diff --git a/Classes/Command/MigrateNewsCommandController.php b/Classes/Command/MigrateNewsCommandController.php index 38868bca19c1ae9ba75701c8648463ff44d35e3d..c7623221f4269105bb2961970e5f4bc0c6fd44ec 100644 --- a/Classes/Command/MigrateNewsCommandController.php +++ b/Classes/Command/MigrateNewsCommandController.php @@ -101,6 +101,7 @@ class MigrateNewsCommandController extends CommandController { * @param int $year only news from that year will be migrated * @param string $languageMapAsJson a json, mapping language ids (old => new). this is needed if the sys_language_uids have changed * @param string $categoryMapAsJson a json, mapping sys_category ids (old => new). t + * @param $pId $year only news from that year will be migrated * * @throws IllegalObjectTypeException * @throws UnknownObjectException @@ -109,7 +110,8 @@ class MigrateNewsCommandController extends CommandController { public function runMigrateNewsCommand( $copyPageId, $categoryPid, $year = 2015, $languageMapAsJson = '{"3":1,"1":0,"2":2,"0":3}', - $categoryMapAsJson = '{"2":10,"3":11,"4":12,"5":13,"6":14,"7":15,"8":16,"9":17}' + $categoryMapAsJson = '{"2":10,"3":11,"4":12,"5":13,"6":14,"7":15,"8":16,"9":17}', + $pId = 52 ) { // fix repair translation bug where tsfee is missing from command controller, can be removed when v1.5 is released if (!$GLOBALS['TSFE']) { @@ -124,7 +126,7 @@ class MigrateNewsCommandController extends CommandController { /** @var DatabaseConnection $db */ $db = $GLOBALS['TYPO3_DB']; - $where = 'hidden = 0 and deleted = 0 and endtime = 0 and pid = 52'; + $where = 'hidden = 0 and deleted = 0 and endtime = 0 and pid = ' . (int) $pId; /** @var \mysqli_result $result */ $result = $db->exec_SELECTquery('*', 'tx_news_domain_model_news', $where);