@@ -1,16 +1,16 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | $extensionPath = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('crawler'); |
| 3 | 3 | return [ |
| 4 | - 'tx_crawler_lib' => $extensionPath . 'class.tx_crawler_lib.php', |
|
| 5 | - 'tx_crawler_cli_flush' => $extensionPath . 'cli/class.tx_crawler_cli_flush.php', |
|
| 6 | - 'tx_crawler_cli' => $extensionPath . 'cli/class.tx_crawler_cli.php', |
|
| 7 | - 'tx_crawler_cli_im' => $extensionPath . 'cli/class.tx_crawler_cli_im.php', |
|
| 8 | - 'tx_crawler_domain_events_dispatcher' => $extensionPath . 'domain/events/class.tx_crawler_domain_events_dispatcher.php', |
|
| 9 | - 'tx_crawler_domain_events_observer' => $extensionPath . 'domain/events/interface.tx_crawler_domain_events_observer.php', |
|
| 10 | - 'tx_crawler_domain_process_manager' => $extensionPath . 'domain/process/class.tx_crawler_domain_process_manager.php', |
|
| 11 | - 'tx_crawler_domain_process_collection' => $extensionPath . 'domain/process/class.tx_crawler_domain_process_collection.php', |
|
| 12 | - 'tx_crawler_domain_process_repository' => $extensionPath . 'domain/process/class.tx_crawler_domain_process_repository.php', |
|
| 13 | - 'tx_crawler_modfunc1' => $extensionPath . 'modfunc1/class.tx_crawler_modfunc1.php', |
|
| 14 | - 'tx_crawler_view_pagination' => $extensionPath . 'view/class.tx_crawler_view_pagination.php', |
|
| 15 | - 'tx_crawler_view_process_list' => $extensionPath . 'view/process/class.tx_crawler_view_process_list.php', |
|
| 4 | + 'tx_crawler_lib' => $extensionPath.'class.tx_crawler_lib.php', |
|
| 5 | + 'tx_crawler_cli_flush' => $extensionPath.'cli/class.tx_crawler_cli_flush.php', |
|
| 6 | + 'tx_crawler_cli' => $extensionPath.'cli/class.tx_crawler_cli.php', |
|
| 7 | + 'tx_crawler_cli_im' => $extensionPath.'cli/class.tx_crawler_cli_im.php', |
|
| 8 | + 'tx_crawler_domain_events_dispatcher' => $extensionPath.'domain/events/class.tx_crawler_domain_events_dispatcher.php', |
|
| 9 | + 'tx_crawler_domain_events_observer' => $extensionPath.'domain/events/interface.tx_crawler_domain_events_observer.php', |
|
| 10 | + 'tx_crawler_domain_process_manager' => $extensionPath.'domain/process/class.tx_crawler_domain_process_manager.php', |
|
| 11 | + 'tx_crawler_domain_process_collection' => $extensionPath.'domain/process/class.tx_crawler_domain_process_collection.php', |
|
| 12 | + 'tx_crawler_domain_process_repository' => $extensionPath.'domain/process/class.tx_crawler_domain_process_repository.php', |
|
| 13 | + 'tx_crawler_modfunc1' => $extensionPath.'modfunc1/class.tx_crawler_modfunc1.php', |
|
| 14 | + 'tx_crawler_view_pagination' => $extensionPath.'view/class.tx_crawler_view_pagination.php', |
|
| 15 | + 'tx_crawler_view_process_list' => $extensionPath.'view/process/class.tx_crawler_view_process_list.php', |
|
| 16 | 16 | ]; |
@@ -166,7 +166,7 @@ discard block |
||
| 166 | 166 | white-space: nowrap; vertical-align: top; |
| 167 | 167 | } |
| 168 | 168 | --></style> |
| 169 | - <link rel="stylesheet" type="text/css" href="' . $BACK_PATH . '../typo3conf/ext/crawler/template/res.css" /> |
|
| 169 | + <link rel="stylesheet" type="text/css" href="' . $BACK_PATH.'../typo3conf/ext/crawler/template/res.css" /> |
|
| 170 | 170 | '; |
| 171 | 171 | |
| 172 | 172 | // Type function menu: |
@@ -201,15 +201,15 @@ discard block |
||
| 201 | 201 | 'index.php' |
| 202 | 202 | ); |
| 203 | 203 | |
| 204 | - $quiPart = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('qid_details') ? '&qid_details=' . intval(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('qid_details')) : ''; |
|
| 204 | + $quiPart = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('qid_details') ? '&qid_details='.intval(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('qid_details')) : ''; |
|
| 205 | 205 | |
| 206 | 206 | $setId = intval(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('setID')); |
| 207 | 207 | |
| 208 | - $h_func .= '<hr/>' . |
|
| 209 | - $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.display') . ': ' . \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncMenu($this->pObj->id, 'SET[log_display]', $this->pObj->MOD_SETTINGS['log_display'], $this->pObj->MOD_MENU['log_display'], 'index.php', '&setID=' . $setId) . ' - ' . |
|
| 210 | - $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.showresultlog') . ': ' . \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncCheck($this->pObj->id, 'SET[log_resultLog]', $this->pObj->MOD_SETTINGS['log_resultLog'], 'index.php', '&setID=' . $setId . $quiPart) . ' - ' . |
|
| 211 | - $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.showfevars') . ': ' . \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncCheck($this->pObj->id, 'SET[log_feVars]', $this->pObj->MOD_SETTINGS['log_feVars'], 'index.php', '&setID=' . $setId . $quiPart) . ' - ' . |
|
| 212 | - $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.itemsPerPage') . ': ' . |
|
| 208 | + $h_func .= '<hr/>'. |
|
| 209 | + $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.display').': '.\TYPO3\CMS\Backend\Utility\BackendUtility::getFuncMenu($this->pObj->id, 'SET[log_display]', $this->pObj->MOD_SETTINGS['log_display'], $this->pObj->MOD_MENU['log_display'], 'index.php', '&setID='.$setId).' - '. |
|
| 210 | + $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.showresultlog').': '.\TYPO3\CMS\Backend\Utility\BackendUtility::getFuncCheck($this->pObj->id, 'SET[log_resultLog]', $this->pObj->MOD_SETTINGS['log_resultLog'], 'index.php', '&setID='.$setId.$quiPart).' - '. |
|
| 211 | + $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.showfevars').': '.\TYPO3\CMS\Backend\Utility\BackendUtility::getFuncCheck($this->pObj->id, 'SET[log_feVars]', $this->pObj->MOD_SETTINGS['log_feVars'], 'index.php', '&setID='.$setId.$quiPart).' - '. |
|
| 212 | + $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.itemsPerPage').': '. |
|
| 213 | 213 | \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncMenu( |
| 214 | 214 | $this->pObj->id, |
| 215 | 215 | 'SET[itemsPerPage]', |
@@ -222,7 +222,7 @@ discard block |
||
| 222 | 222 | $theOutput = $this->pObj->doc->section($LANG->getLL('title'), $h_func, 0, 1); |
| 223 | 223 | |
| 224 | 224 | // Branch based on type: |
| 225 | - switch ((string)$this->pObj->MOD_SETTINGS['crawlaction']) { |
|
| 225 | + switch ((string) $this->pObj->MOD_SETTINGS['crawlaction']) { |
|
| 226 | 226 | case 'start': |
| 227 | 227 | if (empty($this->pObj->id)) { |
| 228 | 228 | $this->addErrorMessage($GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.noPageSelected')); |
@@ -269,7 +269,7 @@ discard block |
||
| 269 | 269 | $this->downloadCrawlUrls = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('_download'); |
| 270 | 270 | $this->makeCrawlerProcessableChecks(); |
| 271 | 271 | |
| 272 | - switch ((string)\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('tstamp')) { |
|
| 272 | + switch ((string) \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('tstamp')) { |
|
| 273 | 273 | case 'midnight': |
| 274 | 274 | $this->scheduledTime = mktime(0, 0, 0); |
| 275 | 275 | break; |
@@ -297,7 +297,7 @@ discard block |
||
| 297 | 297 | ) { |
| 298 | 298 | $code = ' |
| 299 | 299 | <tr> |
| 300 | - <td colspan="7"><b>' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.noConfigSelected') . '</b></td> |
|
| 300 | + <td colspan="7"><b>' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.noConfigSelected').'</b></td> |
|
| 301 | 301 | </tr>'; |
| 302 | 302 | } else { |
| 303 | 303 | if ($this->submitCrawlUrls) { |
@@ -307,7 +307,7 @@ discard block |
||
| 307 | 307 | if ($BE_USER instanceof \TYPO3\CMS\Core\Authentication\BackendUserAuthentication) { |
| 308 | 308 | $username = $BE_USER->user['username']; |
| 309 | 309 | } |
| 310 | - $reason->setDetailText('The user ' . $username . ' added pages to the crawler queue manually '); |
|
| 310 | + $reason->setDetailText('The user '.$username.' added pages to the crawler queue manually '); |
|
| 311 | 311 | |
| 312 | 312 | tx_crawler_domain_events_dispatcher::getInstance()->post( |
| 313 | 313 | 'invokeQueueChange', |
@@ -333,25 +333,25 @@ discard block |
||
| 333 | 333 | |
| 334 | 334 | $output = ''; |
| 335 | 335 | if ($code) { |
| 336 | - $output .= '<h3>' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.configuration') . ':</h3>'; |
|
| 337 | - $output .= '<input type="hidden" name="id" value="' . intval($this->pObj->id) . '" />'; |
|
| 336 | + $output .= '<h3>'.$GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.configuration').':</h3>'; |
|
| 337 | + $output .= '<input type="hidden" name="id" value="'.intval($this->pObj->id).'" />'; |
|
| 338 | 338 | |
| 339 | 339 | if (!$this->submitCrawlUrls) { |
| 340 | - $output .= $this->drawURLs_cfgSelectors() . '<br />'; |
|
| 341 | - $output .= '<input type="submit" name="_update" value="' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.triggerUpdate') . '" /> '; |
|
| 342 | - $output .= '<input type="submit" name="_crawl" value="' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.triggerCrawl') . '" /> '; |
|
| 343 | - $output .= '<input type="submit" name="_download" value="' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.triggerDownload') . '" /><br /><br />'; |
|
| 344 | - $output .= $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.count') . ': ' . count(array_keys($this->duplicateTrack)) . '<br />'; |
|
| 345 | - $output .= $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.curtime') . ': ' . date('H:i:s', time()) . '<br />'; |
|
| 340 | + $output .= $this->drawURLs_cfgSelectors().'<br />'; |
|
| 341 | + $output .= '<input type="submit" name="_update" value="'.$GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.triggerUpdate').'" /> '; |
|
| 342 | + $output .= '<input type="submit" name="_crawl" value="'.$GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.triggerCrawl').'" /> '; |
|
| 343 | + $output .= '<input type="submit" name="_download" value="'.$GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.triggerDownload').'" /><br /><br />'; |
|
| 344 | + $output .= $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.count').': '.count(array_keys($this->duplicateTrack)).'<br />'; |
|
| 345 | + $output .= $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.curtime').': '.date('H:i:s', time()).'<br />'; |
|
| 346 | 346 | $output .= '<br /> |
| 347 | 347 | <table class="lrPadding c-list url-table">' . |
| 348 | - $this->drawURLs_printTableHeader() . |
|
| 349 | - $code . |
|
| 348 | + $this->drawURLs_printTableHeader(). |
|
| 349 | + $code. |
|
| 350 | 350 | '</table>'; |
| 351 | 351 | } else { |
| 352 | - $output .= count(array_keys($this->duplicateTrack)) . ' ' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.submitted') . '. <br /><br />'; |
|
| 353 | - $output .= '<input type="submit" name="_" value="' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.continue') . '" />'; |
|
| 354 | - $output .= '<input type="submit" onclick="this.form.elements[\'SET[crawlaction]\'].value=\'log\';" value="' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.continueinlog') . '" />'; |
|
| 352 | + $output .= count(array_keys($this->duplicateTrack)).' '.$GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.submitted').'. <br /><br />'; |
|
| 353 | + $output .= '<input type="submit" name="_" value="'.$GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.continue').'" />'; |
|
| 354 | + $output .= '<input type="submit" onclick="this.form.elements[\'SET[crawlaction]\'].value=\'log\';" value="'.$GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.continueinlog').'" />'; |
|
| 355 | 355 | } |
| 356 | 356 | } |
| 357 | 357 | |
@@ -360,11 +360,11 @@ discard block |
||
| 360 | 360 | |
| 361 | 361 | // Creating output header: |
| 362 | 362 | $mimeType = 'application/octet-stream'; |
| 363 | - Header('Content-Type: ' . $mimeType); |
|
| 363 | + Header('Content-Type: '.$mimeType); |
|
| 364 | 364 | Header('Content-Disposition: attachment; filename=CrawlerUrls.txt'); |
| 365 | 365 | |
| 366 | 366 | // Printing the content of the CSV lines: |
| 367 | - echo implode(chr(13) . chr(10), $this->downloadUrls); |
|
| 367 | + echo implode(chr(13).chr(10), $this->downloadUrls); |
|
| 368 | 368 | |
| 369 | 369 | // Exits: |
| 370 | 370 | exit; |
@@ -443,13 +443,13 @@ discard block |
||
| 443 | 443 | $output = ' |
| 444 | 444 | <table class="lrPadding c-list"> |
| 445 | 445 | <tr class="bgColor5 tableheader"> |
| 446 | - <td>' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.depth') . ':</td> |
|
| 447 | - <td>' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.configurations') . ':</td> |
|
| 448 | - <td>' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.scheduled') . ':</td> |
|
| 446 | + <td>' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.depth').':</td> |
|
| 447 | + <td>' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.configurations').':</td> |
|
| 448 | + <td>' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.scheduled').':</td> |
|
| 449 | 449 | </tr> |
| 450 | 450 | <tr class="bgColor4"> |
| 451 | 451 | <td valign="top">' . implode('</td> |
| 452 | - <td valign="top">', $cell) . '</td> |
|
| 452 | + <td valign="top">', $cell).'</td> |
|
| 453 | 453 | </tr> |
| 454 | 454 | </table>'; |
| 455 | 455 | |
@@ -465,13 +465,13 @@ discard block |
||
| 465 | 465 | { |
| 466 | 466 | $content = ' |
| 467 | 467 | <tr class="bgColor5 tableheader"> |
| 468 | - <td>' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.pagetitle') . ':</td> |
|
| 469 | - <td>' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.key') . ':</td> |
|
| 470 | - <td>' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.parametercfg') . ':</td> |
|
| 471 | - <td>' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.values') . ':</td> |
|
| 472 | - <td>' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.urls') . ':</td> |
|
| 473 | - <td>' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.options') . ':</td> |
|
| 474 | - <td>' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.parameters') . ':</td> |
|
| 468 | + <td>' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.pagetitle').':</td> |
|
| 469 | + <td>' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.key').':</td> |
|
| 470 | + <td>' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.parametercfg').':</td> |
|
| 471 | + <td>' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.values').':</td> |
|
| 472 | + <td>' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.urls').':</td> |
|
| 473 | + <td>' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.options').':</td> |
|
| 474 | + <td>' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.parameters').':</td> |
|
| 475 | 475 | </tr>'; |
| 476 | 476 | |
| 477 | 477 | return $content; |
@@ -512,7 +512,7 @@ discard block |
||
| 512 | 512 | if (\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('qid_details')) { |
| 513 | 513 | |
| 514 | 514 | // Get entry record: |
| 515 | - list($q_entry) = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', 'tx_crawler_queue', 'qid=' . intval(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('qid_details'))); |
|
| 515 | + list($q_entry) = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', 'tx_crawler_queue', 'qid='.intval(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('qid_details'))); |
|
| 516 | 516 | |
| 517 | 517 | // Explode values: |
| 518 | 518 | $resStatus = $this->getResStatus($q_entry); |
@@ -529,12 +529,12 @@ discard block |
||
| 529 | 529 | // Print rudimentary details: |
| 530 | 530 | $output .= ' |
| 531 | 531 | <br /><br /> |
| 532 | - <input type="submit" value="' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.back') . '" name="_back" /> |
|
| 533 | - <input type="hidden" value="' . $this->pObj->id . '" name="id" /> |
|
| 534 | - <input type="hidden" value="' . $showSetId . '" name="setID" /> |
|
| 532 | + <input type="submit" value="' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.back').'" name="_back" /> |
|
| 533 | + <input type="hidden" value="' . $this->pObj->id.'" name="id" /> |
|
| 534 | + <input type="hidden" value="' . $showSetId.'" name="setID" /> |
|
| 535 | 535 | <br /> |
| 536 | - Current server time: ' . date('H:i:s', time()) . '<br />' . |
|
| 537 | - 'Status: ' . $resStatus . '<br />' . |
|
| 536 | + Current server time: ' . date('H:i:s', time()).'<br />'. |
|
| 537 | + 'Status: '.$resStatus.'<br />'. |
|
| 538 | 538 | \TYPO3\CMS\Core\Utility\DebugUtility::viewArray($q_entry); |
| 539 | 539 | } else { // Show list: |
| 540 | 540 | |
@@ -544,7 +544,7 @@ discard block |
||
| 544 | 544 | // Drawing tree: |
| 545 | 545 | $tree = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\CMS\Backend\Tree\View\PageTreeView'); |
| 546 | 546 | $perms_clause = $GLOBALS['BE_USER']->getPagePermsClause(1); |
| 547 | - $tree->init('AND ' . $perms_clause); |
|
| 547 | + $tree->init('AND '.$perms_clause); |
|
| 548 | 548 | |
| 549 | 549 | // Set root row: |
| 550 | 550 | $HTML = \AOE\Crawler\Utility\IconUtility::getIconForRecord('pages', $this->pObj->pageinfo); |
@@ -564,7 +564,7 @@ discard block |
||
| 564 | 564 | foreach ($tree->tree as $data) { |
| 565 | 565 | $code .= $this->drawLog_addRows( |
| 566 | 566 | $data['row'], |
| 567 | - $data['HTML'] . \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordTitle('pages', $data['row'], true), |
|
| 567 | + $data['HTML'].\TYPO3\CMS\Backend\Utility\BackendUtility::getRecordTitle('pages', $data['row'], true), |
|
| 568 | 568 | intval($this->pObj->MOD_SETTINGS['itemsPerPage']) |
| 569 | 569 | ); |
| 570 | 570 | if (++$count == 1000) { |
@@ -575,27 +575,27 @@ discard block |
||
| 575 | 575 | $code = ''; |
| 576 | 576 | $code .= $this->drawLog_addRows( |
| 577 | 577 | $showSetId, |
| 578 | - 'Set ID: ' . $showSetId |
|
| 578 | + 'Set ID: '.$showSetId |
|
| 579 | 579 | ); |
| 580 | 580 | } |
| 581 | 581 | |
| 582 | 582 | if ($code) { |
| 583 | 583 | $output .= ' |
| 584 | 584 | <br /><br /> |
| 585 | - <input type="submit" value="' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.reloadlist') . '" name="_reload" /> |
|
| 586 | - <input type="submit" value="' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.downloadcsv') . '" name="_csv" /> |
|
| 587 | - <input type="submit" value="' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.flushvisiblequeue') . '" name="_flush" onclick="return confirm(\'' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.confirmyouresure') . '\');" /> |
|
| 588 | - <input type="submit" value="' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.flushfullqueue') . '" name="_flush_all" onclick="return confirm(\'' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.confirmyouresure') . '\');" /> |
|
| 589 | - <input type="hidden" value="' . $this->pObj->id . '" name="id" /> |
|
| 590 | - <input type="hidden" value="' . $showSetId . '" name="setID" /> |
|
| 585 | + <input type="submit" value="' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.reloadlist').'" name="_reload" /> |
|
| 586 | + <input type="submit" value="' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.downloadcsv').'" name="_csv" /> |
|
| 587 | + <input type="submit" value="' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.flushvisiblequeue').'" name="_flush" onclick="return confirm(\''.$GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.confirmyouresure').'\');" /> |
|
| 588 | + <input type="submit" value="' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.flushfullqueue').'" name="_flush_all" onclick="return confirm(\''.$GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.confirmyouresure').'\');" /> |
|
| 589 | + <input type="hidden" value="' . $this->pObj->id.'" name="id" /> |
|
| 590 | + <input type="hidden" value="' . $showSetId.'" name="setID" /> |
|
| 591 | 591 | <br /> |
| 592 | - ' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.curtime') . ': ' . date('H:i:s', time()) . ' |
|
| 592 | + ' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.curtime').': '.date('H:i:s', time()).' |
|
| 593 | 593 | <br /><br /> |
| 594 | 594 | |
| 595 | 595 | |
| 596 | 596 | <table class="lrPadding c-list crawlerlog">' . |
| 597 | - $this->drawLog_printTableHeader() . |
|
| 598 | - $code . |
|
| 597 | + $this->drawLog_printTableHeader(). |
|
| 598 | + $code. |
|
| 599 | 599 | '</table>'; |
| 600 | 600 | } |
| 601 | 601 | } else { // Otherwise show available sets: |
@@ -609,19 +609,19 @@ discard block |
||
| 609 | 609 | |
| 610 | 610 | $code = ' |
| 611 | 611 | <tr class="bgColor5 tableheader"> |
| 612 | - <td>' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.setid') . ':</td> |
|
| 613 | - <td>' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.count') . 't:</td> |
|
| 614 | - <td>' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.time') . ':</td> |
|
| 612 | + <td>' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.setid').':</td> |
|
| 613 | + <td>' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.count').'t:</td> |
|
| 614 | + <td>' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.time').':</td> |
|
| 615 | 615 | </tr> |
| 616 | 616 | '; |
| 617 | 617 | |
| 618 | 618 | $cc = 0; |
| 619 | 619 | foreach ($setList as $set) { |
| 620 | 620 | $code .= ' |
| 621 | - <tr class="bgColor' . ($cc % 2 ? '-20' : '-10') . '"> |
|
| 622 | - <td><a href="' . htmlspecialchars('index.php?setID=' . $set['set_id']) . '">' . $set['set_id'] . '</a></td> |
|
| 623 | - <td>' . $set['count_value'] . '</td> |
|
| 624 | - <td>' . \TYPO3\CMS\Backend\Utility\BackendUtility::dateTimeAge($set['scheduled']) . '</td> |
|
| 621 | + <tr class="bgColor' . ($cc % 2 ? '-20' : '-10').'"> |
|
| 622 | + <td><a href="' . htmlspecialchars('index.php?setID='.$set['set_id']).'">'.$set['set_id'].'</a></td> |
|
| 623 | + <td>' . $set['count_value'].'</td> |
|
| 624 | + <td>' . \TYPO3\CMS\Backend\Utility\BackendUtility::dateTimeAge($set['scheduled']).'</td> |
|
| 625 | 625 | </tr> |
| 626 | 626 | '; |
| 627 | 627 | |
@@ -631,7 +631,7 @@ discard block |
||
| 631 | 631 | $output .= ' |
| 632 | 632 | <br /><br /> |
| 633 | 633 | <table class="lrPadding c-list">' . |
| 634 | - $code . |
|
| 634 | + $code. |
|
| 635 | 635 | '</table>'; |
| 636 | 636 | } |
| 637 | 637 | } |
@@ -668,11 +668,11 @@ discard block |
||
| 668 | 668 | |
| 669 | 669 | // Creating output header: |
| 670 | 670 | $mimeType = 'application/octet-stream'; |
| 671 | - Header('Content-Type: ' . $mimeType); |
|
| 671 | + Header('Content-Type: '.$mimeType); |
|
| 672 | 672 | Header('Content-Disposition: attachment; filename=CrawlerLog.csv'); |
| 673 | 673 | |
| 674 | 674 | // Printing the content of the CSV lines: |
| 675 | - echo implode(chr(13) . chr(10), $csvLines); |
|
| 675 | + echo implode(chr(13).chr(10), $csvLines); |
|
| 676 | 676 | |
| 677 | 677 | // Exits: |
| 678 | 678 | exit; |
@@ -724,7 +724,7 @@ discard block |
||
| 724 | 724 | |
| 725 | 725 | // Title column: |
| 726 | 726 | if (!$c) { |
| 727 | - $titleClm = '<td rowspan="' . count($res) . '">' . $titleString . '</td>'; |
|
| 727 | + $titleClm = '<td rowspan="'.count($res).'">'.$titleString.'</td>'; |
|
| 728 | 728 | } else { |
| 729 | 729 | $titleClm = ''; |
| 730 | 730 | } |
@@ -743,11 +743,11 @@ discard block |
||
| 743 | 743 | if ($this->pObj->MOD_SETTINGS['log_resultLog']) { |
| 744 | 744 | $rowData['result_log'] = $resLog; |
| 745 | 745 | } else { |
| 746 | - $rowData['scheduled'] = ($vv['scheduled'] > 0) ? \TYPO3\CMS\Backend\Utility\BackendUtility::datetime($vv['scheduled']) : ' ' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.immediate'); |
|
| 746 | + $rowData['scheduled'] = ($vv['scheduled'] > 0) ? \TYPO3\CMS\Backend\Utility\BackendUtility::datetime($vv['scheduled']) : ' '.$GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.immediate'); |
|
| 747 | 747 | $rowData['exec_time'] = $vv['exec_time'] ? \TYPO3\CMS\Backend\Utility\BackendUtility::datetime($vv['exec_time']) : '-'; |
| 748 | 748 | } |
| 749 | 749 | $rowData['result_status'] = \TYPO3\CMS\Core\Utility\GeneralUtility::fixed_lgd_cs($resStatus, 50); |
| 750 | - $rowData['url'] = '<a href="' . htmlspecialchars($parameters['url']) . '" target="_newWIndow">' . htmlspecialchars($parameters['url']) . '</a>'; |
|
| 750 | + $rowData['url'] = '<a href="'.htmlspecialchars($parameters['url']).'" target="_newWIndow">'.htmlspecialchars($parameters['url']).'</a>'; |
|
| 751 | 751 | $rowData['feUserGroupList'] = $parameters['feUserGroupList']; |
| 752 | 752 | $rowData['procInstructions'] = is_array($parameters['procInstructions']) ? implode('; ', $parameters['procInstructions']) : ''; |
| 753 | 753 | $rowData['set_id'] = $vv['set_id']; |
@@ -759,21 +759,21 @@ discard block |
||
| 759 | 759 | } |
| 760 | 760 | |
| 761 | 761 | $setId = intval(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('setID')); |
| 762 | - $refreshIcon = $GLOBALS['BACK_PATH'] . 'sysext/t3skin/extjs/images/grid/refresh.gif'; |
|
| 762 | + $refreshIcon = $GLOBALS['BACK_PATH'].'sysext/t3skin/extjs/images/grid/refresh.gif'; |
|
| 763 | 763 | |
| 764 | 764 | // Put rows together: |
| 765 | 765 | $content .= ' |
| 766 | - <tr class="bgColor' . ($c % 2 ? '-20' : '-10') . '"> |
|
| 767 | - ' . $titleClm . ' |
|
| 768 | - <td><a href="' . $this->getModuleUrl(['qid_details' => $vv['qid'], 'setID' => $setId]) . '">' . htmlspecialchars($vv['qid']) . '</a></td> |
|
| 769 | - <td><a href="' . $this->getModuleUrl(['qid_read' => $vv['qid'], 'setID' => $setId]) . '"><img src="' . $refreshIcon . '" width="14" hspace="1" vspace="2" height="14" border="0" title="' . htmlspecialchars('Read') . '" alt="" /></a></td>'; |
|
| 766 | + <tr class="bgColor' . ($c % 2 ? '-20' : '-10').'"> |
|
| 767 | + ' . $titleClm.' |
|
| 768 | + <td><a href="' . $this->getModuleUrl(['qid_details' => $vv['qid'], 'setID' => $setId]).'">'.htmlspecialchars($vv['qid']).'</a></td> |
|
| 769 | + <td><a href="' . $this->getModuleUrl(['qid_read' => $vv['qid'], 'setID' => $setId]).'"><img src="'.$refreshIcon.'" width="14" hspace="1" vspace="2" height="14" border="0" title="'.htmlspecialchars('Read').'" alt="" /></a></td>'; |
|
| 770 | 770 | foreach ($rowData as $fKey => $value) { |
| 771 | 771 | if (\TYPO3\CMS\Core\Utility\GeneralUtility::inList('url', $fKey)) { |
| 772 | 772 | $content .= ' |
| 773 | - <td>' . $value . '</td>'; |
|
| 773 | + <td>' . $value.'</td>'; |
|
| 774 | 774 | } else { |
| 775 | 775 | $content .= ' |
| 776 | - <td>' . nl2br(htmlspecialchars($value)) . '</td>'; |
|
| 776 | + <td>' . nl2br(htmlspecialchars($value)).'</td>'; |
|
| 777 | 777 | } |
| 778 | 778 | } |
| 779 | 779 | $content .= ' |
@@ -794,8 +794,8 @@ discard block |
||
| 794 | 794 | // Compile row: |
| 795 | 795 | $content = ' |
| 796 | 796 | <tr class="bgColor-20"> |
| 797 | - <td>' . $titleString . '</td> |
|
| 798 | - <td colspan="' . $colSpan . '"><em>' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.noentries') . '</em></td> |
|
| 797 | + <td>' . $titleString.'</td> |
|
| 798 | + <td colspan="' . $colSpan.'"><em>'.$GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.noentries').'</em></td> |
|
| 799 | 799 | </tr>'; |
| 800 | 800 | } |
| 801 | 801 | |
@@ -830,22 +830,22 @@ discard block |
||
| 830 | 830 | { |
| 831 | 831 | $content = ' |
| 832 | 832 | <tr class="bgColor5 tableheader"> |
| 833 | - <td>' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.pagetitle') . ':</td> |
|
| 834 | - <td>' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.qid') . ':</td> |
|
| 833 | + <td>' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.pagetitle').':</td> |
|
| 834 | + <td>' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.qid').':</td> |
|
| 835 | 835 | <td> </td>' . |
| 836 | 836 | ($this->pObj->MOD_SETTINGS['log_resultLog'] ? ' |
| 837 | - <td>' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.resultlog') . ':</td>' : ' |
|
| 838 | - <td>' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.scheduledtime') . ':</td> |
|
| 839 | - <td>' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.runtime') . ':</td>') . ' |
|
| 840 | - <td>' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.status') . ':</td> |
|
| 841 | - <td>' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.url') . ':</td> |
|
| 842 | - <td>' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.groups') . ':</td> |
|
| 843 | - <td>' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.procinstr') . ':</td> |
|
| 844 | - <td>' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.setid') . ':</td>' . |
|
| 837 | + <td>' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.resultlog').':</td>' : ' |
|
| 838 | + <td>' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.scheduledtime').':</td> |
|
| 839 | + <td>' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.runtime').':</td>').' |
|
| 840 | + <td>' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.status').':</td> |
|
| 841 | + <td>' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.url').':</td> |
|
| 842 | + <td>' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.groups').':</td> |
|
| 843 | + <td>' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.procinstr').':</td> |
|
| 844 | + <td>' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.setid').':</td>'. |
|
| 845 | 845 | ($this->pObj->MOD_SETTINGS['log_feVars'] ? ' |
| 846 | - <td>' . htmlspecialchars('TSFE->id') . '</td> |
|
| 847 | - <td>' . htmlspecialchars('TSFE->gr_list') . '</td> |
|
| 848 | - <td>' . htmlspecialchars('TSFE->no_cache') . '</td>' : '') . ' |
|
| 846 | + <td>' . htmlspecialchars('TSFE->id').'</td> |
|
| 847 | + <td>' . htmlspecialchars('TSFE->gr_list').'</td> |
|
| 848 | + <td>' . htmlspecialchars('TSFE->no_cache').'</td>' : '').' |
|
| 849 | 849 | </tr>'; |
| 850 | 850 | |
| 851 | 851 | return $content; |
@@ -887,7 +887,7 @@ discard block |
||
| 887 | 887 | } |
| 888 | 888 | $resLog = is_array($requestResult['log']) ? implode(chr(10), $requestResult['log']) : ''; |
| 889 | 889 | } else { |
| 890 | - $resStatus = 'Error: ' . substr(preg_replace('/\s+/', ' ', strip_tags($requestContent['content'])), 0, 10000) . '...'; |
|
| 890 | + $resStatus = 'Error: '.substr(preg_replace('/\s+/', ' ', strip_tags($requestContent['content'])), 0, 10000).'...'; |
|
| 891 | 891 | } |
| 892 | 892 | } else { |
| 893 | 893 | $resStatus = '-'; |
@@ -939,7 +939,7 @@ discard block |
||
| 939 | 939 | |
| 940 | 940 | $listView = new tx_crawler_view_process_list(); |
| 941 | 941 | $listView->setPageId($this->pObj->id); |
| 942 | - $listView->setIconPath($BACK_PATH . '../typo3conf/ext/crawler/template/process/res/img/'); |
|
| 942 | + $listView->setIconPath($BACK_PATH.'../typo3conf/ext/crawler/template/process/res/img/'); |
|
| 943 | 943 | $listView->setProcessCollection($allProcesses); |
| 944 | 944 | $listView->setCliPath($this->processManager->getCrawlerCliPath()); |
| 945 | 945 | $listView->setIsCrawlerEnabled(!$crawler->getDisabled() && !$this->isErrorDetected); |
@@ -957,7 +957,7 @@ discard block |
||
| 957 | 957 | $output = $listView->render(); |
| 958 | 958 | |
| 959 | 959 | if ($paginationView->getTotalPagesCount() > 1) { |
| 960 | - $output .= ' <br />' . $paginationView->render(); |
|
| 960 | + $output .= ' <br />'.$paginationView->render(); |
|
| 961 | 961 | } |
| 962 | 962 | |
| 963 | 963 | return $output; |
@@ -984,7 +984,7 @@ discard block |
||
| 984 | 984 | |
| 985 | 985 | $exitCode = 0; |
| 986 | 986 | $out = []; |
| 987 | - exec(escapeshellcmd($this->extensionSettings['phpPath'] . ' -v'), $out, $exitCode); |
|
| 987 | + exec(escapeshellcmd($this->extensionSettings['phpPath'].' -v'), $out, $exitCode); |
|
| 988 | 988 | if ($exitCode > 0) { |
| 989 | 989 | $this->addErrorMessage(sprintf($LANG->sL('LLL:EXT:crawler/modfunc1/locallang.xml:message.phpBinaryNotFound'), htmlspecialchars($this->extensionSettings['phpPath']))); |
| 990 | 990 | } |
@@ -1173,10 +1173,10 @@ discard block |
||
| 1173 | 1173 | $options = []; |
| 1174 | 1174 | foreach ($optArray as $key => $val) { |
| 1175 | 1175 | $options[] = ' |
| 1176 | - <option value="' . htmlspecialchars($key) . '"' . ((!$multiple && !strcmp($value, $key)) || ($multiple && in_array($key, (array)$value)) ? ' selected="selected"' : '') . '>' . htmlspecialchars($val) . '</option>'; |
|
| 1176 | + <option value="' . htmlspecialchars($key).'"'.((!$multiple && !strcmp($value, $key)) || ($multiple && in_array($key, (array) $value)) ? ' selected="selected"' : '').'>'.htmlspecialchars($val).'</option>'; |
|
| 1177 | 1177 | } |
| 1178 | 1178 | |
| 1179 | - $output = '<select name="' . htmlspecialchars($name . ($multiple ? '[]' : '')) . '"' . ($multiple ? ' multiple="multiple" size="' . count($options) . '"' : '') . '>' . implode('', $options) . '</select>'; |
|
| 1179 | + $output = '<select name="'.htmlspecialchars($name.($multiple ? '[]' : '')).'"'.($multiple ? ' multiple="multiple" size="'.count($options).'"' : '').'>'.implode('', $options).'</select>'; |
|
| 1180 | 1180 | |
| 1181 | 1181 | return $output; |
| 1182 | 1182 | } |
@@ -37,8 +37,8 @@ discard block |
||
| 37 | 37 | */ |
| 38 | 38 | public function offsetGet($index) |
| 39 | 39 | { |
| 40 | - if (! parent::offsetExists($index)) { |
|
| 41 | - throw new Exception('Index "' . var_export($index, true) . '" for \AOE\Crawler\Domain\Model\Process are not available'); |
|
| 40 | + if (!parent::offsetExists($index)) { |
|
| 41 | + throw new Exception('Index "'.var_export($index, true).'" for \AOE\Crawler\Domain\Model\Process are not available'); |
|
| 42 | 42 | } |
| 43 | 43 | return parent::offsetGet($index); |
| 44 | 44 | } |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | */ |
| 54 | 54 | public function offsetSet($index, $subject) |
| 55 | 55 | { |
| 56 | - if (! $subject instanceof \AOE\Crawler\Domain\Model\Process) { |
|
| 56 | + if (!$subject instanceof \AOE\Crawler\Domain\Model\Process) { |
|
| 57 | 57 | throw new InvalidArgumentException('Wrong parameter type given, "\AOE\Crawler\Domain\Model\Process" expected!'); |
| 58 | 58 | } |
| 59 | 59 | parent::offsetSet($index, $subject); |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | */ |
| 68 | 68 | public function append($subject) |
| 69 | 69 | { |
| 70 | - if (! $subject instanceof \AOE\Crawler\Domain\Model\Process) { |
|
| 70 | + if (!$subject instanceof \AOE\Crawler\Domain\Model\Process) { |
|
| 71 | 71 | throw new InvalidArgumentException('Wrong parameter type given, "\AOE\Crawler\Domain\Model\Process" expected!'); |
| 72 | 72 | } |
| 73 | 73 | parent::append($subject); |