Add patch and edit processReleases class to add entries to releases_regexes table

This commit is contained in:
DariusIII
2017-02-14 14:34:23 +01:00
parent 86b54e617d
commit ae19f3a2bd
4 changed files with 24 additions and 0 deletions
+10
View File
@@ -3,6 +3,7 @@ namespace nntmux\processing;
use app\models\MultigroupPosters;
use app\models\ReleasesGroups;
use app\models\ReleasesRegexes;
use app\models\Settings;
use nntmux\Categorize;
use nntmux\Category;
@@ -686,6 +687,15 @@ class ProcessReleases
)
);
// Add the id of regex that matched the collection to releases_regexes table
$releasesRegexes = ReleasesRegexes::create(
[
'releases_id' => $releaseID,
'regex_id' => $collection['collections_regexes_id'],
]
);
$releasesRegexes->save();
if (preg_match_all('#(\S+):\S+#', $collection['xref'], $matches)) {
foreach ($matches[1] as $grp) {
//check if the group name is in a valid format