@@ -59,10 +59,10 @@ |
||
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | $fieldId = 'mode'; |
| 62 | - $fieldCode = '<select name="tx_scheduler[mode]" id="' . $fieldId . '" value="' . htmlentities($taskInfo['mode']) . '" class="form-control">' |
|
| 63 | - . '<option value="all"' . ($taskInfo['mode'] == 'all' ? ' selected="selected"' : '') . '>' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/Resources/Private/Language/Backend.xlf:crawler_flush.modeAll') . '</option>' |
|
| 64 | - . '<option value="finished"' . ($taskInfo['mode'] == 'finished' ? ' selected="selected"' : '') . '>' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/Resources/Private/Language/Backend.xlf:crawler_flush.modeFinished') . '</option>' |
|
| 65 | - . '<option value="pending"' . ($taskInfo['mode'] == 'pending' ? ' selected="selected"' : '') . '>' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/Resources/Private/Language/Backend.xlf:crawler_flush.modePending') . '</option>' |
|
| 62 | + $fieldCode = '<select name="tx_scheduler[mode]" id="'.$fieldId.'" value="'.htmlentities($taskInfo['mode']).'" class="form-control">' |
|
| 63 | + . '<option value="all"'.($taskInfo['mode'] == 'all' ? ' selected="selected"' : '').'>'.$GLOBALS['LANG']->sL('LLL:EXT:crawler/Resources/Private/Language/Backend.xlf:crawler_flush.modeAll').'</option>' |
|
| 64 | + . '<option value="finished"'.($taskInfo['mode'] == 'finished' ? ' selected="selected"' : '').'>'.$GLOBALS['LANG']->sL('LLL:EXT:crawler/Resources/Private/Language/Backend.xlf:crawler_flush.modeFinished').'</option>' |
|
| 65 | + . '<option value="pending"'.($taskInfo['mode'] == 'pending' ? ' selected="selected"' : '').'>'.$GLOBALS['LANG']->sL('LLL:EXT:crawler/Resources/Private/Language/Backend.xlf:crawler_flush.modePending').'</option>' |
|
| 66 | 66 | . '</select>'; |
| 67 | 67 | |
| 68 | 68 | $additionalFields[$fieldId] = [ |
@@ -81,21 +81,21 @@ |
||
| 81 | 81 | |
| 82 | 82 | // input for sleepTime |
| 83 | 83 | $fieldId = 'task_sleepTime'; |
| 84 | - $fieldCode = '<input type="text" name="tx_scheduler[sleepTime]" id="' . $fieldId . '" value="' . htmlentities($taskInfo['sleepTime']) . '" class="form-control" />'; |
|
| 84 | + $fieldCode = '<input type="text" name="tx_scheduler[sleepTime]" id="'.$fieldId.'" value="'.htmlentities($taskInfo['sleepTime']).'" class="form-control" />'; |
|
| 85 | 85 | $additionalFields[$fieldId] = [ |
| 86 | 86 | 'code' => $fieldCode, |
| 87 | 87 | 'label' => 'LLL:EXT:crawler/Resources/Private/Language/Backend.xlf:crawler_im.sleepTime' |
| 88 | 88 | ]; |
| 89 | 89 | // input for sleepAfterFinish |
| 90 | 90 | $fieldId = 'task_sleepAfterFinish'; |
| 91 | - $fieldCode = '<input type="text" name="tx_scheduler[sleepAfterFinish]" id="' . $fieldId . '" value="' . htmlentities($taskInfo['sleepAfterFinish']) . '" class="form-control" />'; |
|
| 91 | + $fieldCode = '<input type="text" name="tx_scheduler[sleepAfterFinish]" id="'.$fieldId.'" value="'.htmlentities($taskInfo['sleepAfterFinish']).'" class="form-control" />'; |
|
| 92 | 92 | $additionalFields[$fieldId] = [ |
| 93 | 93 | 'code' => $fieldCode, |
| 94 | 94 | 'label' => 'LLL:EXT:crawler/Resources/Private/Language/Backend.xlf:crawler_im.sleepAfterFinish' |
| 95 | 95 | ]; |
| 96 | 96 | // input for countInARun |
| 97 | 97 | $fieldId = 'task_countInARun'; |
| 98 | - $fieldCode = '<input type="text" name="tx_scheduler[countInARun]" id="' . $fieldId . '" value="' . htmlentities($taskInfo['countInARun']) . '" class="form-control" />'; |
|
| 98 | + $fieldCode = '<input type="text" name="tx_scheduler[countInARun]" id="'.$fieldId.'" value="'.htmlentities($taskInfo['countInARun']).'" class="form-control" />'; |
|
| 99 | 99 | $additionalFields[$fieldId] = [ |
| 100 | 100 | 'code' => $fieldCode, |
| 101 | 101 | 'label' => 'LLL:EXT:crawler/Resources/Private/Language/Backend.xlf:crawler_im.countInARun' |
@@ -61,7 +61,7 @@ |
||
| 61 | 61 | |
| 62 | 62 | // input for timeOut |
| 63 | 63 | $fieldId = 'task_timeOut'; |
| 64 | - $fieldCode = '<input type="text" name="tx_scheduler[timeOut]" id="' . $fieldId . '" value="' . htmlentities($taskInfo['timeOut']) . '" class="form-control" />'; |
|
| 64 | + $fieldCode = '<input type="text" name="tx_scheduler[timeOut]" id="'.$fieldId.'" value="'.htmlentities($taskInfo['timeOut']).'" class="form-control" />'; |
|
| 65 | 65 | $additionalFields[$fieldId] = [ |
| 66 | 66 | 'code' => $fieldCode, |
| 67 | 67 | 'label' => 'LLL:EXT:crawler/Resources/Private/Language/Backend.xlf:crawler_im.timeOut' |
@@ -311,7 +311,7 @@ discard block |
||
| 311 | 311 | /** |
| 312 | 312 | * Returns a tag for the refresh icon |
| 313 | 313 | * |
| 314 | - * @return string |
|
| 314 | + * @return AOE\Crawler\Utility\ButtonUtility |
|
| 315 | 315 | */ |
| 316 | 316 | protected function getRefreshLink() |
| 317 | 317 | { |
@@ -325,7 +325,7 @@ discard block |
||
| 325 | 325 | /** |
| 326 | 326 | * Returns a link for the panel to enable or disable the crawler |
| 327 | 327 | * |
| 328 | - * @return string |
|
| 328 | + * @return AOE\Crawler\Utility\ButtonUtility |
|
| 329 | 329 | */ |
| 330 | 330 | protected function getEnableDisableLink() |
| 331 | 331 | { |
@@ -351,7 +351,7 @@ discard block |
||
| 351 | 351 | * |
| 352 | 352 | * @param void |
| 353 | 353 | * |
| 354 | - * @return string a-tag |
|
| 354 | + * @return AOE\Crawler\Utility\ButtonUtility|null a-tag |
|
| 355 | 355 | */ |
| 356 | 356 | protected function getModeLink() |
| 357 | 357 | { |
@@ -318,7 +318,7 @@ |
||
| 318 | 318 | return \AOE\Crawler\Utility\ButtonUtility::getLinkButton( |
| 319 | 319 | 'actions-refresh', |
| 320 | 320 | $this->getLLLabel('LLL:EXT:crawler/modfunc1/locallang.xml:labels.refresh'), |
| 321 | - 'window.location=\'' . \TYPO3\CMS\Backend\Utility\BackendUtility::getModuleUrl('web_info') . '&SET[crawlaction]=multiprocess&id=' . $this->pageId . '\';' |
|
| 321 | + 'window.location=\''.\TYPO3\CMS\Backend\Utility\BackendUtility::getModuleUrl('web_info').'&SET[crawlaction]=multiprocess&id='.$this->pageId.'\';' |
|
| 322 | 322 | ); |
| 323 | 323 | } |
| 324 | 324 | |
@@ -50,8 +50,8 @@ discard block |
||
| 50 | 50 | */ |
| 51 | 51 | public function offsetGet($index) |
| 52 | 52 | { |
| 53 | - if (! parent::offsetExists($index)) { |
|
| 54 | - throw new Exception('Index "' . var_export($index, true) . '" for tx_crawler_domain_process are not available'); |
|
| 53 | + if (!parent::offsetExists($index)) { |
|
| 54 | + throw new Exception('Index "'.var_export($index, true).'" for tx_crawler_domain_process are not available'); |
|
| 55 | 55 | } |
| 56 | 56 | return parent::offsetGet($index); |
| 57 | 57 | } |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | */ |
| 67 | 67 | public function offsetSet($index, $subject) |
| 68 | 68 | { |
| 69 | - if (! $subject instanceof tx_crawler_domain_process) { |
|
| 69 | + if (!$subject instanceof tx_crawler_domain_process) { |
|
| 70 | 70 | throw new InvalidArgumentException('Wrong parameter type given, "tx_crawler_domain_process" expected!'); |
| 71 | 71 | } |
| 72 | 72 | parent::offsetSet($index, $subject); |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | */ |
| 81 | 81 | public function append($subject) |
| 82 | 82 | { |
| 83 | - if (! $subject instanceof tx_crawler_domain_process) { |
|
| 83 | + if (!$subject instanceof tx_crawler_domain_process) { |
|
| 84 | 84 | throw new InvalidArgumentException('Wrong parameter type given, "tx_crawler_domain_process" expected!'); |
| 85 | 85 | } |
| 86 | 86 | parent::append($subject); |
@@ -12,12 +12,12 @@ discard block |
||
| 12 | 12 | if (!isAbsPath($tempPathThisScript)) { |
| 13 | 13 | $workingDirectory = $_SERVER['PWD'] ? $_SERVER['PWD'] : getcwd(); |
| 14 | 14 | if ($workingDirectory) { |
| 15 | - $tempPathThisScript = $workingDirectory . '/' . preg_replace('/\.\//', '', $tempPathThisScript); |
|
| 15 | + $tempPathThisScript = $workingDirectory.'/'.preg_replace('/\.\//', '', $tempPathThisScript); |
|
| 16 | 16 | if (!@is_file($tempPathThisScript)) { |
| 17 | - die('Relative path found, but an error occured during resolving of the absolute path: ' . $tempPathThisScript . PHP_EOL); |
|
| 17 | + die('Relative path found, but an error occured during resolving of the absolute path: '.$tempPathThisScript.PHP_EOL); |
|
| 18 | 18 | } |
| 19 | 19 | } else { |
| 20 | - die('Relative path found, but resolving absolute path is not supported on this platform.' . PHP_EOL); |
|
| 20 | + die('Relative path found, but resolving absolute path is not supported on this platform.'.PHP_EOL); |
|
| 21 | 21 | } |
| 22 | 22 | } |
| 23 | 23 | |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | list($key, $value) = explode(':', $additionalHeader, 2); |
| 34 | 34 | $key = str_replace('-', '_', strtoupper(trim($key))); |
| 35 | 35 | if ($key != 'HOST') { |
| 36 | - $_SERVER['HTTP_' . $key] = $value; |
|
| 36 | + $_SERVER['HTTP_'.$key] = $value; |
|
| 37 | 37 | } |
| 38 | 38 | } |
| 39 | 39 | } |
@@ -54,18 +54,18 @@ discard block |
||
| 54 | 54 | $typo3SitePath = $_SERVER['argv'][1]; |
| 55 | 55 | |
| 56 | 56 | // faking the environment |
| 57 | -$_SERVER['DOCUMENT_ROOT'] = preg_replace('#' . preg_quote($typo3SitePath, '#') . '$#', '', $typo3Root); |
|
| 57 | +$_SERVER['DOCUMENT_ROOT'] = preg_replace('#'.preg_quote($typo3SitePath, '#').'$#', '', $typo3Root); |
|
| 58 | 58 | $_SERVER['HTTP_USER_AGENT'] = 'CLI Mode'; |
| 59 | 59 | $_SERVER['HTTP_HOST'] = $_SERVER['SERVER_NAME'] = $urlParts['host']; |
| 60 | -$_SERVER['SCRIPT_NAME'] = $_SERVER['PHP_SELF'] = $typo3SitePath . 'index.php'; |
|
| 61 | -$_SERVER['SCRIPT_FILENAME'] = $_SERVER['PATH_TRANSLATED'] = $typo3Root . 'index.php'; |
|
| 60 | +$_SERVER['SCRIPT_NAME'] = $_SERVER['PHP_SELF'] = $typo3SitePath.'index.php'; |
|
| 61 | +$_SERVER['SCRIPT_FILENAME'] = $_SERVER['PATH_TRANSLATED'] = $typo3Root.'index.php'; |
|
| 62 | 62 | $_SERVER['QUERY_STRING'] = (isset($urlParts['query']) ? $urlParts['query'] : ''); |
| 63 | -$_SERVER['REQUEST_URI'] = $urlParts['path'] . (isset($urlParts['query']) ? '?' . $urlParts['query'] : ''); |
|
| 63 | +$_SERVER['REQUEST_URI'] = $urlParts['path'].(isset($urlParts['query']) ? '?'.$urlParts['query'] : ''); |
|
| 64 | 64 | $_SERVER['REQUEST_METHOD'] = 'GET'; |
| 65 | 65 | |
| 66 | 66 | // Define a port if used in the URL: |
| 67 | 67 | if (isset($urlParts['port'])) { |
| 68 | - $_SERVER['HTTP_HOST'] .= ':' . $urlParts['port']; |
|
| 68 | + $_SERVER['HTTP_HOST'] .= ':'.$urlParts['port']; |
|
| 69 | 69 | $_SERVER['SERVER_PORT'] = $urlParts['port']; |
| 70 | 70 | } |
| 71 | 71 | |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | chdir($typo3Root); |
| 78 | -include($typo3Root . '/index.php'); |
|
| 78 | +include($typo3Root.'/index.php'); |
|
| 79 | 79 | |
| 80 | 80 | /** |
| 81 | 81 | * Checks if the $path is absolute or relative (detecting either '/' or 'x:/' as first part of string) and returns TRUE if so. |
@@ -45,36 +45,36 @@ |
||
| 45 | 45 | { |
| 46 | 46 | $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['AOE\\Crawler\\Task\\CrawlerQueueTask'] = [ |
| 47 | 47 | 'extension' => $extKey, |
| 48 | - 'title' => 'LLL:EXT:' . $extKey . '/Resources/Private/Language/Backend.xlf:crawler_im.name', |
|
| 49 | - 'description' => 'LLL:EXT:' . $extKey . '/Resources/Private/Language/Backend.xlf:crawler_im.description', |
|
| 48 | + 'title' => 'LLL:EXT:'.$extKey.'/Resources/Private/Language/Backend.xlf:crawler_im.name', |
|
| 49 | + 'description' => 'LLL:EXT:'.$extKey.'/Resources/Private/Language/Backend.xlf:crawler_im.description', |
|
| 50 | 50 | 'additionalFields' => CrawlerQueueTaskAdditionalFieldProvider::class |
| 51 | 51 | ]; |
| 52 | 52 | |
| 53 | 53 | $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['AOE\\Crawler\\Task\\CrawlerTask'] = [ |
| 54 | 54 | 'extension' => $extKey, |
| 55 | - 'title' => 'LLL:EXT:' . $extKey . '/Resources/Private/Language/Backend.xlf:crawler_crawl.name', |
|
| 56 | - 'description' => 'LLL:EXT:' . $extKey . '/Resources/Private/Language/Backend.xlf:crawler_crawl.description', |
|
| 55 | + 'title' => 'LLL:EXT:'.$extKey.'/Resources/Private/Language/Backend.xlf:crawler_crawl.name', |
|
| 56 | + 'description' => 'LLL:EXT:'.$extKey.'/Resources/Private/Language/Backend.xlf:crawler_crawl.description', |
|
| 57 | 57 | 'additionalFields' => CrawlerTaskAdditionalFieldProvider::class |
| 58 | 58 | ]; |
| 59 | 59 | |
| 60 | 60 | $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['AOE\\Crawler\\Task\\CrawlMultiProcessTask'] = [ |
| 61 | 61 | 'extension' => $extKey, |
| 62 | - 'title' => 'LLL:EXT:' . $extKey . '/Resources/Private/Language/Backend.xlf:crawler_crawlMultiProcess.name', |
|
| 63 | - 'description' => 'LLL:EXT:' . $extKey . '/Resources/Private/Language/Backend.xlf:crawler_crawl.description', |
|
| 62 | + 'title' => 'LLL:EXT:'.$extKey.'/Resources/Private/Language/Backend.xlf:crawler_crawlMultiProcess.name', |
|
| 63 | + 'description' => 'LLL:EXT:'.$extKey.'/Resources/Private/Language/Backend.xlf:crawler_crawl.description', |
|
| 64 | 64 | 'additionalFields' => CrawlMultiProcessTaskAdditionalFieldProvider::class |
| 65 | 65 | ]; |
| 66 | 66 | |
| 67 | 67 | $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['AOE\\Crawler\\Task\\FlushQueueTask'] = [ |
| 68 | 68 | 'extension' => $extKey, |
| 69 | - 'title' => 'LLL:EXT:' . $extKey . '/Resources/Private/Language/Backend.xlf:crawler_flush.name', |
|
| 70 | - 'description' => 'LLL:EXT:' . $extKey . '/Resources/Private/Language/Backend.xlf:crawler_flush.description', |
|
| 69 | + 'title' => 'LLL:EXT:'.$extKey.'/Resources/Private/Language/Backend.xlf:crawler_flush.name', |
|
| 70 | + 'description' => 'LLL:EXT:'.$extKey.'/Resources/Private/Language/Backend.xlf:crawler_flush.description', |
|
| 71 | 71 | 'additionalFields' => FlushQueueTaskAdditionalFieldProvider::class |
| 72 | 72 | ]; |
| 73 | 73 | |
| 74 | 74 | $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['AOE\\Crawler\\Task\\ProcessCleanupTask'] = [ |
| 75 | 75 | 'extension' => $extKey, |
| 76 | - 'title' => 'LLL:EXT:' . $extKey . '/Resources/Private/Language/Backend.xlf:crawler_processCleanup.name', |
|
| 77 | - 'description' => 'LLL:EXT:' . $extKey . '/Resources/Private/Language/Backend.xlf:crawler_processCleanup.description', |
|
| 76 | + 'title' => 'LLL:EXT:'.$extKey.'/Resources/Private/Language/Backend.xlf:crawler_processCleanup.name', |
|
| 77 | + 'description' => 'LLL:EXT:'.$extKey.'/Resources/Private/Language/Backend.xlf:crawler_processCleanup.description', |
|
| 78 | 78 | ]; |
| 79 | 79 | } |
| 80 | 80 | } |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | $this->startPage = 0; |
| 85 | 85 | } |
| 86 | 86 | |
| 87 | - $_SERVER['argv'] = [$_SERVER['argv'][0], $this->startPage,'-ss', '-d', $this->depth, '-o', self::MODE, '-conf', implode(',', $this->configuration)]; |
|
| 87 | + $_SERVER['argv'] = [$_SERVER['argv'][0], $this->startPage, '-ss', '-d', $this->depth, '-o', self::MODE, '-conf', implode(',', $this->configuration)]; |
|
| 88 | 88 | } |
| 89 | 89 | |
| 90 | 90 | /** |
@@ -100,6 +100,6 @@ discard block |
||
| 100 | 100 | $this->startPage = 0; |
| 101 | 101 | } |
| 102 | 102 | |
| 103 | - return implode(',', $this->configuration) . ' (depth: ' . $this->depth . ', startPage:' . $this->startPage . ')'; |
|
| 103 | + return implode(',', $this->configuration).' (depth: '.$this->depth.', startPage:'.$this->startPage.')'; |
|
| 104 | 104 | } |
| 105 | 105 | } |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | $additionalParameters = []; |
| 68 | 68 | $additionalParameters[] = 'SET[function]=tx_crawler_modfunc1'; |
| 69 | 69 | $additionalParameters[] = 'SET[crawlaction]=start'; |
| 70 | - $additionalParameters[] = 'configurationSelection[]=' . $crawlerConfiguration['name']; |
|
| 70 | + $additionalParameters[] = 'configurationSelection[]='.$crawlerConfiguration['name']; |
|
| 71 | 71 | |
| 72 | 72 | $additionalMenuItems = []; |
| 73 | 73 | $additionalMenuItems[] = $backRef->linkItem( |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | 'crawler' |
| 77 | 77 | ), |
| 78 | 78 | $this->getContextMenuIcon(), |
| 79 | - 'top.goToModule(\'web_info\', 1, \'&' . implode('&', $additionalParameters) . '\'); return hideCM();' |
|
| 79 | + 'top.goToModule(\'web_info\', 1, \'&'.implode('&', $additionalParameters).'\'); return hideCM();' |
|
| 80 | 80 | ); |
| 81 | 81 | |
| 82 | 82 | return array_merge($menuItems, $additionalMenuItems); |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | { |
| 92 | 92 | $icon = sprintf( |
| 93 | 93 | '<img src="%s" border="0" align="top" alt="" />', |
| 94 | - ExtensionManagementUtility::extRelPath('crawler') . 'Resources/Private/Icons/icon_tx_crawler_configuration.gif' |
|
| 94 | + ExtensionManagementUtility::extRelPath('crawler').'Resources/Private/Icons/icon_tx_crawler_configuration.gif' |
|
| 95 | 95 | ); |
| 96 | 96 | |
| 97 | 97 | return $icon; |