Completed
Push — 5-1 ( 92e8be...72b38b )
by Tomas Norre
20:44 queued 12:15
created
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
             array('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/Hooks/StaticFileCacheCreateUriHook.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -66,10 +66,10 @@
 block discarded – undo
66 66
         if ($this->isCrawlerExtensionRunning($frontend) && preg_match('#^/index.php\?&?id=(\d+)(&.*)?$#', $uri, $matches)) {
67 67
             $speakingUri = $frontend->cObj->typoLink_URL(array('parameter' => $matches[1], 'additionalParams' => $matches[2]));
68 68
             $speakingUriParts = parse_url($speakingUri);
69
-            if(false === $speakingUriParts){
70
-                throw new \Exception('Could not parse URI: ' . $speakingUri, 1289915976);
69
+            if (false === $speakingUriParts) {
70
+                throw new \Exception('Could not parse URI: '.$speakingUri, 1289915976);
71 71
             }
72
-            $speakingUrlPath = '/' . ltrim($speakingUriParts['path'], '/');
72
+            $speakingUrlPath = '/'.ltrim($speakingUriParts['path'], '/');
73 73
             // Don't change anything if speaking URL is part of old URI:
74 74
             // (it might be the case the using the speaking URL failed)
75 75
             if (strpos($uri, $speakingUrlPath) !== 0 || $speakingUrlPath === '/') {
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 = array();
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 = array();
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.
Classes/Task/CrawlerQueueTask.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
             $this->startPage = 0;
93 93
         }
94 94
 
95
-        $_SERVER['argv'] = array($_SERVER['argv'][0], $this->startPage,'-ss', '-d', $this->depth, '-o', self::MODE, '-conf', implode(',', $this->configuration));
95
+        $_SERVER['argv'] = array($_SERVER['argv'][0], $this->startPage, '-ss', '-d', $this->depth, '-o', self::MODE, '-conf', implode(',', $this->configuration));
96 96
     }
97 97
 
98 98
 
@@ -109,6 +109,6 @@  discard block
 block discarded – undo
109 109
             $this->startPage = 0;
110 110
         }
111 111
 
112
-        return implode(',', $this->configuration) . ' (depth: ' . $this->depth . ', startPage:' . $this->startPage . ')';
112
+        return implode(',', $this->configuration).' (depth: '.$this->depth.', startPage:'.$this->startPage.')';
113 113
     }
114 114
 }
115 115
\ No newline at end of file
Please login to merge, or discard this patch.
domain/queue/class.tx_crawler_domain_queue_repository.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 	 * @return tx_crawler_domain_queue_entry $entry
38 38
 	 */
39 39
 	public function findYoungestEntryForProcess(tx_crawler_domain_process $process) {
40
-		return $this->getFirstOrLastObjectByProcess($process,'exec_time ASC');
40
+		return $this->getFirstOrLastObjectByProcess($process, 'exec_time ASC');
41 41
 	}
42 42
 
43 43
 	/**
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 	 * @return tx_crawler_domain_queue_entry
48 48
 	 */
49 49
 	public function findOldestEntryForProcess(tx_crawler_domain_process $process) {
50
-		return $this->getFirstOrLastObjectByProcess($process,'exec_time DESC');
50
+		return $this->getFirstOrLastObjectByProcess($process, 'exec_time DESC');
51 51
 	}
52 52
 
53 53
 
@@ -60,15 +60,15 @@  discard block
 block discarded – undo
60 60
 	 */
61 61
 	protected function getFirstOrLastObjectByProcess($process, $orderby) {
62 62
 		$db = $this->getDB();
63
-		$where = 'process_id_completed='.$db->fullQuoteStr($process->getProcess_id(),$this->tableName).
63
+		$where = 'process_id_completed='.$db->fullQuoteStr($process->getProcess_id(), $this->tableName).
64 64
 				 ' AND exec_time > 0 ';
65 65
 		$limit = 1;
66 66
 		$groupby = '';
67 67
 
68
-		$res 	= $db->exec_SELECTgetRows('*','tx_crawler_queue',$where,$groupby,$orderby,$limit);
69
-		if($res) {
70
-			$first 	= $res[0];
71
-		}else{
68
+		$res = $db->exec_SELECTgetRows('*', 'tx_crawler_queue', $where, $groupby, $orderby, $limit);
69
+		if ($res) {
70
+			$first = $res[0];
71
+		} else {
72 72
 			$first = array();
73 73
 		}
74 74
 		$resultObject = new tx_crawler_domain_queue_entry($first);
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 	 */
84 84
 	public function countExtecutedItemsByProcess($process) {
85 85
 
86
-		return $this->countItemsByWhereClause('exec_time > 0 AND process_id_completed = '.$this->getDB()->fullQuoteStr($process->getProcess_id(),$this->tableName));
86
+		return $this->countItemsByWhereClause('exec_time > 0 AND process_id_completed = '.$this->getDB()->fullQuoteStr($process->getProcess_id(), $this->tableName));
87 87
 	}
88 88
 
89 89
 	/**
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 	 * @return int
94 94
 	 */
95 95
 	public function countNonExecutedItemsByProcess($process) {
96
-		return $this->countItemsByWhereClause('exec_time = 0 AND process_id = '.$this->getDB()->fullQuoteStr($process->getProcess_id(),$this->tableName));
96
+		return $this->countItemsByWhereClause('exec_time = 0 AND process_id = '.$this->getDB()->fullQuoteStr($process->getProcess_id(), $this->tableName));
97 97
 	}
98 98
 
99 99
 	/**
@@ -135,8 +135,8 @@  discard block
 block discarded – undo
135 135
 	 */
136 136
 	protected function countItemsByWhereClause($where) {
137 137
 		$db 	= $this->getDB();
138
-		$rs 	= $db->exec_SELECTquery('count(*) as anz',$this->tableName,$where);
139
-		$res 	= $db->sql_fetch_assoc($rs);
138
+		$rs 	= $db->exec_SELECTquery('count(*) as anz', $this->tableName, $where);
139
+		$res = $db->sql_fetch_assoc($rs);
140 140
 
141 141
 		return $res['anz'];
142 142
 	}
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
 			$res = $db->exec_SELECTquery(
203 203
 				'configuration, count(*) as c',
204 204
 				$this->tableName,
205
-				'set_id in ('. implode(',',$setIds).') AND scheduled < '.time(),
205
+				'set_id in ('.implode(',', $setIds).') AND scheduled < '.time(),
206 206
 				'configuration'
207 207
 			);
208 208
 			while ($row = $db->sql_fetch_assoc($res)) {
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
 	 * @author Fabrizio Branca <[email protected]>
248 248
 	 * @since 2010-11-16
249 249
 	 */
250
-	public function getLastProcessedEntries($selectFields='*', $limit='100') {
250
+	public function getLastProcessedEntries($selectFields = '*', $limit = '100') {
251 251
 		$db = $this->getDB();
252 252
 		$res = $db->exec_SELECTquery(
253 253
 			$selectFields,
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
 		$res = $db->exec_SELECTquery(
280 280
 			'process_id_completed, min(exec_time) as start, max(exec_time) as end, count(*) as urlcount',
281 281
 			$this->tableName,
282
-			'exec_time != 0 and exec_time >= '.intval($start). ' and exec_time <= ' . intval($end),
282
+			'exec_time != 0 and exec_time >= '.intval($start).' and exec_time <= '.intval($end),
283 283
 			'process_id_completed'
284 284
 		);
285 285
 
Please login to merge, or discard this patch.
domain/queue/class.tx_crawler_domain_queue_entry.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
 	 * @author Timo Schmidt <[email protected]>
37 37
 	 * @return int
38 38
 	 */
39
-	public function getExecutionTime(){
39
+	public function getExecutionTime() {
40 40
 		return $this->row['exec_time'];
41 41
 	}
42 42
 
Please login to merge, or discard this patch.
domain/process/class.tx_crawler_domain_process_repository.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -59,12 +59,12 @@  discard block
 block discarded – undo
59 59
 			$this->tableName,
60 60
 			$where,
61 61
 			'',
62
-			htmlspecialchars($orderField) . ' ' . htmlspecialchars($orderDirection),
62
+			htmlspecialchars($orderField).' '.htmlspecialchars($orderDirection),
63 63
 			self::getLimitFromItemCountAndOffset($itemCount, $offset)
64 64
 		);
65 65
 
66 66
 		if (is_array($rows)) {
67
-			foreach($rows as $row) {
67
+			foreach ($rows as $row) {
68 68
 				$collection->append(\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance($this->objectClassname, $row));
69 69
 			}
70 70
 		}
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 	 * @return integer
100 100
 	 */
101 101
 	public function countNotTimeouted($ttl) {
102
-		return $this->countByWhere('deleted = 0 AND ttl > ' . intval($ttl));
102
+		return $this->countByWhere('deleted = 0 AND ttl > '.intval($ttl));
103 103
 	}
104 104
 
105 105
 	/**
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
 	public static function getLimitFromItemCountAndOffset($itemCount, $offset) {
114 114
 		$itemCount = filter_var($itemCount, FILTER_VALIDATE_INT, array('options' => array('min_range' => 1, 'default' => 20)));
115 115
 		$offset = filter_var($offset, FILTER_VALIDATE_INT, array('options' => array('min_range' => 0, 'default' => 0)));
116
-		$limit = $offset . ', ' . $itemCount;
116
+		$limit = $offset.', '.$itemCount;
117 117
 
118 118
 		return $limit;
119 119
 	}
Please login to merge, or discard this patch.
domain/process/class.tx_crawler_domain_process.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -151,7 +151,7 @@
 block discarded – undo
151 151
 		// TODO: use class constants for these states
152 152
 		if ($this->getActive() && $this->getProgress() < 100) {
153 153
 			$stage = 'running';
154
-		} elseif(!$this->getActive() && $this->getProgress() < 100) {
154
+		} elseif (!$this->getActive() && $this->getProgress() < 100) {
155 155
 			$stage = 'cancelled';
156 156
 		} else {
157 157
 			$stage = 'completed';
Please login to merge, or discard this patch.
modfunc1/class.tx_crawler_modfunc1.php 1 patch
Spacing   +107 added lines, -107 removed lines patch added patch discarded remove patch
@@ -90,10 +90,10 @@  discard block
 block discarded – undo
90 90
 	 *
91 91
 	 * @return	array		Menu array
92 92
 	 */
93
-	function modMenu()	{
93
+	function modMenu() {
94 94
 		global $LANG;
95 95
 
96
-		return array (
96
+		return array(
97 97
 			'depth' => array(
98 98
 				0 => $LANG->sL('LLL:EXT:lang/locallang_core.php:labels.depth_0'),
99 99
 				1 => $LANG->sL('LLL:EXT:lang/locallang_core.php:labels.depth_1'),
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 		}
151 151
 
152 152
 			// Set CSS styles specific for this document:
153
-		$this->pObj->content = str_replace('/*###POSTCSSMARKER###*/','
153
+		$this->pObj->content = str_replace('/*###POSTCSSMARKER###*/', '
154 154
 			TABLE.c-list TR TD { white-space: nowrap; vertical-align: top; }
155 155
 		',$this->pObj->content);
156 156
 
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
 		*/
196 196
 
197 197
 			// Additional menus for the log type:
198
-		if ($this->pObj->MOD_SETTINGS['crawlaction']==='log')	{
198
+		if ($this->pObj->MOD_SETTINGS['crawlaction'] === 'log') {
199 199
 			$h_func .= \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncMenu(
200 200
 				$this->pObj->id,
201 201
 				'SET[depth]',
@@ -204,15 +204,15 @@  discard block
 block discarded – undo
204 204
 				'index.php'
205 205
 			);
206 206
 
207
-			$quiPart = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('qid_details') ? '&qid_details=' . intval(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('qid_details')) : '';
207
+			$quiPart = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('qid_details') ? '&qid_details='.intval(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('qid_details')) : '';
208 208
 
209 209
 			$setId = intval(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('setID'));
210 210
 
211
-			$h_func.= '<hr/>'.
212
-					$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) . ' - ' .
213
-					$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) . ' - ' .
214
-					$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) . ' - ' .
215
-					$GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.itemsPerPage').': ' .
211
+			$h_func .= '<hr/>'.
212
+					$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).' - '.
213
+					$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).' - '.
214
+					$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).' - '.
215
+					$GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.itemsPerPage').': '.
216 216
 					\TYPO3\CMS\Backend\Utility\BackendUtility::getFuncMenu(
217 217
 						$this->pObj->id,
218 218
 						'SET[itemsPerPage]',
@@ -222,11 +222,11 @@  discard block
 block discarded – undo
222 222
 					);
223 223
 		}
224 224
 
225
-		$theOutput= $this->pObj->doc->spacer(5);
226
-		$theOutput.= $this->pObj->doc->section($LANG->getLL('title'), $h_func, 0, 1);
225
+		$theOutput = $this->pObj->doc->spacer(5);
226
+		$theOutput .= $this->pObj->doc->section($LANG->getLL('title'), $h_func, 0, 1);
227 227
 
228 228
 			// Branch based on type:
229
-		switch ((string)$this->pObj->MOD_SETTINGS['crawlaction']) {
229
+		switch ((string) $this->pObj->MOD_SETTINGS['crawlaction']) {
230 230
 			case 'start':
231 231
 				if (empty($this->pObj->id)) {
232 232
 					$this->addErrorMessage($GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.noPageSelected'));
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
 	 *
275 275
 	 * @return	string		HTML output
276 276
 	 */
277
-	function drawURLs()	{
277
+	function drawURLs() {
278 278
 		global $BACK_PATH, $BE_USER;
279 279
 
280 280
 			// Init:
@@ -283,12 +283,12 @@  discard block
 block discarded – undo
283 283
 		$this->downloadCrawlUrls = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('_download');
284 284
 		$this->makeCrawlerProcessableChecks();
285 285
 
286
-		switch((string)\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('tstamp'))	{
286
+		switch ((string) \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('tstamp')) {
287 287
 			case 'midnight':
288
-				$this->scheduledTime = mktime(0,0,0);
288
+				$this->scheduledTime = mktime(0, 0, 0);
289 289
 			break;
290 290
 			case '04:00':
291
-				$this->scheduledTime = mktime(0,0,0)+4*3600;
291
+				$this->scheduledTime = mktime(0, 0, 0) + 4 * 3600;
292 292
 			break;
293 293
 			case 'now':
294 294
 			default:
@@ -308,23 +308,23 @@  discard block
 block discarded – undo
308 308
 		$this->crawlerObj->setID = \TYPO3\CMS\Core\Utility\GeneralUtility::md5int(microtime());
309 309
 
310 310
 		if (empty($this->incomingConfigurationSelection)
311
-			|| (count($this->incomingConfigurationSelection)==1 && empty($this->incomingConfigurationSelection[0]))
311
+			|| (count($this->incomingConfigurationSelection) == 1 && empty($this->incomingConfigurationSelection[0]))
312 312
 			) {
313
-			$code= '
313
+			$code = '
314 314
 			<tr>
315 315
 				<td colspan="7"><b>'.$GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.noConfigSelected').'</b></td>
316 316
 			</tr>';
317 317
 		} else {
318
-			if($this->submitCrawlUrls){
318
+			if ($this->submitCrawlUrls) {
319 319
 				$reason = new tx_crawler_domain_reason();
320 320
 				$reason->setReason(tx_crawler_domain_reason::REASON_GUI_SUBMIT);
321 321
 
322
-				if($BE_USER instanceof \TYPO3\CMS\Core\Authentication\BackendUserAuthentication){ $username = $BE_USER->user['username']; }
322
+				if ($BE_USER instanceof \TYPO3\CMS\Core\Authentication\BackendUserAuthentication) { $username = $BE_USER->user['username']; }
323 323
 				$reason->setDetailText('The user '.$username.' added pages to the crawler queue manually ');
324 324
 
325
-				tx_crawler_domain_events_dispatcher::getInstance()->post(	'invokeQueueChange',
325
+				tx_crawler_domain_events_dispatcher::getInstance()->post('invokeQueueChange',
326 326
 																			$this->findCrawler()->setID,
327
-																			array(	'reason' => $reason ));
327
+																			array('reason' => $reason));
328 328
 			}
329 329
 
330 330
 			$code = $this->crawlerObj->getPageTreeAndUrls(
@@ -345,18 +345,18 @@  discard block
 block discarded – undo
345 345
 		$this->duplicateTrack = $this->crawlerObj->duplicateTrack;
346 346
 
347 347
 		$output = '';
348
-		if ($code)	{
348
+		if ($code) {
349 349
 
350 350
 			$output .= '<h3>'.$GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.configuration').':</h3>';
351 351
 			$output .= '<input type="hidden" name="id" value="'.intval($this->pObj->id).'" />';
352 352
 
353
-			if (!$this->submitCrawlUrls)	{
353
+			if (!$this->submitCrawlUrls) {
354 354
 				$output .= $this->drawURLs_cfgSelectors().'<br />';
355 355
 				$output .= '<input type="submit" name="_update" value="'.$GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.triggerUpdate').'" /> ';
356 356
 				$output .= '<input type="submit" name="_crawl" value="'.$GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.triggerCrawl').'" /> ';
357 357
 				$output .= '<input type="submit" name="_download" value="'.$GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.triggerDownload').'" /><br /><br />';
358 358
 				$output .= $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.count').': '.count(array_keys($this->duplicateTrack)).'<br />';
359
-				$output .= $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.curtime').': '.date('H:i:s',time()).'<br />';
359
+				$output .= $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.curtime').': '.date('H:i:s', time()).'<br />';
360 360
 				$output .= '<br />
361 361
 					<table class="lrPadding c-list url-table">'.
362 362
 						$this->drawURLs_printTableHeader().
@@ -370,7 +370,7 @@  discard block
 block discarded – undo
370 370
 		}
371 371
 
372 372
 			// Download Urls to crawl:
373
-		if ($this->downloadCrawlUrls)	{
373
+		if ($this->downloadCrawlUrls) {
374 374
 
375 375
 				// Creating output header:
376 376
 			$mimeType = 'application/octet-stream';
@@ -378,7 +378,7 @@  discard block
 block discarded – undo
378 378
 			Header('Content-Disposition: attachment; filename=CrawlerUrls.txt');
379 379
 
380 380
 				// Printing the content of the CSV lines:
381
-			echo implode(chr(13).chr(10),$this->downloadUrls);
381
+			echo implode(chr(13).chr(10), $this->downloadUrls);
382 382
 
383 383
 				// Exits:
384 384
 			exit;
@@ -393,7 +393,7 @@  discard block
 block discarded – undo
393 393
 	 *
394 394
 	 * @return	string		HTML table
395 395
 	 */
396
-	function drawURLs_cfgSelectors()	{
396
+	function drawURLs_cfgSelectors() {
397 397
 
398 398
 			// depth
399 399
 		$cell[] = $this->selectorBox(
@@ -409,11 +409,11 @@  discard block
 block discarded – undo
409 409
 			$this->pObj->MOD_SETTINGS['depth'],
410 410
 			0
411 411
 		);
412
-		$availableConfigurations = $this->crawlerObj->getConfigurationsForBranch($this->pObj->id, $this->pObj->MOD_SETTINGS['depth']?$this->pObj->MOD_SETTINGS['depth']:0 );
412
+		$availableConfigurations = $this->crawlerObj->getConfigurationsForBranch($this->pObj->id, $this->pObj->MOD_SETTINGS['depth'] ? $this->pObj->MOD_SETTINGS['depth'] : 0);
413 413
 
414 414
 			// Configurations
415 415
 		$cell[] = $this->selectorBox(
416
-			empty($availableConfigurations)?array():array_combine($availableConfigurations, $availableConfigurations),
416
+			empty($availableConfigurations) ? array() : array_combine($availableConfigurations, $availableConfigurations),
417 417
 			'configurationSelection',
418 418
 			$this->incomingConfigurationSelection,
419 419
 			1
@@ -474,7 +474,7 @@  discard block
 block discarded – undo
474 474
 	 *
475 475
 	 * @return	string		Table header
476 476
 	 */
477
-	function drawURLs_printTableHeader()	{
477
+	function drawURLs_printTableHeader() {
478 478
 
479 479
 		$content = '
480 480
 			<tr class="bgColor5 tableheader">
@@ -512,7 +512,7 @@  discard block
 block discarded – undo
512 512
 	 *
513 513
 	 * @return	string		HTML output
514 514
 	 */
515
-	function drawLog()	{
515
+	function drawLog() {
516 516
 		global $BACK_PATH;
517 517
 		$output = '';
518 518
 
@@ -524,46 +524,46 @@  discard block
 block discarded – undo
524 524
 		$this->CSVExport = \TYPO3\CMS\Core\Utility\GeneralUtility::_POST('_csv');
525 525
 
526 526
 			// Read URL:
527
-		if (\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('qid_read'))	{
528
-			$this->crawlerObj->readUrl(intval(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('qid_read')),TRUE);
527
+		if (\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('qid_read')) {
528
+			$this->crawlerObj->readUrl(intval(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('qid_read')), TRUE);
529 529
 		}
530 530
 
531 531
 			// Look for set ID sent - if it is, we will display contents of that set:
532 532
 		$showSetId = intval(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('setID'));
533 533
 
534 534
 			// Show details:
535
-		if (\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('qid_details'))	{
535
+		if (\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('qid_details')) {
536 536
 
537 537
 				// Get entry record:
538
-			list($q_entry) = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*','tx_crawler_queue','qid='.intval(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('qid_details')));
538
+			list($q_entry) = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', 'tx_crawler_queue', 'qid='.intval(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('qid_details')));
539 539
 
540 540
 				// Explode values:
541 541
 				$resStatus = $this->getResStatus($q_entry);
542 542
 			$q_entry['parameters'] = unserialize($q_entry['parameters']);
543 543
 			$q_entry['result_data'] = unserialize($q_entry['result_data']);
544
-			if (is_array($q_entry['result_data']))	{
544
+			if (is_array($q_entry['result_data'])) {
545 545
 				$q_entry['result_data']['content'] = unserialize($q_entry['result_data']['content']);
546 546
 			}
547 547
 
548
-			if(!$this->pObj->MOD_SETTINGS['log_resultLog']) {
548
+			if (!$this->pObj->MOD_SETTINGS['log_resultLog']) {
549 549
 				unset($q_entry['result_data']['content']['log']);
550 550
 			}
551 551
 
552 552
 				// Print rudimentary details:
553 553
 			$output .= '
554 554
 				<br /><br />
555
-				<input type="submit" value="' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.back') . '" name="_back" />
556
-				<input type="hidden" value="' . $this->pObj->id . '" name="id" />
557
-				<input type="hidden" value="' . $showSetId . '" name="setID" />
555
+				<input type="submit" value="' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.back').'" name="_back" />
556
+				<input type="hidden" value="' . $this->pObj->id.'" name="id" />
557
+				<input type="hidden" value="' . $showSetId.'" name="setID" />
558 558
 				<br />
559
-				Current server time: ' . date('H:i:s', time()) . '<br />' .
560
-				'Status: ' . $resStatus . '<br />' .
559
+				Current server time: ' . date('H:i:s', time()).'<br />'.
560
+				'Status: '.$resStatus.'<br />'.
561 561
 				\TYPO3\CMS\Core\Utility\DebugUtility::viewArray($q_entry);
562 562
 		} else {	// Show list:
563 563
 
564 564
 				// If either id or set id, show list:
565
-			if ($this->pObj->id || $showSetId)	{
566
-				if ($this->pObj->id)	{
565
+			if ($this->pObj->id || $showSetId) {
566
+				if ($this->pObj->id) {
567 567
 						// Drawing tree:
568 568
 					$tree = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\CMS\Backend\Tree\View\PageTreeView');
569 569
 					$perms_clause = $GLOBALS['BE_USER']->getPagePermsClause(1);
@@ -578,16 +578,16 @@  discard block
 block discarded – undo
578 578
 					);
579 579
 
580 580
 						// Get branch beneath:
581
-					if ($this->pObj->MOD_SETTINGS['depth'])	{
581
+					if ($this->pObj->MOD_SETTINGS['depth']) {
582 582
 						$tree->getTree($this->pObj->id, $this->pObj->MOD_SETTINGS['depth'], '');
583 583
 					}
584 584
 
585 585
 						// Traverse page tree:
586 586
 					$code = ''; $count = 0;
587
-					foreach($tree->tree as $data)	{
587
+					foreach ($tree->tree as $data) {
588 588
 						$code .= $this->drawLog_addRows(
589 589
 									$data['row'],
590
-									$data['HTML'] . \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordTitle('pages',$data['row'],TRUE),
590
+									$data['HTML'].\TYPO3\CMS\Backend\Utility\BackendUtility::getRecordTitle('pages', $data['row'], TRUE),
591 591
 									intval($this->pObj->MOD_SETTINGS['itemsPerPage'])
592 592
 								);
593 593
 						if (++$count == 1000) {
@@ -596,13 +596,13 @@  discard block
 block discarded – undo
596 596
 					}
597 597
 				} else {
598 598
 					$code = '';
599
-					$code.= $this->drawLog_addRows(
599
+					$code .= $this->drawLog_addRows(
600 600
 								$showSetId,
601 601
 								'Set ID: '.$showSetId
602 602
 							);
603 603
 				}
604 604
 
605
-				if ($code)	{
605
+				if ($code) {
606 606
 
607 607
 					$output .= '
608 608
 						<br /><br />
@@ -613,7 +613,7 @@  discard block
 block discarded – undo
613 613
 						<input type="hidden" value="'.$this->pObj->id.'" name="id" />
614 614
 						<input type="hidden" value="'.$showSetId.'" name="setID" />
615 615
 						<br />
616
-						'.$GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.curtime').': '.date('H:i:s',time()).'
616
+						'.$GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.curtime').': '.date('H:i:s', time()).'
617 617
 						<br /><br />
618 618
 
619 619
 
@@ -639,10 +639,10 @@  discard block
 block discarded – undo
639 639
 					</tr>
640 640
 				';
641 641
 
642
-				$cc=0;
643
-				foreach($setList as $set)	{
644
-					$code.= '
645
-						<tr class="bgColor'.($cc%2 ? '-20':'-10').'">
642
+				$cc = 0;
643
+				foreach ($setList as $set) {
644
+					$code .= '
645
+						<tr class="bgColor'.($cc % 2 ? '-20' : '-10').'">
646 646
 							<td><a href="'.htmlspecialchars('index.php?setID='.$set['set_id']).'">'.$set['set_id'].'</a></td>
647 647
 							<td>'.$set['count_value'].'</td>
648 648
 							<td>'.\TYPO3\CMS\Backend\Utility\BackendUtility::dateTimeAge($set['scheduled']).'</td>
@@ -660,7 +660,7 @@  discard block
 block discarded – undo
660 660
 			}
661 661
 		}
662 662
 
663
-		if($this->CSVExport) {
663
+		if ($this->CSVExport) {
664 664
 			$this->outputCsvFile();
665 665
 		}
666 666
 
@@ -686,7 +686,7 @@  discard block
 block discarded – undo
686 686
 		$csvLines[] = \TYPO3\CMS\Core\Utility\GeneralUtility::csvValues($fieldNames);
687 687
 
688 688
 			// Data:
689
-		foreach($this->CSVaccu as $row)	{
689
+		foreach ($this->CSVaccu as $row) {
690 690
 			$csvLines[] = \TYPO3\CMS\Core\Utility\GeneralUtility::csvValues($row);
691 691
 		}
692 692
 
@@ -696,7 +696,7 @@  discard block
 block discarded – undo
696 696
 		Header('Content-Disposition: attachment; filename=CrawlerLog.csv');
697 697
 
698 698
 			// Printing the content of the CSV lines:
699
-		echo implode(chr(13).chr(10),$csvLines);
699
+		echo implode(chr(13).chr(10), $csvLines);
700 700
 
701 701
 			// Exits:
702 702
 		exit;
@@ -711,14 +711,14 @@  discard block
 block discarded – undo
711 711
 	 * @param	int			Items per Page setting
712 712
 	 * @return	string		HTML <tr> content (one or more)
713 713
 	 */
714
-	function drawLog_addRows($pageRow_setId, $titleString, $itemsPerPage=10) {
714
+	function drawLog_addRows($pageRow_setId, $titleString, $itemsPerPage = 10) {
715 715
 
716 716
 			// If Flush button is pressed, flush tables instead of selecting entries:
717 717
 
718
-		if(\TYPO3\CMS\Core\Utility\GeneralUtility::_POST('_flush')) {
718
+		if (\TYPO3\CMS\Core\Utility\GeneralUtility::_POST('_flush')) {
719 719
 			$doFlush = true;
720 720
 			$doFullFlush = false;
721
-		} elseif(\TYPO3\CMS\Core\Utility\GeneralUtility::_POST('_flush_all')) {
721
+		} elseif (\TYPO3\CMS\Core\Utility\GeneralUtility::_POST('_flush_all')) {
722 722
 			$doFlush = true;
723 723
 			$doFullFlush = true;
724 724
 		} else {
@@ -727,7 +727,7 @@  discard block
 block discarded – undo
727 727
 		}
728 728
 
729 729
 			// Get result:
730
-		if (is_array($pageRow_setId))	{
730
+		if (is_array($pageRow_setId)) {
731 731
 			$res = $this->crawlerObj->getLogEntriesForPageId($pageRow_setId['uid'], $this->pObj->MOD_SETTINGS['log_display'], $doFlush, $doFullFlush, intval($itemsPerPage));
732 732
 		} else {
733 733
 			$res = $this->crawlerObj->getLogEntriesForSetId($pageRow_setId, $this->pObj->MOD_SETTINGS['log_display'], $doFlush, $doFullFlush, intval($itemsPerPage));
@@ -738,14 +738,14 @@  discard block
 block discarded – undo
738 738
 				+ ($this->pObj->MOD_SETTINGS['log_resultLog'] ? -1 : 0)
739 739
 				+ ($this->pObj->MOD_SETTINGS['log_feVars'] ? 3 : 0);
740 740
 
741
-		if (count($res))	{
741
+		if (count($res)) {
742 742
 				// Traverse parameter combinations:
743 743
 			$c = 0;
744
-			$content='';
745
-			foreach($res as $kk => $vv)	{
744
+			$content = '';
745
+			foreach ($res as $kk => $vv) {
746 746
 
747 747
 					// Title column:
748
-				if (!$c)	{
748
+				if (!$c) {
749 749
 					$titleClm = '<td rowspan="'.count($res).'">'.$titleString.'</td>';
750 750
 				} else {
751 751
 					$titleClm = '';
@@ -762,16 +762,16 @@  discard block
 block discarded – undo
762 762
 
763 763
 					// Put data into array:
764 764
 				$rowData = array();
765
-				if ($this->pObj->MOD_SETTINGS['log_resultLog'])	{
765
+				if ($this->pObj->MOD_SETTINGS['log_resultLog']) {
766 766
 					$rowData['result_log'] = $resLog;
767 767
 				} else {
768
-					$rowData['scheduled'] = ($vv['scheduled']> 0) ? \TYPO3\CMS\Backend\Utility\BackendUtility::datetime($vv['scheduled']) : ' '.$GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.immediate');
768
+					$rowData['scheduled'] = ($vv['scheduled'] > 0) ? \TYPO3\CMS\Backend\Utility\BackendUtility::datetime($vv['scheduled']) : ' '.$GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.immediate');
769 769
 					$rowData['exec_time'] = $vv['exec_time'] ? \TYPO3\CMS\Backend\Utility\BackendUtility::datetime($vv['exec_time']) : '-';
770 770
 				}
771
-				$rowData['result_status'] = \TYPO3\CMS\Core\Utility\GeneralUtility::fixed_lgd_cs($resStatus,50);
771
+				$rowData['result_status'] = \TYPO3\CMS\Core\Utility\GeneralUtility::fixed_lgd_cs($resStatus, 50);
772 772
 				$rowData['url'] = '<a href="'.htmlspecialchars($parameters['url']).'" target="_newWIndow">'.htmlspecialchars($parameters['url']).'</a>';
773 773
 				$rowData['feUserGroupList'] = $parameters['feUserGroupList'];
774
-				$rowData['procInstructions'] = is_array($parameters['procInstructions']) ? implode('; ',$parameters['procInstructions']) : '';
774
+				$rowData['procInstructions'] = is_array($parameters['procInstructions']) ? implode('; ', $parameters['procInstructions']) : '';
775 775
 				$rowData['set_id'] = $vv['set_id'];
776 776
 
777 777
 				if ($this->pObj->MOD_SETTINGS['log_feVars']) {
@@ -782,34 +782,34 @@  discard block
 block discarded – undo
782 782
 
783 783
 				$setId = intval(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('setID'));
784 784
 
785
-				$refreshIcon = $GLOBALS['BACK_PATH'] . 'gfx/refresh_n.gif';
786
-				if (version_compare(TYPO3_version,'7.0','>=')) {
787
-					$refreshIcon = $GLOBALS['BACK_PATH'] . 'sysext/t3skin/extjs/images/grid/refresh.gif';
785
+				$refreshIcon = $GLOBALS['BACK_PATH'].'gfx/refresh_n.gif';
786
+				if (version_compare(TYPO3_version, '7.0', '>=')) {
787
+					$refreshIcon = $GLOBALS['BACK_PATH'].'sysext/t3skin/extjs/images/grid/refresh.gif';
788 788
 				}
789 789
 
790 790
 					// Put rows together:
791
-				$content.= '
792
-					<tr class="bgColor'.($c%2 ? '-20':'-10').'">
791
+				$content .= '
792
+					<tr class="bgColor'.($c % 2 ? '-20' : '-10').'">
793 793
 						'.$titleClm.'
794
-						<td><a href="' . $this->getModuleUrl(array('qid_details' => $vv['qid'], 'setID' => $setId)) . '">'.htmlspecialchars($vv['qid']).'</a></td>
795
-						<td><a href="' . $this->getModuleUrl(array('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>';
796
-				foreach($rowData as $fKey => $value) {
794
+						<td><a href="' . $this->getModuleUrl(array('qid_details' => $vv['qid'], 'setID' => $setId)).'">'.htmlspecialchars($vv['qid']).'</a></td>
795
+						<td><a href="' . $this->getModuleUrl(array('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>';
796
+				foreach ($rowData as $fKey => $value) {
797 797
 
798
-					if (\TYPO3\CMS\Core\Utility\GeneralUtility::inList('url',$fKey))	{
799
-						$content.= '
798
+					if (\TYPO3\CMS\Core\Utility\GeneralUtility::inList('url', $fKey)) {
799
+						$content .= '
800 800
 						<td>'.$value.'</td>';
801 801
 					} else {
802
-						$content.= '
802
+						$content .= '
803 803
 						<td>'.nl2br(htmlspecialchars($value)).'</td>';
804 804
 					}
805 805
 				}
806
-				$content.= '
806
+				$content .= '
807 807
 					</tr>';
808 808
 				$c++;
809 809
 
810
-				if ($this->CSVExport)	{
810
+				if ($this->CSVExport) {
811 811
 						// Only for CSV (adding qid and scheduled/exec_time if needed):
812
-					$rowData['result_log'] = implode('// ',explode(chr(10),$resLog));
812
+					$rowData['result_log'] = implode('// ', explode(chr(10), $resLog));
813 813
 					$rowData['qid'] = $vv['qid'];
814 814
 					$rowData['scheduled'] = \TYPO3\CMS\Backend\Utility\BackendUtility::datetime($vv['scheduled']);
815 815
 					$rowData['exec_time'] = $vv['exec_time'] ? \TYPO3\CMS\Backend\Utility\BackendUtility::datetime($vv['exec_time']) : '-';
@@ -852,7 +852,7 @@  discard block
 block discarded – undo
852 852
 	 *
853 853
 	 * @return	string		Table header
854 854
 	 */
855
-	function drawLog_printTableHeader()	{
855
+	function drawLog_printTableHeader() {
856 856
 
857 857
 		$content = '
858 858
 			<tr class="bgColor5 tableheader">
@@ -903,7 +903,7 @@  discard block
 block discarded – undo
903 903
         }
904 904
 
905 905
 	function getResStatus($vv) {
906
-		if ($vv['result_data'])	{
906
+		if ($vv['result_data']) {
907 907
 			$requestContent = unserialize($vv['result_data']);
908 908
 			$requestResult = unserialize($requestContent['content']);
909 909
 			if (is_array($requestResult)) {
@@ -912,9 +912,9 @@  discard block
 block discarded – undo
912 912
 				} else {
913 913
 					$resStatus = implode("\n", $requestResult['errorlog']);
914 914
 				}
915
-				$resLog = is_array($requestResult['log']) ?  implode(chr(10),$requestResult['log']) : '';
915
+				$resLog = is_array($requestResult['log']) ?  implode(chr(10), $requestResult['log']) : '';
916 916
 			} else {
917
-				$resStatus = 'Error: '.substr(preg_replace('/\s+/',' ',strip_tags($requestContent['content'])),0,10000).'...';
917
+				$resStatus = 'Error: '.substr(preg_replace('/\s+/', ' ', strip_tags($requestContent['content'])), 0, 10000).'...';
918 918
 			}
919 919
 		} else {
920 920
 			$resStatus = '-';
@@ -942,7 +942,7 @@  discard block
 block discarded – undo
942 942
 	 * @param void
943 943
 	 * @return string
944 944
 	 */
945
-	protected function drawProcessOverviewAction(){
945
+	protected function drawProcessOverviewAction() {
946 946
 
947 947
 		$this->runRefreshHooks();
948 948
 
@@ -956,20 +956,20 @@  discard block
 block discarded – undo
956 956
 			$this->addErrorMessage($e->getMessage());
957 957
 		}
958 958
 
959
-		$offset 	= intval(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('offset'));
960
-		$perpage 	= 20;
959
+		$offset = intval(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('offset'));
960
+		$perpage = 20;
961 961
 
962
-		$processRepository	= new tx_crawler_domain_process_repository();
963
-		$queueRepository	= new tx_crawler_domain_queue_repository();
962
+		$processRepository = new tx_crawler_domain_process_repository();
963
+		$queueRepository = new tx_crawler_domain_queue_repository();
964 964
 
965 965
 		$mode = $this->pObj->MOD_SETTINGS['processListMode'];
966 966
 		if ($mode == 'detail') {
967 967
 			$where = '';
968
-		} elseif($mode == 'simple') {
968
+		} elseif ($mode == 'simple') {
969 969
 			$where = 'active = 1';
970 970
 		}
971 971
 
972
-		$allProcesses 		= $processRepository->findAll('ttl','DESC', $perpage, $offset,$where);
972
+		$allProcesses = $processRepository->findAll('ttl', 'DESC', $perpage, $offset, $where);
973 973
 		$allCount			= $processRepository->countAll($where);
974 974
 
975 975
 		$listView			= new tx_crawler_view_process_list();
@@ -981,10 +981,10 @@  discard block
 block discarded – undo
981 981
 		$listView->setTotalUnprocessedItemCount($queueRepository->countAllPendingItems());
982 982
 		$listView->setAssignedUnprocessedItemCount($queueRepository->countAllAssignedPendingItems());
983 983
 		$listView->setActiveProcessCount($processRepository->countActive());
984
-		$listView->setMaxActiveProcessCount(tx_crawler_api::forceIntegerInRange($this->extensionSettings['processLimit'],1,99,1));
984
+		$listView->setMaxActiveProcessCount(tx_crawler_api::forceIntegerInRange($this->extensionSettings['processLimit'], 1, 99, 1));
985 985
 		$listView->setMode($mode);
986 986
 
987
-		$paginationView		= new tx_crawler_view_pagination();
987
+		$paginationView = new tx_crawler_view_pagination();
988 988
 		$paginationView->setCurrentOffset($offset);
989 989
 		$paginationView->setPerPage($perpage);
990 990
 		$paginationView->setTotalItemCount($allCount);
@@ -1021,7 +1021,7 @@  discard block
 block discarded – undo
1021 1021
 
1022 1022
 		$exitCode = 0;
1023 1023
 		$out = array();
1024
-		exec(escapeshellcmd($this->extensionSettings['phpPath'] . ' -v'), $out, $exitCode);
1024
+		exec(escapeshellcmd($this->extensionSettings['phpPath'].' -v'), $out, $exitCode);
1025 1025
 		if ($exitCode > 0) {
1026 1026
 			$this->addErrorMessage(sprintf($LANG->sL('LLL:EXT:crawler/modfunc1/locallang.xml:message.phpBinaryNotFound'), htmlspecialchars($this->extensionSettings['phpPath'])));
1027 1027
 		}
@@ -1084,7 +1084,7 @@  discard block
 block discarded – undo
1084 1084
 	 * @param void
1085 1085
 	 * @return void
1086 1086
 	 */
1087
-	protected function handleProcessOverviewActions(){
1087
+	protected function handleProcessOverviewActions() {
1088 1088
 
1089 1089
 		$crawler = $this->findCrawler();
1090 1090
 
@@ -1117,8 +1117,8 @@  discard block
 block discarded – undo
1117 1117
 	 * @return tx_crawler_lib crawler object
1118 1118
 	 * @author Timo Schmidt <[email protected]>
1119 1119
 	 */
1120
-	protected function findCrawler(){
1121
-		if(!$this->crawlerObj instanceof tx_crawler_lib){
1120
+	protected function findCrawler() {
1121
+		if (!$this->crawlerObj instanceof tx_crawler_lib) {
1122 1122
 			$this->crawlerObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('tx_crawler_lib');
1123 1123
 		}
1124 1124
 		return $this->crawlerObj;
@@ -1219,15 +1219,15 @@  discard block
 block discarded – undo
1219 1219
 	 * @param	boolean		If set, will draw multiple box.
1220 1220
 	 * @return	string		HTML select element
1221 1221
 	 */
1222
-	function selectorBox($optArray, $name, $value, $multiple)	{
1222
+	function selectorBox($optArray, $name, $value, $multiple) {
1223 1223
 
1224 1224
 		$options = array();
1225
-		foreach($optArray as $key => $val)	{
1225
+		foreach ($optArray as $key => $val) {
1226 1226
 			$options[] = '
1227
-				<option value="'.htmlspecialchars($key).'"'.((!$multiple && !strcmp($value,$key)) || ($multiple && in_array($key,(array)$value))?' selected="selected"':'').'>'.htmlspecialchars($val).'</option>';
1227
+				<option value="'.htmlspecialchars($key).'"'.((!$multiple && !strcmp($value, $key)) || ($multiple && in_array($key, (array) $value)) ? ' selected="selected"' : '').'>'.htmlspecialchars($val).'</option>';
1228 1228
 		}
1229 1229
 
1230
-		$output = '<select name="'.htmlspecialchars($name.($multiple?'[]':'')).'"'.($multiple ? ' multiple="multiple" size="'.count($options).'"' : '').'>'.implode('',$options).'</select>';
1230
+		$output = '<select name="'.htmlspecialchars($name.($multiple ? '[]' : '')).'"'.($multiple ? ' multiple="multiple" size="'.count($options).'"' : '').'>'.implode('', $options).'</select>';
1231 1231
 
1232 1232
 		return $output;
1233 1233
 	}
@@ -1266,6 +1266,6 @@  discard block
 block discarded – undo
1266 1266
 	}
1267 1267
 }
1268 1268
 
1269
-if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/crawler/modfunc1/class.tx_crawler_modfunc1.php'])	{
1269
+if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/crawler/modfunc1/class.tx_crawler_modfunc1.php']) {
1270 1270
 	include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/crawler/modfunc1/class.tx_crawler_modfunc1.php']);
1271 1271
 }
1272 1272
\ No newline at end of file
Please login to merge, or discard this patch.