Completed
Push — issue/139 ( 971053...0c29f3 )
by Tomas Norre
17:25
created
modfunc1/class.tx_crawler_modfunc1.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -201,15 +201,15 @@  discard block
 block discarded – undo
201 201
                 'index.php'
202 202
             );
203 203
 
204
-            $quiPart = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('qid_details') ? '&qid_details=' . intval(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('qid_details')) : '';
204
+            $quiPart = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('qid_details') ? '&qid_details='.intval(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('qid_details')) : '';
205 205
 
206 206
             $setId = intval(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('setID'));
207 207
 
208 208
             $h_func .= '<hr/>'.
209
-                    $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.display').': '.\TYPO3\CMS\Backend\Utility\BackendUtility::getFuncMenu($this->pObj->id, 'SET[log_display]', $this->pObj->MOD_SETTINGS['log_display'], $this->pObj->MOD_MENU['log_display'], 'index.php', '&setID='.$setId) . ' - ' .
210
-                    $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.showresultlog').': '.\TYPO3\CMS\Backend\Utility\BackendUtility::getFuncCheck($this->pObj->id, 'SET[log_resultLog]', $this->pObj->MOD_SETTINGS['log_resultLog'], 'index.php', '&setID='.$setId . $quiPart) . ' - ' .
211
-                    $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.showfevars').': '.\TYPO3\CMS\Backend\Utility\BackendUtility::getFuncCheck($this->pObj->id, 'SET[log_feVars]', $this->pObj->MOD_SETTINGS['log_feVars'], 'index.php', '&setID='.$setId . $quiPart) . ' - ' .
212
-                    $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.itemsPerPage').': ' .
209
+                    $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.display').': '.\TYPO3\CMS\Backend\Utility\BackendUtility::getFuncMenu($this->pObj->id, 'SET[log_display]', $this->pObj->MOD_SETTINGS['log_display'], $this->pObj->MOD_MENU['log_display'], 'index.php', '&setID='.$setId).' - '.
210
+                    $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.showresultlog').': '.\TYPO3\CMS\Backend\Utility\BackendUtility::getFuncCheck($this->pObj->id, 'SET[log_resultLog]', $this->pObj->MOD_SETTINGS['log_resultLog'], 'index.php', '&setID='.$setId.$quiPart).' - '.
211
+                    $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.showfevars').': '.\TYPO3\CMS\Backend\Utility\BackendUtility::getFuncCheck($this->pObj->id, 'SET[log_feVars]', $this->pObj->MOD_SETTINGS['log_feVars'], 'index.php', '&setID='.$setId.$quiPart).' - '.
212
+                    $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.itemsPerPage').': '.
213 213
                     \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncMenu(
214 214
                         $this->pObj->id,
215 215
                         'SET[itemsPerPage]',
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
         $theOutput = $this->pObj->doc->section($LANG->getLL('title'), $h_func, 0, 1);
223 223
 
224 224
         // Branch based on type:
225
-        switch ((string)$this->pObj->MOD_SETTINGS['crawlaction']) {
225
+        switch ((string) $this->pObj->MOD_SETTINGS['crawlaction']) {
226 226
             case 'start':
227 227
                 if (empty($this->pObj->id)) {
228 228
                     $this->addErrorMessage($GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.noPageSelected'));
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
         $this->downloadCrawlUrls = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('_download');
270 270
         $this->makeCrawlerProcessableChecks();
271 271
 
272
-        switch ((string)\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('tstamp')) {
272
+        switch ((string) \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('tstamp')) {
273 273
             case 'midnight':
274 274
                 $this->scheduledTime = mktime(0, 0, 0);
275 275
             break;
@@ -312,7 +312,7 @@  discard block
 block discarded – undo
312 312
                 tx_crawler_domain_events_dispatcher::getInstance()->post(
313 313
                     'invokeQueueChange',
314 314
                                                                             $this->findCrawler()->setID,
315
-                                                                            [	'reason' => $reason ]
315
+                                                                            ['reason' => $reason]
316 316
                 );
317 317
             }
318 318
 
@@ -396,11 +396,11 @@  discard block
 block discarded – undo
396 396
             $this->pObj->MOD_SETTINGS['depth'],
397 397
             0
398 398
         );
399
-        $availableConfigurations = $this->crawlerObj->getConfigurationsForBranch($this->pObj->id, $this->pObj->MOD_SETTINGS['depth']?$this->pObj->MOD_SETTINGS['depth']:0);
399
+        $availableConfigurations = $this->crawlerObj->getConfigurationsForBranch($this->pObj->id, $this->pObj->MOD_SETTINGS['depth'] ? $this->pObj->MOD_SETTINGS['depth'] : 0);
400 400
 
401 401
         // Configurations
402 402
         $cell[] = $this->selectorBox(
403
-            empty($availableConfigurations)?[]:array_combine($availableConfigurations, $availableConfigurations),
403
+            empty($availableConfigurations) ? [] : array_combine($availableConfigurations, $availableConfigurations),
404 404
             'configurationSelection',
405 405
             $this->incomingConfigurationSelection,
406 406
             1
@@ -529,12 +529,12 @@  discard block
 block discarded – undo
529 529
             // Print rudimentary details:
530 530
             $output .= '
531 531
 				<br /><br />
532
-				<input type="submit" value="' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.back') . '" name="_back" />
533
-				<input type="hidden" value="' . $this->pObj->id . '" name="id" />
534
-				<input type="hidden" value="' . $showSetId . '" name="setID" />
532
+				<input type="submit" value="' . $GLOBALS['LANG']->sL('LLL:EXT:crawler/modfunc1/locallang.xml:labels.back').'" name="_back" />
533
+				<input type="hidden" value="' . $this->pObj->id.'" name="id" />
534
+				<input type="hidden" value="' . $showSetId.'" name="setID" />
535 535
 				<br />
536
-				Current server time: ' . date('H:i:s', time()) . '<br />' .
537
-                'Status: ' . $resStatus . '<br />' .
536
+				Current server time: ' . date('H:i:s', time()).'<br />'.
537
+                'Status: '.$resStatus.'<br />'.
538 538
                 \TYPO3\CMS\Core\Utility\DebugUtility::viewArray($q_entry);
539 539
         } else {	// Show list:
540 540
 
@@ -564,7 +564,7 @@  discard block
 block discarded – undo
564 564
                     foreach ($tree->tree as $data) {
565 565
                         $code .= $this->drawLog_addRows(
566 566
                                     $data['row'],
567
-                                    $data['HTML'] . \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordTitle('pages', $data['row'], true),
567
+                                    $data['HTML'].\TYPO3\CMS\Backend\Utility\BackendUtility::getRecordTitle('pages', $data['row'], true),
568 568
                                     intval($this->pObj->MOD_SETTINGS['itemsPerPage'])
569 569
                                 );
570 570
                         if (++$count == 1000) {
@@ -618,7 +618,7 @@  discard block
 block discarded – undo
618 618
                 $cc = 0;
619 619
                 foreach ($setList as $set) {
620 620
                     $code .= '
621
-						<tr class="bgColor'.($cc % 2 ? '-20':'-10').'">
621
+						<tr class="bgColor'.($cc % 2 ? '-20' : '-10').'">
622 622
 							<td><a href="'.htmlspecialchars('index.php?setID='.$set['set_id']).'">'.$set['set_id'].'</a></td>
623 623
 							<td>'.$set['count_value'].'</td>
624 624
 							<td>'.\TYPO3\CMS\Backend\Utility\BackendUtility::dateTimeAge($set['scheduled']).'</td>
@@ -759,14 +759,14 @@  discard block
 block discarded – undo
759 759
                 }
760 760
 
761 761
                 $setId = intval(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('setID'));
762
-                $refreshIcon = $GLOBALS['BACK_PATH'] . 'sysext/t3skin/extjs/images/grid/refresh.gif';
762
+                $refreshIcon = $GLOBALS['BACK_PATH'].'sysext/t3skin/extjs/images/grid/refresh.gif';
763 763
 
764 764
                 // Put rows together:
765 765
                 $content .= '
766
-					<tr class="bgColor'.($c % 2 ? '-20':'-10').'">
766
+					<tr class="bgColor'.($c % 2 ? '-20' : '-10').'">
767 767
 						'.$titleClm.'
768
-						<td><a href="' . $this->getModuleUrl(['qid_details' => $vv['qid'], 'setID' => $setId]) . '">'.htmlspecialchars($vv['qid']).'</a></td>
769
-						<td><a href="' . $this->getModuleUrl(['qid_read' => $vv['qid'], 'setID' => $setId]) . '"><img src="' . $refreshIcon . '" width="14" hspace="1" vspace="2" height="14" border="0" title="'.htmlspecialchars('Read').'" alt="" /></a></td>';
768
+						<td><a href="' . $this->getModuleUrl(['qid_details' => $vv['qid'], 'setID' => $setId]).'">'.htmlspecialchars($vv['qid']).'</a></td>
769
+						<td><a href="' . $this->getModuleUrl(['qid_read' => $vv['qid'], 'setID' => $setId]).'"><img src="'.$refreshIcon.'" width="14" hspace="1" vspace="2" height="14" border="0" title="'.htmlspecialchars('Read').'" alt="" /></a></td>';
770 770
                 foreach ($rowData as $fKey => $value) {
771 771
                     if (\TYPO3\CMS\Core\Utility\GeneralUtility::inList('url', $fKey)) {
772 772
                         $content .= '
@@ -984,7 +984,7 @@  discard block
 block discarded – undo
984 984
 
985 985
         $exitCode = 0;
986 986
         $out = [];
987
-        exec(escapeshellcmd($this->extensionSettings['phpPath'] . ' -v'), $out, $exitCode);
987
+        exec(escapeshellcmd($this->extensionSettings['phpPath'].' -v'), $out, $exitCode);
988 988
         if ($exitCode > 0) {
989 989
             $this->addErrorMessage(sprintf($LANG->sL('LLL:EXT:crawler/modfunc1/locallang.xml:message.phpBinaryNotFound'), htmlspecialchars($this->extensionSettings['phpPath'])));
990 990
         }
@@ -1173,10 +1173,10 @@  discard block
 block discarded – undo
1173 1173
         $options = [];
1174 1174
         foreach ($optArray as $key => $val) {
1175 1175
             $options[] = '
1176
-				<option value="'.htmlspecialchars($key).'"'.((!$multiple && !strcmp($value, $key)) || ($multiple && in_array($key, (array)$value))?' selected="selected"':'').'>'.htmlspecialchars($val).'</option>';
1176
+				<option value="'.htmlspecialchars($key).'"'.((!$multiple && !strcmp($value, $key)) || ($multiple && in_array($key, (array) $value)) ? ' selected="selected"' : '').'>'.htmlspecialchars($val).'</option>';
1177 1177
         }
1178 1178
 
1179
-        $output = '<select name="'.htmlspecialchars($name.($multiple?'[]':'')).'"'.($multiple ? ' multiple="multiple" size="'.count($options).'"' : '').'>'.implode('', $options).'</select>';
1179
+        $output = '<select name="'.htmlspecialchars($name.($multiple ? '[]' : '')).'"'.($multiple ? ' multiple="multiple" size="'.count($options).'"' : '').'>'.implode('', $options).'</select>';
1180 1180
 
1181 1181
         return $output;
1182 1182
     }
Please login to merge, or discard this patch.