Completed
Push — issue/224 ( 965982 )
by Tomas Norre
09:15
created
Classes/Utility/HookUtility.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -45,17 +45,17 @@
 block discarded – undo
45 45
     public static function registerHooks($extKey)
46 46
     {
47 47
         $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['connectToDB']['tx_crawler'] =
48
-            TsfeHook::class . '->fe_init';
48
+            TsfeHook::class.'->fe_init';
49 49
         $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['initFEuser']['tx_crawler'] =
50
-            TsfeHook::class . '->fe_feuserInit';
50
+            TsfeHook::class.'->fe_feuserInit';
51 51
         $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['isOutputting']['tx_crawler'] =
52
-            TsfeHook::class . '->fe_isOutputting';
52
+            TsfeHook::class.'->fe_isOutputting';
53 53
         $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['hook_eofe']['tx_crawler'] =
54
-            TsfeHook::class . '->fe_eofe';
54
+            TsfeHook::class.'->fe_eofe';
55 55
 
56 56
         // Activating NC Static File Cache hook
57 57
         $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['nc_staticfilecache/class.tx_ncstaticfilecache.php']['createFile_initializeVariables']['tx_crawler'] =
58
-            StaticFileCacheCreateUriHook::class . '->initialize';
58
+            StaticFileCacheCreateUriHook::class.'->initialize';
59 59
 
60 60
         // Activating Crawler cli_hooks
61 61
         $GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$extKey]['cli_hooks'][] =
Please login to merge, or discard this patch.
Classes/Hooks/ProcessCleanUpHook.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -70,14 +70,14 @@  discard block
 block discarded – undo
70 70
         $results = $this->getDatabaseConnection()->exec_SELECTgetRows(
71 71
             'process_id, system_process_id',
72 72
             'tx_crawler_process',
73
-            'ttl <= ' . intval(time() - $this->extensionSettings['processMaxRunTime'] - 3600) . ' AND active = 1'
73
+            'ttl <= '.intval(time() - $this->extensionSettings['processMaxRunTime'] - 3600).' AND active = 1'
74 74
         );
75 75
 
76 76
         if (!is_array($results)) {
77 77
             return;
78 78
         }
79 79
         foreach ($results as $result) {
80
-            $systemProcessId = (int)$result['system_process_id'];
80
+            $systemProcessId = (int) $result['system_process_id'];
81 81
             $processId = $result['process_id'];
82 82
             if ($systemProcessId > 1) {
83 83
                 if ($this->doProcessStillExists($systemProcessId)) {
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
         $results = $this->getDatabaseConnection()->exec_SELECTgetRows(
99 99
             'process_id, system_process_id',
100 100
             'tx_crawler_process',
101
-            'ttl <= ' . intval(time() - $this->extensionSettings['processMaxRunTime']) . ' AND active = 1'
101
+            'ttl <= '.intval(time() - $this->extensionSettings['processMaxRunTime']).' AND active = 1'
102 102
         );
103 103
 
104 104
         if (!is_array($results)) {
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
         }
107 107
         foreach ($results as $result) {
108 108
             $processExists = false;
109
-            $systemProcessId = (int)$result['system_process_id'];
109
+            $systemProcessId = (int) $result['system_process_id'];
110 110
             $processId = $result['process_id'];
111 111
             if ($systemProcessId > 1) {
112 112
                 $dispatcherProcesses = $this->findDispatcherProcesses();
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
                 }
117 117
                 foreach ($dispatcherProcesses as $process) {
118 118
                     $responseArray = $this->createResponseArray($process);
119
-                    if ($systemProcessId === (int)$responseArray[1]) {
119
+                    if ($systemProcessId === (int) $responseArray[1]) {
120 120
                         $processExists = true;
121 121
                     };
122 122
                 }
@@ -138,12 +138,12 @@  discard block
 block discarded – undo
138 138
     {
139 139
         $this->getDatabaseConnection()->exec_DELETEquery(
140 140
             'tx_crawler_process',
141
-            'process_id = ' . $this->getDatabaseConnection()->fullQuoteStr($processId, 'tx_crawler_process')
141
+            'process_id = '.$this->getDatabaseConnection()->fullQuoteStr($processId, 'tx_crawler_process')
142 142
         );
143 143
 
144 144
         $this->getDatabaseConnection()->exec_UPDATEquery(
145 145
             'tx_crawler_queue',
146
-            'process_id = ' . $this->getDatabaseConnection()->fullQuoteStr($processId, 'tx_crawler_queue'),
146
+            'process_id = '.$this->getDatabaseConnection()->fullQuoteStr($processId, 'tx_crawler_queue'),
147 147
             ['process_id' => '']
148 148
         );
149 149
     }
@@ -177,12 +177,12 @@  discard block
 block discarded – undo
177 177
         $doProcessStillExists = false;
178 178
         if (!$this->isOsWindows()) {
179 179
             // Not windows
180
-            if (file_exists('/proc/' . $pid)) {
180
+            if (file_exists('/proc/'.$pid)) {
181 181
                 $doProcessStillExists = true;
182 182
             }
183 183
         } else {
184 184
             // Windows
185
-            exec('tasklist | find "' . $pid . '"', $returnArray, $returnValue);
185
+            exec('tasklist | find "'.$pid.'"', $returnArray, $returnValue);
186 186
             if (count($returnArray) > 0 && preg_match('/php/i', $returnValue[0])) {
187 187
                 $doProcessStillExists = true;
188 188
             }
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
             posix_kill($pid, 9);
205 205
         } else {
206 206
             // Windows
207
-            exec('taskkill /PID ' . $pid);
207
+            exec('taskkill /PID '.$pid);
208 208
         }
209 209
     }
210 210
 
Please login to merge, or discard this patch.
Classes/Task/CrawlerQueueTaskAdditionalFieldProvider.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 
87 87
         // input for startPage
88 88
         $fieldId = 'task_startPage';
89
-        $fieldCode = '<input name="tx_scheduler[startPage]" type="text" id="' . $fieldId . '" value="' . $task->startPage . '" class="form-control" />';
89
+        $fieldCode = '<input name="tx_scheduler[startPage]" type="text" id="'.$fieldId.'" value="'.$task->startPage.'" class="form-control" />';
90 90
         $additionalFields[$fieldId] = [
91 91
             'code' => $fieldCode,
92 92
             'label' => 'LLL:EXT:crawler/Resources/Private/Language/Backend.xlf:crawler_im.startPage'
@@ -102,10 +102,10 @@  discard block
 block discarded – undo
102 102
             '4' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.depth_4'),
103 103
             '99' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.depth_infi'),
104 104
         ];
105
-        $fieldCode = '<select name="tx_scheduler[depth]" id="' . $fieldId . '" class="form-control">';
105
+        $fieldCode = '<select name="tx_scheduler[depth]" id="'.$fieldId.'" class="form-control">';
106 106
 
107 107
         foreach ($fieldValueArray as $key => $label) {
108
-            $fieldCode .= "\t" . '<option value="' . $key . '"' . (($key == $task->depth) ? ' selected="selected"' : '') . '>' . $label . '</option>';
108
+            $fieldCode .= "\t".'<option value="'.$key.'"'.(($key == $task->depth) ? ' selected="selected"' : '').'>'.$label.'</option>';
109 109
         }
110 110
 
111 111
         $fieldCode .= '</select>';
@@ -117,10 +117,10 @@  discard block
 block discarded – undo
117 117
         // combobox for configuration records
118 118
         $recordsArray = $this->getCrawlerConfigurationRecords();
119 119
         $fieldId = 'task_configuration';
120
-        $fieldCode = '<select name="tx_scheduler[configuration][]" multiple="multiple" id="' . $fieldId . '" class="form-control">';
121
-        $fieldCode .= "\t" . '<option value=""></option>';
120
+        $fieldCode = '<select name="tx_scheduler[configuration][]" multiple="multiple" id="'.$fieldId.'" class="form-control">';
121
+        $fieldCode .= "\t".'<option value=""></option>';
122 122
         for ($i = 0; $i < count($recordsArray); $i++) {
123
-            $fieldCode .= "\t" . '<option ' . $this->getSelectedState($task->configuration, $recordsArray[$i]['name']) . 'value="' . $recordsArray[$i]['name'] . '">' . $recordsArray[$i]['name'] . '</option>';
123
+            $fieldCode .= "\t".'<option '.$this->getSelectedState($task->configuration, $recordsArray[$i]['name']).'value="'.$recordsArray[$i]['name'].'">'.$recordsArray[$i]['name'].'</option>';
124 124
         }
125 125
         $fieldCode .= '</select>';
126 126
 
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
         $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
164 164
             '*',
165 165
             'tx_crawler_configuration',
166
-            '1=1' . BackendUtility::deleteClause('tx_crawler_configuration')
166
+            '1=1'.BackendUtility::deleteClause('tx_crawler_configuration')
167 167
         );
168 168
 
169 169
         while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)) {
Please login to merge, or discard this patch.
Classes/Task/FlushQueueTaskAdditionalFieldProvider.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -59,10 +59,10 @@
 block discarded – undo
59 59
         }
60 60
 
61 61
         $fieldId = 'mode';
62
-        $fieldCode = '<select name="tx_scheduler[mode]" id="' . $fieldId . '" value="' . htmlentities($taskInfo['mode']) . '" class="form-control">'
63
-            . '<option value="all"' . ($taskInfo['mode'] == 'all' ? ' selected="selected"' : '') . '>' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/Resources/Private/Language/Backend.xlf:crawler_flush.modeAll') . '</option>'
64
-            . '<option value="finished"' . ($taskInfo['mode'] == 'finished' ? ' selected="selected"' : '') . '>' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/Resources/Private/Language/Backend.xlf:crawler_flush.modeFinished') . '</option>'
65
-            . '<option value="pending"' . ($taskInfo['mode'] == 'pending' ? ' selected="selected"' : '') . '>' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/Resources/Private/Language/Backend.xlf:crawler_flush.modePending') . '</option>'
62
+        $fieldCode = '<select name="tx_scheduler[mode]" id="'.$fieldId.'" value="'.htmlentities($taskInfo['mode']).'" class="form-control">'
63
+            . '<option value="all"'.($taskInfo['mode'] == 'all' ? ' selected="selected"' : '').'>'.$GLOBALS['LANG']->sL('LLL:EXT:crawler/Resources/Private/Language/Backend.xlf:crawler_flush.modeAll').'</option>'
64
+            . '<option value="finished"'.($taskInfo['mode'] == 'finished' ? ' selected="selected"' : '').'>'.$GLOBALS['LANG']->sL('LLL:EXT:crawler/Resources/Private/Language/Backend.xlf:crawler_flush.modeFinished').'</option>'
65
+            . '<option value="pending"'.($taskInfo['mode'] == 'pending' ? ' selected="selected"' : '').'>'.$GLOBALS['LANG']->sL('LLL:EXT:crawler/Resources/Private/Language/Backend.xlf:crawler_flush.modePending').'</option>'
66 66
             . '</select>';
67 67
 
68 68
         $additionalFields[$fieldId] = [
Please login to merge, or discard this patch.
Classes/Task/CrawlerTaskAdditionalFieldProvider.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -81,21 +81,21 @@
 block discarded – undo
81 81
 
82 82
         // input for sleepTime
83 83
         $fieldId = 'task_sleepTime';
84
-        $fieldCode = '<input type="text" name="tx_scheduler[sleepTime]" id="' . $fieldId . '" value="' . htmlentities($taskInfo['sleepTime']) . '" class="form-control" />';
84
+        $fieldCode = '<input type="text" name="tx_scheduler[sleepTime]" id="'.$fieldId.'" value="'.htmlentities($taskInfo['sleepTime']).'" class="form-control" />';
85 85
         $additionalFields[$fieldId] = [
86 86
             'code' => $fieldCode,
87 87
             'label' => 'LLL:EXT:crawler/Resources/Private/Language/Backend.xlf:crawler_im.sleepTime'
88 88
         ];
89 89
         // input for sleepAfterFinish
90 90
         $fieldId = 'task_sleepAfterFinish';
91
-        $fieldCode = '<input type="text" name="tx_scheduler[sleepAfterFinish]" id="' . $fieldId . '" value="' . htmlentities($taskInfo['sleepAfterFinish']) . '" class="form-control" />';
91
+        $fieldCode = '<input type="text" name="tx_scheduler[sleepAfterFinish]" id="'.$fieldId.'" value="'.htmlentities($taskInfo['sleepAfterFinish']).'" class="form-control" />';
92 92
         $additionalFields[$fieldId] = [
93 93
             'code' => $fieldCode,
94 94
             'label' => 'LLL:EXT:crawler/Resources/Private/Language/Backend.xlf:crawler_im.sleepAfterFinish'
95 95
         ];
96 96
         // input for countInARun
97 97
         $fieldId = 'task_countInARun';
98
-        $fieldCode = '<input type="text" name="tx_scheduler[countInARun]" id="' . $fieldId . '" value="' . htmlentities($taskInfo['countInARun']) . '" class="form-control" />';
98
+        $fieldCode = '<input type="text" name="tx_scheduler[countInARun]" id="'.$fieldId.'" value="'.htmlentities($taskInfo['countInARun']).'" class="form-control" />';
99 99
         $additionalFields[$fieldId] = [
100 100
             'code' => $fieldCode,
101 101
             'label' => 'LLL:EXT:crawler/Resources/Private/Language/Backend.xlf:crawler_im.countInARun'
Please login to merge, or discard this patch.
Classes/Task/CrawlMultiProcessTaskAdditionalFieldProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
 
62 62
         // input for timeOut
63 63
         $fieldId = 'task_timeOut';
64
-        $fieldCode = '<input type="text" name="tx_scheduler[timeOut]" id="' . $fieldId . '" value="' . htmlentities($taskInfo['timeOut']) . '" class="form-control" />';
64
+        $fieldCode = '<input type="text" name="tx_scheduler[timeOut]" id="'.$fieldId.'" value="'.htmlentities($taskInfo['timeOut']).'" class="form-control" />';
65 65
         $additionalFields[$fieldId] = [
66 66
             'code' => $fieldCode,
67 67
             'label' => 'LLL:EXT:crawler/Resources/Private/Language/Backend.xlf:crawler_im.timeOut'
Please login to merge, or discard this patch.
Classes/ClickMenu/CrawlerClickMenu.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
         $additionalParameters = [];
68 68
         $additionalParameters[] = 'SET[function]=tx_crawler_modfunc1';
69 69
         $additionalParameters[] = 'SET[crawlaction]=start';
70
-        $additionalParameters[] = 'configurationSelection[]=' . $crawlerConfiguration['name'];
70
+        $additionalParameters[] = 'configurationSelection[]='.$crawlerConfiguration['name'];
71 71
 
72 72
         $additionalMenuItems = [];
73 73
         $additionalMenuItems[] = $backRef->linkItem(
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
                 'crawler'
77 77
             ),
78 78
             $this->getContextMenuIcon(),
79
-            'top.goToModule(\'web_info\', 1, \'&' . implode('&', $additionalParameters) . '\'); return hideCM();'
79
+            'top.goToModule(\'web_info\', 1, \'&'.implode('&', $additionalParameters).'\'); return hideCM();'
80 80
         );
81 81
 
82 82
         return array_merge($menuItems, $additionalMenuItems);
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
     {
92 92
         $icon = sprintf(
93 93
             '<img src="%s" border="0" align="top" alt="" />',
94
-            ExtensionManagementUtility::extRelPath('crawler') . 'icon_tx_crawler_configuration.gif'
94
+            ExtensionManagementUtility::extRelPath('crawler').'icon_tx_crawler_configuration.gif'
95 95
         );
96 96
 
97 97
         return $icon;
Please login to merge, or discard this patch.
modfunc1/class.tx_crawler_modfunc1.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -694,6 +694,7 @@  discard block
 block discarded – undo
694 694
      * @param	array		Page row or set-id
695 695
      * @param	string		Title string
696 696
      * @param	int			Items per Page setting
697
+     * @param string $titleString
697 698
      * @return	string		HTML <tr> content (one or more)
698 699
      */
699 700
     public function drawLog_addRows($pageRow_setId, $titleString, $itemsPerPage = 10)
@@ -1204,6 +1205,8 @@  discard block
 block discarded – undo
1204 1205
      * @param	string		Selector box name
1205 1206
      * @param	string		Selector box value (array for multiple...)
1206 1207
      * @param	boolean		If set, will draw multiple box.
1208
+     * @param string $name
1209
+     * @param integer $multiple
1207 1210
      * @return	string		HTML select element
1208 1211
      */
1209 1212
     public function selectorBox($optArray, $name, $value, $multiple)
Please login to merge, or discard this patch.
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -209,15 +209,15 @@  discard block
 block discarded – undo
209 209
                 'index.php'
210 210
             );
211 211
 
212
-            $quiPart = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('qid_details') ? '&qid_details=' . intval(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('qid_details')) : '';
212
+            $quiPart = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('qid_details') ? '&qid_details='.intval(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('qid_details')) : '';
213 213
 
214 214
             $setId = intval(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('setID'));
215 215
 
216 216
             $h_func .= '<hr/>'.
217
-                    $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) . ' - ' .
218
-                    $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) . ' - ' .
219
-                    $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) . ' - ' .
220
-                    $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.itemsPerPage').': ' .
217
+                    $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).' - '.
218
+                    $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).' - '.
219
+                    $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).' - '.
220
+                    $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.itemsPerPage').': '.
221 221
                     \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncMenu(
222 222
                         $this->pObj->id,
223 223
                         'SET[itemsPerPage]',
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
         $theOutput .= $this->pObj->doc->section($LANG->getLL('title'), $h_func, 0, 1);
232 232
 
233 233
         // Branch based on type:
234
-        switch ((string)$this->pObj->MOD_SETTINGS['crawlaction']) {
234
+        switch ((string) $this->pObj->MOD_SETTINGS['crawlaction']) {
235 235
             case 'start':
236 236
                 if (empty($this->pObj->id)) {
237 237
                     $this->addErrorMessage($GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.noPageSelected'));
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
         $this->downloadCrawlUrls = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('_download');
279 279
         $this->makeCrawlerProcessableChecks();
280 280
 
281
-        switch ((string)\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('tstamp')) {
281
+        switch ((string) \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('tstamp')) {
282 282
             case 'midnight':
283 283
                 $this->scheduledTime = mktime(0, 0, 0);
284 284
             break;
@@ -321,7 +321,7 @@  discard block
 block discarded – undo
321 321
                 tx_crawler_domain_events_dispatcher::getInstance()->post(
322 322
                     'invokeQueueChange',
323 323
                                                                             $this->findCrawler()->setID,
324
-                                                                            [	'reason' => $reason ]
324
+                                                                            ['reason' => $reason]
325 325
                 );
326 326
             }
327 327
 
@@ -405,11 +405,11 @@  discard block
 block discarded – undo
405 405
             $this->pObj->MOD_SETTINGS['depth'],
406 406
             0
407 407
         );
408
-        $availableConfigurations = $this->crawlerObj->getConfigurationsForBranch($this->pObj->id, $this->pObj->MOD_SETTINGS['depth']?$this->pObj->MOD_SETTINGS['depth']:0);
408
+        $availableConfigurations = $this->crawlerObj->getConfigurationsForBranch($this->pObj->id, $this->pObj->MOD_SETTINGS['depth'] ? $this->pObj->MOD_SETTINGS['depth'] : 0);
409 409
 
410 410
         // Configurations
411 411
         $cell[] = $this->selectorBox(
412
-            empty($availableConfigurations)?[]:array_combine($availableConfigurations, $availableConfigurations),
412
+            empty($availableConfigurations) ? [] : array_combine($availableConfigurations, $availableConfigurations),
413 413
             'configurationSelection',
414 414
             $this->incomingConfigurationSelection,
415 415
             1
@@ -538,12 +538,12 @@  discard block
 block discarded – undo
538 538
             // Print rudimentary details:
539 539
             $output .= '
540 540
 				<br /><br />
541
-				<input type="submit" value="' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.back') . '" name="_back" />
542
-				<input type="hidden" value="' . $this->pObj->id . '" name="id" />
543
-				<input type="hidden" value="' . $showSetId . '" name="setID" />
541
+				<input type="submit" value="' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.back').'" name="_back" />
542
+				<input type="hidden" value="' . $this->pObj->id.'" name="id" />
543
+				<input type="hidden" value="' . $showSetId.'" name="setID" />
544 544
 				<br />
545
-				Current server time: ' . date('H:i:s', time()) . '<br />' .
546
-                'Status: ' . $resStatus . '<br />' .
545
+				Current server time: ' . date('H:i:s', time()).'<br />'.
546
+                'Status: '.$resStatus.'<br />'.
547 547
                 \TYPO3\CMS\Core\Utility\DebugUtility::viewArray($q_entry);
548 548
         } else {	// Show list:
549 549
 
@@ -573,7 +573,7 @@  discard block
 block discarded – undo
573 573
                     foreach ($tree->tree as $data) {
574 574
                         $code .= $this->drawLog_addRows(
575 575
                                     $data['row'],
576
-                                    $data['HTML'] . \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordTitle('pages', $data['row'], true),
576
+                                    $data['HTML'].\TYPO3\CMS\Backend\Utility\BackendUtility::getRecordTitle('pages', $data['row'], true),
577 577
                                     intval($this->pObj->MOD_SETTINGS['itemsPerPage'])
578 578
                                 );
579 579
                         if (++$count == 1000) {
@@ -627,7 +627,7 @@  discard block
 block discarded – undo
627 627
                 $cc = 0;
628 628
                 foreach ($setList as $set) {
629 629
                     $code .= '
630
-						<tr class="bgColor'.($cc % 2 ? '-20':'-10').'">
630
+						<tr class="bgColor'.($cc % 2 ? '-20' : '-10').'">
631 631
 							<td><a href="'.htmlspecialchars('index.php?setID='.$set['set_id']).'">'.$set['set_id'].'</a></td>
632 632
 							<td>'.$set['count_value'].'</td>
633 633
 							<td>'.\TYPO3\CMS\Backend\Utility\BackendUtility::dateTimeAge($set['scheduled']).'</td>
@@ -767,14 +767,14 @@  discard block
 block discarded – undo
767 767
                 }
768 768
 
769 769
                 $setId = intval(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('setID'));
770
-                $refreshIcon = $GLOBALS['BACK_PATH'] . 'sysext/t3skin/extjs/images/grid/refresh.gif';
770
+                $refreshIcon = $GLOBALS['BACK_PATH'].'sysext/t3skin/extjs/images/grid/refresh.gif';
771 771
                 
772 772
                 // Put rows together:
773 773
                 $content .= '
774
-					<tr class="bgColor'.($c % 2 ? '-20':'-10').'">
774
+					<tr class="bgColor'.($c % 2 ? '-20' : '-10').'">
775 775
 						'.$titleClm.'
776
-						<td><a href="' . $this->getModuleUrl(['qid_details' => $vv['qid'], 'setID' => $setId]) . '">'.htmlspecialchars($vv['qid']).'</a></td>
777
-						<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>';
776
+						<td><a href="' . $this->getModuleUrl(['qid_details' => $vv['qid'], 'setID' => $setId]).'">'.htmlspecialchars($vv['qid']).'</a></td>
777
+						<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>';
778 778
                 foreach ($rowData as $fKey => $value) {
779 779
                     if (\TYPO3\CMS\Core\Utility\GeneralUtility::inList('url', $fKey)) {
780 780
                         $content .= '
@@ -999,7 +999,7 @@  discard block
 block discarded – undo
999 999
 
1000 1000
         $exitCode = 0;
1001 1001
         $out = [];
1002
-        exec(escapeshellcmd($this->extensionSettings['phpPath'] . ' -v'), $out, $exitCode);
1002
+        exec(escapeshellcmd($this->extensionSettings['phpPath'].' -v'), $out, $exitCode);
1003 1003
         if ($exitCode > 0) {
1004 1004
             $this->addErrorMessage(sprintf($LANG->sL('LLL:EXT:crawler/modfunc1/locallang.xml:message.phpBinaryNotFound'), htmlspecialchars($this->extensionSettings['phpPath'])));
1005 1005
         }
@@ -1207,10 +1207,10 @@  discard block
 block discarded – undo
1207 1207
         $options = [];
1208 1208
         foreach ($optArray as $key => $val) {
1209 1209
             $options[] = '
1210
-				<option value="'.htmlspecialchars($key).'"'.((!$multiple && !strcmp($value, $key)) || ($multiple && in_array($key, (array)$value))?' selected="selected"':'').'>'.htmlspecialchars($val).'</option>';
1210
+				<option value="'.htmlspecialchars($key).'"'.((!$multiple && !strcmp($value, $key)) || ($multiple && in_array($key, (array) $value)) ? ' selected="selected"' : '').'>'.htmlspecialchars($val).'</option>';
1211 1211
         }
1212 1212
 
1213
-        $output = '<select name="'.htmlspecialchars($name.($multiple?'[]':'')).'"'.($multiple ? ' multiple="multiple" size="'.count($options).'"' : '').'>'.implode('', $options).'</select>';
1213
+        $output = '<select name="'.htmlspecialchars($name.($multiple ? '[]' : '')).'"'.($multiple ? ' multiple="multiple" size="'.count($options).'"' : '').'>'.implode('', $options).'</select>';
1214 1214
 
1215 1215
         return $output;
1216 1216
     }
Please login to merge, or discard this patch.
domain/process/class.tx_crawler_domain_process_manager.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
     public function multiProcess($timeout)
85 85
     {
86 86
         if ($this->processLimit <= 1) {
87
-            throw new RuntimeException('To run crawler in multi process mode you have to configure the processLimit > 1.' . PHP_EOL);
87
+            throw new RuntimeException('To run crawler in multi process mode you have to configure the processLimit > 1.'.PHP_EOL);
88 88
         }
89 89
 
90 90
         $pendingItemsStart = $this->queueRepository->countAllPendingItems();
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
             }
103 103
             if ($currentPendingItems == 0) {
104 104
                 if ($this->verbose) {
105
-                    echo 'Finished...' . chr(10);
105
+                    echo 'Finished...'.chr(10);
106 106
                 }
107 107
                 break;
108 108
             }
@@ -114,16 +114,16 @@  discard block
 block discarded – undo
114 114
             }
115 115
             sleep(1);
116 116
             if ($nextTimeOut < time()) {
117
-                $timedOutProcesses = $this->processRepository->findAll('', 'DESC', null, 0, 'ttl >' . $nextTimeOut);
117
+                $timedOutProcesses = $this->processRepository->findAll('', 'DESC', null, 0, 'ttl >'.$nextTimeOut);
118 118
                 $nextTimeOut = time() + $this->timeToLive;
119 119
                 if ($this->verbose) {
120
-                    echo 'Cleanup' . implode(',', $timedOutProcesses->getProcessIds()) . chr(10);
120
+                    echo 'Cleanup'.implode(',', $timedOutProcesses->getProcessIds()).chr(10);
121 121
                 }
122 122
                 $this->crawlerObj->CLI_releaseProcesses($timedOutProcesses->getProcessIds(), true);
123 123
             }
124 124
         }
125 125
         if ($currentPendingItems > 0 && $this->verbose) {
126
-            echo 'Stop with timeout' . chr(10);
126
+            echo 'Stop with timeout'.chr(10);
127 127
         }
128 128
     }
129 129
 
@@ -146,14 +146,14 @@  discard block
 block discarded – undo
146 146
         $currentProcesses = $this->processRepository->countActive();
147 147
         $availableProcessesCount = $this->processLimit - $currentProcesses;
148 148
         $requiredProcessesCount = ceil($this->queueRepository->countAllUnassignedPendingItems() / $this->countInARun);
149
-        $startProcessCount = min([$availableProcessesCount,$requiredProcessesCount]);
149
+        $startProcessCount = min([$availableProcessesCount, $requiredProcessesCount]);
150 150
         if ($startProcessCount <= 0) {
151 151
             return $ret;
152 152
         }
153 153
         if ($startProcessCount && $this->verbose) {
154 154
             echo 'Start '.$startProcessCount.' new processes (Running:'.$currentProcesses.')';
155 155
         }
156
-        for ($i = 0;$i < $startProcessCount;$i++) {
156
+        for ($i = 0; $i < $startProcessCount; $i++) {
157 157
             usleep(100);
158 158
             if ($this->startProcess()) {
159 159
                 if ($this->verbose) {
@@ -176,11 +176,11 @@  discard block
 block discarded – undo
176 176
     {
177 177
         $ttl = (time() + $this->timeToLive - 1);
178 178
         $current = $this->processRepository->countNotTimeouted($ttl);
179
-        $completePath = '(' .escapeshellcmd($this->getCrawlerCliPath()) . ' &) > /dev/null';
179
+        $completePath = '('.escapeshellcmd($this->getCrawlerCliPath()).' &) > /dev/null';
180 180
         if (system($completePath) === false) {
181 181
             throw new Exception('could not start process!');
182 182
         } else {
183
-            for ($i = 0;$i < 10;$i++) {
183
+            for ($i = 0; $i < 10; $i++) {
184 184
                 if ($this->processRepository->countNotTimeouted($ttl) > $current) {
185 185
                     return true;
186 186
                 }
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
      */
198 198
     public function getCrawlerCliPath()
199 199
     {
200
-        $phpPath = $this->crawlerObj->extensionSettings['phpPath'] . ' ';
200
+        $phpPath = $this->crawlerObj->extensionSettings['phpPath'].' ';
201 201
         $pathToTypo3 = rtrim(\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_DOCUMENT_ROOT'), '/');
202 202
         $pathToTypo3 .= rtrim(\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SITE_PATH'), '/');
203 203
         $cliPart = '/typo3/cli_dispatch.phpsh crawler';
Please login to merge, or discard this patch.