Completed
Push — issue/139 ( 18a7a0...02fda4 )
by
unknown
10:31
created
class.tx_crawler_lib.php 2 patches
Doc Comments   +12 added lines, -6 removed lines patch added patch discarded remove patch
@@ -475,7 +475,7 @@  discard block
 block discarded – undo
475 475
      *
476 476
      * @param string $piString PI to test
477 477
      * @param array $incomingProcInstructions Processing instructions
478
-     * @return boolean
478
+     * @return boolean|null
479 479
      */
480 480
     public function drawURLs_PIfilter($piString, array $incomingProcInstructions)
481 481
     {
@@ -685,6 +685,9 @@  discard block
 block discarded – undo
685 685
         return $baseUrl;
686 686
     }
687 687
 
688
+    /**
689
+     * @param integer $rootid
690
+     */
688 691
     public function getConfigurationsForBranch($rootid, $depth)
689 692
     {
690 693
         $configurationsForBranch = [];
@@ -906,7 +909,7 @@  discard block
 block discarded – undo
906 909
      * The number of URLs will be the multiplication of the number of parameter values for each key
907 910
      *
908 911
      * @param array $paramArray Output of expandParameters(): Array with keys (GET var names) and for each an array of values
909
-     * @param array $urls URLs accumulated in this array (for recursion)
912
+     * @param string[] $urls URLs accumulated in this array (for recursion)
910 913
      * @return array
911 914
      */
912 915
     public function compileUrls($paramArray, $urls = [])
@@ -1556,6 +1559,7 @@  discard block
 block discarded – undo
1556 1559
 
1557 1560
     /**
1558 1561
      * @param message
1562
+     * @param string $message
1559 1563
      */
1560 1564
     protected function log($message)
1561 1565
     {
@@ -1570,7 +1574,7 @@  discard block
 block discarded – undo
1570 1574
      * @param array $url
1571 1575
      * @param string $crawlerId
1572 1576
      *
1573
-     * @return array
1577
+     * @return string[]
1574 1578
      */
1575 1579
     protected function buildRequestHeaderArray(array $url, $crawlerId)
1576 1580
     {
@@ -1826,6 +1830,7 @@  discard block
 block discarded – undo
1826 1830
      *
1827 1831
      * @param    array        Page row
1828 1832
      * @param    string        Page icon and title for row
1833
+     * @param string $pageTitleAndIcon
1829 1834
      * @return    string        HTML <tr> content (one or more)
1830 1835
      */
1831 1836
     public function drawURLs_addRowsForPage(array $pageRow, $pageTitleAndIcon)
@@ -2114,7 +2119,7 @@  discard block
 block discarded – undo
2114 2119
     /**
2115 2120
      * Function executed by crawler_im.php cli script.
2116 2121
      *
2117
-     * @return bool
2122
+     * @return null|boolean
2118 2123
      */
2119 2124
     public function CLI_main_flush()
2120 2125
     {
@@ -2173,7 +2178,7 @@  discard block
 block discarded – undo
2173 2178
      * @param int $countInARun
2174 2179
      * @param int $sleepTime
2175 2180
      * @param int $sleepAfterFinish
2176
-     * @return string
2181
+     * @return integer
2177 2182
      */
2178 2183
     public function CLI_run($countInARun, $sleepTime, $sleepAfterFinish)
2179 2184
     {
@@ -2448,6 +2453,7 @@  discard block
 block discarded – undo
2448 2453
      * Used to determine timeouts and to ensure a proper cleanup if there's a timeout
2449 2454
      *
2450 2455
      * @param  string  identification string for the process
2456
+     * @param string $pid
2451 2457
      * @return boolean determines if the process is still active / has resources
2452 2458
      *
2453 2459
      * FIXME: Please remove Transaction, not needed as only a select query.
@@ -2488,7 +2494,7 @@  discard block
 block discarded – undo
2488 2494
     /**
2489 2495
      * @param bool $get_as_float
2490 2496
      *
2491
-     * @return mixed
2497
+     * @return string
2492 2498
      */
2493 2499
     protected function microtime($get_as_float = false)
2494 2500
     {
Please login to merge, or discard this patch.
Spacing   +135 added lines, -135 removed lines patch added patch discarded remove patch
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
     {
205 205
         $this->db = $GLOBALS['TYPO3_DB'];
206 206
         $this->backendUser = $GLOBALS['BE_USER'];
207
-        $this->processFilename = PATH_site . 'typo3temp/tx_crawler.proc';
207
+        $this->processFilename = PATH_site.'typo3temp/tx_crawler.proc';
208 208
 
209 209
         $settings = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['crawler']);
210 210
         $settings = is_array($settings) ? $settings : [];
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
                 foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['crawler']['excludeDoktype'] as $key => $doktypeList) {
263 263
                     if (\TYPO3\CMS\Core\Utility\GeneralUtility::inList($doktypeList, $pageRow['doktype'])) {
264 264
                         $skipPage = true;
265
-                        $skipMessage = 'Doktype was excluded by "' . $key . '"';
265
+                        $skipMessage = 'Doktype was excluded by "'.$key.'"';
266 266
                         break;
267 267
                     }
268 268
                 }
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
                         if (is_string($veto)) {
284 284
                             $skipMessage = $veto;
285 285
                         } else {
286
-                            $skipMessage = 'Veto from hook "' . htmlspecialchars($key) . '"';
286
+                            $skipMessage = 'Veto from hook "'.htmlspecialchars($key).'"';
287 287
                         }
288 288
                         // no need to execute other hooks if a previous one return a veto
289 289
                         break;
@@ -332,7 +332,7 @@  discard block
 block discarded – undo
332 332
     protected function noUnprocessedQueueEntriesForPageWithConfigurationHashExist($uid, $configurationHash)
333 333
     {
334 334
         $configurationHash = $this->db->fullQuoteStr($configurationHash, 'tx_crawler_queue');
335
-        $res = $this->db->exec_SELECTquery('count(*) as anz', 'tx_crawler_queue', "page_id=" . intval($uid) . " AND configuration_hash=" . $configurationHash . " AND exec_time=0");
335
+        $res = $this->db->exec_SELECTquery('count(*) as anz', 'tx_crawler_queue', "page_id=".intval($uid)." AND configuration_hash=".$configurationHash." AND exec_time=0");
336 336
         $row = $this->db->sql_fetch_assoc($res);
337 337
 
338 338
         return ($row['anz'] == 0);
@@ -408,14 +408,14 @@  discard block
 block discarded – undo
408 408
                     if ($vv['subCfg']['cHash']) {
409 409
                         /* @var $cacheHash \TYPO3\CMS\Frontend\Page\CacheHashCalculator */
410 410
                         $cacheHash = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\CMS\Frontend\Page\CacheHashCalculator');
411
-                        $urlQuery .= '&cHash=' . $cacheHash->generateForParameters($urlQuery);
411
+                        $urlQuery .= '&cHash='.$cacheHash->generateForParameters($urlQuery);
412 412
                     }
413 413
 
414 414
                     // Create key by which to determine unique-ness:
415
-                    $uKey = $urlQuery . '|' . $vv['subCfg']['userGroups'] . '|' . $vv['subCfg']['baseUrl'] . '|' . $vv['subCfg']['procInstrFilter'];
415
+                    $uKey = $urlQuery.'|'.$vv['subCfg']['userGroups'].'|'.$vv['subCfg']['baseUrl'].'|'.$vv['subCfg']['procInstrFilter'];
416 416
 
417 417
                     // realurl support (thanks to Ingo Renner)
418
-                    $urlQuery = 'index.php' . $urlQuery;
418
+                    $urlQuery = 'index.php'.$urlQuery;
419 419
                     if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('realurl') && $vv['subCfg']['realurl']) {
420 420
                         $params = [
421 421
                             'LD' => [
@@ -434,12 +434,12 @@  discard block
 block discarded – undo
434 434
                     if (isset($duplicateTrack[$uKey])) {
435 435
 
436 436
                         //if the url key is registered just display it and do not resubmit is
437
-                        $urlList = '<em><span class="typo3-dimmed">' . htmlspecialchars($urlQuery) . '</span></em><br/>';
437
+                        $urlList = '<em><span class="typo3-dimmed">'.htmlspecialchars($urlQuery).'</span></em><br/>';
438 438
                     } else {
439
-                        $urlList = '[' . date('d.m.y H:i', $schTime) . '] ' . htmlspecialchars($urlQuery);
440
-                        $this->urlList[] = '[' . date('d.m.y H:i', $schTime) . '] ' . $urlQuery;
439
+                        $urlList = '['.date('d.m.y H:i', $schTime).'] '.htmlspecialchars($urlQuery);
440
+                        $this->urlList[] = '['.date('d.m.y H:i', $schTime).'] '.$urlQuery;
441 441
 
442
-                        $theUrl = ($vv['subCfg']['baseUrl'] ? $vv['subCfg']['baseUrl'] : \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SITE_URL')) . $urlQuery;
442
+                        $theUrl = ($vv['subCfg']['baseUrl'] ? $vv['subCfg']['baseUrl'] : \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SITE_URL')).$urlQuery;
443 443
 
444 444
                         // Submit for crawling!
445 445
                         if ($submitCrawlUrls) {
@@ -541,7 +541,7 @@  discard block
 block discarded – undo
541 541
                     if (!is_array($values)) {
542 542
 
543 543
                         // Sub configuration for a single configuration string:
544
-                        $subCfg = (array)$crawlerCfg['paramSets.'][$key . '.'];
544
+                        $subCfg = (array) $crawlerCfg['paramSets.'][$key.'.'];
545 545
                         $subCfg['key'] = $key;
546 546
 
547 547
                         if (strcmp($subCfg['procInstrFilter'], '')) {
@@ -566,9 +566,9 @@  discard block
 block discarded – undo
566 566
 
567 567
                             // recognize MP value
568 568
                             if (!$this->MP) {
569
-                                $res[$key]['URLs'] = $this->compileUrls($res[$key]['paramExpanded'], ['?id=' . $id]);
569
+                                $res[$key]['URLs'] = $this->compileUrls($res[$key]['paramExpanded'], ['?id='.$id]);
570 570
                             } else {
571
-                                $res[$key]['URLs'] = $this->compileUrls($res[$key]['paramExpanded'], ['?id=' . $id . '&MP=' . $this->MP]);
571
+                                $res[$key]['URLs'] = $this->compileUrls($res[$key]['paramExpanded'], ['?id='.$id.'&MP='.$this->MP]);
572 572
                             }
573 573
                         }
574 574
                     }
@@ -588,7 +588,7 @@  discard block
 block discarded – undo
588 588
                 'tx_crawler_configuration',
589 589
                 'pid',
590 590
                 intval($page['uid']),
591
-                \TYPO3\CMS\Backend\Utility\BackendUtility::BEenableFields('tx_crawler_configuration') . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause('tx_crawler_configuration')
591
+                \TYPO3\CMS\Backend\Utility\BackendUtility::BEenableFields('tx_crawler_configuration').\TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause('tx_crawler_configuration')
592 592
             );
593 593
 
594 594
             if (is_array($configurationRecordsForCurrentPage)) {
@@ -634,8 +634,8 @@  discard block
 block discarded – undo
634 634
                                     $res[$key]['subCfg'] = $subCfg;
635 635
                                     $res[$key]['paramParsed'] = $this->parseParams($configurationRecord['configuration']);
636 636
                                     $res[$key]['paramExpanded'] = $this->expandParameters($res[$key]['paramParsed'], $id);
637
-                                    $res[$key]['URLs'] = $this->compileUrls($res[$key]['paramExpanded'], ['?id=' . $id]);
638
-                                    $res[$key]['origin'] = 'tx_crawler_configuration_' . $configurationRecord['uid'];
637
+                                    $res[$key]['URLs'] = $this->compileUrls($res[$key]['paramExpanded'], ['?id='.$id]);
638
+                                    $res[$key]['origin'] = 'tx_crawler_configuration_'.$configurationRecord['uid'];
639 639
                                 }
640 640
                             }
641 641
                         }
@@ -673,13 +673,13 @@  discard block
 block discarded – undo
673 673
             $res = $this->db->exec_SELECTquery(
674 674
                 '*',
675 675
                 'sys_domain',
676
-                'uid = ' . $sysDomainUid .
677
-                \TYPO3\CMS\Backend\Utility\BackendUtility::BEenableFields('sys_domain') .
676
+                'uid = '.$sysDomainUid.
677
+                \TYPO3\CMS\Backend\Utility\BackendUtility::BEenableFields('sys_domain').
678 678
                 \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause('sys_domain')
679 679
             );
680 680
             $row = $this->db->sql_fetch_assoc($res);
681 681
             if ($row['domainName'] != '') {
682
-                return $urlScheme . '://' . $row['domainName'];
682
+                return $urlScheme.'://'.$row['domainName'];
683 683
             }
684 684
         }
685 685
         return $baseUrl;
@@ -709,7 +709,7 @@  discard block
 block discarded – undo
709 709
         /* @var \TYPO3\CMS\Backend\Tree\View\PageTreeView */
710 710
         $tree = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\CMS\Backend\Tree\View\PageTreeView');
711 711
         $perms_clause = $GLOBALS['BE_USER']->getPagePermsClause(1);
712
-        $tree->init('AND ' . $perms_clause);
712
+        $tree->init('AND '.$perms_clause);
713 713
         $tree->getTree($rootid, $depth, '');
714 714
         foreach ($tree->tree as $node) {
715 715
             $pids[] = $node['row']['uid'];
@@ -718,10 +718,10 @@  discard block
 block discarded – undo
718 718
         $res = $this->db->exec_SELECTquery(
719 719
             '*',
720 720
             'tx_crawler_configuration',
721
-            'pid IN (' . implode(',', $pids) . ') ' .
722
-            \TYPO3\CMS\Backend\Utility\BackendUtility::BEenableFields('tx_crawler_configuration') .
723
-            \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause('tx_crawler_configuration') . ' ' .
724
-            \TYPO3\CMS\Backend\Utility\BackendUtility::versioningPlaceholderClause('tx_crawler_configuration') . ' '
721
+            'pid IN ('.implode(',', $pids).') '.
722
+            \TYPO3\CMS\Backend\Utility\BackendUtility::BEenableFields('tx_crawler_configuration').
723
+            \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause('tx_crawler_configuration').' '.
724
+            \TYPO3\CMS\Backend\Utility\BackendUtility::versioningPlaceholderClause('tx_crawler_configuration').' '
725 725
         );
726 726
 
727 727
         while ($row = $this->db->sql_fetch_assoc($res)) {
@@ -820,7 +820,7 @@  discard block
 block discarded – undo
820 820
 
821 821
                         // Traverse range, add values:
822 822
                         $runAwayBrake = 1000; // Limit to size of range!
823
-                        for ($a = $reg[1]; $a <= $reg[2];$a++) {
823
+                        for ($a = $reg[1]; $a <= $reg[2]; $a++) {
824 824
                             $paramArray[$p][] = $a;
825 825
                             $runAwayBrake--;
826 826
                             if ($runAwayBrake <= 0) {
@@ -850,16 +850,16 @@  discard block
 block discarded – undo
850 850
                                 $transOrigPointerField = $TCA[$subpartParams['_TABLE']]['ctrl']['transOrigPointerField'];
851 851
 
852 852
                                 if ($subpartParams['_ENABLELANG'] && $transOrigPointerField) {
853
-                                    $andWhereLanguage = ' AND ' . $this->db->quoteStr($transOrigPointerField, $subpartParams['_TABLE']) . ' <= 0 ';
853
+                                    $andWhereLanguage = ' AND '.$this->db->quoteStr($transOrigPointerField, $subpartParams['_TABLE']).' <= 0 ';
854 854
                                 }
855 855
 
856
-                                $where = $this->db->quoteStr($pidField, $subpartParams['_TABLE']) . '=' . intval($lookUpPid) . ' ' .
857
-                                    $andWhereLanguage . $where;
856
+                                $where = $this->db->quoteStr($pidField, $subpartParams['_TABLE']).'='.intval($lookUpPid).' '.
857
+                                    $andWhereLanguage.$where;
858 858
 
859 859
                                 $rows = $this->db->exec_SELECTgetRows(
860 860
                                     $fieldName,
861
-                                    $subpartParams['_TABLE'] . $addTable,
862
-                                    $where . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause($subpartParams['_TABLE']),
861
+                                    $subpartParams['_TABLE'].$addTable,
862
+                                    $where.\TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause($subpartParams['_TABLE']),
863 863
                                     '',
864 864
                                     '',
865 865
                                     '',
@@ -921,7 +921,7 @@  discard block
 block discarded – undo
921 921
             $newUrls = [];
922 922
             foreach ($urls as $url) {
923 923
                 foreach ($valueSet as $val) {
924
-                    $newUrls[] = $url . (strcmp($val, '') ? '&' . rawurlencode($varName) . '=' . rawurlencode($val) : '');
924
+                    $newUrls[] = $url.(strcmp($val, '') ? '&'.rawurlencode($varName).'='.rawurlencode($val) : '');
925 925
 
926 926
                     if (count($newUrls) > \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange($this->extensionSettings['maxCompileUrls'], 1, 1000000000, 10000)) {
927 927
                         break;
@@ -968,13 +968,13 @@  discard block
 block discarded – undo
968 968
 
969 969
         // FIXME: Write unit test that ensures that the right records are deleted.
970 970
         if ($doFlush) {
971
-            $this->flushQueue(($doFullFlush ? '1=1' : ('page_id=' . intval($id))) . $addWhere);
971
+            $this->flushQueue(($doFullFlush ? '1=1' : ('page_id='.intval($id))).$addWhere);
972 972
             return [];
973 973
         } else {
974 974
             return $this->db->exec_SELECTgetRows(
975 975
                 '*',
976 976
                 'tx_crawler_queue',
977
-                'page_id=' . intval($id) . $addWhere,
977
+                'page_id='.intval($id).$addWhere,
978 978
                 '',
979 979
                 'scheduled DESC',
980 980
                 (intval($itemsPerPage) > 0 ? intval($itemsPerPage) : '')
@@ -1007,13 +1007,13 @@  discard block
 block discarded – undo
1007 1007
         }
1008 1008
         // FIXME: Write unit test that ensures that the right records are deleted.
1009 1009
         if ($doFlush) {
1010
-            $this->flushQueue($doFullFlush ? '' : ('set_id=' . intval($set_id) . $addWhere));
1010
+            $this->flushQueue($doFullFlush ? '' : ('set_id='.intval($set_id).$addWhere));
1011 1011
             return [];
1012 1012
         } else {
1013 1013
             return $this->db->exec_SELECTgetRows(
1014 1014
                 '*',
1015 1015
                 'tx_crawler_queue',
1016
-                'set_id=' . intval($set_id) . $addWhere,
1016
+                'set_id='.intval($set_id).$addWhere,
1017 1017
                 '',
1018 1018
                 'scheduled DESC',
1019 1019
                 (intval($itemsPerPage) > 0 ? intval($itemsPerPage) : '')
@@ -1034,7 +1034,7 @@  discard block
 block discarded – undo
1034 1034
         if (tx_crawler_domain_events_dispatcher::getInstance()->hasObserver('queueEntryFlush')) {
1035 1035
             $groups = $this->db->exec_SELECTgetRows('DISTINCT set_id', 'tx_crawler_queue', $realWhere);
1036 1036
             foreach ($groups as $group) {
1037
-                tx_crawler_domain_events_dispatcher::getInstance()->post('queueEntryFlush', $group['set_id'], $this->db->exec_SELECTgetRows('uid, set_id', 'tx_crawler_queue', $realWhere . ' AND set_id="' . $group['set_id'] . '"'));
1037
+                tx_crawler_domain_events_dispatcher::getInstance()->post('queueEntryFlush', $group['set_id'], $this->db->exec_SELECTgetRows('uid, set_id', 'tx_crawler_queue', $realWhere.' AND set_id="'.$group['set_id'].'"'));
1038 1038
             }
1039 1039
         }
1040 1040
 
@@ -1176,24 +1176,24 @@  discard block
 block discarded – undo
1176 1176
             if ($this->extensionSettings['enableTimeslot']) {
1177 1177
                 $timeBegin = $currentTime - 100;
1178 1178
                 $timeEnd = $currentTime + 100;
1179
-                $where = ' ((scheduled BETWEEN ' . $timeBegin . ' AND ' . $timeEnd . ' ) OR scheduled <= ' . $currentTime . ') ';
1179
+                $where = ' ((scheduled BETWEEN '.$timeBegin.' AND '.$timeEnd.' ) OR scheduled <= '.$currentTime.') ';
1180 1180
             } else {
1181
-                $where = 'scheduled <= ' . $currentTime;
1181
+                $where = 'scheduled <= '.$currentTime;
1182 1182
             }
1183 1183
         } elseif ($tstamp > $currentTime) {
1184 1184
             //entry with a timestamp in the future need to have the same schedule time
1185
-            $where = 'scheduled = ' . $tstamp ;
1185
+            $where = 'scheduled = '.$tstamp;
1186 1186
         }
1187 1187
 
1188 1188
         if (!empty($where)) {
1189 1189
             $result = $this->db->exec_SELECTgetRows(
1190 1190
                 'qid',
1191 1191
                 'tx_crawler_queue',
1192
-                $where .
1193
-                ' AND NOT exec_time' .
1194
-                ' AND NOT process_id ' .
1195
-                ' AND page_id=' . intval($fieldArray['page_id']) .
1196
-                ' AND parameters_hash = ' . $this->db->fullQuoteStr($fieldArray['parameters_hash'], 'tx_crawler_queue')
1192
+                $where.
1193
+                ' AND NOT exec_time'.
1194
+                ' AND NOT process_id '.
1195
+                ' AND page_id='.intval($fieldArray['page_id']).
1196
+                ' AND parameters_hash = '.$this->db->fullQuoteStr($fieldArray['parameters_hash'], 'tx_crawler_queue')
1197 1197
             );
1198 1198
 
1199 1199
             if (is_array($result)) {
@@ -1233,13 +1233,13 @@  discard block
 block discarded – undo
1233 1233
     {
1234 1234
         $ret = 0;
1235 1235
         if ($this->debugMode) {
1236
-            \TYPO3\CMS\Core\Utility\GeneralUtility::devlog('crawler-readurl start ' . microtime(true), __FUNCTION__);
1236
+            \TYPO3\CMS\Core\Utility\GeneralUtility::devlog('crawler-readurl start '.microtime(true), __FUNCTION__);
1237 1237
         }
1238 1238
         // Get entry:
1239 1239
         list($queueRec) = $this->db->exec_SELECTgetRows(
1240 1240
             '*',
1241 1241
             'tx_crawler_queue',
1242
-            'qid=' . intval($queueId) . ($force ? '' : ' AND exec_time=0 AND process_scheduled > 0')
1242
+            'qid='.intval($queueId).($force ? '' : ' AND exec_time=0 AND process_scheduled > 0')
1243 1243
         );
1244 1244
 
1245 1245
         if (!is_array($queueRec)) {
@@ -1248,10 +1248,10 @@  discard block
 block discarded – undo
1248 1248
 
1249 1249
         $parameters = unserialize($queueRec['parameters']);
1250 1250
         if ($parameters['rootTemplatePid']) {
1251
-            $this->initTSFE((int)$parameters['rootTemplatePid']);
1251
+            $this->initTSFE((int) $parameters['rootTemplatePid']);
1252 1252
         } else {
1253 1253
             \TYPO3\CMS\Core\Utility\GeneralUtility::sysLog(
1254
-                'Page with (' . $queueRec['page_id'] . ') could not be crawled, please check your crawler configuration. Perhaps no Root Template Pid is set',
1254
+                'Page with ('.$queueRec['page_id'].') could not be crawled, please check your crawler configuration. Perhaps no Root Template Pid is set',
1255 1255
                 'crawler',
1256 1256
                 \TYPO3\CMS\Core\Utility\GeneralUtility::SYSLOG_SEVERITY_WARNING
1257 1257
             );
@@ -1270,7 +1270,7 @@  discard block
 block discarded – undo
1270 1270
             //if mulitprocessing is used we need to store the id of the process which has handled this entry
1271 1271
             $field_array['process_id_completed'] = $this->processID;
1272 1272
         }
1273
-        $this->db->exec_UPDATEquery('tx_crawler_queue', 'qid=' . intval($queueId), $field_array);
1273
+        $this->db->exec_UPDATEquery('tx_crawler_queue', 'qid='.intval($queueId), $field_array);
1274 1274
 
1275 1275
         $result = $this->readUrl_exec($queueRec);
1276 1276
         $resultData = unserialize($result['content']);
@@ -1301,10 +1301,10 @@  discard block
 block discarded – undo
1301 1301
             [$queueId, &$field_array]
1302 1302
         );
1303 1303
 
1304
-        $this->db->exec_UPDATEquery('tx_crawler_queue', 'qid=' . intval($queueId), $field_array);
1304
+        $this->db->exec_UPDATEquery('tx_crawler_queue', 'qid='.intval($queueId), $field_array);
1305 1305
 
1306 1306
         if ($this->debugMode) {
1307
-            \TYPO3\CMS\Core\Utility\GeneralUtility::devlog('crawler-readurl stop ' . microtime(true), __FUNCTION__);
1307
+            \TYPO3\CMS\Core\Utility\GeneralUtility::devlog('crawler-readurl stop '.microtime(true), __FUNCTION__);
1308 1308
         }
1309 1309
 
1310 1310
         return $ret;
@@ -1335,7 +1335,7 @@  discard block
 block discarded – undo
1335 1335
             [$queueId, &$field_array]
1336 1336
         );
1337 1337
 
1338
-        $this->db->exec_UPDATEquery('tx_crawler_queue', 'qid=' . intval($queueId), $field_array);
1338
+        $this->db->exec_UPDATEquery('tx_crawler_queue', 'qid='.intval($queueId), $field_array);
1339 1339
 
1340 1340
         return $result;
1341 1341
     }
@@ -1359,12 +1359,12 @@  discard block
 block discarded – undo
1359 1359
                     unset($parameters['_CALLBACKOBJ']);
1360 1360
                     $result = ['content' => serialize($callBackObj->crawler_execute($parameters, $this))];
1361 1361
                 } else {
1362
-                    $result = ['content' => 'No object: ' . $objRef];
1362
+                    $result = ['content' => 'No object: '.$objRef];
1363 1363
                 }
1364 1364
             } else { // Regular FE request:
1365 1365
 
1366 1366
                 // Prepare:
1367
-                $crawlerId = $queueRec['qid'] . ':' . md5($queueRec['qid'] . '|' . $queueRec['set_id'] . '|' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey']);
1367
+                $crawlerId = $queueRec['qid'].':'.md5($queueRec['qid'].'|'.$queueRec['set_id'].'|'.$GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey']);
1368 1368
 
1369 1369
                 // Get result:
1370 1370
                 $result = $this->requestUrl($parameters['url'], $crawlerId);
@@ -1401,7 +1401,7 @@  discard block
 block discarded – undo
1401 1401
             return false;
1402 1402
         }
1403 1403
 
1404
-        if (!in_array($url['scheme'], ['','http','https'])) {
1404
+        if (!in_array($url['scheme'], ['', 'http', 'https'])) {
1405 1405
             if (TYPO3_DLOG) {
1406 1406
                 \TYPO3\CMS\Core\Utility\GeneralUtility::devLog(sprintf('Scheme does not match for url "%s"', $url), 'crawler', 4, ['crawlerId' => $crawlerId]);
1407 1407
             }
@@ -1421,14 +1421,14 @@  discard block
 block discarded – undo
1421 1421
 
1422 1422
         if ($GLOBALS['TYPO3_CONF_VARS']['SYS']['curlUse'] && $GLOBALS['TYPO3_CONF_VARS']['SYS']['curlProxyServer']) {
1423 1423
             $rurl = parse_url($GLOBALS['TYPO3_CONF_VARS']['SYS']['curlProxyServer']);
1424
-            $url['path'] = $url['scheme'] . '://' . $url['host'] . ($url['port'] > 0 ? ':' . $url['port'] : '') . $url['path'];
1424
+            $url['path'] = $url['scheme'].'://'.$url['host'].($url['port'] > 0 ? ':'.$url['port'] : '').$url['path'];
1425 1425
             $reqHeaders = $this->buildRequestHeaderArray($url, $crawlerId);
1426 1426
         }
1427 1427
 
1428 1428
         $host = $rurl['host'];
1429 1429
 
1430 1430
         if ($url['scheme'] == 'https') {
1431
-            $host = 'ssl://' . $host;
1431
+            $host = 'ssl://'.$host;
1432 1432
             $port = ($rurl['port'] > 0) ? $rurl['port'] : 443;
1433 1433
         } else {
1434 1434
             $port = ($rurl['port'] > 0) ? $rurl['port'] : 80;
@@ -1444,7 +1444,7 @@  discard block
 block discarded – undo
1444 1444
             return false;
1445 1445
         } else {
1446 1446
             // Request message:
1447
-            $msg = implode("\r\n", $reqHeaders) . "\r\n\r\n";
1447
+            $msg = implode("\r\n", $reqHeaders)."\r\n\r\n";
1448 1448
             fputs($fp, $msg);
1449 1449
 
1450 1450
             // Read response:
@@ -1452,13 +1452,13 @@  discard block
 block discarded – undo
1452 1452
             fclose($fp);
1453 1453
 
1454 1454
             $time = microtime(true) - $startTime;
1455
-            $this->log($originalUrl . ' ' . $time);
1455
+            $this->log($originalUrl.' '.$time);
1456 1456
 
1457 1457
             // Implode content and headers:
1458 1458
             $result = [
1459 1459
                 'request' => $msg,
1460 1460
                 'headers' => implode('', $d['headers']),
1461
-                'content' => implode('', (array)$d['content'])
1461
+                'content' => implode('', (array) $d['content'])
1462 1462
             ];
1463 1463
 
1464 1464
             if (($this->extensionSettings['follow30x']) && ($newUrl = $this->getRequestUrlFrom302Header($d['headers'], $url['user'], $url['pass']))) {
@@ -1503,8 +1503,8 @@  discard block
 block discarded – undo
1503 1503
 
1504 1504
         // Base path must be '/<pathSegements>/':
1505 1505
         if ($frontendBasePath != '/') {
1506
-            $frontendBasePath = '/' . ltrim($frontendBasePath, '/');
1507
-            $frontendBasePath = rtrim($frontendBasePath, '/') . '/';
1506
+            $frontendBasePath = '/'.ltrim($frontendBasePath, '/');
1507
+            $frontendBasePath = rtrim($frontendBasePath, '/').'/';
1508 1508
         }
1509 1509
 
1510 1510
         return $frontendBasePath;
@@ -1560,7 +1560,7 @@  discard block
 block discarded – undo
1560 1560
     protected function log($message)
1561 1561
     {
1562 1562
         if (!empty($this->extensionSettings['logFileName'])) {
1563
-            @file_put_contents($this->extensionSettings['logFileName'], date('Ymd His') . ' ' . $message . PHP_EOL, FILE_APPEND);
1563
+            @file_put_contents($this->extensionSettings['logFileName'], date('Ymd His').' '.$message.PHP_EOL, FILE_APPEND);
1564 1564
         }
1565 1565
     }
1566 1566
 
@@ -1575,16 +1575,16 @@  discard block
 block discarded – undo
1575 1575
     protected function buildRequestHeaderArray(array $url, $crawlerId)
1576 1576
     {
1577 1577
         $reqHeaders = [];
1578
-        $reqHeaders[] = 'GET ' . $url['path'] . ($url['query'] ? '?' . $url['query'] : '') . ' HTTP/1.0';
1579
-        $reqHeaders[] = 'Host: ' . $url['host'];
1578
+        $reqHeaders[] = 'GET '.$url['path'].($url['query'] ? '?'.$url['query'] : '').' HTTP/1.0';
1579
+        $reqHeaders[] = 'Host: '.$url['host'];
1580 1580
         if (stristr($url['query'], 'ADMCMD_previewWS')) {
1581 1581
             $reqHeaders[] = 'Cookie: $Version="1"; be_typo_user="1"; $Path=/';
1582 1582
         }
1583 1583
         $reqHeaders[] = 'Connection: close';
1584 1584
         if ($url['user'] != '') {
1585
-            $reqHeaders[] = 'Authorization: Basic ' . base64_encode($url['user'] . ':' . $url['pass']);
1585
+            $reqHeaders[] = 'Authorization: Basic '.base64_encode($url['user'].':'.$url['pass']);
1586 1586
         }
1587
-        $reqHeaders[] = 'X-T3crawler: ' . $crawlerId;
1587
+        $reqHeaders[] = 'X-T3crawler: '.$crawlerId;
1588 1588
         $reqHeaders[] = 'User-Agent: TYPO3 crawler';
1589 1589
         return $reqHeaders;
1590 1590
     }
@@ -1621,9 +1621,9 @@  discard block
 block discarded – undo
1621 1621
             if (!($tmp = parse_url($header['Location']))) {
1622 1622
                 return false;
1623 1623
             }
1624
-            $newUrl = $tmp['scheme'] . '://' . $user . ':' . $pass . '@' . $tmp['host'] . $tmp['path'];
1624
+            $newUrl = $tmp['scheme'].'://'.$user.':'.$pass.'@'.$tmp['host'].$tmp['path'];
1625 1625
             if ($tmp['query'] != '') {
1626
-                $newUrl .= '?' . $tmp['query'];
1626
+                $newUrl .= '?'.$tmp['query'];
1627 1627
             }
1628 1628
         } else {
1629 1629
             $newUrl = $header['Location'];
@@ -1651,10 +1651,10 @@  discard block
 block discarded – undo
1651 1651
             // Authenticate crawler request:
1652 1652
         if (isset($_SERVER['HTTP_X_T3CRAWLER'])) {
1653 1653
             list($queueId, $hash) = explode(':', $_SERVER['HTTP_X_T3CRAWLER']);
1654
-            list($queueRec) = $this->db->exec_SELECTgetRows('*', 'tx_crawler_queue', 'qid=' . intval($queueId));
1654
+            list($queueRec) = $this->db->exec_SELECTgetRows('*', 'tx_crawler_queue', 'qid='.intval($queueId));
1655 1655
 
1656 1656
             // If a crawler record was found and hash was matching, set it up:
1657
-            if (is_array($queueRec) && $hash === md5($queueRec['qid'] . '|' . $queueRec['set_id'] . '|' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'])) {
1657
+            if (is_array($queueRec) && $hash === md5($queueRec['qid'].'|'.$queueRec['set_id'].'|'.$GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'])) {
1658 1658
                 $params['pObj']->applicationData['tx_crawler']['running'] = true;
1659 1659
                 $params['pObj']->applicationData['tx_crawler']['parameters'] = unserialize($queueRec['parameters']);
1660 1660
                 $params['pObj']->applicationData['tx_crawler']['log'] = [];
@@ -1711,7 +1711,7 @@  discard block
 block discarded – undo
1711 1711
         /* @var $tree \TYPO3\CMS\Backend\Tree\View\PageTreeView */
1712 1712
         $tree = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\CMS\Backend\Tree\View\PageTreeView');
1713 1713
         $perms_clause = $GLOBALS['BE_USER']->getPagePermsClause(1);
1714
-        $tree->init('AND ' . $perms_clause);
1714
+        $tree->init('AND '.$perms_clause);
1715 1715
 
1716 1716
         $pageinfo = \TYPO3\CMS\Backend\Utility\BackendUtility::readPageAccess($id, $perms_clause);
1717 1717
 
@@ -1734,19 +1734,19 @@  discard block
 block discarded – undo
1734 1734
 
1735 1735
             // recognize mount points
1736 1736
             if ($data['row']['doktype'] == 7) {
1737
-                $mountpage = $this->db->exec_SELECTgetRows('*', 'pages', 'uid = ' . $data['row']['uid']);
1737
+                $mountpage = $this->db->exec_SELECTgetRows('*', 'pages', 'uid = '.$data['row']['uid']);
1738 1738
 
1739 1739
                 // fetch mounted pages
1740
-                $this->MP = $mountpage[0]['mount_pid'] . '-' . $data['row']['uid'];
1740
+                $this->MP = $mountpage[0]['mount_pid'].'-'.$data['row']['uid'];
1741 1741
 
1742 1742
                 $mountTree = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\CMS\Backend\Tree\View\PageTreeView');
1743
-                $mountTree->init('AND ' . $perms_clause);
1743
+                $mountTree->init('AND '.$perms_clause);
1744 1744
                 $mountTree->getTree($mountpage[0]['mount_pid'], $depth, '');
1745 1745
 
1746 1746
                 foreach ($mountTree->tree as $mountData) {
1747 1747
                     $code .= $this->drawURLs_addRowsForPage(
1748 1748
                         $mountData['row'],
1749
-                        $mountData['HTML'] . \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordTitle('pages', $mountData['row'], true)
1749
+                        $mountData['HTML'].\TYPO3\CMS\Backend\Utility\BackendUtility::getRecordTitle('pages', $mountData['row'], true)
1750 1750
                     );
1751 1751
                 }
1752 1752
 
@@ -1761,7 +1761,7 @@  discard block
 block discarded – undo
1761 1761
 
1762 1762
             $code .= $this->drawURLs_addRowsForPage(
1763 1763
                 $data['row'],
1764
-                $data['HTML'] . \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordTitle('pages', $data['row'], true)
1764
+                $data['HTML'].\TYPO3\CMS\Backend\Utility\BackendUtility::getRecordTitle('pages', $data['row'], true)
1765 1765
             );
1766 1766
         }
1767 1767
 
@@ -1786,7 +1786,7 @@  discard block
 block discarded – undo
1786 1786
             if (!empty($excludeString)) {
1787 1787
                 /* @var $tree \TYPO3\CMS\Backend\Tree\View\PageTreeView */
1788 1788
                 $tree = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\CMS\Backend\Tree\View\PageTreeView');
1789
-                $tree->init('AND ' . $this->backendUser->getPagePermsClause(1));
1789
+                $tree->init('AND '.$this->backendUser->getPagePermsClause(1));
1790 1790
 
1791 1791
                 $excludeParts = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $excludeString);
1792 1792
 
@@ -1853,7 +1853,7 @@  discard block
 block discarded – undo
1853 1853
 
1854 1854
                     // Title column:
1855 1855
                 if (!$c) {
1856
-                    $titleClm = '<td rowspan="' . count($configurations) . '">' . $pageTitleAndIcon . '</td>';
1856
+                    $titleClm = '<td rowspan="'.count($configurations).'">'.$pageTitleAndIcon.'</td>';
1857 1857
                 } else {
1858 1858
                     $titleClm = '';
1859 1859
                 }
@@ -1880,45 +1880,45 @@  discard block
 block discarded – undo
1880 1880
                     foreach ($confArray['paramExpanded'] as $gVar => $gVal) {
1881 1881
                         $paramExpanded .= '
1882 1882
                             <tr>
1883
-                                <td class="bgColor4-20">' . htmlspecialchars('&' . $gVar . '=') . '<br/>' .
1884
-                                                '(' . count($gVal) . ')' .
1883
+                                <td class="bgColor4-20">' . htmlspecialchars('&'.$gVar.'=').'<br/>'.
1884
+                                                '('.count($gVal).')'.
1885 1885
                                                 '</td>
1886
-                                <td class="bgColor4" nowrap="nowrap">' . nl2br(htmlspecialchars(implode(chr(10), $gVal))) . '</td>
1886
+                                <td class="bgColor4" nowrap="nowrap">' . nl2br(htmlspecialchars(implode(chr(10), $gVal))).'</td>
1887 1887
                             </tr>
1888 1888
                         ';
1889 1889
                         $calcRes *= count($gVal);
1890 1890
                         $calcAccu[] = count($gVal);
1891 1891
                     }
1892
-                    $paramExpanded = '<table class="lrPadding c-list param-expanded">' . $paramExpanded . '</table>';
1893
-                    $paramExpanded .= 'Comb: ' . implode('*', $calcAccu) . '=' . $calcRes;
1892
+                    $paramExpanded = '<table class="lrPadding c-list param-expanded">'.$paramExpanded.'</table>';
1893
+                    $paramExpanded .= 'Comb: '.implode('*', $calcAccu).'='.$calcRes;
1894 1894
 
1895 1895
                     // Options
1896 1896
                     $optionValues = '';
1897 1897
                     if ($confArray['subCfg']['userGroups']) {
1898
-                        $optionValues .= 'User Groups: ' . $confArray['subCfg']['userGroups'] . '<br/>';
1898
+                        $optionValues .= 'User Groups: '.$confArray['subCfg']['userGroups'].'<br/>';
1899 1899
                     }
1900 1900
                     if ($confArray['subCfg']['baseUrl']) {
1901
-                        $optionValues .= 'Base Url: ' . $confArray['subCfg']['baseUrl'] . '<br/>';
1901
+                        $optionValues .= 'Base Url: '.$confArray['subCfg']['baseUrl'].'<br/>';
1902 1902
                     }
1903 1903
                     if ($confArray['subCfg']['procInstrFilter']) {
1904
-                        $optionValues .= 'ProcInstr: ' . $confArray['subCfg']['procInstrFilter'] . '<br/>';
1904
+                        $optionValues .= 'ProcInstr: '.$confArray['subCfg']['procInstrFilter'].'<br/>';
1905 1905
                     }
1906 1906
 
1907 1907
                     // Compile row:
1908 1908
                     $content .= '
1909
-                        <tr class="bgColor' . ($c % 2 ? '-20' : '-10') . '">
1910
-                            ' . $titleClm . '
1911
-                            <td>' . htmlspecialchars($confKey) . '</td>
1912
-                            <td>' . nl2br(htmlspecialchars(rawurldecode(trim(str_replace('&', chr(10) . '&', \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl('', $confArray['paramParsed'])))))) . '</td>
1913
-                            <td>' . $paramExpanded . '</td>
1914
-                            <td nowrap="nowrap">' . $urlList . '</td>
1915
-                            <td nowrap="nowrap">' . $optionValues . '</td>
1916
-                            <td nowrap="nowrap">' . \TYPO3\CMS\Core\Utility\DebugUtility::viewArray($confArray['subCfg']['procInstrParams.']) . '</td>
1909
+                        <tr class="bgColor' . ($c % 2 ? '-20' : '-10').'">
1910
+                            ' . $titleClm.'
1911
+                            <td>' . htmlspecialchars($confKey).'</td>
1912
+                            <td>' . nl2br(htmlspecialchars(rawurldecode(trim(str_replace('&', chr(10).'&', \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl('', $confArray['paramParsed'])))))).'</td>
1913
+                            <td>' . $paramExpanded.'</td>
1914
+                            <td nowrap="nowrap">' . $urlList.'</td>
1915
+                            <td nowrap="nowrap">' . $optionValues.'</td>
1916
+                            <td nowrap="nowrap">' . \TYPO3\CMS\Core\Utility\DebugUtility::viewArray($confArray['subCfg']['procInstrParams.']).'</td>
1917 1917
                         </tr>';
1918 1918
                 } else {
1919
-                    $content .= '<tr class="bgColor' . ($c % 2 ? '-20' : '-10') . '">
1920
-                            ' . $titleClm . '
1921
-                            <td>' . htmlspecialchars($confKey) . '</td>
1919
+                    $content .= '<tr class="bgColor'.($c % 2 ? '-20' : '-10').'">
1920
+                            ' . $titleClm.'
1921
+                            <td>' . htmlspecialchars($confKey).'</td>
1922 1922
                             <td colspan="5"><em>No entries</em> (Page is excluded in this configuration)</td>
1923 1923
                         </tr>';
1924 1924
                 }
@@ -1926,13 +1926,13 @@  discard block
 block discarded – undo
1926 1926
                 $c++;
1927 1927
             }
1928 1928
         } else {
1929
-            $message = !empty($skipMessage) ? ' (' . $skipMessage . ')' : '';
1929
+            $message = !empty($skipMessage) ? ' ('.$skipMessage.')' : '';
1930 1930
 
1931 1931
             // Compile row:
1932 1932
             $content .= '
1933 1933
                 <tr class="bgColor-20" style="border-bottom: 1px solid black;">
1934
-                    <td>' . $pageTitleAndIcon . '</td>
1935
-                    <td colspan="6"><em>No entries</em>' . $message . '</td>
1934
+                    <td>' . $pageTitleAndIcon.'</td>
1935
+                    <td colspan="6"><em>No entries</em>' . $message.'</td>
1936 1936
                 </tr>';
1937 1937
         }
1938 1938
 
@@ -1947,7 +1947,7 @@  discard block
 block discarded – undo
1947 1947
         $res = $this->db->exec_SELECTquery(
1948 1948
             'count(*) as num',
1949 1949
             'tx_crawler_queue',
1950
-            'exec_time=0 AND process_scheduled=0 AND scheduled<=' . $this->getCurrentTime()
1950
+            'exec_time=0 AND process_scheduled=0 AND scheduled<='.$this->getCurrentTime()
1951 1951
         );
1952 1952
 
1953 1953
         $count = $this->db->sql_fetch_assoc($res);
@@ -1998,7 +1998,7 @@  discard block
 block discarded – undo
1998 1998
             //TODO can't we do that in a clean way?
1999 1999
             $releaseStatus = $this->CLI_releaseProcesses($this->CLI_buildProcessId());
2000 2000
 
2001
-            $this->CLI_debug("Unprocessed Items remaining:" . $this->getUnprocessedItemsCount() . " (" . $this->CLI_buildProcessId() . ")");
2001
+            $this->CLI_debug("Unprocessed Items remaining:".$this->getUnprocessedItemsCount()." (".$this->CLI_buildProcessId().")");
2002 2002
             $result |= ($this->getUnprocessedItemsCount() > 0 ? self::CLI_STATUS_REMAIN : self::CLI_STATUS_NOTHING_PROCCESSED);
2003 2003
         } else {
2004 2004
             $result |= self::CLI_STATUS_ABORTED;
@@ -2082,32 +2082,32 @@  discard block
 block discarded – undo
2082 2082
         );
2083 2083
 
2084 2084
         if ($cliObj->cli_argValue('-o') === 'url') {
2085
-            $cliObj->cli_echo(implode(chr(10), $this->downloadUrls) . chr(10), 1);
2085
+            $cliObj->cli_echo(implode(chr(10), $this->downloadUrls).chr(10), 1);
2086 2086
         } elseif ($cliObj->cli_argValue('-o') === 'exec') {
2087
-            $cliObj->cli_echo("Executing " . count($this->urlList) . " requests right away:\n\n");
2088
-            $cliObj->cli_echo(implode(chr(10), $this->urlList) . chr(10));
2087
+            $cliObj->cli_echo("Executing ".count($this->urlList)." requests right away:\n\n");
2088
+            $cliObj->cli_echo(implode(chr(10), $this->urlList).chr(10));
2089 2089
             $cliObj->cli_echo("\nProcessing:\n");
2090 2090
 
2091 2091
             foreach ($this->queueEntries as $queueRec) {
2092 2092
                 $p = unserialize($queueRec['parameters']);
2093
-                $cliObj->cli_echo($p['url'] . ' (' . implode(',', $p['procInstructions']) . ') => ');
2093
+                $cliObj->cli_echo($p['url'].' ('.implode(',', $p['procInstructions']).') => ');
2094 2094
 
2095 2095
                 $result = $this->readUrlFromArray($queueRec);
2096 2096
 
2097 2097
                 $requestResult = unserialize($result['content']);
2098 2098
                 if (is_array($requestResult)) {
2099
-                    $resLog = is_array($requestResult['log']) ? chr(10) . chr(9) . chr(9) . implode(chr(10) . chr(9) . chr(9), $requestResult['log']) : '';
2100
-                    $cliObj->cli_echo('OK: ' . $resLog . chr(10));
2099
+                    $resLog = is_array($requestResult['log']) ? chr(10).chr(9).chr(9).implode(chr(10).chr(9).chr(9), $requestResult['log']) : '';
2100
+                    $cliObj->cli_echo('OK: '.$resLog.chr(10));
2101 2101
                 } else {
2102
-                    $cliObj->cli_echo('Error checking Crawler Result: ' . substr(preg_replace('/\s+/', ' ', strip_tags($result['content'])), 0, 30000) . '...' . chr(10));
2102
+                    $cliObj->cli_echo('Error checking Crawler Result: '.substr(preg_replace('/\s+/', ' ', strip_tags($result['content'])), 0, 30000).'...'.chr(10));
2103 2103
                 }
2104 2104
             }
2105 2105
         } elseif ($cliObj->cli_argValue('-o') === 'queue') {
2106
-            $cliObj->cli_echo("Putting " . count($this->urlList) . " entries in queue:\n\n");
2107
-            $cliObj->cli_echo(implode(chr(10), $this->urlList) . chr(10));
2106
+            $cliObj->cli_echo("Putting ".count($this->urlList)." entries in queue:\n\n");
2107
+            $cliObj->cli_echo(implode(chr(10), $this->urlList).chr(10));
2108 2108
         } else {
2109
-            $cliObj->cli_echo(count($this->urlList) . " entries found for processing. (Use -o to decide action):\n\n", 1);
2110
-            $cliObj->cli_echo(implode(chr(10), $this->urlList) . chr(10), 1);
2109
+            $cliObj->cli_echo(count($this->urlList)." entries found for processing. (Use -o to decide action):\n\n", 1);
2110
+            $cliObj->cli_echo(implode(chr(10), $this->urlList).chr(10), 1);
2111 2111
         }
2112 2112
     }
2113 2113
 
@@ -2161,7 +2161,7 @@  discard block
 block discarded – undo
2161 2161
      * @param  tx_crawler_cli_im $cliObj    Command line object
2162 2162
      * @return mixed                        Array of keys or null if no keys found
2163 2163
      */
2164
-    protected function getConfigurationKeys(tx_crawler_cli_im &$cliObj)
2164
+    protected function getConfigurationKeys(tx_crawler_cli_im & $cliObj)
2165 2165
     {
2166 2166
         $parameter = trim($cliObj->cli_argValue('-conf'));
2167 2167
         return ($parameter != '' ? \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $parameter) : []);
@@ -2188,7 +2188,7 @@  discard block
 block discarded – undo
2188 2188
             $purgeDate = $this->getCurrentTime() - 24 * 60 * 60 * intval($this->extensionSettings['purgeQueueDays']);
2189 2189
             $del = $this->db->exec_DELETEquery(
2190 2190
                 'tx_crawler_queue',
2191
-                'exec_time!=0 AND exec_time<' . $purgeDate
2191
+                'exec_time!=0 AND exec_time<'.$purgeDate
2192 2192
             );
2193 2193
         }
2194 2194
 
@@ -2219,7 +2219,7 @@  discard block
 block discarded – undo
2219 2219
             //TODO make sure we're not taking assigned queue-entires
2220 2220
             $this->db->exec_UPDATEquery(
2221 2221
                 'tx_crawler_queue',
2222
-                'qid IN (' . implode(',', $quidList) . ')',
2222
+                'qid IN ('.implode(',', $quidList).')',
2223 2223
                 [
2224 2224
                     'process_scheduled' => intval($this->getCurrentTime()),
2225 2225
                     'process_id' => $processId
@@ -2230,7 +2230,7 @@  discard block
 block discarded – undo
2230 2230
             $numberOfAffectedRows = $this->db->sql_affected_rows();
2231 2231
             $this->db->exec_UPDATEquery(
2232 2232
                 'tx_crawler_process',
2233
-                "process_id = '" . $processId . "'",
2233
+                "process_id = '".$processId."'",
2234 2234
                 [
2235 2235
                     'assigned_items_count' => intval($numberOfAffectedRows)
2236 2236
                 ]
@@ -2240,7 +2240,7 @@  discard block
 block discarded – undo
2240 2240
                 $this->db->sql_query('COMMIT');
2241 2241
             } else {
2242 2242
                 $this->db->sql_query('ROLLBACK');
2243
-                $this->CLI_debug("Nothing processed due to multi-process collision (" . $this->CLI_buildProcessId() . ")");
2243
+                $this->CLI_debug("Nothing processed due to multi-process collision (".$this->CLI_buildProcessId().")");
2244 2244
                 return ($result | self::CLI_STATUS_ABORTED);
2245 2245
             }
2246 2246
 
@@ -2257,7 +2257,7 @@  discard block
 block discarded – undo
2257 2257
                 }
2258 2258
 
2259 2259
                 if (!$this->CLI_checkIfProcessIsActive($this->CLI_buildProcessId())) {
2260
-                    $this->CLI_debug("conflict / timeout (" . $this->CLI_buildProcessId() . ")");
2260
+                    $this->CLI_debug("conflict / timeout (".$this->CLI_buildProcessId().")");
2261 2261
 
2262 2262
                     //TODO might need an additional returncode
2263 2263
                     $result |= self::CLI_STATUS_ABORTED;
@@ -2267,10 +2267,10 @@  discard block
 block discarded – undo
2267 2267
 
2268 2268
             sleep(intval($sleepAfterFinish));
2269 2269
 
2270
-            $msg = 'Rows: ' . $counter;
2271
-            $this->CLI_debug($msg . " (" . $this->CLI_buildProcessId() . ")");
2270
+            $msg = 'Rows: '.$counter;
2271
+            $this->CLI_debug($msg." (".$this->CLI_buildProcessId().")");
2272 2272
         } else {
2273
-            $this->CLI_debug("Nothing within queue which needs to be processed (" . $this->CLI_buildProcessId() . ")");
2273
+            $this->CLI_debug("Nothing within queue which needs to be processed (".$this->CLI_buildProcessId().")");
2274 2274
         }
2275 2275
 
2276 2276
         if ($counter > 0) {
@@ -2338,7 +2338,7 @@  discard block
 block discarded – undo
2338 2338
 
2339 2339
         // if there are less than allowed active processes then add a new one
2340 2340
         if ($processCount < intval($this->extensionSettings['processLimit'])) {
2341
-            $this->CLI_debug("add " . $this->CLI_buildProcessId() . " (" . ($processCount + 1) . "/" . intval($this->extensionSettings['processLimit']) . ")");
2341
+            $this->CLI_debug("add ".$this->CLI_buildProcessId()." (".($processCount + 1)."/".intval($this->extensionSettings['processLimit']).")");
2342 2342
 
2343 2343
             // create new process record
2344 2344
             $this->db->exec_INSERTquery(
@@ -2351,7 +2351,7 @@  discard block
 block discarded – undo
2351 2351
                 ]
2352 2352
                 );
2353 2353
         } else {
2354
-            $this->CLI_debug("Processlimit reached (" . ($processCount) . "/" . intval($this->extensionSettings['processLimit']) . ")");
2354
+            $this->CLI_debug("Processlimit reached (".($processCount)."/".intval($this->extensionSettings['processLimit']).")");
2355 2355
             $ret = false;
2356 2356
         }
2357 2357
 
@@ -2377,7 +2377,7 @@  discard block
 block discarded – undo
2377 2377
         }
2378 2378
 
2379 2379
         if (!count($releaseIds) > 0) {
2380
-            return false;   //nothing to release
2380
+            return false; //nothing to release
2381 2381
         }
2382 2382
 
2383 2383
         if (!$withinLock) {
@@ -2412,14 +2412,14 @@  discard block
 block discarded – undo
2412 2412
         // mark all requested processes as non-active
2413 2413
         $this->db->exec_UPDATEquery(
2414 2414
             'tx_crawler_process',
2415
-            'process_id IN (\'' . implode('\',\'', $releaseIds) . '\') AND deleted=0',
2415
+            'process_id IN (\''.implode('\',\'', $releaseIds).'\') AND deleted=0',
2416 2416
             [
2417 2417
                 'active' => '0'
2418 2418
             ]
2419 2419
         );
2420 2420
         $this->db->exec_UPDATEquery(
2421 2421
             'tx_crawler_queue',
2422
-            'exec_time=0 AND process_id IN ("' . implode('","', $releaseIds) . '")',
2422
+            'exec_time=0 AND process_id IN ("'.implode('","', $releaseIds).'")',
2423 2423
             [
2424 2424
                 'process_scheduled' => 0,
2425 2425
                 'process_id' => ''
@@ -2459,7 +2459,7 @@  discard block
 block discarded – undo
2459 2459
         $res = $this->db->exec_SELECTquery(
2460 2460
             'process_id,active,ttl',
2461 2461
             'tx_crawler_process',
2462
-            'process_id = \'' . $pid . '\'  AND deleted=0',
2462
+            'process_id = \''.$pid.'\'  AND deleted=0',
2463 2463
             '',
2464 2464
             'ttl',
2465 2465
             '0,1'
@@ -2503,7 +2503,7 @@  discard block
 block discarded – undo
2503 2503
     public function CLI_debug($msg)
2504 2504
     {
2505 2505
         if (intval($this->extensionSettings['processDebug'])) {
2506
-            echo $msg . "\n";
2506
+            echo $msg."\n";
2507 2507
             flush();
2508 2508
         }
2509 2509
     }
@@ -2521,7 +2521,7 @@  discard block
 block discarded – undo
2521 2521
 
2522 2522
         $cmd = escapeshellcmd($this->extensionSettings['phpPath']);
2523 2523
         $cmd .= ' ';
2524
-        $cmd .= escapeshellarg(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('crawler') . 'cli/bootstrap.php');
2524
+        $cmd .= escapeshellarg(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('crawler').'cli/bootstrap.php');
2525 2525
         $cmd .= ' ';
2526 2526
         $cmd .= escapeshellarg($this->getFrontendBasePath());
2527 2527
         $cmd .= ' ';
@@ -2531,10 +2531,10 @@  discard block
 block discarded – undo
2531 2531
 
2532 2532
         $startTime = microtime(true);
2533 2533
         $content = $this->executeShellCommand($cmd);
2534
-        $this->log($url . ' ' . (microtime(true) - $startTime));
2534
+        $this->log($url.' '.(microtime(true) - $startTime));
2535 2535
 
2536 2536
         $result = [
2537
-            'request' => implode("\r\n", $requestHeaders) . "\r\n\r\n",
2537
+            'request' => implode("\r\n", $requestHeaders)."\r\n\r\n",
2538 2538
             'headers' => '',
2539 2539
             'content' => $content
2540 2540
         ];
@@ -2555,7 +2555,7 @@  discard block
 block discarded – undo
2555 2555
         $scheduledAgeInSeconds = $this->extensionSettings['cleanUpScheduledAge'] * 86400;
2556 2556
 
2557 2557
         $now = time();
2558
-        $condition = '(exec_time<>0 AND exec_time<' . ($now - $processedAgeInSeconds) . ') OR scheduled<=' . ($now - $scheduledAgeInSeconds);
2558
+        $condition = '(exec_time<>0 AND exec_time<'.($now - $processedAgeInSeconds).') OR scheduled<='.($now - $scheduledAgeInSeconds);
2559 2559
         $this->flushQueue($condition);
2560 2560
     }
2561 2561
 
Please login to merge, or discard this patch.
domain/process/class.tx_crawler_domain_process_manager.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
     public function multiProcess($timeout)
88 88
     {
89 89
         if ($this->processLimit <= 1) {
90
-            throw new RuntimeException('To run crawler in multi process mode you have to configure the processLimit > 1.' . PHP_EOL);
90
+            throw new RuntimeException('To run crawler in multi process mode you have to configure the processLimit > 1.'.PHP_EOL);
91 91
         }
92 92
 
93 93
         $pendingItemsStart = $this->queueRepository->countAllPendingItems();
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
             }
106 106
             if ($currentPendingItems == 0) {
107 107
                 if ($this->verbose) {
108
-                    echo 'Finished...' . chr(10);
108
+                    echo 'Finished...'.chr(10);
109 109
                 }
110 110
                 break;
111 111
             }
@@ -117,16 +117,16 @@  discard block
 block discarded – undo
117 117
             }
118 118
             sleep(1);
119 119
             if ($nextTimeOut < time()) {
120
-                $timedOutProcesses = $this->processRepository->findAll('', 'DESC', null, 0, 'ttl >' . $nextTimeOut);
120
+                $timedOutProcesses = $this->processRepository->findAll('', 'DESC', null, 0, 'ttl >'.$nextTimeOut);
121 121
                 $nextTimeOut = time() + $this->timeToLive;
122 122
                 if ($this->verbose) {
123
-                    echo 'Cleanup' . implode(',', $timedOutProcesses->getProcessIds()) . chr(10);
123
+                    echo 'Cleanup'.implode(',', $timedOutProcesses->getProcessIds()).chr(10);
124 124
                 }
125 125
                 $this->crawlerObj->CLI_releaseProcesses($timedOutProcesses->getProcessIds(), true);
126 126
             }
127 127
         }
128 128
         if ($currentPendingItems > 0 && $this->verbose) {
129
-            echo 'Stop with timeout' . chr(10);
129
+            echo 'Stop with timeout'.chr(10);
130 130
         }
131 131
     }
132 132
 
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
      */
136 136
     protected function reportItemStatus()
137 137
     {
138
-        echo 'Pending:' . $this->queueRepository->countAllPendingItems() . ' / Assigned:' . $this->queueRepository->countAllAssignedPendingItems() . chr(10);
138
+        echo 'Pending:'.$this->queueRepository->countAllPendingItems().' / Assigned:'.$this->queueRepository->countAllAssignedPendingItems().chr(10);
139 139
     }
140 140
 
141 141
     /**
@@ -149,14 +149,14 @@  discard block
 block discarded – undo
149 149
         $currentProcesses = $this->processRepository->countActive();
150 150
         $availableProcessesCount = $this->processLimit - $currentProcesses;
151 151
         $requiredProcessesCount = ceil($this->queueRepository->countAllUnassignedPendingItems() / $this->countInARun);
152
-        $startProcessCount = min([$availableProcessesCount,$requiredProcessesCount]);
152
+        $startProcessCount = min([$availableProcessesCount, $requiredProcessesCount]);
153 153
         if ($startProcessCount <= 0) {
154 154
             return $ret;
155 155
         }
156 156
         if ($startProcessCount && $this->verbose) {
157
-            echo 'Start ' . $startProcessCount . ' new processes (Running:' . $currentProcesses . ')';
157
+            echo 'Start '.$startProcessCount.' new processes (Running:'.$currentProcesses.')';
158 158
         }
159
-        for ($i = 0;$i < $startProcessCount;$i++) {
159
+        for ($i = 0; $i < $startProcessCount; $i++) {
160 160
             usleep(100);
161 161
             if ($this->startProcess()) {
162 162
                 if ($this->verbose) {
@@ -179,11 +179,11 @@  discard block
 block discarded – undo
179 179
     {
180 180
         $ttl = (time() + $this->timeToLive - 1);
181 181
         $current = $this->processRepository->countNotTimeouted($ttl);
182
-        $completePath = '(' . escapeshellcmd($this->getCrawlerCliPath()) . ' &) > /dev/null';
182
+        $completePath = '('.escapeshellcmd($this->getCrawlerCliPath()).' &) > /dev/null';
183 183
         if (system($completePath) === false) {
184 184
             throw new Exception('could not start process!');
185 185
         } else {
186
-            for ($i = 0;$i < 10;$i++) {
186
+            for ($i = 0; $i < 10; $i++) {
187 187
                 if ($this->processRepository->countNotTimeouted($ttl) > $current) {
188 188
                     return true;
189 189
                 }
@@ -200,10 +200,10 @@  discard block
 block discarded – undo
200 200
      */
201 201
     public function getCrawlerCliPath()
202 202
     {
203
-        $phpPath = $this->crawlerObj->extensionSettings['phpPath'] . ' ';
203
+        $phpPath = $this->crawlerObj->extensionSettings['phpPath'].' ';
204 204
         $pathToTypo3 = rtrim(\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_DOCUMENT_ROOT'), '/');
205 205
         $pathToTypo3 .= rtrim(\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SITE_PATH'), '/');
206 206
         $cliPart = '/typo3/cli_dispatch.phpsh crawler';
207
-        return $phpPath . $pathToTypo3 . $cliPart;
207
+        return $phpPath.$pathToTypo3.$cliPart;
208 208
     }
209 209
 }
Please login to merge, or discard this patch.
modfunc1/class.tx_crawler_modfunc1.php 1 patch
Spacing   +97 added lines, -97 removed lines patch added patch discarded remove patch
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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,12 +307,12 @@  discard block
 block discarded – undo
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',
314 314
                                                                             $this->findCrawler()->setID,
315
-                                                                            [	'reason' => $reason ]
315
+                                                                            ['reason' => $reason]
316 316
                 );
317 317
             }
318 318
 
@@ -333,25 +333,25 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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>&nbsp;</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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
Classes/Api/CrawlerApi.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -192,12 +192,12 @@  discard block
 block discarded – undo
192 192
         //if the same page is scheduled for the same time and has not be executed?
193 193
         if ($schedule_timestamp == 0) {
194 194
             //untimed elements need an exec_time with 0 because they can occure multiple times
195
-            $where = 'page_id=' . $page_uid . ' AND exec_time = 0 AND scheduled=' . $schedule_timestamp;
195
+            $where = 'page_id='.$page_uid.' AND exec_time = 0 AND scheduled='.$schedule_timestamp;
196 196
         } else {
197 197
             //timed elementes have got a fixed schedule time, if a record with this time
198 198
             //exists it is maybe queued for the future, or is has been queue for the past and therefore
199 199
             //also been processed.
200
-            $where = 'page_id=' . $page_uid . ' AND scheduled=' . $schedule_timestamp;
200
+            $where = 'page_id='.$page_uid.' AND scheduled='.$schedule_timestamp;
201 201
         }
202 202
 
203 203
         $row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($GLOBALS['TYPO3_DB']->exec_SELECTquery(
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
 
228 228
         $isPageInQueue = false;
229 229
 
230
-        $whereClause = 'page_id = ' . (integer)$uid;
230
+        $whereClause = 'page_id = '.(integer) $uid;
231 231
 
232 232
         if (false !== $unprocessed_only) {
233 233
             $whereClause .= ' AND exec_time = 0';
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
         }
239 239
 
240 240
         if (false !== $timestamp) {
241
-            $whereClause .= ' AND scheduled = ' . (integer)$timestamp;
241
+            $whereClause .= ' AND scheduled = '.(integer) $timestamp;
242 242
         }
243 243
 
244 244
         $count = $GLOBALS['TYPO3_DB']->exec_SELECTcountRows(
@@ -267,10 +267,10 @@  discard block
 block discarded – undo
267 267
     {
268 268
         $uid = intval($uid);
269 269
         $query = 'max(scheduled) as latest';
270
-        $where = ' page_id = ' . $uid;
270
+        $where = ' page_id = '.$uid;
271 271
 
272 272
         if ($future_crawldates_only) {
273
-            $where .= ' AND scheduled > ' . time();
273
+            $where .= ' AND scheduled > '.time();
274 274
         }
275 275
 
276 276
         if ($unprocessed_only) {
@@ -303,7 +303,7 @@  discard block
 block discarded – undo
303 303
         $limit = $GLOBALS['TYPO3_DB']->fullQuoteStr($limit, 'tx_crawler_queue');
304 304
 
305 305
         $query = 'scheduled, exec_time, set_id';
306
-        $where = ' page_id = ' . $uid;
306
+        $where = ' page_id = '.$uid;
307 307
 
308 308
         $limit_query = ($limit) ? $limit : null;
309 309
 
@@ -380,7 +380,7 @@  discard block
 block discarded – undo
380 380
     {
381 381
         $qid = intval($qid);
382 382
         $table = 'tx_crawler_queue';
383
-        $where = ' qid=' . $qid;
383
+        $where = ' qid='.$qid;
384 384
         $GLOBALS['TYPO3_DB']->exec_DELETEquery($table, $where);
385 385
     }
386 386
 
Please login to merge, or discard this patch.
Classes/Hooks/TsfeHook.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -49,10 +49,10 @@  discard block
 block discarded – undo
49 49
             //@todo: ask service to exclude current call for special reasons: for example no relevance because the language version is not affected
50 50
 
51 51
             list($queueId, $hash) = explode(':', $_SERVER['HTTP_X_T3CRAWLER']);
52
-            list($queueRec) = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', 'tx_crawler_queue', 'qid=' . intval($queueId));
52
+            list($queueRec) = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', 'tx_crawler_queue', 'qid='.intval($queueId));
53 53
 
54 54
             // If a crawler record was found and hash was matching, set it up:
55
-            if (is_array($queueRec) && $hash === md5($queueRec['qid'] . '|' . $queueRec['set_id'] . '|' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'])) {
55
+            if (is_array($queueRec) && $hash === md5($queueRec['qid'].'|'.$queueRec['set_id'].'|'.$GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'])) {
56 56
                 $params['pObj']->applicationData['tx_crawler']['running'] = true;
57 57
                 $params['pObj']->applicationData['tx_crawler']['parameters'] = unserialize($queueRec['parameters']);
58 58
                 $params['pObj']->applicationData['tx_crawler']['log'] = [];
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
                     $params['pObj']->fe_user->user = [];
81 81
                 }
82 82
                 $params['pObj']->fe_user->user['usergroup'] = $grList;
83
-                $params['pObj']->applicationData['tx_crawler']['log'][] = 'User Groups: ' . $grList;
83
+                $params['pObj']->applicationData['tx_crawler']['log'][] = 'User Groups: '.$grList;
84 84
             }
85 85
         }
86 86
     }
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
                 foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['crawler']['pollSuccess'] as $pollable) {
126 126
                     if (is_array($params['pObj']->applicationData['tx_crawler']['content']['parameters']['procInstructions']) && in_array($pollable, $params['pObj']->applicationData['tx_crawler']['content']['parameters']['procInstructions'])) {
127 127
                         if (empty($params['pObj']->applicationData['tx_crawler']['success'][$pollable])) {
128
-                            $params['pObj']->applicationData['tx_crawler']['errorlog'][] = 'Error: Pollable extension (' . $pollable . ') did not complete successfully.';
128
+                            $params['pObj']->applicationData['tx_crawler']['errorlog'][] = 'Error: Pollable extension ('.$pollable.') did not complete successfully.';
129 129
                         }
130 130
                     }
131 131
                 }
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
             $str = serialize($params['pObj']->applicationData['tx_crawler']);
136 136
             //just make sure that no other output distracts this
137 137
             ob_clean();
138
-            header('Content-Length: ' . strlen($str));
138
+            header('Content-Length: '.strlen($str));
139 139
             echo $str;
140 140
             // Exit since we don't want anymore output!
141 141
             exit;
Please login to merge, or discard this patch.
Classes/Utility/TcaUtility.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
     {
40 40
         if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['crawler']['procInstructions'])) {
41 41
             foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['crawler']['procInstructions'] as $key => $value) {
42
-                $configuration['items'][] = [$value . ' [' . $key . ']', $key, $this->getExtensionIcon($key)];
42
+                $configuration['items'][] = [$value.' ['.$key.']', $key, $this->getExtensionIcon($key)];
43 43
             }
44 44
         }
45 45
 
@@ -59,8 +59,8 @@  discard block
 block discarded – undo
59 59
         if (method_exists(ExtensionManagementUtility::class, 'getExtensionKeyByPrefix')) {
60 60
             $parts = explode('_', $key);
61 61
             if (is_array($parts) && count($parts) > 2) {
62
-                $extensionKey = ExtensionManagementUtility::getExtensionKeyByPrefix('tx_' . $parts[1]);
63
-                $extIcon = ExtensionManagementUtility::siteRelPath($extensionKey) . 'ext_icon.gif';
62
+                $extensionKey = ExtensionManagementUtility::getExtensionKeyByPrefix('tx_'.$parts[1]);
63
+                $extIcon = ExtensionManagementUtility::siteRelPath($extensionKey).'ext_icon.gif';
64 64
             }
65 65
         }
66 66
 
Please login to merge, or discard this patch.