Test Setup Failed
Push — issue/226 ( 0e8428 )
by Stefan
06:42
created
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.
view/process/class.tx_crawler_view_process_list.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -318,7 +318,7 @@
 block discarded – undo
318 318
         return \AOE\Crawler\Utility\ButtonUtility::getLinkButton(
319 319
             'actions-refresh',
320 320
             $this->getLLLabel('LLL:EXT:crawler/modfunc1/locallang.xml:labels.refresh'),
321
-            'window.location=\'' . \TYPO3\CMS\Backend\Utility\BackendUtility::getModuleUrl('web_info') . '&SET[crawlaction]=multiprocess&id=' . $this->pageId . '\';'
321
+            'window.location=\''.\TYPO3\CMS\Backend\Utility\BackendUtility::getModuleUrl('web_info').'&SET[crawlaction]=multiprocess&id='.$this->pageId.'\';'
322 322
         );
323 323
     }
324 324
 
Please login to merge, or discard this patch.
cli/bootstrap.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -12,12 +12,12 @@  discard block
 block discarded – undo
12 12
 if (!isAbsPath($tempPathThisScript)) {
13 13
     $workingDirectory = $_SERVER['PWD'] ? $_SERVER['PWD'] : getcwd();
14 14
     if ($workingDirectory) {
15
-        $tempPathThisScript = $workingDirectory . '/' . preg_replace('/\.\//', '', $tempPathThisScript);
15
+        $tempPathThisScript = $workingDirectory.'/'.preg_replace('/\.\//', '', $tempPathThisScript);
16 16
         if (!@is_file($tempPathThisScript)) {
17
-            die('Relative path found, but an error occured during resolving of the absolute path: ' . $tempPathThisScript . PHP_EOL);
17
+            die('Relative path found, but an error occured during resolving of the absolute path: '.$tempPathThisScript.PHP_EOL);
18 18
         }
19 19
     } else {
20
-        die('Relative path found, but resolving absolute path is not supported on this platform.' . PHP_EOL);
20
+        die('Relative path found, but resolving absolute path is not supported on this platform.'.PHP_EOL);
21 21
     }
22 22
 }
23 23
 
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
             list($key, $value) = explode(':', $additionalHeader, 2);
34 34
             $key = str_replace('-', '_', strtoupper(trim($key)));
35 35
             if ($key != 'HOST') {
36
-                $_SERVER['HTTP_' . $key] = $value;
36
+                $_SERVER['HTTP_'.$key] = $value;
37 37
             }
38 38
         }
39 39
     }
@@ -54,18 +54,18 @@  discard block
 block discarded – undo
54 54
 $typo3SitePath = $_SERVER['argv'][1];
55 55
 
56 56
     // faking the environment
57
-$_SERVER['DOCUMENT_ROOT'] = preg_replace('#' . preg_quote($typo3SitePath, '#') . '$#', '', $typo3Root);
57
+$_SERVER['DOCUMENT_ROOT'] = preg_replace('#'.preg_quote($typo3SitePath, '#').'$#', '', $typo3Root);
58 58
 $_SERVER['HTTP_USER_AGENT'] = 'CLI Mode';
59 59
 $_SERVER['HTTP_HOST'] = $_SERVER['SERVER_NAME'] = $urlParts['host'];
60
-$_SERVER['SCRIPT_NAME'] = $_SERVER['PHP_SELF'] = $typo3SitePath . 'index.php';
61
-$_SERVER['SCRIPT_FILENAME'] = $_SERVER['PATH_TRANSLATED'] = $typo3Root . 'index.php';
60
+$_SERVER['SCRIPT_NAME'] = $_SERVER['PHP_SELF'] = $typo3SitePath.'index.php';
61
+$_SERVER['SCRIPT_FILENAME'] = $_SERVER['PATH_TRANSLATED'] = $typo3Root.'index.php';
62 62
 $_SERVER['QUERY_STRING'] = (isset($urlParts['query']) ? $urlParts['query'] : '');
63
-$_SERVER['REQUEST_URI'] = $urlParts['path'] . (isset($urlParts['query']) ? '?' . $urlParts['query'] : '');
63
+$_SERVER['REQUEST_URI'] = $urlParts['path'].(isset($urlParts['query']) ? '?'.$urlParts['query'] : '');
64 64
 $_SERVER['REQUEST_METHOD'] = 'GET';
65 65
 
66 66
     // Define a port if used in the URL:
67 67
 if (isset($urlParts['port'])) {
68
-    $_SERVER['HTTP_HOST'] .= ':' . $urlParts['port'];
68
+    $_SERVER['HTTP_HOST'] .= ':'.$urlParts['port'];
69 69
     $_SERVER['SERVER_PORT'] = $urlParts['port'];
70 70
 }
71 71
 
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 }
76 76
 
77 77
 chdir($typo3Root);
78
-include($typo3Root . '/index.php');
78
+include($typo3Root.'/index.php');
79 79
 
80 80
 /**
81 81
  * Checks if the $path is absolute or relative (detecting either '/' or 'x:/' as first part of string) and returns TRUE if so.
Please login to merge, or discard this patch.
cli/class.tx_crawler_cli_im.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
         $this->cli_options[] = ['-d depth', 'Tree depth, 0-99', "How many levels under the 'page_id' to include."];
59 59
         $this->cli_options[] = ['-o mode', 'Output mode: "url", "exec", "queue"', "Specifies output modes\nurl : Will list URLs which wget could use as input.\nqueue: Will put entries in queue table.\nexec: Will execute all entries right away!"];
60 60
         $this->cli_options[] = ['-n number', 'Number of items per minute.', 'Specifies how many items are put in the queue per minute. Only valid for output mode "queue"'];
61
-        $this->cli_options[] = ['-conf configurationkeys','List of Configuration Keys','A commaseperated list of crawler configurations'];
61
+        $this->cli_options[] = ['-conf configurationkeys', 'List of Configuration Keys', 'A commaseperated list of crawler configurations'];
62 62
         #		$this->cli_options[] = array('-v level', 'Verbosity level 0-3', "The value of level can be:\n  0 = all output\n  1 = info and greater (default)\n  2 = warnings and greater\n  3 = errors");
63 63
 
64 64
         // Setting help texts:
Please login to merge, or discard this patch.
Classes/Utility/SchedulerUtility.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -45,36 +45,36 @@
 block discarded – undo
45 45
     {
46 46
         $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['AOE\\Crawler\\Task\\CrawlerQueueTask'] = [
47 47
             'extension' => $extKey,
48
-            'title' => 'LLL:EXT:' . $extKey . '/Resources/Private/Language/Backend.xlf:crawler_im.name',
49
-            'description' => 'LLL:EXT:' . $extKey . '/Resources/Private/Language/Backend.xlf:crawler_im.description',
48
+            'title' => 'LLL:EXT:'.$extKey.'/Resources/Private/Language/Backend.xlf:crawler_im.name',
49
+            'description' => 'LLL:EXT:'.$extKey.'/Resources/Private/Language/Backend.xlf:crawler_im.description',
50 50
             'additionalFields' => CrawlerQueueTaskAdditionalFieldProvider::class
51 51
         ];
52 52
 
53 53
         $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['AOE\\Crawler\\Task\\CrawlerTask'] = [
54 54
             'extension' => $extKey,
55
-            'title' => 'LLL:EXT:' . $extKey . '/Resources/Private/Language/Backend.xlf:crawler_crawl.name',
56
-            'description' => 'LLL:EXT:' . $extKey . '/Resources/Private/Language/Backend.xlf:crawler_crawl.description',
55
+            'title' => 'LLL:EXT:'.$extKey.'/Resources/Private/Language/Backend.xlf:crawler_crawl.name',
56
+            'description' => 'LLL:EXT:'.$extKey.'/Resources/Private/Language/Backend.xlf:crawler_crawl.description',
57 57
             'additionalFields' => CrawlerTaskAdditionalFieldProvider::class
58 58
         ];
59 59
 
60 60
         $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['AOE\\Crawler\\Task\\CrawlMultiProcessTask'] = [
61 61
             'extension' => $extKey,
62
-            'title' => 'LLL:EXT:' . $extKey . '/Resources/Private/Language/Backend.xlf:crawler_crawlMultiProcess.name',
63
-            'description' => 'LLL:EXT:' . $extKey . '/Resources/Private/Language/Backend.xlf:crawler_crawl.description',
62
+            'title' => 'LLL:EXT:'.$extKey.'/Resources/Private/Language/Backend.xlf:crawler_crawlMultiProcess.name',
63
+            'description' => 'LLL:EXT:'.$extKey.'/Resources/Private/Language/Backend.xlf:crawler_crawl.description',
64 64
             'additionalFields' => CrawlMultiProcessTaskAdditionalFieldProvider::class
65 65
         ];
66 66
 
67 67
         $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['AOE\\Crawler\\Task\\FlushQueueTask'] = [
68 68
             'extension' => $extKey,
69
-            'title' => 'LLL:EXT:' . $extKey . '/Resources/Private/Language/Backend.xlf:crawler_flush.name',
70
-            'description' => 'LLL:EXT:' . $extKey . '/Resources/Private/Language/Backend.xlf:crawler_flush.description',
69
+            'title' => 'LLL:EXT:'.$extKey.'/Resources/Private/Language/Backend.xlf:crawler_flush.name',
70
+            'description' => 'LLL:EXT:'.$extKey.'/Resources/Private/Language/Backend.xlf:crawler_flush.description',
71 71
             'additionalFields' => FlushQueueTaskAdditionalFieldProvider::class
72 72
         ];
73 73
 
74 74
         $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['AOE\\Crawler\\Task\\ProcessCleanupTask'] = [
75 75
             'extension' => $extKey,
76
-            'title' => 'LLL:EXT:' . $extKey . '/Resources/Private/Language/Backend.xlf:crawler_processCleanup.name',
77
-            'description' => 'LLL:EXT:' . $extKey . '/Resources/Private/Language/Backend.xlf:crawler_processCleanup.description',
76
+            'title' => 'LLL:EXT:'.$extKey.'/Resources/Private/Language/Backend.xlf:crawler_processCleanup.name',
77
+            'description' => 'LLL:EXT:'.$extKey.'/Resources/Private/Language/Backend.xlf:crawler_processCleanup.description',
78 78
         ];
79 79
     }
80 80
 }
Please login to merge, or discard this patch.
Classes/Task/CrawlerQueueTask.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
             $this->startPage = 0;
85 85
         }
86 86
 
87
-        $_SERVER['argv'] = [$_SERVER['argv'][0], $this->startPage,'-ss', '-d', $this->depth, '-o', self::MODE, '-conf', implode(',', $this->configuration)];
87
+        $_SERVER['argv'] = [$_SERVER['argv'][0], $this->startPage, '-ss', '-d', $this->depth, '-o', self::MODE, '-conf', implode(',', $this->configuration)];
88 88
     }
89 89
 
90 90
     /**
@@ -100,6 +100,6 @@  discard block
 block discarded – undo
100 100
             $this->startPage = 0;
101 101
         }
102 102
 
103
-        return implode(',', $this->configuration) . ' (depth: ' . $this->depth . ', startPage:' . $this->startPage . ')';
103
+        return implode(',', $this->configuration).' (depth: '.$this->depth.', startPage:'.$this->startPage.')';
104 104
     }
105 105
 }
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') . 'Resources/Private/Icons/icon_tx_crawler_configuration.gif'
94
+            ExtensionManagementUtility::extRelPath('crawler').'Resources/Private/Icons/icon_tx_crawler_configuration.gif'
95 95
         );
96 96
 
97 97
         return $icon;
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
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 
89 89
         // input for startPage
90 90
         $fieldId = 'task_startPage';
91
-        $fieldCode = '<input name="tx_scheduler[startPage]" type="text" id="' . $fieldId . '" value="' . $task->startPage . '" class="form-control" />';
91
+        $fieldCode = '<input name="tx_scheduler[startPage]" type="text" id="'.$fieldId.'" value="'.$task->startPage.'" class="form-control" />';
92 92
         $additionalFields[$fieldId] = [
93 93
             'code' => $fieldCode,
94 94
             'label' => 'LLL:EXT:crawler/Resources/Private/Language/Backend.xlf:crawler_im.startPage'
@@ -104,10 +104,10 @@  discard block
 block discarded – undo
104 104
             '4' => $GLOBALS['LANG']->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:labels.depth_4'),
105 105
             '99' => $GLOBALS['LANG']->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:labels.depth_infi'),
106 106
         ];
107
-        $fieldCode = '<select name="tx_scheduler[depth]" id="' . $fieldId . '" class="form-control">';
107
+        $fieldCode = '<select name="tx_scheduler[depth]" id="'.$fieldId.'" class="form-control">';
108 108
 
109 109
         foreach ($fieldValueArray as $key => $label) {
110
-            $fieldCode .= "\t" . '<option value="' . $key . '"' . (($key == $task->depth) ? ' selected="selected"' : '') . '>' . $label . '</option>';
110
+            $fieldCode .= "\t".'<option value="'.$key.'"'.(($key == $task->depth) ? ' selected="selected"' : '').'>'.$label.'</option>';
111 111
         }
112 112
 
113 113
         $fieldCode .= '</select>';
@@ -119,10 +119,10 @@  discard block
 block discarded – undo
119 119
         // combobox for configuration records
120 120
         $recordsArray = $this->getCrawlerConfigurationRecords();
121 121
         $fieldId = 'task_configuration';
122
-        $fieldCode = '<select name="tx_scheduler[configuration][]" multiple="multiple" id="' . $fieldId . '" class="form-control">';
123
-        $fieldCode .= "\t" . '<option value=""></option>';
122
+        $fieldCode = '<select name="tx_scheduler[configuration][]" multiple="multiple" id="'.$fieldId.'" class="form-control">';
123
+        $fieldCode .= "\t".'<option value=""></option>';
124 124
         for ($i = 0; $i < count($recordsArray); $i++) {
125
-            $fieldCode .= "\t" . '<option ' . $this->getSelectedState($task->configuration, $recordsArray[$i]['name']) . 'value="' . $recordsArray[$i]['name'] . '">' . $recordsArray[$i]['name'] . '</option>';
125
+            $fieldCode .= "\t".'<option '.$this->getSelectedState($task->configuration, $recordsArray[$i]['name']).'value="'.$recordsArray[$i]['name'].'">'.$recordsArray[$i]['name'].'</option>';
126 126
         }
127 127
         $fieldCode .= '</select>';
128 128
 
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
         $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
166 166
             '*',
167 167
             'tx_crawler_configuration',
168
-            '1=1' . BackendUtility::deleteClause('tx_crawler_configuration')
168
+            '1=1'.BackendUtility::deleteClause('tx_crawler_configuration')
169 169
         );
170 170
 
171 171
         while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)) {
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.