@@ -132,6 +132,7 @@ |
||
| 132 | 132 | /** |
| 133 | 133 | * Internal method to count items by a given where clause |
| 134 | 134 | * |
| 135 | + * @param string $where |
|
| 135 | 136 | */ |
| 136 | 137 | protected function countItemsByWhereClause($where) { |
| 137 | 138 | $db = $this->getDB(); |
@@ -68,7 +68,7 @@ |
||
| 68 | 68 | $res = $db->exec_SELECTgetRows('*','tx_crawler_queue',$where,$groupby,$orderby,$limit); |
| 69 | 69 | if($res) { |
| 70 | 70 | $first = $res[0]; |
| 71 | - }else{ |
|
| 71 | + } else{ |
|
| 72 | 72 | $first = array(); |
| 73 | 73 | } |
| 74 | 74 | $resultObject = new tx_crawler_domain_queue_entry($first); |
@@ -103,7 +103,7 @@ |
||
| 103 | 103 | * This method is used to set the uid of the queue entry |
| 104 | 104 | * where the reason is relevant for. |
| 105 | 105 | * |
| 106 | - * @param int $entry_id |
|
| 106 | + * @param int $entry_uid |
|
| 107 | 107 | */ |
| 108 | 108 | public function setQueueEntryUid($entry_uid) { |
| 109 | 109 | $this->row['queue_entry_uid'] = $entry_uid; |
@@ -709,6 +709,7 @@ discard block |
||
| 709 | 709 | * @param array Page row or set-id |
| 710 | 710 | * @param string Title string |
| 711 | 711 | * @param int Items per Page setting |
| 712 | + * @param string $titleString |
|
| 712 | 713 | * @return string HTML <tr> content (one or more) |
| 713 | 714 | */ |
| 714 | 715 | function drawLog_addRows($pageRow_setId, $titleString, $itemsPerPage=10) { |
@@ -1214,6 +1215,8 @@ discard block |
||
| 1214 | 1215 | * @param string Selector box name |
| 1215 | 1216 | * @param string Selector box value (array for multiple...) |
| 1216 | 1217 | * @param boolean If set, will draw multiple box. |
| 1218 | + * @param string $name |
|
| 1219 | + * @param integer $multiple |
|
| 1217 | 1220 | * @return string HTML select element |
| 1218 | 1221 | */ |
| 1219 | 1222 | function selectorBox($optArray, $name, $value, $multiple) { |
@@ -1054,8 +1054,9 @@ discard block |
||
| 1054 | 1054 | $isAvailable = false; |
| 1055 | 1055 | $userArray = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordsByField('be_users', 'username', '_cli_crawler'); |
| 1056 | 1056 | |
| 1057 | - if (is_array($userArray)) |
|
| 1058 | - $isAvailable = true; |
|
| 1057 | + if (is_array($userArray)) { |
|
| 1058 | + $isAvailable = true; |
|
| 1059 | + } |
|
| 1059 | 1060 | |
| 1060 | 1061 | return $isAvailable; |
| 1061 | 1062 | } |
@@ -1073,8 +1074,9 @@ discard block |
||
| 1073 | 1074 | $isAvailable = false; |
| 1074 | 1075 | $userArray = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordsByField('be_users', 'username', '_cli_crawler'); |
| 1075 | 1076 | |
| 1076 | - if (is_array($userArray) && $userArray[0]['admin'] == 0) |
|
| 1077 | - $isAvailable = true; |
|
| 1077 | + if (is_array($userArray) && $userArray[0]['admin'] == 0) { |
|
| 1078 | + $isAvailable = true; |
|
| 1079 | + } |
|
| 1078 | 1080 | |
| 1079 | 1081 | return $isAvailable; |
| 1080 | 1082 | } |
@@ -123,7 +123,7 @@ |
||
| 123 | 123 | * Returns the total number of pages needed to display all content which |
| 124 | 124 | * is paginatable |
| 125 | 125 | * |
| 126 | - * @return int |
|
| 126 | + * @return double |
|
| 127 | 127 | */ |
| 128 | 128 | public function getTotalPagesCount() { |
| 129 | 129 | return ceil($this->getTotalItemCount() / $this->getPerPage()); |
@@ -111,6 +111,7 @@ discard block |
||
| 111 | 111 | * Set the page id |
| 112 | 112 | * |
| 113 | 113 | * @param int page id |
| 114 | + * @param integer $pageId |
|
| 114 | 115 | */ |
| 115 | 116 | public function setPageId($pageId) { |
| 116 | 117 | $this->pageId = $pageId; |
@@ -269,7 +270,7 @@ discard block |
||
| 269 | 270 | * Converts seconds into minutes |
| 270 | 271 | * |
| 271 | 272 | * @param int $seconds |
| 272 | - * @return int |
|
| 273 | + * @return double |
|
| 273 | 274 | */ |
| 274 | 275 | protected function asMinutes($seconds) { |
| 275 | 276 | return round($seconds / 60); |
@@ -409,7 +410,7 @@ discard block |
||
| 409 | 410 | * just a wrapper should be done in a cleaner way |
| 410 | 411 | * later on |
| 411 | 412 | * |
| 412 | - * @param $label |
|
| 413 | + * @param string $label |
|
| 413 | 414 | * @return string |
| 414 | 415 | */ |
| 415 | 416 | protected function getLLLabel($label) { |
@@ -53,7 +53,7 @@ |
||
| 53 | 53 | * @param string $uri |
| 54 | 54 | * @param TypoScriptFrontendController $frontend |
| 55 | 55 | * |
| 56 | - * @return array |
|
| 56 | + * @return string[] |
|
| 57 | 57 | * |
| 58 | 58 | * @throws \Exception |
| 59 | 59 | * |
@@ -1,4 +1,7 @@ |
||
| 1 | -<?php if (!defined('TYPO3_MODE')) die ('Access denied.'); ?> |
|
| 1 | +<?php if (!defined('TYPO3_MODE')) { |
|
| 2 | + die ('Access denied.'); |
|
| 3 | +} |
|
| 4 | +?> |
|
| 2 | 5 | |
| 3 | 6 | Page: |
| 4 | 7 | <?php for($currentPageOffset = 0; $currentPageOffset < $this->getTotalPagesCount(); $currentPageOffset++ ){ ?> |
@@ -1,4 +1,7 @@ discard block |
||
| 1 | -<?php if (!defined('TYPO3_MODE')) die ('Access denied.'); ?> |
|
| 1 | +<?php if (!defined('TYPO3_MODE')) { |
|
| 2 | + die ('Access denied.'); |
|
| 3 | +} |
|
| 4 | +?> |
|
| 2 | 5 | |
| 3 | 6 | <br /> |
| 4 | 7 | <div id="controll-panel"> |
@@ -69,8 +72,11 @@ discard block |
||
| 69 | 72 | </div> |
| 70 | 73 | <?php elseif ($process->getState() == 'cancelled'): ?> |
| 71 | 74 | <?php echo $this->getLLLabel('LLL:EXT:crawler/modfunc1/locallang.xml:labels.process.cancelled'); ?> |
| 72 | - <?php else: ?> |
|
| 73 | - <?php echo $this->getLLLabel('LLL:EXT:crawler/modfunc1/locallang.xml:labels.process.success'); ?> |
|
| 75 | + <?php else { |
|
| 76 | + : ?> |
|
| 77 | + <?php echo $this->getLLLabel('LLL:EXT:crawler/modfunc1/locallang.xml:labels.process.success'); |
|
| 78 | +} |
|
| 79 | +?> |
|
| 74 | 80 | <?php endif; ?> |
| 75 | 81 | </td> |
| 76 | 82 | </tr> |
@@ -1,5 +1,7 @@ |
||
| 1 | 1 | <?php |
| 2 | -if (!defined('TYPO3_cliMode')) die('You cannot run this script directly!'); |
|
| 2 | +if (!defined('TYPO3_cliMode')) { |
|
| 3 | + die('You cannot run this script directly!'); |
|
| 4 | +} |
|
| 3 | 5 | |
| 4 | 6 | $crawlerObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('tx_crawler_lib'); |
| 5 | 7 | |