We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -19,7 +19,8 @@ discard block |
||
| 19 | 19 | * @subpackage tx_dlf |
| 20 | 20 | * @access public |
| 21 | 21 | */ |
| 22 | -class tx_dlf_listview extends tx_dlf_plugin { |
|
| 22 | +class tx_dlf_listview extends tx_dlf_plugin |
|
| 23 | +{ |
|
| 23 | 24 | |
| 24 | 25 | public $scriptRelPath = 'plugins/listview/class.tx_dlf_listview.php'; |
| 25 | 26 | |
@@ -62,7 +63,8 @@ discard block |
||
| 62 | 63 | * |
| 63 | 64 | * @return string The rendered page browser ready for output |
| 64 | 65 | */ |
| 65 | - protected function getPageBrowser() { |
|
| 66 | + protected function getPageBrowser() |
|
| 67 | + { |
|
| 66 | 68 | |
| 67 | 69 | // Get overall number of pages. |
| 68 | 70 | $maxPages = intval(ceil($this->list->metadata['options']['numberOfToplevelHits'] / $this->conf['limit'])); |
@@ -146,7 +148,8 @@ discard block |
||
| 146 | 148 | * |
| 147 | 149 | * @return string The rendered entry ready for output |
| 148 | 150 | */ |
| 149 | - protected function getEntry($number, $template) { |
|
| 151 | + protected function getEntry($number, $template) |
|
| 152 | + { |
|
| 150 | 153 | |
| 151 | 154 | $markerArray['###NUMBER###'] = $number + 1; |
| 152 | 155 | |
@@ -314,7 +317,8 @@ discard block |
||
| 314 | 317 | * |
| 315 | 318 | * @return array The parsed fieldwrap |
| 316 | 319 | */ |
| 317 | - private function getFieldWrap($index_name, $wrap) { |
|
| 320 | + private function getFieldWrap($index_name, $wrap) |
|
| 321 | + { |
|
| 318 | 322 | |
| 319 | 323 | if (isset($this->fieldwrap[$index_name])) { |
| 320 | 324 | |
@@ -335,7 +339,8 @@ discard block |
||
| 335 | 339 | * |
| 336 | 340 | * @return string The rendered sorting dialog ready for output |
| 337 | 341 | */ |
| 338 | - protected function getSortingForm() { |
|
| 342 | + protected function getSortingForm() |
|
| 343 | + { |
|
| 339 | 344 | |
| 340 | 345 | // Return nothing if there are no sortable metadata fields. |
| 341 | 346 | if (!count($this->sortables)) { |
@@ -416,7 +421,8 @@ discard block |
||
| 416 | 421 | * |
| 417 | 422 | * @return string The rendered entries ready for output |
| 418 | 423 | */ |
| 419 | - protected function getSubEntries($number, $template) { |
|
| 424 | + protected function getSubEntries($number, $template) |
|
| 425 | + { |
|
| 420 | 426 | |
| 421 | 427 | $content = ''; |
| 422 | 428 | |
@@ -590,7 +596,8 @@ discard block |
||
| 590 | 596 | * |
| 591 | 597 | * @return void |
| 592 | 598 | */ |
| 593 | - protected function loadConfig() { |
|
| 599 | + protected function loadConfig() |
|
| 600 | + { |
|
| 594 | 601 | |
| 595 | 602 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
| 596 | 603 | 'tx_dlf_metadata.index_name AS index_name,tx_dlf_metadata.wrap AS wrap,tx_dlf_metadata.is_listed AS is_listed,tx_dlf_metadata.is_sortable AS is_sortable', |
@@ -632,7 +639,8 @@ discard block |
||
| 632 | 639 | * |
| 633 | 640 | * @return string The content that is displayed on the website |
| 634 | 641 | */ |
| 635 | - public function main($content, $conf) { |
|
| 642 | + public function main($content, $conf) |
|
| 643 | + { |
|
| 636 | 644 | |
| 637 | 645 | $this->init($conf); |
| 638 | 646 | |
@@ -75,22 +75,22 @@ discard block |
||
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | // Get separator. |
| 78 | - $separator = $this->pi_getLL('separator', ' - ', TRUE); |
|
| 78 | + $separator = $this->pi_getLL('separator', ' - ', true); |
|
| 79 | 79 | |
| 80 | 80 | // Add link to previous page. |
| 81 | 81 | if ($this->piVars['pointer'] > 0) { |
| 82 | 82 | |
| 83 | - $output = $this->pi_linkTP_keepPIvars($this->pi_getLL('prevPage', '<', TRUE), array ('pointer' => $this->piVars['pointer'] - 1), TRUE).$separator; |
|
| 83 | + $output = $this->pi_linkTP_keepPIvars($this->pi_getLL('prevPage', '<', true), array ('pointer' => $this->piVars['pointer'] - 1), true).$separator; |
|
| 84 | 84 | |
| 85 | 85 | } else { |
| 86 | 86 | |
| 87 | - $output = $this->pi_getLL('prevPage', '<', TRUE).$separator; |
|
| 87 | + $output = $this->pi_getLL('prevPage', '<', true).$separator; |
|
| 88 | 88 | |
| 89 | 89 | } |
| 90 | 90 | |
| 91 | 91 | $i = 0; |
| 92 | 92 | |
| 93 | - $skip = NULL; |
|
| 93 | + $skip = null; |
|
| 94 | 94 | |
| 95 | 95 | // Add links to pages. |
| 96 | 96 | while ($i < $maxPages) { |
@@ -99,21 +99,21 @@ discard block |
||
| 99 | 99 | |
| 100 | 100 | if ($this->piVars['pointer'] != $i) { |
| 101 | 101 | |
| 102 | - $output .= $this->pi_linkTP_keepPIvars(sprintf($this->pi_getLL('page', '%d', TRUE), $i + 1), array ('pointer' => $i), TRUE).$separator; |
|
| 102 | + $output .= $this->pi_linkTP_keepPIvars(sprintf($this->pi_getLL('page', '%d', true), $i + 1), array ('pointer' => $i), true).$separator; |
|
| 103 | 103 | |
| 104 | 104 | } else { |
| 105 | 105 | |
| 106 | - $output .= sprintf($this->pi_getLL('page', '%d', TRUE), $i + 1).$separator; |
|
| 106 | + $output .= sprintf($this->pi_getLL('page', '%d', true), $i + 1).$separator; |
|
| 107 | 107 | |
| 108 | 108 | } |
| 109 | 109 | |
| 110 | - $skip = TRUE; |
|
| 110 | + $skip = true; |
|
| 111 | 111 | |
| 112 | - } elseif ($skip === TRUE) { |
|
| 112 | + } elseif ($skip === true) { |
|
| 113 | 113 | |
| 114 | - $output .= $this->pi_getLL('skip', '...', TRUE).$separator; |
|
| 114 | + $output .= $this->pi_getLL('skip', '...', true).$separator; |
|
| 115 | 115 | |
| 116 | - $skip = FALSE; |
|
| 116 | + $skip = false; |
|
| 117 | 117 | |
| 118 | 118 | } |
| 119 | 119 | |
@@ -124,11 +124,11 @@ discard block |
||
| 124 | 124 | // Add link to next page. |
| 125 | 125 | if ($this->piVars['pointer'] < $maxPages - 1) { |
| 126 | 126 | |
| 127 | - $output .= $this->pi_linkTP_keepPIvars($this->pi_getLL('nextPage', '>', TRUE), array ('pointer' => $this->piVars['pointer'] + 1), TRUE); |
|
| 127 | + $output .= $this->pi_linkTP_keepPIvars($this->pi_getLL('nextPage', '>', true), array ('pointer' => $this->piVars['pointer'] + 1), true); |
|
| 128 | 128 | |
| 129 | 129 | } else { |
| 130 | 130 | |
| 131 | - $output .= $this->pi_getLL('nextPage', '>', TRUE); |
|
| 131 | + $output .= $this->pi_getLL('nextPage', '>', true); |
|
| 132 | 132 | |
| 133 | 133 | } |
| 134 | 134 | |
@@ -180,7 +180,7 @@ discard block |
||
| 180 | 180 | // Get title of parent document if needed. |
| 181 | 181 | if (empty($value) && $this->conf['getTitle']) { |
| 182 | 182 | |
| 183 | - $superiorTitle = tx_dlf_document::getTitle($this->list[$number]['uid'], TRUE); |
|
| 183 | + $superiorTitle = tx_dlf_document::getTitle($this->list[$number]['uid'], true); |
|
| 184 | 184 | |
| 185 | 185 | if (!empty($superiorTitle)) { |
| 186 | 186 | |
@@ -213,7 +213,7 @@ discard block |
||
| 213 | 213 | $conf = array ( |
| 214 | 214 | 'useCacheHash' => 1, |
| 215 | 215 | 'parameter' => $this->conf['targetPid'], |
| 216 | - 'additionalParams' => \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, $additionalParams, '', TRUE, FALSE) |
|
| 216 | + 'additionalParams' => \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, $additionalParams, '', true, false) |
|
| 217 | 217 | ); |
| 218 | 218 | |
| 219 | 219 | $value = $this->cObj->typoLink(htmlspecialchars($value), $conf); |
@@ -291,16 +291,16 @@ discard block |
||
| 291 | 291 | $conf = array ( |
| 292 | 292 | 'useCacheHash' => 1, |
| 293 | 293 | 'parameter' => $this->conf['targetBasket'], |
| 294 | - 'additionalParams' => \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, $additionalParams, '', TRUE, FALSE) |
|
| 294 | + 'additionalParams' => \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, $additionalParams, '', true, false) |
|
| 295 | 295 | ); |
| 296 | 296 | |
| 297 | - $link = $this->cObj->typoLink($this->pi_getLL('addBasket', '', TRUE), $conf); |
|
| 297 | + $link = $this->cObj->typoLink($this->pi_getLL('addBasket', '', true), $conf); |
|
| 298 | 298 | |
| 299 | 299 | $markerArray['###BASKETBUTTON###'] = $link; |
| 300 | 300 | |
| 301 | 301 | } |
| 302 | 302 | |
| 303 | - return $this->cObj->substituteMarkerArray($this->cObj->substituteSubpart($template['entry'], '###SUBTEMPLATE###', $subpart, TRUE), $markerArray); |
|
| 303 | + return $this->cObj->substituteMarkerArray($this->cObj->substituteSubpart($template['entry'], '###SUBTEMPLATE###', $subpart, true), $markerArray); |
|
| 304 | 304 | |
| 305 | 305 | } |
| 306 | 306 | |
@@ -354,7 +354,7 @@ discard block |
||
| 354 | 354 | |
| 355 | 355 | if (!empty($this->piVars['logicalPage'])) { |
| 356 | 356 | |
| 357 | - $linkConf['additionalParams'] = \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, array ('logicalPage' => $this->piVars['logicalPage']), '', TRUE, FALSE); |
|
| 357 | + $linkConf['additionalParams'] = \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, array ('logicalPage' => $this->piVars['logicalPage']), '', true, false); |
|
| 358 | 358 | |
| 359 | 359 | } |
| 360 | 360 | |
@@ -374,12 +374,12 @@ discard block |
||
| 374 | 374 | // Select sort field. |
| 375 | 375 | $uniqId = uniqid($prefix.'-'); |
| 376 | 376 | |
| 377 | - $sorting .= '<label for="'.$uniqId.'">'.$this->pi_getLL('orderBy', '', TRUE).'</label><select id="'.$uniqId.'" name="'.$this->prefixId.'[order]" onchange="javascript:this.form.submit();">'; |
|
| 377 | + $sorting .= '<label for="'.$uniqId.'">'.$this->pi_getLL('orderBy', '', true).'</label><select id="'.$uniqId.'" name="'.$this->prefixId.'[order]" onchange="javascript:this.form.submit();">'; |
|
| 378 | 378 | |
| 379 | 379 | // Add relevance sorting if this is a search result list. |
| 380 | 380 | if ($this->list->metadata['options']['source'] == 'search') { |
| 381 | 381 | |
| 382 | - $sorting .= '<option value="score"'.(($this->list->metadata['options']['order'] == 'score') ? ' selected="selected"' : '').'>'.$this->pi_getLL('relevance', '', TRUE).'</option>'; |
|
| 382 | + $sorting .= '<option value="score"'.(($this->list->metadata['options']['order'] == 'score') ? ' selected="selected"' : '').'>'.$this->pi_getLL('relevance', '', true).'</option>'; |
|
| 383 | 383 | |
| 384 | 384 | } |
| 385 | 385 | |
@@ -394,11 +394,11 @@ discard block |
||
| 394 | 394 | // Select sort direction. |
| 395 | 395 | $uniqId = uniqid($prefix.'-'); |
| 396 | 396 | |
| 397 | - $sorting .= '<label for="'.$uniqId.'">'.$this->pi_getLL('direction', '', TRUE).'</label><select id="'.$uniqId.'" name="'.$this->prefixId.'[asc]" onchange="javascript:this.form.submit();">'; |
|
| 397 | + $sorting .= '<label for="'.$uniqId.'">'.$this->pi_getLL('direction', '', true).'</label><select id="'.$uniqId.'" name="'.$this->prefixId.'[asc]" onchange="javascript:this.form.submit();">'; |
|
| 398 | 398 | |
| 399 | - $sorting .= '<option value="1" '.($this->list->metadata['options']['order.asc'] ? ' selected="selected"' : '').'>'.$this->pi_getLL('direction.asc', '', TRUE).'</option>'; |
|
| 399 | + $sorting .= '<option value="1" '.($this->list->metadata['options']['order.asc'] ? ' selected="selected"' : '').'>'.$this->pi_getLL('direction.asc', '', true).'</option>'; |
|
| 400 | 400 | |
| 401 | - $sorting .= '<option value="0" '.(!$this->list->metadata['options']['order.asc'] ? ' selected="selected"' : '').'>'.$this->pi_getLL('direction.desc', '', TRUE).'</option>'; |
|
| 401 | + $sorting .= '<option value="0" '.(!$this->list->metadata['options']['order.asc'] ? ' selected="selected"' : '').'>'.$this->pi_getLL('direction.desc', '', true).'</option>'; |
|
| 402 | 402 | |
| 403 | 403 | $sorting .= '</select></div></form>'; |
| 404 | 404 | |
@@ -450,7 +450,7 @@ discard block |
||
| 450 | 450 | // Get title of parent document if needed. |
| 451 | 451 | if (empty($value) && $this->conf['getTitle']) { |
| 452 | 452 | |
| 453 | - $superiorTitle = tx_dlf_document::getTitle($subpart['uid'], TRUE); |
|
| 453 | + $superiorTitle = tx_dlf_document::getTitle($subpart['uid'], true); |
|
| 454 | 454 | |
| 455 | 455 | if (!empty($superiorTitle)) { |
| 456 | 456 | |
@@ -485,7 +485,7 @@ discard block |
||
| 485 | 485 | // we don't want cHash in case of search parameters |
| 486 | 486 | 'useCacheHash' => empty($this->list->metadata['searchString']) ? 1 : 0, |
| 487 | 487 | 'parameter' => $this->conf['targetPid'], |
| 488 | - 'additionalParams' => \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, $additionalParams, '', TRUE, FALSE) |
|
| 488 | + 'additionalParams' => \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, $additionalParams, '', true, false) |
|
| 489 | 489 | ); |
| 490 | 490 | |
| 491 | 491 | $value = $this->cObj->typoLink(htmlspecialchars($value), $conf); |
@@ -566,10 +566,10 @@ discard block |
||
| 566 | 566 | $conf = array ( |
| 567 | 567 | 'useCacheHash' => 1, |
| 568 | 568 | 'parameter' => $this->conf['targetBasket'], |
| 569 | - 'additionalParams' => \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, $additionalParams, '', TRUE, FALSE) |
|
| 569 | + 'additionalParams' => \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, $additionalParams, '', true, false) |
|
| 570 | 570 | ); |
| 571 | 571 | |
| 572 | - $link = $this->cObj->typoLink($this->pi_getLL('addBasket', '', TRUE), $conf); |
|
| 572 | + $link = $this->cObj->typoLink($this->pi_getLL('addBasket', '', true), $conf); |
|
| 573 | 573 | |
| 574 | 574 | $markerArray['###SUBBASKETBUTTON###'] = $link; |
| 575 | 575 | |
@@ -579,7 +579,7 @@ discard block |
||
| 579 | 579 | |
| 580 | 580 | } |
| 581 | 581 | |
| 582 | - return $this->cObj->substituteSubpart($this->cObj->getSubpart($this->template, '###SUBTEMPLATE###'), '###SUBENTRY###', $content, TRUE); |
|
| 582 | + return $this->cObj->substituteSubpart($this->cObj->getSubpart($this->template, '###SUBTEMPLATE###'), '###SUBENTRY###', $content, true); |
|
| 583 | 583 | |
| 584 | 584 | } |
| 585 | 585 | |
@@ -637,7 +637,7 @@ discard block |
||
| 637 | 637 | $this->init($conf); |
| 638 | 638 | |
| 639 | 639 | // Don't cache the output. |
| 640 | - $this->setCache(FALSE); |
|
| 640 | + $this->setCache(false); |
|
| 641 | 641 | |
| 642 | 642 | // Load the list. |
| 643 | 643 | $this->list = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('tx_dlf_list'); |
@@ -797,7 +797,7 @@ discard block |
||
| 797 | 797 | |
| 798 | 798 | } else { |
| 799 | 799 | |
| 800 | - $markerArray['###COUNT###'] = $this->pi_getLL('nohits', '', TRUE); |
|
| 800 | + $markerArray['###COUNT###'] = $this->pi_getLL('nohits', '', true); |
|
| 801 | 801 | |
| 802 | 802 | } |
| 803 | 803 | |
@@ -805,7 +805,7 @@ discard block |
||
| 805 | 805 | |
| 806 | 806 | $markerArray['###SORTING###'] = $this->getSortingForm(); |
| 807 | 807 | |
| 808 | - $content = $this->cObj->substituteMarkerArray($this->cObj->substituteSubpart($this->template, '###ENTRY###', $content, TRUE), $markerArray); |
|
| 808 | + $content = $this->cObj->substituteMarkerArray($this->cObj->substituteSubpart($this->template, '###ENTRY###', $content, true), $markerArray); |
|
| 809 | 809 | |
| 810 | 810 | return $this->pi_wrapInBaseClass($content); |
| 811 | 811 | |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | * @var array |
| 30 | 30 | * @access private |
| 31 | 31 | */ |
| 32 | - private $fieldwrap = array (); |
|
| 32 | + private $fieldwrap = array(); |
|
| 33 | 33 | |
| 34 | 34 | /** |
| 35 | 35 | * This holds the list |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | * @var array |
| 46 | 46 | * @access protected |
| 47 | 47 | */ |
| 48 | - protected $metadata = array (); |
|
| 48 | + protected $metadata = array(); |
|
| 49 | 49 | |
| 50 | 50 | /** |
| 51 | 51 | * Array of sortable metadata |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | * @var array |
| 54 | 54 | * @access protected |
| 55 | 55 | */ |
| 56 | - protected $sortables = array (); |
|
| 56 | + protected $sortables = array(); |
|
| 57 | 57 | |
| 58 | 58 | /** |
| 59 | 59 | * Renders the page browser |
@@ -80,11 +80,11 @@ discard block |
||
| 80 | 80 | // Add link to previous page. |
| 81 | 81 | if ($this->piVars['pointer'] > 0) { |
| 82 | 82 | |
| 83 | - $output = $this->pi_linkTP_keepPIvars($this->pi_getLL('prevPage', '<', TRUE), array ('pointer' => $this->piVars['pointer'] - 1), TRUE).$separator; |
|
| 83 | + $output = $this->pi_linkTP_keepPIvars($this->pi_getLL('prevPage', '<', TRUE), array('pointer' => $this->piVars['pointer'] - 1), TRUE) . $separator; |
|
| 84 | 84 | |
| 85 | 85 | } else { |
| 86 | 86 | |
| 87 | - $output = $this->pi_getLL('prevPage', '<', TRUE).$separator; |
|
| 87 | + $output = $this->pi_getLL('prevPage', '<', TRUE) . $separator; |
|
| 88 | 88 | |
| 89 | 89 | } |
| 90 | 90 | |
@@ -99,11 +99,11 @@ discard block |
||
| 99 | 99 | |
| 100 | 100 | if ($this->piVars['pointer'] != $i) { |
| 101 | 101 | |
| 102 | - $output .= $this->pi_linkTP_keepPIvars(sprintf($this->pi_getLL('page', '%d', TRUE), $i + 1), array ('pointer' => $i), TRUE).$separator; |
|
| 102 | + $output .= $this->pi_linkTP_keepPIvars(sprintf($this->pi_getLL('page', '%d', TRUE), $i + 1), array('pointer' => $i), TRUE) . $separator; |
|
| 103 | 103 | |
| 104 | 104 | } else { |
| 105 | 105 | |
| 106 | - $output .= sprintf($this->pi_getLL('page', '%d', TRUE), $i + 1).$separator; |
|
| 106 | + $output .= sprintf($this->pi_getLL('page', '%d', TRUE), $i + 1) . $separator; |
|
| 107 | 107 | |
| 108 | 108 | } |
| 109 | 109 | |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | |
| 112 | 112 | } elseif ($skip === TRUE) { |
| 113 | 113 | |
| 114 | - $output .= $this->pi_getLL('skip', '...', TRUE).$separator; |
|
| 114 | + $output .= $this->pi_getLL('skip', '...', TRUE) . $separator; |
|
| 115 | 115 | |
| 116 | 116 | $skip = FALSE; |
| 117 | 117 | |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | // Add link to next page. |
| 125 | 125 | if ($this->piVars['pointer'] < $maxPages - 1) { |
| 126 | 126 | |
| 127 | - $output .= $this->pi_linkTP_keepPIvars($this->pi_getLL('nextPage', '>', TRUE), array ('pointer' => $this->piVars['pointer'] + 1), TRUE); |
|
| 127 | + $output .= $this->pi_linkTP_keepPIvars($this->pi_getLL('nextPage', '>', TRUE), array('pointer' => $this->piVars['pointer'] + 1), TRUE); |
|
| 128 | 128 | |
| 129 | 129 | } else { |
| 130 | 130 | |
@@ -184,7 +184,7 @@ discard block |
||
| 184 | 184 | |
| 185 | 185 | if (!empty($superiorTitle)) { |
| 186 | 186 | |
| 187 | - $value = '['.$superiorTitle.']'; |
|
| 187 | + $value = '[' . $superiorTitle . ']'; |
|
| 188 | 188 | |
| 189 | 189 | } |
| 190 | 190 | |
@@ -199,7 +199,7 @@ discard block |
||
| 199 | 199 | |
| 200 | 200 | $imgAlt = htmlspecialchars($value); |
| 201 | 201 | |
| 202 | - $additionalParams = array ( |
|
| 202 | + $additionalParams = array( |
|
| 203 | 203 | 'id' => $this->list[$number]['uid'], |
| 204 | 204 | 'page' => $this->list[$number]['page'] |
| 205 | 205 | ); |
@@ -210,7 +210,7 @@ discard block |
||
| 210 | 210 | |
| 211 | 211 | } |
| 212 | 212 | |
| 213 | - $conf = array ( |
|
| 213 | + $conf = array( |
|
| 214 | 214 | 'useCacheHash' => 1, |
| 215 | 215 | 'parameter' => $this->conf['targetPid'], |
| 216 | 216 | 'additionalParams' => \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, $additionalParams, '', TRUE, FALSE) |
@@ -264,7 +264,7 @@ discard block |
||
| 264 | 264 | // Add thumbnail. |
| 265 | 265 | if (!empty($this->list[$number]['thumbnail'])) { |
| 266 | 266 | |
| 267 | - $markerArray['###THUMBNAIL###'] = '<img alt="'.$imgAlt.'" src="'.$this->list[$number]['thumbnail'].'" />'; |
|
| 267 | + $markerArray['###THUMBNAIL###'] = '<img alt="' . $imgAlt . '" src="' . $this->list[$number]['thumbnail'] . '" />'; |
|
| 268 | 268 | |
| 269 | 269 | } |
| 270 | 270 | |
@@ -286,9 +286,9 @@ discard block |
||
| 286 | 286 | |
| 287 | 287 | if (!empty($this->conf['basketButton']) && !empty($this->conf['targetBasket'])) { |
| 288 | 288 | |
| 289 | - $additionalParams = array ('id' => $this->list[$number]['uid'], 'startpage' => $this->list[$number]['page'], 'addToBasket' => 'list'); |
|
| 289 | + $additionalParams = array('id' => $this->list[$number]['uid'], 'startpage' => $this->list[$number]['page'], 'addToBasket' => 'list'); |
|
| 290 | 290 | |
| 291 | - $conf = array ( |
|
| 291 | + $conf = array( |
|
| 292 | 292 | 'useCacheHash' => 1, |
| 293 | 293 | 'parameter' => $this->conf['targetBasket'], |
| 294 | 294 | 'additionalParams' => \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, $additionalParams, '', TRUE, FALSE) |
@@ -348,57 +348,57 @@ discard block |
||
| 348 | 348 | $prefix = str_replace('_', '-', get_class($this)); |
| 349 | 349 | |
| 350 | 350 | // Configure @action URL for form. |
| 351 | - $linkConf = array ( |
|
| 351 | + $linkConf = array( |
|
| 352 | 352 | 'parameter' => $GLOBALS['TSFE']->id |
| 353 | 353 | ); |
| 354 | 354 | |
| 355 | 355 | if (!empty($this->piVars['logicalPage'])) { |
| 356 | 356 | |
| 357 | - $linkConf['additionalParams'] = \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, array ('logicalPage' => $this->piVars['logicalPage']), '', TRUE, FALSE); |
|
| 357 | + $linkConf['additionalParams'] = \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, array('logicalPage' => $this->piVars['logicalPage']), '', TRUE, FALSE); |
|
| 358 | 358 | |
| 359 | 359 | } |
| 360 | 360 | |
| 361 | 361 | // Build HTML form. |
| 362 | - $sorting = '<form action="'.$this->cObj->typoLink_URL($linkConf).'" method="get"><div><input type="hidden" name="id" value="'.$GLOBALS['TSFE']->id.'" />'; |
|
| 362 | + $sorting = '<form action="' . $this->cObj->typoLink_URL($linkConf) . '" method="get"><div><input type="hidden" name="id" value="' . $GLOBALS['TSFE']->id . '" />'; |
|
| 363 | 363 | |
| 364 | 364 | foreach ($this->piVars as $piVar => $value) { |
| 365 | 365 | |
| 366 | 366 | if ($piVar != 'order' && $piVar != 'DATA' && !empty($value)) { |
| 367 | 367 | |
| 368 | - $sorting .= '<input type="hidden" name="'.$this->prefixId.'['.preg_replace('/[^A-Za-z0-9_-]/', '', $piVar).']" value="'.htmlspecialchars($value).'" />'; |
|
| 368 | + $sorting .= '<input type="hidden" name="' . $this->prefixId . '[' . preg_replace('/[^A-Za-z0-9_-]/', '', $piVar) . ']" value="' . htmlspecialchars($value) . '" />'; |
|
| 369 | 369 | |
| 370 | 370 | } |
| 371 | 371 | |
| 372 | 372 | } |
| 373 | 373 | |
| 374 | 374 | // Select sort field. |
| 375 | - $uniqId = uniqid($prefix.'-'); |
|
| 375 | + $uniqId = uniqid($prefix . '-'); |
|
| 376 | 376 | |
| 377 | - $sorting .= '<label for="'.$uniqId.'">'.$this->pi_getLL('orderBy', '', TRUE).'</label><select id="'.$uniqId.'" name="'.$this->prefixId.'[order]" onchange="javascript:this.form.submit();">'; |
|
| 377 | + $sorting .= '<label for="' . $uniqId . '">' . $this->pi_getLL('orderBy', '', TRUE) . '</label><select id="' . $uniqId . '" name="' . $this->prefixId . '[order]" onchange="javascript:this.form.submit();">'; |
|
| 378 | 378 | |
| 379 | 379 | // Add relevance sorting if this is a search result list. |
| 380 | 380 | if ($this->list->metadata['options']['source'] == 'search') { |
| 381 | 381 | |
| 382 | - $sorting .= '<option value="score"'.(($this->list->metadata['options']['order'] == 'score') ? ' selected="selected"' : '').'>'.$this->pi_getLL('relevance', '', TRUE).'</option>'; |
|
| 382 | + $sorting .= '<option value="score"' . (($this->list->metadata['options']['order'] == 'score') ? ' selected="selected"' : '') . '>' . $this->pi_getLL('relevance', '', TRUE) . '</option>'; |
|
| 383 | 383 | |
| 384 | 384 | } |
| 385 | 385 | |
| 386 | 386 | foreach ($this->sortables as $index_name => $label) { |
| 387 | 387 | |
| 388 | - $sorting .= '<option value="'.htmlspecialchars($index_name).'"'.(($this->list->metadata['options']['order'] == $index_name) ? ' selected="selected"' : '').'>'.htmlspecialchars($label).'</option>'; |
|
| 388 | + $sorting .= '<option value="' . htmlspecialchars($index_name) . '"' . (($this->list->metadata['options']['order'] == $index_name) ? ' selected="selected"' : '') . '>' . htmlspecialchars($label) . '</option>'; |
|
| 389 | 389 | |
| 390 | 390 | } |
| 391 | 391 | |
| 392 | 392 | $sorting .= '</select>'; |
| 393 | 393 | |
| 394 | 394 | // Select sort direction. |
| 395 | - $uniqId = uniqid($prefix.'-'); |
|
| 395 | + $uniqId = uniqid($prefix . '-'); |
|
| 396 | 396 | |
| 397 | - $sorting .= '<label for="'.$uniqId.'">'.$this->pi_getLL('direction', '', TRUE).'</label><select id="'.$uniqId.'" name="'.$this->prefixId.'[asc]" onchange="javascript:this.form.submit();">'; |
|
| 397 | + $sorting .= '<label for="' . $uniqId . '">' . $this->pi_getLL('direction', '', TRUE) . '</label><select id="' . $uniqId . '" name="' . $this->prefixId . '[asc]" onchange="javascript:this.form.submit();">'; |
|
| 398 | 398 | |
| 399 | - $sorting .= '<option value="1" '.($this->list->metadata['options']['order.asc'] ? ' selected="selected"' : '').'>'.$this->pi_getLL('direction.asc', '', TRUE).'</option>'; |
|
| 399 | + $sorting .= '<option value="1" ' . ($this->list->metadata['options']['order.asc'] ? ' selected="selected"' : '') . '>' . $this->pi_getLL('direction.asc', '', TRUE) . '</option>'; |
|
| 400 | 400 | |
| 401 | - $sorting .= '<option value="0" '.(!$this->list->metadata['options']['order.asc'] ? ' selected="selected"' : '').'>'.$this->pi_getLL('direction.desc', '', TRUE).'</option>'; |
|
| 401 | + $sorting .= '<option value="0" ' . (!$this->list->metadata['options']['order.asc'] ? ' selected="selected"' : '') . '>' . $this->pi_getLL('direction.desc', '', TRUE) . '</option>'; |
|
| 402 | 402 | |
| 403 | 403 | $sorting .= '</select></div></form>'; |
| 404 | 404 | |
@@ -454,7 +454,7 @@ discard block |
||
| 454 | 454 | |
| 455 | 455 | if (!empty($superiorTitle)) { |
| 456 | 456 | |
| 457 | - $value = '['.$superiorTitle.']'; |
|
| 457 | + $value = '[' . $superiorTitle . ']'; |
|
| 458 | 458 | |
| 459 | 459 | } |
| 460 | 460 | |
@@ -469,7 +469,7 @@ discard block |
||
| 469 | 469 | |
| 470 | 470 | $imgAlt = htmlspecialchars($value); |
| 471 | 471 | |
| 472 | - $additionalParams = array ( |
|
| 472 | + $additionalParams = array( |
|
| 473 | 473 | 'id' => $subpart['uid'], |
| 474 | 474 | 'page' => $subpart['page'], |
| 475 | 475 | 'highlight_word' => $highlight_word |
@@ -481,7 +481,7 @@ discard block |
||
| 481 | 481 | |
| 482 | 482 | } |
| 483 | 483 | |
| 484 | - $conf = array ( |
|
| 484 | + $conf = array( |
|
| 485 | 485 | // we don't want cHash in case of search parameters |
| 486 | 486 | 'useCacheHash' => empty($this->list->metadata['searchString']) ? 1 : 0, |
| 487 | 487 | 'parameter' => $this->conf['targetPid'], |
@@ -505,7 +505,7 @@ discard block |
||
| 505 | 505 | // Add page number for single pages. |
| 506 | 506 | if ($_value == 'page') { |
| 507 | 507 | |
| 508 | - $value .= ' '.intval($subpart['page']); |
|
| 508 | + $value .= ' ' . intval($subpart['page']); |
|
| 509 | 509 | |
| 510 | 510 | } |
| 511 | 511 | |
@@ -545,7 +545,7 @@ discard block |
||
| 545 | 545 | // Add thumbnail. |
| 546 | 546 | if (!empty($subpart['thumbnail'])) { |
| 547 | 547 | |
| 548 | - $markerArray['###SUBTHUMBNAIL###'] = '<img alt="'.$imgAlt.'" src="'.$subpart['thumbnail'].'" />'; |
|
| 548 | + $markerArray['###SUBTHUMBNAIL###'] = '<img alt="' . $imgAlt . '" src="' . $subpart['thumbnail'] . '" />'; |
|
| 549 | 549 | |
| 550 | 550 | } |
| 551 | 551 | |
@@ -561,9 +561,9 @@ discard block |
||
| 561 | 561 | |
| 562 | 562 | if (!empty($this->conf['basketButton']) && !empty($this->conf['targetBasket'])) { |
| 563 | 563 | |
| 564 | - $additionalParams = array ('id' => $this->list[$number]['uid'], 'startpage' => $subpart['page'], 'endpage' => $subpart['page'], 'logId' => $subpart['sid'], 'addToBasket' => 'subentry'); |
|
| 564 | + $additionalParams = array('id' => $this->list[$number]['uid'], 'startpage' => $subpart['page'], 'endpage' => $subpart['page'], 'logId' => $subpart['sid'], 'addToBasket' => 'subentry'); |
|
| 565 | 565 | |
| 566 | - $conf = array ( |
|
| 566 | + $conf = array( |
|
| 567 | 567 | 'useCacheHash' => 1, |
| 568 | 568 | 'parameter' => $this->conf['targetBasket'], |
| 569 | 569 | 'additionalParams' => \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, $additionalParams, '', TRUE, FALSE) |
@@ -595,7 +595,7 @@ discard block |
||
| 595 | 595 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
| 596 | 596 | 'tx_dlf_metadata.index_name AS index_name,tx_dlf_metadata.wrap AS wrap,tx_dlf_metadata.is_listed AS is_listed,tx_dlf_metadata.is_sortable AS is_sortable', |
| 597 | 597 | 'tx_dlf_metadata', |
| 598 | - '(tx_dlf_metadata.is_listed=1 OR tx_dlf_metadata.is_sortable=1) AND tx_dlf_metadata.pid='.intval($this->conf['pages']).tx_dlf_helper::whereClause('tx_dlf_metadata'), |
|
| 598 | + '(tx_dlf_metadata.is_listed=1 OR tx_dlf_metadata.is_sortable=1) AND tx_dlf_metadata.pid=' . intval($this->conf['pages']) . tx_dlf_helper::whereClause('tx_dlf_metadata'), |
|
| 599 | 599 | '', |
| 600 | 600 | 'tx_dlf_metadata.sorting ASC', |
| 601 | 601 | '' |
@@ -605,7 +605,7 @@ discard block |
||
| 605 | 605 | |
| 606 | 606 | if ($resArray['is_listed']) { |
| 607 | 607 | |
| 608 | - $this->metadata[$resArray['index_name']] = array ( |
|
| 608 | + $this->metadata[$resArray['index_name']] = array( |
|
| 609 | 609 | 'wrap' => $resArray['wrap'], |
| 610 | 610 | 'label' => tx_dlf_helper::translate($resArray['index_name'], 'tx_dlf_metadata', $this->conf['pages']) |
| 611 | 611 | ); |
@@ -678,7 +678,7 @@ discard block |
||
| 678 | 678 | || (isset($this->piVars['asc']) && $this->piVars['asc'] != $listMetadata['options']['order.asc'])) { |
| 679 | 679 | |
| 680 | 680 | // Update list's metadata. |
| 681 | - $listMetadata['options']['params']['sort'] = array ($this->piVars['order']."_sorting" => (boolean) $this->piVars['asc']?'asc':'desc'); |
|
| 681 | + $listMetadata['options']['params']['sort'] = array($this->piVars['order'] . "_sorting" => (boolean) $this->piVars['asc'] ? 'asc' : 'desc'); |
|
| 682 | 682 | |
| 683 | 683 | $listMetadata['options']['order'] = $this->piVars['order']; |
| 684 | 684 | $listMetadata['options']['order.asc'] = (boolean) $this->piVars['asc']; |
@@ -702,7 +702,7 @@ discard block |
||
| 702 | 702 | |
| 703 | 703 | if (TYPO3_DLOG) { |
| 704 | 704 | |
| 705 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_listview->main('.$content.', [data])] Apache Solr not available', $this->extKey, SYSLOG_SEVERITY_ERROR, $conf); |
|
| 705 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_listview->main(' . $content . ', [data])] Apache Solr not available', $this->extKey, SYSLOG_SEVERITY_ERROR, $conf); |
|
| 706 | 706 | |
| 707 | 707 | } |
| 708 | 708 | |
@@ -711,7 +711,7 @@ discard block |
||
| 711 | 711 | } |
| 712 | 712 | |
| 713 | 713 | // Set search parameters. |
| 714 | - $solr->cPid = $listMetadata['options']['pid']; |
|
| 714 | + $solr->cPid = $listMetadata['options']['pid']; |
|
| 715 | 715 | $solr->params = $listMetadata['options']['params']; |
| 716 | 716 | |
| 717 | 717 | // Perform search. |
@@ -720,7 +720,7 @@ discard block |
||
| 720 | 720 | } |
| 721 | 721 | |
| 722 | 722 | // Add list description |
| 723 | - $listMetadata['description'] = '<p class="tx-dlf-search-numHits">'.htmlspecialchars(sprintf($this->pi_getLL('hits', ''), $this->list->metadata['options']['numberOfHits'], $this->list->metadata['options']['numberOfToplevelHits'])).'</p>'; |
|
| 723 | + $listMetadata['description'] = '<p class="tx-dlf-search-numHits">' . htmlspecialchars(sprintf($this->pi_getLL('hits', ''), $this->list->metadata['options']['numberOfHits'], $this->list->metadata['options']['numberOfToplevelHits'])) . '</p>'; |
|
| 724 | 724 | $this->list->metadata = $listMetadata; |
| 725 | 725 | |
| 726 | 726 | // Save updated list. |
@@ -780,7 +780,7 @@ discard block |
||
| 780 | 780 | |
| 781 | 781 | if (!empty($this->list->metadata['thumbnail'])) { |
| 782 | 782 | |
| 783 | - $markerArray['###LISTTHUMBNAIL###'] = '<img alt="" src="'.$this->list->metadata['thumbnail'].'" />'; |
|
| 783 | + $markerArray['###LISTTHUMBNAIL###'] = '<img alt="" src="' . $this->list->metadata['thumbnail'] . '" />'; |
|
| 784 | 784 | |
| 785 | 785 | } else { |
| 786 | 786 | |
@@ -790,7 +790,7 @@ discard block |
||
| 790 | 790 | |
| 791 | 791 | if ($currentEntry) { |
| 792 | 792 | |
| 793 | - $currentEntry = ($this->piVars['pointer'] * $this->conf['limit']) + 1; |
|
| 793 | + $currentEntry = ($this->piVars['pointer'] * $this->conf['limit']) + 1; |
|
| 794 | 794 | $lastEntry = ($this->piVars['pointer'] * $this->conf['limit']) + $this->conf['limit']; |
| 795 | 795 | |
| 796 | 796 | $markerArray['###COUNT###'] = htmlspecialchars(sprintf($this->pi_getLL('count'), $currentEntry, $lastEntry < $this->list->metadata['options']['numberOfToplevelHits'] ? $lastEntry : $this->list->metadata['options']['numberOfToplevelHits'], $this->list->metadata['options']['numberOfToplevelHits'])); |
@@ -34,11 +34,11 @@ discard block |
||
| 34 | 34 | $output = '<div style="padding:5px; background-color:#000000;">'; |
| 35 | 35 | |
| 36 | 36 | // Simulate TCA field type "passthrough". |
| 37 | - $output .= '<input type="hidden" name="'.$params['itemFormElName'].'" value="'.$params['itemFormElValue'].'" />'; |
|
| 37 | + $output .= '<input type="hidden" name="' . $params['itemFormElName'] . '" value="' . $params['itemFormElValue'] . '" />'; |
|
| 38 | 38 | |
| 39 | 39 | if (!empty($params['itemFormElValue'])) { |
| 40 | 40 | |
| 41 | - $output .= '<img alt="" src="'.$params['itemFormElValue'].'" />'; |
|
| 41 | + $output .= '<img alt="" src="' . $params['itemFormElValue'] . '" />'; |
|
| 42 | 42 | |
| 43 | 43 | } |
| 44 | 44 | |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
| 95 | 95 | 'label,uid', |
| 96 | 96 | 'tx_dlf_collections', |
| 97 | - 'pid='.intval($pages).' AND (sys_language_uid IN (-1,0) OR l18n_parent=0)'.tx_dlf_helper::whereClause('tx_dlf_collections'), |
|
| 97 | + 'pid=' . intval($pages) . ' AND (sys_language_uid IN (-1,0) OR l18n_parent=0)' . tx_dlf_helper::whereClause('tx_dlf_collections'), |
|
| 98 | 98 | '', |
| 99 | 99 | 'label', |
| 100 | 100 | '' |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
| 163 | 163 | 'label,index_name', |
| 164 | 164 | 'tx_dlf_metadata', |
| 165 | - 'index_indexed=1 AND pid='.intval($pages).' AND (sys_language_uid IN (-1,0) OR l18n_parent=0)'.tx_dlf_helper::whereClause('tx_dlf_metadata'), |
|
| 165 | + 'index_indexed=1 AND pid=' . intval($pages) . ' AND (sys_language_uid IN (-1,0) OR l18n_parent=0)' . tx_dlf_helper::whereClause('tx_dlf_metadata'), |
|
| 166 | 166 | '', |
| 167 | 167 | 'sorting', |
| 168 | 168 | '' |
@@ -230,7 +230,7 @@ discard block |
||
| 230 | 230 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
| 231 | 231 | 'label,index_name', |
| 232 | 232 | 'tx_dlf_metadata', |
| 233 | - 'is_facet=1 AND pid='.intval($pages).' AND (sys_language_uid IN (-1,0) OR l18n_parent=0)'.tx_dlf_helper::whereClause('tx_dlf_metadata'), |
|
| 233 | + 'is_facet=1 AND pid=' . intval($pages) . ' AND (sys_language_uid IN (-1,0) OR l18n_parent=0)' . tx_dlf_helper::whereClause('tx_dlf_metadata'), |
|
| 234 | 234 | '', |
| 235 | 235 | 'sorting', |
| 236 | 236 | '' |
@@ -298,7 +298,7 @@ discard block |
||
| 298 | 298 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
| 299 | 299 | 'label,uid', |
| 300 | 300 | 'tx_dlf_libraries', |
| 301 | - 'pid='.intval($pages).' AND (sys_language_uid IN (-1,0) OR l18n_parent=0)'.tx_dlf_helper::whereClause('tx_dlf_libraries'), |
|
| 301 | + 'pid=' . intval($pages) . ' AND (sys_language_uid IN (-1,0) OR l18n_parent=0)' . tx_dlf_helper::whereClause('tx_dlf_libraries'), |
|
| 302 | 302 | '', |
| 303 | 303 | 'label', |
| 304 | 304 | '' |
@@ -366,7 +366,7 @@ discard block |
||
| 366 | 366 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
| 367 | 367 | 'label,uid', |
| 368 | 368 | 'tx_dlf_solrcores', |
| 369 | - 'pid IN ('.intval($pages).',0)'.tx_dlf_helper::whereClause('tx_dlf_solrcores'), |
|
| 369 | + 'pid IN (' . intval($pages) . ',0)' . tx_dlf_helper::whereClause('tx_dlf_solrcores'), |
|
| 370 | 370 | '', |
| 371 | 371 | 'label', |
| 372 | 372 | '' |
@@ -402,7 +402,7 @@ discard block |
||
| 402 | 402 | |
| 403 | 403 | foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/plugins/toolbox/tools'] as $class => $label) { |
| 404 | 404 | |
| 405 | - $params['items'][] = array ($GLOBALS['LANG']->sL($label), $class); |
|
| 405 | + $params['items'][] = array($GLOBALS['LANG']->sL($label), $class); |
|
| 406 | 406 | |
| 407 | 407 | } |
| 408 | 408 | |
@@ -17,7 +17,8 @@ discard block |
||
| 17 | 17 | * @subpackage tx_dlf |
| 18 | 18 | * @access public |
| 19 | 19 | */ |
| 20 | -class tx_dlf_tceforms { |
|
| 20 | +class tx_dlf_tceforms |
|
| 21 | +{ |
|
| 21 | 22 | |
| 22 | 23 | /** |
| 23 | 24 | * Helper to display document's thumbnail for table "tx_dlf_documents" |
@@ -29,7 +30,8 @@ discard block |
||
| 29 | 30 | * |
| 30 | 31 | * @return string HTML <img> tag for thumbnail |
| 31 | 32 | */ |
| 32 | - public function displayThumbnail(&$params, &$pObj) { |
|
| 33 | + public function displayThumbnail(&$params, &$pObj) |
|
| 34 | + { |
|
| 33 | 35 | |
| 34 | 36 | $output = '<div style="padding:5px; background-color:#000000;">'; |
| 35 | 37 | |
@@ -58,7 +60,8 @@ discard block |
||
| 58 | 60 | * |
| 59 | 61 | * @return void |
| 60 | 62 | */ |
| 61 | - public function itemsProcFunc_collectionList(&$params, &$pObj) { |
|
| 63 | + public function itemsProcFunc_collectionList(&$params, &$pObj) |
|
| 64 | + { |
|
| 62 | 65 | |
| 63 | 66 | // the access to pi_flexform data has changed in TYPO3 7.6 |
| 64 | 67 | if (version_compare(TYPO3_version, '7.6', '<')) { |
@@ -126,7 +129,8 @@ discard block |
||
| 126 | 129 | * |
| 127 | 130 | * @return void |
| 128 | 131 | */ |
| 129 | - public function itemsProcFunc_extendedSearchList(&$params, &$pObj) { |
|
| 132 | + public function itemsProcFunc_extendedSearchList(&$params, &$pObj) |
|
| 133 | + { |
|
| 130 | 134 | |
| 131 | 135 | // the access to pi_flexform data has changed in TYPO3 7.6 |
| 132 | 136 | if (version_compare(TYPO3_version, '7.6', '<')) { |
@@ -194,7 +198,8 @@ discard block |
||
| 194 | 198 | * |
| 195 | 199 | * @return void |
| 196 | 200 | */ |
| 197 | - public function itemsProcFunc_facetsList(&$params, &$pObj) { |
|
| 201 | + public function itemsProcFunc_facetsList(&$params, &$pObj) |
|
| 202 | + { |
|
| 198 | 203 | |
| 199 | 204 | // the access to pi_flexform data has changed in TYPO3 7.6 |
| 200 | 205 | if (version_compare(TYPO3_version, '7.6', '<')) { |
@@ -262,7 +267,8 @@ discard block |
||
| 262 | 267 | * |
| 263 | 268 | * @return void |
| 264 | 269 | */ |
| 265 | - public function itemsProcFunc_libraryList(&$params, &$pObj) { |
|
| 270 | + public function itemsProcFunc_libraryList(&$params, &$pObj) |
|
| 271 | + { |
|
| 266 | 272 | |
| 267 | 273 | // the access to pi_flexform data has changed in TYPO3 7.6 |
| 268 | 274 | if (version_compare(TYPO3_version, '7.6', '<')) { |
@@ -330,7 +336,8 @@ discard block |
||
| 330 | 336 | * |
| 331 | 337 | * @return void |
| 332 | 338 | */ |
| 333 | - public function itemsProcFunc_solrList(&$params, &$pObj) { |
|
| 339 | + public function itemsProcFunc_solrList(&$params, &$pObj) |
|
| 340 | + { |
|
| 334 | 341 | |
| 335 | 342 | // the access to pi_flexform data has changed in TYPO3 7.6 |
| 336 | 343 | if (version_compare(TYPO3_version, '7.6', '<')) { |
@@ -398,7 +405,8 @@ discard block |
||
| 398 | 405 | * |
| 399 | 406 | * @return void |
| 400 | 407 | */ |
| 401 | - public function itemsProcFunc_toolList(&$params, &$pObj) { |
|
| 408 | + public function itemsProcFunc_toolList(&$params, &$pObj) |
|
| 409 | + { |
|
| 402 | 410 | |
| 403 | 411 | foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/plugins/toolbox/tools'] as $class => $label) { |
| 404 | 412 | |
@@ -70,7 +70,7 @@ |
||
| 70 | 70 | |
| 71 | 71 | } |
| 72 | 72 | |
| 73 | - $recordIds = $xml->xpath('//mets:dmdSec[@ID="'.$id.'"]//mods:mods/mods:recordInfo/mods:recordIdentifier'); |
|
| 73 | + $recordIds = $xml->xpath('//mets:dmdSec[@ID="' . $id . '"]//mods:mods/mods:recordInfo/mods:recordIdentifier'); |
|
| 74 | 74 | |
| 75 | 75 | if (!empty($recordIds[0])) { |
| 76 | 76 | |
@@ -17,7 +17,8 @@ discard block |
||
| 17 | 17 | * @subpackage tx_dlf |
| 18 | 18 | * @access public |
| 19 | 19 | */ |
| 20 | -class tx_dlf_hacks { |
|
| 20 | +class tx_dlf_hacks |
|
| 21 | +{ |
|
| 21 | 22 | |
| 22 | 23 | /** |
| 23 | 24 | * Hook for the __construct() method of dlf/common/class.tx_dlf_document.php |
@@ -31,7 +32,8 @@ discard block |
||
| 31 | 32 | * |
| 32 | 33 | * @return void |
| 33 | 34 | */ |
| 34 | - public function construct_postProcessRecordId(SimpleXMLElement &$xml, &$record_id) { |
|
| 35 | + public function construct_postProcessRecordId(SimpleXMLElement &$xml, &$record_id) |
|
| 36 | + { |
|
| 35 | 37 | |
| 36 | 38 | if (!$record_id) { |
| 37 | 39 | |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | * @var array |
| 26 | 26 | * @access protected |
| 27 | 27 | */ |
| 28 | - protected $conf = array (); |
|
| 28 | + protected $conf = array(); |
|
| 29 | 29 | |
| 30 | 30 | /** |
| 31 | 31 | * This holds the output ready to return |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | // Prepend username and password to hostname. |
| 53 | 53 | if (!empty($solrInfo['username']) && !empty($solrInfo['password'])) { |
| 54 | 54 | |
| 55 | - $host = $solrInfo['username'].':'.$solrInfo['password'].'@'.$solrInfo['host']; |
|
| 55 | + $host = $solrInfo['username'] . ':' . $solrInfo['password'] . '@' . $solrInfo['host']; |
|
| 56 | 56 | |
| 57 | 57 | } else { |
| 58 | 58 | |
@@ -61,10 +61,10 @@ discard block |
||
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | // Build request URI. |
| 64 | - $url = $solrInfo['scheme'].'://'.$host.':'.$solrInfo['port'].'/'.$solrInfo['path'].'/admin/cores?wt=xml'; |
|
| 64 | + $url = $solrInfo['scheme'] . '://' . $host . ':' . $solrInfo['port'] . '/' . $solrInfo['path'] . '/admin/cores?wt=xml'; |
|
| 65 | 65 | |
| 66 | - $context = stream_context_create(array ( |
|
| 67 | - 'http' => array ( |
|
| 66 | + $context = stream_context_create(array( |
|
| 67 | + 'http' => array( |
|
| 68 | 68 | 'method' => 'GET', |
| 69 | 69 | 'user_agent' => (!empty($this->conf['useragent']) ? $this->conf['useragent'] : ini_get('user_agent')) |
| 70 | 70 | ) |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
| 130 | 130 | 'uid,admin,usergroup', |
| 131 | 131 | 'be_users', |
| 132 | - 'username='.$GLOBALS['TYPO3_DB']->fullQuoteStr('_cli_dlf', 'be_users').\TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause('be_users') |
|
| 132 | + 'username=' . $GLOBALS['TYPO3_DB']->fullQuoteStr('_cli_dlf', 'be_users') . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause('be_users') |
|
| 133 | 133 | ); |
| 134 | 134 | |
| 135 | 135 | if ($GLOBALS['TYPO3_DB']->sql_num_rows($result) > 0) { |
@@ -143,11 +143,11 @@ discard block |
||
| 143 | 143 | $result2 = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
| 144 | 144 | '1', |
| 145 | 145 | 'be_users', |
| 146 | - 'uid='.intval($resArray['uid']).\TYPO3\CMS\Backend\Utility\BackendUtility::BEenableFields('be_users') |
|
| 146 | + 'uid=' . intval($resArray['uid']) . \TYPO3\CMS\Backend\Utility\BackendUtility::BEenableFields('be_users') |
|
| 147 | 147 | ); |
| 148 | 148 | |
| 149 | 149 | // Check if user is configured properly. |
| 150 | - if (count(array_diff(array ($groupUid), $resArray['usergroup'])) == 0 |
|
| 150 | + if (count(array_diff(array($groupUid), $resArray['usergroup'])) == 0 |
|
| 151 | 151 | && !$resArray['admin'] |
| 152 | 152 | && $GLOBALS['TYPO3_DB']->sql_num_rows($result2) > 0) { |
| 153 | 153 | |
@@ -166,11 +166,11 @@ discard block |
||
| 166 | 166 | if (!$checkOnly && $groupUid) { |
| 167 | 167 | |
| 168 | 168 | // Keep exisiting values and add the new ones. |
| 169 | - $usergroup = array_unique(array_merge(array ($groupUid), $resArray['usergroup'])); |
|
| 169 | + $usergroup = array_unique(array_merge(array($groupUid), $resArray['usergroup'])); |
|
| 170 | 170 | |
| 171 | 171 | // Try to configure user. |
| 172 | - $data = array (); |
|
| 173 | - $data['be_users'][$resArray['uid']] = array ( |
|
| 172 | + $data = array(); |
|
| 173 | + $data['be_users'][$resArray['uid']] = array( |
|
| 174 | 174 | 'admin' => 0, |
| 175 | 175 | 'usergroup' => implode(',', $usergroup), |
| 176 | 176 | $GLOBALS['TCA']['be_users']['ctrl']['enablecolumns']['disabled'] => 0, |
@@ -226,8 +226,8 @@ discard block |
||
| 226 | 226 | // Try to create user. |
| 227 | 227 | $tempUid = uniqid('NEW'); |
| 228 | 228 | |
| 229 | - $data = array (); |
|
| 230 | - $data['be_users'][$tempUid] = array ( |
|
| 229 | + $data = array(); |
|
| 230 | + $data['be_users'][$tempUid] = array( |
|
| 231 | 231 | 'pid' => 0, |
| 232 | 232 | 'username' => '_cli_dlf', |
| 233 | 233 | 'password' => md5($tempUid), |
@@ -292,7 +292,7 @@ discard block |
||
| 292 | 292 | * |
| 293 | 293 | * @return integer UID of usergroup or 0 if something is wrong |
| 294 | 294 | */ |
| 295 | - protected function checkCliGroup($checkOnly, $settings = array ()) { |
|
| 295 | + protected function checkCliGroup($checkOnly, $settings = array()) { |
|
| 296 | 296 | |
| 297 | 297 | // Set default return value. |
| 298 | 298 | $grpUid = 0; |
@@ -300,9 +300,9 @@ discard block |
||
| 300 | 300 | // Set default configuration for usergroup. |
| 301 | 301 | if (empty($settings)) { |
| 302 | 302 | |
| 303 | - $settings = array ( |
|
| 304 | - 'non_exclude_fields' => array (), |
|
| 305 | - 'tables_select' => array ( |
|
| 303 | + $settings = array( |
|
| 304 | + 'non_exclude_fields' => array(), |
|
| 305 | + 'tables_select' => array( |
|
| 306 | 306 | 'tx_dlf_documents', |
| 307 | 307 | 'tx_dlf_collections', |
| 308 | 308 | 'tx_dlf_libraries', |
@@ -312,7 +312,7 @@ discard block |
||
| 312 | 312 | 'tx_dlf_formats', |
| 313 | 313 | 'tx_dlf_solrcores' |
| 314 | 314 | ), |
| 315 | - 'tables_modify' => array ( |
|
| 315 | + 'tables_modify' => array( |
|
| 316 | 316 | 'tx_dlf_documents', |
| 317 | 317 | 'tx_dlf_collections', |
| 318 | 318 | 'tx_dlf_libraries' |
@@ -326,7 +326,7 @@ discard block |
||
| 326 | 326 | |
| 327 | 327 | if (!empty($fieldConf['exclude'])) { |
| 328 | 328 | |
| 329 | - $settings['non_exclude_fields'][] = $table.':'.$field; |
|
| 329 | + $settings['non_exclude_fields'][] = $table . ':' . $field; |
|
| 330 | 330 | |
| 331 | 331 | } |
| 332 | 332 | |
@@ -338,10 +338,10 @@ discard block |
||
| 338 | 338 | |
| 339 | 339 | // Check if group "_cli_dlf" exists and is not disabled. |
| 340 | 340 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
| 341 | - 'uid,non_exclude_fields,tables_select,tables_modify,'. |
|
| 341 | + 'uid,non_exclude_fields,tables_select,tables_modify,' . |
|
| 342 | 342 | $GLOBALS['TCA']['be_groups']['ctrl']['enablecolumns']['disabled'], |
| 343 | 343 | 'be_groups', |
| 344 | - 'title='.$GLOBALS['TYPO3_DB']->fullQuoteStr('_cli_dlf', 'be_groups'). |
|
| 344 | + 'title=' . $GLOBALS['TYPO3_DB']->fullQuoteStr('_cli_dlf', 'be_groups') . |
|
| 345 | 345 | \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause('be_groups') |
| 346 | 346 | ); |
| 347 | 347 | |
@@ -384,8 +384,8 @@ discard block |
||
| 384 | 384 | $tables_modify = array_unique(array_merge($settings['tables_modify'], $resArray['tables_modify'])); |
| 385 | 385 | |
| 386 | 386 | // Try to configure usergroup. |
| 387 | - $data = array (); |
|
| 388 | - $data['be_groups'][$resArray['uid']] = array ( |
|
| 387 | + $data = array(); |
|
| 388 | + $data['be_groups'][$resArray['uid']] = array( |
|
| 389 | 389 | 'non_exclude_fields' => implode(',', $non_exclude_fields), |
| 390 | 390 | 'tables_select' => implode(',', $tables_select), |
| 391 | 391 | 'tables_modify' => implode(',', $tables_modify), |
@@ -440,8 +440,8 @@ discard block |
||
| 440 | 440 | // Try to create usergroup. |
| 441 | 441 | $tempUid = uniqid('NEW'); |
| 442 | 442 | |
| 443 | - $data = array (); |
|
| 444 | - $data['be_groups'][$tempUid] = array ( |
|
| 443 | + $data = array(); |
|
| 444 | + $data['be_groups'][$tempUid] = array( |
|
| 445 | 445 | 'pid' => 0, |
| 446 | 446 | 'title' => '_cli_dlf', |
| 447 | 447 | 'description' => $GLOBALS['LANG']->getLL('cliUserGroup.grpDescription'), |
@@ -522,7 +522,7 @@ discard block |
||
| 522 | 522 | $this->content .= $content; |
| 523 | 523 | |
| 524 | 524 | // Check if CLI dispatcher is executable. |
| 525 | - if (is_executable(PATH_typo3.'cli_dispatch.phpsh')) { |
|
| 525 | + if (is_executable(PATH_typo3 . 'cli_dispatch.phpsh')) { |
|
| 526 | 526 | |
| 527 | 527 | $message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance( |
| 528 | 528 | 'TYPO3\\CMS\\Core\\Messaging\\FlashMessage', |
@@ -562,7 +562,7 @@ discard block |
||
| 562 | 562 | */ |
| 563 | 563 | public function checkMetadataFormats(&$params, &$pObj) { |
| 564 | 564 | |
| 565 | - $nsDefined = array ( |
|
| 565 | + $nsDefined = array( |
|
| 566 | 566 | 'MODS' => FALSE, |
| 567 | 567 | 'TEIHDR' => FALSE |
| 568 | 568 | ); |
@@ -571,7 +571,7 @@ discard block |
||
| 571 | 571 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
| 572 | 572 | 'type', |
| 573 | 573 | 'tx_dlf_formats', |
| 574 | - '(type='.$GLOBALS['TYPO3_DB']->fullQuoteStr('MODS', 'tx_dlf_formats').' OR type='.$GLOBALS['TYPO3_DB']->fullQuoteStr('TEIHDR', 'tx_dlf_formats').')'.tx_dlf_helper::whereClause('tx_dlf_formats') |
|
| 574 | + '(type=' . $GLOBALS['TYPO3_DB']->fullQuoteStr('MODS', 'tx_dlf_formats') . ' OR type=' . $GLOBALS['TYPO3_DB']->fullQuoteStr('TEIHDR', 'tx_dlf_formats') . ')' . tx_dlf_helper::whereClause('tx_dlf_formats') |
|
| 575 | 575 | ); |
| 576 | 576 | |
| 577 | 577 | while ($resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)) { |
@@ -581,12 +581,12 @@ discard block |
||
| 581 | 581 | } |
| 582 | 582 | |
| 583 | 583 | // Build data array. |
| 584 | - $data = array (); |
|
| 584 | + $data = array(); |
|
| 585 | 585 | |
| 586 | 586 | // Add MODS namespace. |
| 587 | 587 | if (!$nsDefined['MODS']) { |
| 588 | 588 | |
| 589 | - $data['tx_dlf_formats'][uniqid('NEW')] = array ( |
|
| 589 | + $data['tx_dlf_formats'][uniqid('NEW')] = array( |
|
| 590 | 590 | 'pid' => 0, |
| 591 | 591 | 'type' => 'MODS', |
| 592 | 592 | 'root' => 'mods', |
@@ -599,7 +599,7 @@ discard block |
||
| 599 | 599 | // Add TEIHDR namespace. |
| 600 | 600 | if (!$nsDefined['TEIHDR']) { |
| 601 | 601 | |
| 602 | - $data['tx_dlf_formats'][uniqid('NEW')] = array ( |
|
| 602 | + $data['tx_dlf_formats'][uniqid('NEW')] = array( |
|
| 603 | 603 | 'pid' => 0, |
| 604 | 604 | 'type' => 'TEIHDR', |
| 605 | 605 | 'root' => 'teiHeader', |
@@ -17,7 +17,8 @@ discard block |
||
| 17 | 17 | * @subpackage tx_dlf |
| 18 | 18 | * @access public |
| 19 | 19 | */ |
| 20 | -class tx_dlf_em { |
|
| 20 | +class tx_dlf_em |
|
| 21 | +{ |
|
| 21 | 22 | |
| 22 | 23 | /** |
| 23 | 24 | * This holds the current configuration |
@@ -45,7 +46,8 @@ discard block |
||
| 45 | 46 | * |
| 46 | 47 | * @return string Message informing the user of success or failure |
| 47 | 48 | */ |
| 48 | - public function checkSolrConnection(&$params, &$pObj) { |
|
| 49 | + public function checkSolrConnection(&$params, &$pObj) |
|
| 50 | + { |
|
| 49 | 51 | |
| 50 | 52 | $solrInfo = tx_dlf_solr::getSolrConnectionInfo(); |
| 51 | 53 | |
@@ -120,7 +122,8 @@ discard block |
||
| 120 | 122 | * |
| 121 | 123 | * @return integer UID of user or 0 if something is wrong |
| 122 | 124 | */ |
| 123 | - protected function checkCliUser($checkOnly, $groupUid) { |
|
| 125 | + protected function checkCliUser($checkOnly, $groupUid) |
|
| 126 | + { |
|
| 124 | 127 | |
| 125 | 128 | // Set default return value. |
| 126 | 129 | $usrUid = 0; |
@@ -292,7 +295,8 @@ discard block |
||
| 292 | 295 | * |
| 293 | 296 | * @return integer UID of usergroup or 0 if something is wrong |
| 294 | 297 | */ |
| 295 | - protected function checkCliGroup($checkOnly, $settings = array ()) { |
|
| 298 | + protected function checkCliGroup($checkOnly, $settings = array ()) |
|
| 299 | + { |
|
| 296 | 300 | |
| 297 | 301 | // Set default return value. |
| 298 | 302 | $grpUid = 0; |
@@ -507,7 +511,8 @@ discard block |
||
| 507 | 511 | * |
| 508 | 512 | * @return string Message informing the user of success or failure |
| 509 | 513 | */ |
| 510 | - public function checkCliUserGroup(&$params, &$pObj) { |
|
| 514 | + public function checkCliUserGroup(&$params, &$pObj) |
|
| 515 | + { |
|
| 511 | 516 | |
| 512 | 517 | // Check if usergroup "_cli_dlf" exists and is configured properly. |
| 513 | 518 | $groupUid = $this->checkCliGroup(empty($this->conf['makeCliUserGroup'])); |
@@ -560,7 +565,8 @@ discard block |
||
| 560 | 565 | * |
| 561 | 566 | * @return string Message informing the user of success or failure |
| 562 | 567 | */ |
| 563 | - public function checkMetadataFormats(&$params, &$pObj) { |
|
| 568 | + public function checkMetadataFormats(&$params, &$pObj) |
|
| 569 | + { |
|
| 564 | 570 | |
| 565 | 571 | $nsDefined = array ( |
| 566 | 572 | 'MODS' => FALSE, |
@@ -661,7 +667,8 @@ discard block |
||
| 661 | 667 | * |
| 662 | 668 | * @return void |
| 663 | 669 | */ |
| 664 | - public function __construct() { |
|
| 670 | + public function __construct() |
|
| 671 | + { |
|
| 665 | 672 | |
| 666 | 673 | // Load localization file. |
| 667 | 674 | $GLOBALS['LANG']->includeLLFile('EXT:dlf/locallang.xml'); |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | )); |
| 72 | 72 | |
| 73 | 73 | // Try to connect to Solr server. |
| 74 | - $response = @simplexml_load_string(file_get_contents($url, FALSE, $context)); |
|
| 74 | + $response = @simplexml_load_string(file_get_contents($url, false, $context)); |
|
| 75 | 75 | |
| 76 | 76 | // Check status code. |
| 77 | 77 | if ($response) { |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | sprintf($GLOBALS['LANG']->getLL('solr.status'), (string) $status[0]), |
| 86 | 86 | $GLOBALS['LANG']->getLL('solr.connected'), |
| 87 | 87 | ($status[0] == 0 ? \TYPO3\CMS\Core\Messaging\FlashMessage::OK : \TYPO3\CMS\Core\Messaging\FlashMessage::WARNING), |
| 88 | - FALSE |
|
| 88 | + false |
|
| 89 | 89 | ); |
| 90 | 90 | |
| 91 | 91 | $this->content .= $message->render(); |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | sprintf($GLOBALS['LANG']->getLL('solr.error'), $url), |
| 102 | 102 | $GLOBALS['LANG']->getLL('solr.notConnected'), |
| 103 | 103 | \TYPO3\CMS\Core\Messaging\FlashMessage::WARNING, |
| 104 | - FALSE |
|
| 104 | + false |
|
| 105 | 105 | ); |
| 106 | 106 | |
| 107 | 107 | $this->content .= $message->render(); |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | $GLOBALS['LANG']->getLL('cliUserGroup.usrOkayMsg'), |
| 159 | 159 | $GLOBALS['LANG']->getLL('cliUserGroup.usrOkay'), |
| 160 | 160 | \TYPO3\CMS\Core\Messaging\FlashMessage::OK, |
| 161 | - FALSE |
|
| 161 | + false |
|
| 162 | 162 | ); |
| 163 | 163 | |
| 164 | 164 | } else { |
@@ -181,7 +181,7 @@ discard block |
||
| 181 | 181 | tx_dlf_helper::processDBasAdmin($data); |
| 182 | 182 | |
| 183 | 183 | // Check if configuration was successful. |
| 184 | - if ($this->checkCliUser(TRUE, $groupUid)) { |
|
| 184 | + if ($this->checkCliUser(true, $groupUid)) { |
|
| 185 | 185 | |
| 186 | 186 | $usrUid = $resArray['uid']; |
| 187 | 187 | |
@@ -190,7 +190,7 @@ discard block |
||
| 190 | 190 | $GLOBALS['LANG']->getLL('cliUserGroup.usrConfiguredMsg'), |
| 191 | 191 | $GLOBALS['LANG']->getLL('cliUserGroup.usrConfigured'), |
| 192 | 192 | \TYPO3\CMS\Core\Messaging\FlashMessage::INFO, |
| 193 | - FALSE |
|
| 193 | + false |
|
| 194 | 194 | ); |
| 195 | 195 | |
| 196 | 196 | } else { |
@@ -200,7 +200,7 @@ discard block |
||
| 200 | 200 | $GLOBALS['LANG']->getLL('cliUserGroup.usrNotConfiguredMsg'), |
| 201 | 201 | $GLOBALS['LANG']->getLL('cliUserGroup.usrNotConfigured'), |
| 202 | 202 | \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR, |
| 203 | - FALSE |
|
| 203 | + false |
|
| 204 | 204 | ); |
| 205 | 205 | |
| 206 | 206 | } |
@@ -212,7 +212,7 @@ discard block |
||
| 212 | 212 | $GLOBALS['LANG']->getLL('cliUserGroup.usrNotConfiguredMsg'), |
| 213 | 213 | $GLOBALS['LANG']->getLL('cliUserGroup.usrNotConfigured'), |
| 214 | 214 | \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR, |
| 215 | - FALSE |
|
| 215 | + false |
|
| 216 | 216 | ); |
| 217 | 217 | |
| 218 | 218 | } |
@@ -247,7 +247,7 @@ discard block |
||
| 247 | 247 | $GLOBALS['LANG']->getLL('cliUserGroup.usrCreatedMsg'), |
| 248 | 248 | $GLOBALS['LANG']->getLL('cliUserGroup.usrCreated'), |
| 249 | 249 | \TYPO3\CMS\Core\Messaging\FlashMessage::INFO, |
| 250 | - FALSE |
|
| 250 | + false |
|
| 251 | 251 | ); |
| 252 | 252 | |
| 253 | 253 | } else { |
@@ -257,7 +257,7 @@ discard block |
||
| 257 | 257 | $GLOBALS['LANG']->getLL('cliUserGroup.usrNotCreatedMsg'), |
| 258 | 258 | $GLOBALS['LANG']->getLL('cliUserGroup.usrNotCreated'), |
| 259 | 259 | \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR, |
| 260 | - FALSE |
|
| 260 | + false |
|
| 261 | 261 | ); |
| 262 | 262 | |
| 263 | 263 | } |
@@ -269,7 +269,7 @@ discard block |
||
| 269 | 269 | $GLOBALS['LANG']->getLL('cliUserGroup.usrNotCreatedMsg'), |
| 270 | 270 | $GLOBALS['LANG']->getLL('cliUserGroup.usrNotCreated'), |
| 271 | 271 | \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR, |
| 272 | - FALSE |
|
| 272 | + false |
|
| 273 | 273 | ); |
| 274 | 274 | |
| 275 | 275 | } |
@@ -369,7 +369,7 @@ discard block |
||
| 369 | 369 | $GLOBALS['LANG']->getLL('cliUserGroup.grpOkayMsg'), |
| 370 | 370 | $GLOBALS['LANG']->getLL('cliUserGroup.grpOkay'), |
| 371 | 371 | \TYPO3\CMS\Core\Messaging\FlashMessage::OK, |
| 372 | - FALSE |
|
| 372 | + false |
|
| 373 | 373 | ); |
| 374 | 374 | |
| 375 | 375 | } else { |
@@ -395,7 +395,7 @@ discard block |
||
| 395 | 395 | tx_dlf_helper::processDBasAdmin($data); |
| 396 | 396 | |
| 397 | 397 | // Check if configuration was successful. |
| 398 | - if ($this->checkCliGroup(TRUE, $settings)) { |
|
| 398 | + if ($this->checkCliGroup(true, $settings)) { |
|
| 399 | 399 | |
| 400 | 400 | $grpUid = $resArray['uid']; |
| 401 | 401 | |
@@ -404,7 +404,7 @@ discard block |
||
| 404 | 404 | $GLOBALS['LANG']->getLL('cliUserGroup.grpConfiguredMsg'), |
| 405 | 405 | $GLOBALS['LANG']->getLL('cliUserGroup.grpConfigured'), |
| 406 | 406 | \TYPO3\CMS\Core\Messaging\FlashMessage::INFO, |
| 407 | - FALSE |
|
| 407 | + false |
|
| 408 | 408 | ); |
| 409 | 409 | |
| 410 | 410 | } else { |
@@ -414,7 +414,7 @@ discard block |
||
| 414 | 414 | $GLOBALS['LANG']->getLL('cliUserGroup.grpNotConfiguredMsg'), |
| 415 | 415 | $GLOBALS['LANG']->getLL('cliUserGroup.grpNotConfigured'), |
| 416 | 416 | \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR, |
| 417 | - FALSE |
|
| 417 | + false |
|
| 418 | 418 | ); |
| 419 | 419 | |
| 420 | 420 | } |
@@ -426,7 +426,7 @@ discard block |
||
| 426 | 426 | $GLOBALS['LANG']->getLL('cliUserGroup.grpNotConfiguredMsg'), |
| 427 | 427 | $GLOBALS['LANG']->getLL('cliUserGroup.grpNotConfigured'), |
| 428 | 428 | \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR, |
| 429 | - FALSE |
|
| 429 | + false |
|
| 430 | 430 | ); |
| 431 | 431 | |
| 432 | 432 | } |
@@ -462,7 +462,7 @@ discard block |
||
| 462 | 462 | $GLOBALS['LANG']->getLL('cliUserGroup.grpCreatedMsg'), |
| 463 | 463 | $GLOBALS['LANG']->getLL('cliUserGroup.grpCreated'), |
| 464 | 464 | \TYPO3\CMS\Core\Messaging\FlashMessage::INFO, |
| 465 | - FALSE |
|
| 465 | + false |
|
| 466 | 466 | ); |
| 467 | 467 | |
| 468 | 468 | } else { |
@@ -472,7 +472,7 @@ discard block |
||
| 472 | 472 | $GLOBALS['LANG']->getLL('cliUserGroup.grpNotCreatedMsg'), |
| 473 | 473 | $GLOBALS['LANG']->getLL('cliUserGroup.grpNotCreated'), |
| 474 | 474 | \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR, |
| 475 | - FALSE |
|
| 475 | + false |
|
| 476 | 476 | ); |
| 477 | 477 | |
| 478 | 478 | } |
@@ -484,7 +484,7 @@ discard block |
||
| 484 | 484 | $GLOBALS['LANG']->getLL('cliUserGroup.grpNotCreatedMsg'), |
| 485 | 485 | $GLOBALS['LANG']->getLL('cliUserGroup.grpNotCreated'), |
| 486 | 486 | \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR, |
| 487 | - FALSE |
|
| 487 | + false |
|
| 488 | 488 | ); |
| 489 | 489 | |
| 490 | 490 | } |
@@ -529,7 +529,7 @@ discard block |
||
| 529 | 529 | $GLOBALS['LANG']->getLL('cliUserGroup.cliOkayMsg'), |
| 530 | 530 | $GLOBALS['LANG']->getLL('cliUserGroup.cliOkay'), |
| 531 | 531 | \TYPO3\CMS\Core\Messaging\FlashMessage::OK, |
| 532 | - FALSE |
|
| 532 | + false |
|
| 533 | 533 | ); |
| 534 | 534 | |
| 535 | 535 | } else { |
@@ -539,7 +539,7 @@ discard block |
||
| 539 | 539 | $GLOBALS['LANG']->getLL('cliUserGroup.cliNotOkayMsg'), |
| 540 | 540 | $GLOBALS['LANG']->getLL('cliUserGroup.cliNotOkay'), |
| 541 | 541 | \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR, |
| 542 | - FALSE |
|
| 542 | + false |
|
| 543 | 543 | ); |
| 544 | 544 | |
| 545 | 545 | } |
@@ -563,8 +563,8 @@ discard block |
||
| 563 | 563 | public function checkMetadataFormats(&$params, &$pObj) { |
| 564 | 564 | |
| 565 | 565 | $nsDefined = array ( |
| 566 | - 'MODS' => FALSE, |
|
| 567 | - 'TEIHDR' => FALSE |
|
| 566 | + 'MODS' => false, |
|
| 567 | + 'TEIHDR' => false |
|
| 568 | 568 | ); |
| 569 | 569 | |
| 570 | 570 | // Check if formats "MODS" and "TEIHDR" exist. |
@@ -576,7 +576,7 @@ discard block |
||
| 576 | 576 | |
| 577 | 577 | while ($resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)) { |
| 578 | 578 | |
| 579 | - $nsDefined[$resArray['type']] = TRUE; |
|
| 579 | + $nsDefined[$resArray['type']] = true; |
|
| 580 | 580 | |
| 581 | 581 | } |
| 582 | 582 | |
@@ -621,7 +621,7 @@ discard block |
||
| 621 | 621 | $GLOBALS['LANG']->getLL('metadataFormats.nsCreatedMsg'), |
| 622 | 622 | $GLOBALS['LANG']->getLL('metadataFormats.nsCreated'), |
| 623 | 623 | \TYPO3\CMS\Core\Messaging\FlashMessage::INFO, |
| 624 | - FALSE |
|
| 624 | + false |
|
| 625 | 625 | ); |
| 626 | 626 | |
| 627 | 627 | } else { |
@@ -631,7 +631,7 @@ discard block |
||
| 631 | 631 | $GLOBALS['LANG']->getLL('metadataFormats.nsNotCreatedMsg'), |
| 632 | 632 | $GLOBALS['LANG']->getLL('metadataFormats.nsNotCreated'), |
| 633 | 633 | \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR, |
| 634 | - FALSE |
|
| 634 | + false |
|
| 635 | 635 | ); |
| 636 | 636 | |
| 637 | 637 | } |
@@ -643,7 +643,7 @@ discard block |
||
| 643 | 643 | $GLOBALS['LANG']->getLL('metadataFormats.nsOkayMsg'), |
| 644 | 644 | $GLOBALS['LANG']->getLL('metadataFormats.nsOkay'), |
| 645 | 645 | \TYPO3\CMS\Core\Messaging\FlashMessage::OK, |
| 646 | - FALSE |
|
| 646 | + false |
|
| 647 | 647 | ); |
| 648 | 648 | |
| 649 | 649 | } |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | // Prepend username and password to hostname. |
| 120 | 120 | if ($solrInfo['username'] && $solrInfo['password']) { |
| 121 | 121 | |
| 122 | - $host = $solrInfo['username'].':'.$solrInfo['password'].'@'.$solrInfo['host']; |
|
| 122 | + $host = $solrInfo['username'] . ':' . $solrInfo['password'] . '@' . $solrInfo['host']; |
|
| 123 | 123 | |
| 124 | 124 | } else { |
| 125 | 125 | |
@@ -127,8 +127,8 @@ discard block |
||
| 127 | 127 | |
| 128 | 128 | } |
| 129 | 129 | |
| 130 | - $context = stream_context_create(array ( |
|
| 131 | - 'http' => array ( |
|
| 130 | + $context = stream_context_create(array( |
|
| 131 | + 'http' => array( |
|
| 132 | 132 | 'method' => 'GET', |
| 133 | 133 | 'user_agent' => ($conf['useragent'] ? $conf['useragent'] : ini_get('user_agent')) |
| 134 | 134 | ) |
@@ -136,7 +136,7 @@ discard block |
||
| 136 | 136 | |
| 137 | 137 | // Build request for adding new Solr core. |
| 138 | 138 | // @see http://wiki.apache.org/solr/CoreAdmin |
| 139 | - $url = $solrInfo['scheme'].'://'.$host.':'.$solrInfo['port'].'/'.$solrInfo['path'].'/admin/cores?wt=xml&action=CREATE&name=dlfCore'.$coreNumber.'&instanceDir=dlfCore'.$coreNumber.'&dataDir=data&configSet=dlf'; |
|
| 139 | + $url = $solrInfo['scheme'] . '://' . $host . ':' . $solrInfo['port'] . '/' . $solrInfo['path'] . '/admin/cores?wt=xml&action=CREATE&name=dlfCore' . $coreNumber . '&instanceDir=dlfCore' . $coreNumber . '&dataDir=data&configSet=dlf'; |
|
| 140 | 140 | |
| 141 | 141 | $response = @simplexml_load_string(file_get_contents($url, FALSE, $context)); |
| 142 | 142 | |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | |
| 148 | 148 | if ($status && $status[0] == 0) { |
| 149 | 149 | |
| 150 | - $fieldArray['index_name'] = 'dlfCore'.$coreNumber; |
|
| 150 | + $fieldArray['index_name'] = 'dlfCore' . $coreNumber; |
|
| 151 | 151 | |
| 152 | 152 | return; |
| 153 | 153 | |
@@ -157,12 +157,12 @@ discard block |
||
| 157 | 157 | |
| 158 | 158 | if (TYPO3_DLOG) { |
| 159 | 159 | |
| 160 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_tcemain->processDatamap_postProcessFieldArray('.$status.', '.$table.', '.$id.', [data], ['.get_class($pObj).'])] Could not create new Apache Solr core "dlfCore'.$coreNumber.'"', $this->extKey, SYSLOG_SEVERITY_ERROR, $fieldArray); |
|
| 160 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_tcemain->processDatamap_postProcessFieldArray(' . $status . ', ' . $table . ', ' . $id . ', [data], [' . get_class($pObj) . '])] Could not create new Apache Solr core "dlfCore' . $coreNumber . '"', $this->extKey, SYSLOG_SEVERITY_ERROR, $fieldArray); |
|
| 161 | 161 | |
| 162 | 162 | } |
| 163 | 163 | |
| 164 | 164 | // Solr core could not be created, thus unset field array. |
| 165 | - $fieldArray = array (); |
|
| 165 | + $fieldArray = array(); |
|
| 166 | 166 | |
| 167 | 167 | break; |
| 168 | 168 | |
@@ -186,9 +186,9 @@ discard block |
||
| 186 | 186 | |
| 187 | 187 | // Get current configuration. |
| 188 | 188 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
| 189 | - $table.'.is_listed AS is_listed', |
|
| 189 | + $table . '.is_listed AS is_listed', |
|
| 190 | 190 | $table, |
| 191 | - $table.'.uid='.intval($id).tx_dlf_helper::whereClause($table), |
|
| 191 | + $table . '.uid=' . intval($id) . tx_dlf_helper::whereClause($table), |
|
| 192 | 192 | '', |
| 193 | 193 | '', |
| 194 | 194 | '1' |
@@ -214,9 +214,9 @@ discard block |
||
| 214 | 214 | |
| 215 | 215 | // Get current configuration. |
| 216 | 216 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
| 217 | - $table.'.index_autocomplete AS index_autocomplete', |
|
| 217 | + $table . '.index_autocomplete AS index_autocomplete', |
|
| 218 | 218 | $table, |
| 219 | - $table.'.uid='.intval($id).tx_dlf_helper::whereClause($table), |
|
| 219 | + $table . '.uid=' . intval($id) . tx_dlf_helper::whereClause($table), |
|
| 220 | 220 | '', |
| 221 | 221 | '', |
| 222 | 222 | '1' |
@@ -240,15 +240,15 @@ discard block |
||
| 240 | 240 | if (count($fieldArray) < 2) { |
| 241 | 241 | |
| 242 | 242 | // Unset the whole field array. |
| 243 | - $fieldArray = array (); |
|
| 243 | + $fieldArray = array(); |
|
| 244 | 244 | |
| 245 | 245 | } else { |
| 246 | 246 | |
| 247 | 247 | // Get current index name. |
| 248 | 248 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
| 249 | - $table.'.index_name AS index_name', |
|
| 249 | + $table . '.index_name AS index_name', |
|
| 250 | 250 | $table, |
| 251 | - $table.'.uid='.intval($id).tx_dlf_helper::whereClause($table), |
|
| 251 | + $table . '.uid=' . intval($id) . tx_dlf_helper::whereClause($table), |
|
| 252 | 252 | '', |
| 253 | 253 | '', |
| 254 | 254 | '1' |
@@ -265,7 +265,7 @@ discard block |
||
| 265 | 265 | |
| 266 | 266 | if (TYPO3_DLOG) { |
| 267 | 267 | |
| 268 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_tcemain->processDatamap_postProcessFieldArray('.$status.', '.$table.', '.$id.', [data], ['.get_class($pObj).'])] Prevented change of "index_name" for UID "'.$id.'" in table "'.$table.'"', $this->extKey, SYSLOG_SEVERITY_NOTICE, $fieldArray); |
|
| 268 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_tcemain->processDatamap_postProcessFieldArray(' . $status . ', ' . $table . ', ' . $id . ', [data], [' . get_class($pObj) . '])] Prevented change of "index_name" for UID "' . $id . '" in table "' . $table . '"', $this->extKey, SYSLOG_SEVERITY_NOTICE, $fieldArray); |
|
| 269 | 269 | |
| 270 | 270 | } |
| 271 | 271 | |
@@ -308,7 +308,7 @@ discard block |
||
| 308 | 308 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
| 309 | 309 | 'tx_dlf_solrcores.uid,tx_dlf_documents.hidden', |
| 310 | 310 | 'tx_dlf_solrcores,tx_dlf_documents', |
| 311 | - 'tx_dlf_solrcores.uid=tx_dlf_documents.solrcore AND tx_dlf_documents.uid='.intval($id).tx_dlf_helper::whereClause('tx_dlf_solrcores'), |
|
| 311 | + 'tx_dlf_solrcores.uid=tx_dlf_documents.solrcore AND tx_dlf_documents.uid=' . intval($id) . tx_dlf_helper::whereClause('tx_dlf_solrcores'), |
|
| 312 | 312 | '', |
| 313 | 313 | '', |
| 314 | 314 | '1' |
@@ -325,7 +325,7 @@ discard block |
||
| 325 | 325 | |
| 326 | 326 | // Delete Solr document. |
| 327 | 327 | $updateQuery = $solr->service->createUpdate(); |
| 328 | - $updateQuery->addDeleteQuery('uid:'.$id); |
|
| 328 | + $updateQuery->addDeleteQuery('uid:' . $id); |
|
| 329 | 329 | $updateQuery->addCommit(); |
| 330 | 330 | $solr->service->update($updateQuery); |
| 331 | 331 | |
@@ -344,7 +344,7 @@ discard block |
||
| 344 | 344 | |
| 345 | 345 | if (TYPO3_DLOG) { |
| 346 | 346 | |
| 347 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_tcemain->processDatamap_afterDatabaseOperations('.$status.', '.$table.', '.$id.', [data], ['.get_class($pObj).'])] Failed to re-index document with UID "'.$id.'"', $this->extKey, SYSLOG_SEVERITY_ERROR, $fieldArray); |
|
| 347 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_tcemain->processDatamap_afterDatabaseOperations(' . $status . ', ' . $table . ', ' . $id . ', [data], [' . get_class($pObj) . '])] Failed to re-index document with UID "' . $id . '"', $this->extKey, SYSLOG_SEVERITY_ERROR, $fieldArray); |
|
| 348 | 348 | |
| 349 | 349 | } |
| 350 | 350 | |
@@ -379,13 +379,13 @@ discard block |
||
| 379 | 379 | */ |
| 380 | 380 | public function processCmdmap_postProcess($command, $table, $id, $value, $pObj) { |
| 381 | 381 | |
| 382 | - if (in_array($command, array ('move', 'delete', 'undelete')) && $table == 'tx_dlf_documents') { |
|
| 382 | + if (in_array($command, array('move', 'delete', 'undelete')) && $table == 'tx_dlf_documents') { |
|
| 383 | 383 | |
| 384 | 384 | // Get Solr core. |
| 385 | 385 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
| 386 | 386 | 'tx_dlf_solrcores.uid', |
| 387 | 387 | 'tx_dlf_solrcores,tx_dlf_documents', |
| 388 | - 'tx_dlf_solrcores.uid=tx_dlf_documents.solrcore AND tx_dlf_documents.uid='.intval($id).tx_dlf_helper::whereClause('tx_dlf_solrcores'), |
|
| 388 | + 'tx_dlf_solrcores.uid=tx_dlf_documents.solrcore AND tx_dlf_documents.uid=' . intval($id) . tx_dlf_helper::whereClause('tx_dlf_solrcores'), |
|
| 389 | 389 | '', |
| 390 | 390 | '', |
| 391 | 391 | '1' |
@@ -405,7 +405,7 @@ discard block |
||
| 405 | 405 | |
| 406 | 406 | // Delete Solr document. |
| 407 | 407 | $updateQuery = $solr->service->createUpdate(); |
| 408 | - $updateQuery->addDeleteQuery('uid:'.$id); |
|
| 408 | + $updateQuery->addDeleteQuery('uid:' . $id); |
|
| 409 | 409 | $updateQuery->addCommit(); |
| 410 | 410 | $solr->service->update($updateQuery); |
| 411 | 411 | |
@@ -430,7 +430,7 @@ discard block |
||
| 430 | 430 | |
| 431 | 431 | if (TYPO3_DLOG) { |
| 432 | 432 | |
| 433 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_tcemain->processCmdmap_postProcess('.$command.', '.$table.', '.$id.', '.$value.', ['.get_class($pObj).'])] Failed to re-index document with UID "'.$id.'"', $this->extKey, SYSLOG_SEVERITY_ERROR); |
|
| 433 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_tcemain->processCmdmap_postProcess(' . $command . ', ' . $table . ', ' . $id . ', ' . $value . ', [' . get_class($pObj) . '])] Failed to re-index document with UID "' . $id . '"', $this->extKey, SYSLOG_SEVERITY_ERROR); |
|
| 434 | 434 | |
| 435 | 435 | } |
| 436 | 436 | |
@@ -17,7 +17,8 @@ discard block |
||
| 17 | 17 | * @subpackage tx_dlf |
| 18 | 18 | * @access public |
| 19 | 19 | */ |
| 20 | -class tx_dlf_tcemain { |
|
| 20 | +class tx_dlf_tcemain |
|
| 21 | +{ |
|
| 21 | 22 | |
| 22 | 23 | /** |
| 23 | 24 | * Field post-processing hook for the process_datamap() method. |
@@ -32,7 +33,8 @@ discard block |
||
| 32 | 33 | * |
| 33 | 34 | * @return void |
| 34 | 35 | */ |
| 35 | - public function processDatamap_postProcessFieldArray($status, $table, $id, &$fieldArray, $pObj) { |
|
| 36 | + public function processDatamap_postProcessFieldArray($status, $table, $id, &$fieldArray, $pObj) |
|
| 37 | + { |
|
| 36 | 38 | |
| 37 | 39 | if ($status == 'new') { |
| 38 | 40 | |
@@ -292,7 +294,8 @@ discard block |
||
| 292 | 294 | * |
| 293 | 295 | * @return void |
| 294 | 296 | */ |
| 295 | - public function processDatamap_afterDatabaseOperations($status, $table, $id, &$fieldArray, $pObj) { |
|
| 297 | + public function processDatamap_afterDatabaseOperations($status, $table, $id, &$fieldArray, $pObj) |
|
| 298 | + { |
|
| 296 | 299 | |
| 297 | 300 | if ($status == 'update') { |
| 298 | 301 | |
@@ -377,7 +380,8 @@ discard block |
||
| 377 | 380 | * |
| 378 | 381 | * @return void |
| 379 | 382 | */ |
| 380 | - public function processCmdmap_postProcess($command, $table, $id, $value, $pObj) { |
|
| 383 | + public function processCmdmap_postProcess($command, $table, $id, $value, $pObj) |
|
| 384 | + { |
|
| 381 | 385 | |
| 382 | 386 | if (in_array($command, array ('move', 'delete', 'undelete')) && $table == 'tx_dlf_documents') { |
| 383 | 387 | |
@@ -138,7 +138,7 @@ |
||
| 138 | 138 | // @see http://wiki.apache.org/solr/CoreAdmin |
| 139 | 139 | $url = $solrInfo['scheme'].'://'.$host.':'.$solrInfo['port'].'/'.$solrInfo['path'].'/admin/cores?wt=xml&action=CREATE&name=dlfCore'.$coreNumber.'&instanceDir=dlfCore'.$coreNumber.'&dataDir=data&configSet=dlf'; |
| 140 | 140 | |
| 141 | - $response = @simplexml_load_string(file_get_contents($url, FALSE, $context)); |
|
| 141 | + $response = @simplexml_load_string(file_get_contents($url, false, $context)); |
|
| 142 | 142 | |
| 143 | 143 | // Process response. |
| 144 | 144 | if ($response) { |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | * @var array |
| 44 | 44 | * @access protected |
| 45 | 45 | */ |
| 46 | - protected $piVars = array (); |
|
| 46 | + protected $piVars = array(); |
|
| 47 | 47 | |
| 48 | 48 | /** |
| 49 | 49 | * This holds the DLF parameter prefix |
@@ -171,7 +171,7 @@ discard block |
||
| 171 | 171 | |
| 172 | 172 | if (TYPO3_DLOG) { |
| 173 | 173 | |
| 174 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_doctype->loadDocument()] Failed to load document with UID "'.$this->piVars['id'].'"', $this->extKey, SYSLOG_SEVERITY_WARNING); |
|
| 174 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_doctype->loadDocument()] Failed to load document with UID "' . $this->piVars['id'] . '"', $this->extKey, SYSLOG_SEVERITY_WARNING); |
|
| 175 | 175 | |
| 176 | 176 | } |
| 177 | 177 | |
@@ -183,7 +183,7 @@ discard block |
||
| 183 | 183 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
| 184 | 184 | 'tx_dlf_documents.uid', |
| 185 | 185 | 'tx_dlf_documents', |
| 186 | - 'tx_dlf_documents.record_id='.$GLOBALS['TYPO3_DB']->fullQuoteStr($this->piVars['recordId'], 'tx_dlf_documents').tx_dlf_helper::whereClause('tx_dlf_documents'), |
|
| 186 | + 'tx_dlf_documents.record_id=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($this->piVars['recordId'], 'tx_dlf_documents') . tx_dlf_helper::whereClause('tx_dlf_documents'), |
|
| 187 | 187 | '', |
| 188 | 188 | '', |
| 189 | 189 | '1' |
@@ -206,7 +206,7 @@ discard block |
||
| 206 | 206 | |
| 207 | 207 | if (TYPO3_DLOG) { |
| 208 | 208 | |
| 209 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_doctype->loadDocument()] Failed to load document with record ID "'.$this->piVars['recordId'].'"', $this->extKey, SYSLOG_SEVERITY_WARNING); |
|
| 209 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_doctype->loadDocument()] Failed to load document with record ID "' . $this->piVars['recordId'] . '"', $this->extKey, SYSLOG_SEVERITY_WARNING); |
|
| 210 | 210 | |
| 211 | 211 | } |
| 212 | 212 | |
@@ -18,7 +18,8 @@ discard block |
||
| 18 | 18 | * @subpackage tx_dlf |
| 19 | 19 | * @access public |
| 20 | 20 | */ |
| 21 | -class tx_dlf_doctype { |
|
| 21 | +class tx_dlf_doctype |
|
| 22 | +{ |
|
| 22 | 23 | |
| 23 | 24 | /** |
| 24 | 25 | * This holds the current document |
@@ -60,7 +61,8 @@ discard block |
||
| 60 | 61 | * |
| 61 | 62 | * @return string The type of the current document |
| 62 | 63 | */ |
| 63 | - public function getDocType() { |
|
| 64 | + public function getDocType() |
|
| 65 | + { |
|
| 64 | 66 | |
| 65 | 67 | // Load current document. |
| 66 | 68 | $this->loadDocument(); |
@@ -156,7 +158,8 @@ discard block |
||
| 156 | 158 | * |
| 157 | 159 | * @return void |
| 158 | 160 | */ |
| 159 | - protected function loadDocument() { |
|
| 161 | + protected function loadDocument() |
|
| 162 | + { |
|
| 160 | 163 | |
| 161 | 164 | // Check for required variable. |
| 162 | 165 | if (!empty($this->piVars['id'])) { |
@@ -223,7 +226,8 @@ discard block |
||
| 223 | 226 | * |
| 224 | 227 | * @return void |
| 225 | 228 | */ |
| 226 | - public function __construct() { |
|
| 229 | + public function __construct() |
|
| 230 | + { |
|
| 227 | 231 | |
| 228 | 232 | // Load current plugin parameters. |
| 229 | 233 | $this->piVars = \TYPO3\CMS\Core\Utility\GeneralUtility::_GPmerged($this->prefixId); |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | // Load current document. |
| 66 | 66 | $this->loadDocument(); |
| 67 | 67 | |
| 68 | - if ($this->doc === NULL) { |
|
| 68 | + if ($this->doc === null) { |
|
| 69 | 69 | |
| 70 | 70 | // Quit without doing anything if document not available. |
| 71 | 71 | return ''; |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | if (!$this->doc->ready) { |
| 168 | 168 | |
| 169 | 169 | // Destroy the incomplete object. |
| 170 | - $this->doc = NULL; |
|
| 170 | + $this->doc = null; |
|
| 171 | 171 | |
| 172 | 172 | if (TYPO3_DLOG) { |
| 173 | 173 | |
@@ -105,7 +105,8 @@ |
||
| 105 | 105 | * |
| 106 | 106 | * @return boolean TRUE if document type matches, FALSE if not |
| 107 | 107 | */ |
| 108 | - function user_dlf_docTypeCheck($type) { |
|
| 108 | + function user_dlf_docTypeCheck($type) |
|
| 109 | + { |
|
| 109 | 110 | |
| 110 | 111 | $hook = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('tx_dlf_doctype'); |
| 111 | 112 | |
@@ -14,52 +14,52 @@ |
||
| 14 | 14 | } |
| 15 | 15 | |
| 16 | 16 | // Register plugins. |
| 17 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY, 'plugins/audioplayer/class.tx_dlf_audioplayer.php', '_audioplayer', 'list_type', TRUE); |
|
| 17 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY, 'plugins/audioplayer/class.tx_dlf_audioplayer.php', '_audioplayer', 'list_type', true); |
|
| 18 | 18 | |
| 19 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY, 'plugins/basket/class.tx_dlf_basket.php', '_basket', 'list_type', FALSE); |
|
| 19 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY, 'plugins/basket/class.tx_dlf_basket.php', '_basket', 'list_type', false); |
|
| 20 | 20 | |
| 21 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY, 'plugins/collection/class.tx_dlf_collection.php', '_collection', 'list_type', TRUE); |
|
| 21 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY, 'plugins/collection/class.tx_dlf_collection.php', '_collection', 'list_type', true); |
|
| 22 | 22 | |
| 23 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY, 'plugins/feeds/class.tx_dlf_feeds.php', '_feeds', 'list_type', FALSE); |
|
| 23 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY, 'plugins/feeds/class.tx_dlf_feeds.php', '_feeds', 'list_type', false); |
|
| 24 | 24 | |
| 25 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY, 'plugins/listview/class.tx_dlf_listview.php', '_listview', 'list_type', FALSE); |
|
| 25 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY, 'plugins/listview/class.tx_dlf_listview.php', '_listview', 'list_type', false); |
|
| 26 | 26 | |
| 27 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY, 'plugins/metadata/class.tx_dlf_metadata.php', '_metadata', 'list_type', TRUE); |
|
| 27 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY, 'plugins/metadata/class.tx_dlf_metadata.php', '_metadata', 'list_type', true); |
|
| 28 | 28 | |
| 29 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY, 'plugins/navigation/class.tx_dlf_navigation.php', '_navigation', 'list_type', TRUE); |
|
| 29 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY, 'plugins/navigation/class.tx_dlf_navigation.php', '_navigation', 'list_type', true); |
|
| 30 | 30 | |
| 31 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY, 'plugins/newspaper/class.tx_dlf_newspaper.php', '_newspaper', 'list_type', TRUE); |
|
| 31 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY, 'plugins/newspaper/class.tx_dlf_newspaper.php', '_newspaper', 'list_type', true); |
|
| 32 | 32 | |
| 33 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY, 'plugins/oai/class.tx_dlf_oai.php', '_oai', 'list_type', FALSE); |
|
| 33 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY, 'plugins/oai/class.tx_dlf_oai.php', '_oai', 'list_type', false); |
|
| 34 | 34 | |
| 35 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY, 'plugins/pagegrid/class.tx_dlf_pagegrid.php', '_pagegrid', 'list_type', TRUE); |
|
| 35 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY, 'plugins/pagegrid/class.tx_dlf_pagegrid.php', '_pagegrid', 'list_type', true); |
|
| 36 | 36 | |
| 37 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY, 'plugins/pageview/class.tx_dlf_pageview.php', '_pageview', 'list_type', TRUE); |
|
| 37 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY, 'plugins/pageview/class.tx_dlf_pageview.php', '_pageview', 'list_type', true); |
|
| 38 | 38 | |
| 39 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY, 'plugins/search/class.tx_dlf_search.php', '_search', 'list_type', TRUE); |
|
| 39 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY, 'plugins/search/class.tx_dlf_search.php', '_search', 'list_type', true); |
|
| 40 | 40 | |
| 41 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY, 'plugins/statistics/class.tx_dlf_statistics.php', '_statistics', 'list_type', TRUE); |
|
| 41 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY, 'plugins/statistics/class.tx_dlf_statistics.php', '_statistics', 'list_type', true); |
|
| 42 | 42 | |
| 43 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY, 'plugins/toc/class.tx_dlf_toc.php', '_toc', 'list_type', TRUE); |
|
| 43 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY, 'plugins/toc/class.tx_dlf_toc.php', '_toc', 'list_type', true); |
|
| 44 | 44 | |
| 45 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY, 'plugins/toolbox/class.tx_dlf_toolbox.php', '_toolbox', 'list_type', TRUE); |
|
| 45 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY, 'plugins/toolbox/class.tx_dlf_toolbox.php', '_toolbox', 'list_type', true); |
|
| 46 | 46 | |
| 47 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY, 'plugins/validator/class.tx_dlf_validator.php', '_validator', 'list_type', FALSE); |
|
| 47 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY, 'plugins/validator/class.tx_dlf_validator.php', '_validator', 'list_type', false); |
|
| 48 | 48 | |
| 49 | 49 | // Register tools for toolbox plugin. |
| 50 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY, 'plugins/toolbox/tools/fulltext/class.tx_dlf_toolsFulltext.php', '_toolsFulltext', '', TRUE); |
|
| 50 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY, 'plugins/toolbox/tools/fulltext/class.tx_dlf_toolsFulltext.php', '_toolsFulltext', '', true); |
|
| 51 | 51 | $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/plugins/toolbox/tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_toolsFulltext'] = 'LLL:EXT:dlf/locallang.xml:tx_dlf_toolbox.toolsFulltext'; |
| 52 | 52 | |
| 53 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY, 'plugins/toolbox/tools/imagemanipulation/class.tx_dlf_toolsImagemanipulation.php', '_toolsImagemanipulation', '', TRUE); |
|
| 53 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY, 'plugins/toolbox/tools/imagemanipulation/class.tx_dlf_toolsImagemanipulation.php', '_toolsImagemanipulation', '', true); |
|
| 54 | 54 | $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/plugins/toolbox/tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_toolsImagemanipulation'] = 'LLL:EXT:dlf/locallang.xml:tx_dlf_toolbox.toolsImagemanipulation'; |
| 55 | 55 | |
| 56 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY, 'plugins/toolbox/tools/pdf/class.tx_dlf_toolsPdf.php', '_toolsPdf', '', TRUE); |
|
| 56 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY, 'plugins/toolbox/tools/pdf/class.tx_dlf_toolsPdf.php', '_toolsPdf', '', true); |
|
| 57 | 57 | $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/plugins/toolbox/tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_toolsPdf'] = 'LLL:EXT:dlf/locallang.xml:tx_dlf_toolbox.toolsPdf'; |
| 58 | 58 | |
| 59 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY, 'plugins/toolbox/tools/imagedownload/class.tx_dlf_toolsImagedownload.php', '_toolsImagedownload', '', TRUE); |
|
| 59 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY, 'plugins/toolbox/tools/imagedownload/class.tx_dlf_toolsImagedownload.php', '_toolsImagedownload', '', true); |
|
| 60 | 60 | $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/plugins/toolbox/tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_toolsImagedownload'] = 'LLL:EXT:dlf/locallang.xml:tx_dlf_toolbox.toolsImagedownload'; |
| 61 | 61 | |
| 62 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY, 'plugins/toolbox/tools/searchindocument/class.tx_dlf_toolsSearchindocument.php', '_toolsSearchindocument', '', TRUE); |
|
| 62 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY, 'plugins/toolbox/tools/searchindocument/class.tx_dlf_toolsSearchindocument.php', '_toolsSearchindocument', '', true); |
|
| 63 | 63 | $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/plugins/toolbox/tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_toolsSearchindocument'] = 'LLL:EXT:dlf/locallang.xml:tx_dlf_toolbox.toolsSearchindocument'; |
| 64 | 64 | |
| 65 | 65 | // Register hooks. |
@@ -48,39 +48,39 @@ |
||
| 48 | 48 | |
| 49 | 49 | // Register tools for toolbox plugin. |
| 50 | 50 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY, 'plugins/toolbox/tools/fulltext/class.tx_dlf_toolsFulltext.php', '_toolsFulltext', '', TRUE); |
| 51 | -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/plugins/toolbox/tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_toolsFulltext'] = 'LLL:EXT:dlf/locallang.xml:tx_dlf_toolbox.toolsFulltext'; |
|
| 51 | +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/plugins/toolbox/tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_toolsFulltext'] = 'LLL:EXT:dlf/locallang.xml:tx_dlf_toolbox.toolsFulltext'; |
|
| 52 | 52 | |
| 53 | 53 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY, 'plugins/toolbox/tools/imagemanipulation/class.tx_dlf_toolsImagemanipulation.php', '_toolsImagemanipulation', '', TRUE); |
| 54 | -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/plugins/toolbox/tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_toolsImagemanipulation'] = 'LLL:EXT:dlf/locallang.xml:tx_dlf_toolbox.toolsImagemanipulation'; |
|
| 54 | +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/plugins/toolbox/tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_toolsImagemanipulation'] = 'LLL:EXT:dlf/locallang.xml:tx_dlf_toolbox.toolsImagemanipulation'; |
|
| 55 | 55 | |
| 56 | 56 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY, 'plugins/toolbox/tools/pdf/class.tx_dlf_toolsPdf.php', '_toolsPdf', '', TRUE); |
| 57 | -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/plugins/toolbox/tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_toolsPdf'] = 'LLL:EXT:dlf/locallang.xml:tx_dlf_toolbox.toolsPdf'; |
|
| 57 | +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/plugins/toolbox/tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_toolsPdf'] = 'LLL:EXT:dlf/locallang.xml:tx_dlf_toolbox.toolsPdf'; |
|
| 58 | 58 | |
| 59 | 59 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY, 'plugins/toolbox/tools/imagedownload/class.tx_dlf_toolsImagedownload.php', '_toolsImagedownload', '', TRUE); |
| 60 | -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/plugins/toolbox/tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_toolsImagedownload'] = 'LLL:EXT:dlf/locallang.xml:tx_dlf_toolbox.toolsImagedownload'; |
|
| 60 | +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/plugins/toolbox/tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_toolsImagedownload'] = 'LLL:EXT:dlf/locallang.xml:tx_dlf_toolbox.toolsImagedownload'; |
|
| 61 | 61 | |
| 62 | 62 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY, 'plugins/toolbox/tools/searchindocument/class.tx_dlf_toolsSearchindocument.php', '_toolsSearchindocument', '', TRUE); |
| 63 | -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/plugins/toolbox/tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_toolsSearchindocument'] = 'LLL:EXT:dlf/locallang.xml:tx_dlf_toolbox.toolsSearchindocument'; |
|
| 63 | +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/plugins/toolbox/tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_toolsSearchindocument'] = 'LLL:EXT:dlf/locallang.xml:tx_dlf_toolbox.toolsSearchindocument'; |
|
| 64 | 64 | |
| 65 | 65 | // Register hooks. |
| 66 | -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'][] = 'EXT:'.$_EXTKEY.'/hooks/class.tx_dlf_tcemain.php:tx_dlf_tcemain'; |
|
| 66 | +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'][] = 'EXT:' . $_EXTKEY . '/hooks/class.tx_dlf_tcemain.php:tx_dlf_tcemain'; |
|
| 67 | 67 | |
| 68 | -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processCmdmapClass'][] = 'EXT:'.$_EXTKEY.'/hooks/class.tx_dlf_tcemain.php:tx_dlf_tcemain'; |
|
| 68 | +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processCmdmapClass'][] = 'EXT:' . $_EXTKEY . '/hooks/class.tx_dlf_tcemain.php:tx_dlf_tcemain'; |
|
| 69 | 69 | |
| 70 | -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/common/class.tx_dlf_document.php']['hookClass'][] = 'EXT:'.$_EXTKEY.'/hooks/class.tx_dlf_hacks.php:tx_dlf_hacks'; |
|
| 70 | +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/common/class.tx_dlf_document.php']['hookClass'][] = 'EXT:' . $_EXTKEY . '/hooks/class.tx_dlf_hacks.php:tx_dlf_hacks'; |
|
| 71 | 71 | |
| 72 | 72 | // Register command line scripts. |
| 73 | -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['cliKeys'][$_EXTKEY] = array ('EXT:'.$_EXTKEY.'/cli/class.tx_dlf_cli.php', '_CLI_dlf'); |
|
| 73 | +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['cliKeys'][$_EXTKEY] = array('EXT:' . $_EXTKEY . '/cli/class.tx_dlf_cli.php', '_CLI_dlf'); |
|
| 74 | 74 | |
| 75 | 75 | // Register AJAX eID handlers. |
| 76 | -$GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_dlf_search_suggest'] = 'EXT:'.$_EXTKEY.'/plugins/search/class.tx_dlf_search_suggest.php'; |
|
| 76 | +$GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_dlf_search_suggest'] = 'EXT:' . $_EXTKEY . '/plugins/search/class.tx_dlf_search_suggest.php'; |
|
| 77 | 77 | |
| 78 | 78 | $extConf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['dlf']); |
| 79 | 79 | if (!empty($extConf) && $extConf['enableInternalProxy']) { |
| 80 | - $GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_dlf_geturl_eid'] = 'EXT:'.$_EXTKEY.'/plugins/pageview/class.tx_dlf_geturl_eid.php'; |
|
| 80 | + $GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_dlf_geturl_eid'] = 'EXT:' . $_EXTKEY . '/plugins/pageview/class.tx_dlf_geturl_eid.php'; |
|
| 81 | 81 | } |
| 82 | 82 | |
| 83 | -$GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_dlf_search_in_document_eid'] = 'EXT:'.$_EXTKEY.'/plugins/toolbox/tools/searchindocument/class.tx_dlf_search_in_document_eid.php'; |
|
| 83 | +$GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_dlf_search_in_document_eid'] = 'EXT:' . $_EXTKEY . '/plugins/toolbox/tools/searchindocument/class.tx_dlf_search_in_document_eid.php'; |
|
| 84 | 84 | |
| 85 | 85 | // add caching framework for Solr queries |
| 86 | 86 | if (!is_array($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['tx_dlf_solr'])) { |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | // Add modules after "web". |
| 20 | 20 | if (!isset($TBE_MODULES['txdlfmodules'])) { |
| 21 | 21 | |
| 22 | - $modules = array (); |
|
| 22 | + $modules = array(); |
|
| 23 | 23 | |
| 24 | 24 | foreach ($TBE_MODULES as $key => $val) { |
| 25 | 25 | |
@@ -44,17 +44,17 @@ discard block |
||
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | // Main "dlf" module. |
| 47 | - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule('txdlfmodules', '', '', \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY).'modules/'); |
|
| 47 | + \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule('txdlfmodules', '', '', \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'modules/'); |
|
| 48 | 48 | |
| 49 | 49 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addNavigationComponent('txdlfmodules', 'typo3-pagetree'); |
| 50 | 50 | |
| 51 | 51 | // Module "indexing". |
| 52 | - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule('txdlfmodules', 'txdlfindexing', '', \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY).'modules/indexing/'); |
|
| 52 | + \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule('txdlfmodules', 'txdlfindexing', '', \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'modules/indexing/'); |
|
| 53 | 53 | |
| 54 | 54 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('_MOD_txdlfmodules_txdlfindexing', 'EXT:dlf/modules/indexing/locallang_mod.xml'); |
| 55 | 55 | |
| 56 | 56 | // Module "newclient". |
| 57 | - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule('txdlfmodules', 'txdlfnewclient', '', \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY).'modules/newclient/'); |
|
| 57 | + \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule('txdlfmodules', 'txdlfnewclient', '', \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'modules/newclient/'); |
|
| 58 | 58 | |
| 59 | 59 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('_MOD_txdlfmodules_txdlfnewclient', 'EXT:dlf/modules/newclient/locallang_mod.xml'); |
| 60 | 60 | |
@@ -48,11 +48,11 @@ discard block |
||
| 48 | 48 | case 'index': |
| 49 | 49 | |
| 50 | 50 | // Add command line arguments. |
| 51 | - $this->cli_options[] = array ('-doc UID/URL', 'UID or (properly encoded) URL of the document.'); |
|
| 51 | + $this->cli_options[] = array('-doc UID/URL', 'UID or (properly encoded) URL of the document.'); |
|
| 52 | 52 | |
| 53 | - $this->cli_options[] = array ('-pid UID', 'UID of the page the document should be added to.'); |
|
| 53 | + $this->cli_options[] = array('-pid UID', 'UID of the page the document should be added to.'); |
|
| 54 | 54 | |
| 55 | - $this->cli_options[] = array ('-core UID', 'UID of the Solr core the document should be added to.'); |
|
| 55 | + $this->cli_options[] = array('-core UID', 'UID of the Solr core the document should be added to.'); |
|
| 56 | 56 | |
| 57 | 57 | // Check the command line arguments. |
| 58 | 58 | $this->cli_validateArgs(); |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | if (!\TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($this->cli_args['-doc'][0]) |
| 61 | 61 | && !\TYPO3\CMS\Core\Utility\GeneralUtility::isValidUrl($this->cli_args['-doc'][0])) { |
| 62 | 62 | |
| 63 | - $this->cli_echo('ERROR: "'.$this->cli_args['-doc'][0].'" is not a valid document UID or URL.'.LF, TRUE); |
|
| 63 | + $this->cli_echo('ERROR: "' . $this->cli_args['-doc'][0] . '" is not a valid document UID or URL.' . LF, TRUE); |
|
| 64 | 64 | |
| 65 | 65 | $this->return = 1; |
| 66 | 66 | |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | |
| 69 | 69 | if (!\TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($this->cli_args['-pid'][0])) { |
| 70 | 70 | |
| 71 | - $this->cli_echo('ERROR: "'.$this->cli_args['-pid'][0].'" is not a valid page UID.'.LF, TRUE); |
|
| 71 | + $this->cli_echo('ERROR: "' . $this->cli_args['-pid'][0] . '" is not a valid page UID.' . LF, TRUE); |
|
| 72 | 72 | |
| 73 | 73 | $this->return = 1; |
| 74 | 74 | |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | |
| 77 | 77 | if (!\TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($this->cli_args['-core'][0])) { |
| 78 | 78 | |
| 79 | - $this->cli_echo('ERROR: "'.$this->cli_args['-core'][0].'" is not a valid core UID.'.LF, TRUE); |
|
| 79 | + $this->cli_echo('ERROR: "' . $this->cli_args['-core'][0] . '" is not a valid core UID.' . LF, TRUE); |
|
| 80 | 80 | |
| 81 | 81 | $this->return = 1; |
| 82 | 82 | |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | // ...and save it to the database... |
| 97 | 97 | if (!$doc->save(intval($this->cli_args['-pid'][0]), intval($this->cli_args['-core'][0]))) { |
| 98 | 98 | |
| 99 | - $this->cli_echo('ERROR: Document "'.$this->cli_args['-doc'][0].'" not saved and indexed.'.LF, TRUE); |
|
| 99 | + $this->cli_echo('ERROR: Document "' . $this->cli_args['-doc'][0] . '" not saved and indexed.' . LF, TRUE); |
|
| 100 | 100 | |
| 101 | 101 | $this->return = 1; |
| 102 | 102 | |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | |
| 105 | 105 | } else { |
| 106 | 106 | |
| 107 | - $this->cli_echo('ERROR: Document "'.$this->cli_args['-doc'][0].'" could not be loaded.'.LF, TRUE); |
|
| 107 | + $this->cli_echo('ERROR: Document "' . $this->cli_args['-doc'][0] . '" could not be loaded.' . LF, TRUE); |
|
| 108 | 108 | |
| 109 | 109 | $this->return = 1; |
| 110 | 110 | |
@@ -116,18 +116,18 @@ discard block |
||
| 116 | 116 | case 'reindex': |
| 117 | 117 | |
| 118 | 118 | // Add command line arguments. |
| 119 | - $this->cli_options[] = array ('-coll UID', 'UID of the collection.'); |
|
| 119 | + $this->cli_options[] = array('-coll UID', 'UID of the collection.'); |
|
| 120 | 120 | |
| 121 | - $this->cli_options[] = array ('-pid UID', 'UID of the page the document should be added to.'); |
|
| 121 | + $this->cli_options[] = array('-pid UID', 'UID of the page the document should be added to.'); |
|
| 122 | 122 | |
| 123 | - $this->cli_options[] = array ('-core UID', 'UID of the Solr core the document should be added to.'); |
|
| 123 | + $this->cli_options[] = array('-core UID', 'UID of the Solr core the document should be added to.'); |
|
| 124 | 124 | |
| 125 | 125 | // Check the command line arguments. |
| 126 | 126 | $this->cli_validateArgs(); |
| 127 | 127 | |
| 128 | 128 | if (!\TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($this->cli_args['-coll'][0])) { |
| 129 | 129 | |
| 130 | - $this->cli_echo('ERROR: "'.$this->cli_args['-coll'][0].'" is not a valid collection UID.'.LF, TRUE); |
|
| 130 | + $this->cli_echo('ERROR: "' . $this->cli_args['-coll'][0] . '" is not a valid collection UID.' . LF, TRUE); |
|
| 131 | 131 | |
| 132 | 132 | $this->return = 1; |
| 133 | 133 | |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | |
| 136 | 136 | if (!\TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($this->cli_args['-pid'][0])) { |
| 137 | 137 | |
| 138 | - $this->cli_echo('ERROR: "'.$this->cli_args['-pid'][0].'" is not a valid page UID.'.LF, TRUE); |
|
| 138 | + $this->cli_echo('ERROR: "' . $this->cli_args['-pid'][0] . '" is not a valid page UID.' . LF, TRUE); |
|
| 139 | 139 | |
| 140 | 140 | $this->return = 1; |
| 141 | 141 | |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | |
| 144 | 144 | if (!\TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($this->cli_args['-core'][0])) { |
| 145 | 145 | |
| 146 | - $this->cli_echo('ERROR: "'.$this->cli_args['-core'][0].'" is not a valid core UID.'.LF, TRUE); |
|
| 146 | + $this->cli_echo('ERROR: "' . $this->cli_args['-core'][0] . '" is not a valid core UID.' . LF, TRUE); |
|
| 147 | 147 | |
| 148 | 148 | $this->return = 1; |
| 149 | 149 | |
@@ -161,7 +161,7 @@ discard block |
||
| 161 | 161 | 'tx_dlf_documents', |
| 162 | 162 | 'tx_dlf_relations', |
| 163 | 163 | 'tx_dlf_collections', |
| 164 | - 'AND tx_dlf_collections.uid='.intval($this->cli_args['-coll'][0]).' AND tx_dlf_collections.pid='.intval($this->cli_args['-pid'][0]).' AND tx_dlf_relations.ident='.$GLOBALS['TYPO3_DB']->fullQuoteStr('docs_colls', 'tx_dlf_relations').tx_dlf_helper::whereClause('tx_dlf_documents').tx_dlf_helper::whereClause('tx_dlf_collections'), |
|
| 164 | + 'AND tx_dlf_collections.uid=' . intval($this->cli_args['-coll'][0]) . ' AND tx_dlf_collections.pid=' . intval($this->cli_args['-pid'][0]) . ' AND tx_dlf_relations.ident=' . $GLOBALS['TYPO3_DB']->fullQuoteStr('docs_colls', 'tx_dlf_relations') . tx_dlf_helper::whereClause('tx_dlf_documents') . tx_dlf_helper::whereClause('tx_dlf_collections'), |
|
| 165 | 165 | '', |
| 166 | 166 | '', |
| 167 | 167 | '' |
@@ -177,7 +177,7 @@ discard block |
||
| 177 | 177 | // ...and save it to the database... |
| 178 | 178 | if (!$doc->save(intval($this->cli_args['-pid'][0]), intval($this->cli_args['-core'][0]))) { |
| 179 | 179 | |
| 180 | - $this->cli_echo('ERROR: Document "'.$resArray['uid'].'" not saved and indexed.'.LF, TRUE); |
|
| 180 | + $this->cli_echo('ERROR: Document "' . $resArray['uid'] . '" not saved and indexed.' . LF, TRUE); |
|
| 181 | 181 | |
| 182 | 182 | $this->return = 1; |
| 183 | 183 | |
@@ -185,7 +185,7 @@ discard block |
||
| 185 | 185 | |
| 186 | 186 | } else { |
| 187 | 187 | |
| 188 | - $this->cli_echo('ERROR: Document "'.$resArray['uid'].'" could not be loaded.'.LF, TRUE); |
|
| 188 | + $this->cli_echo('ERROR: Document "' . $resArray['uid'] . '" could not be loaded.' . LF, TRUE); |
|
| 189 | 189 | |
| 190 | 190 | $this->return = 1; |
| 191 | 191 | |
@@ -213,10 +213,10 @@ discard block |
||
| 213 | 213 | public function __construct() { |
| 214 | 214 | |
| 215 | 215 | // Set basic information about the script. |
| 216 | - $this->cli_help = array ( |
|
| 216 | + $this->cli_help = array( |
|
| 217 | 217 | 'name' => 'Command Line Interface for Kitodo.Presentation', |
| 218 | 218 | 'synopsis' => '###OPTIONS###', |
| 219 | - 'description' => 'Currently the only tasks available are "index" and "reindex".'.LF.'Try "/PATH/TO/TYPO3/cli_dispatch.phpsh dlf TASK" for more options.', |
|
| 219 | + 'description' => 'Currently the only tasks available are "index" and "reindex".' . LF . 'Try "/PATH/TO/TYPO3/cli_dispatch.phpsh dlf TASK" for more options.', |
|
| 220 | 220 | 'examples' => '/PATH/TO/TYPO3/cli_dispatch.phpsh dlf TASK -ARG1=VALUE1 -ARG2=VALUE2', |
| 221 | 221 | 'options' => '', |
| 222 | 222 | 'license' => 'GNU GPL - free software!', |
@@ -23,7 +23,8 @@ discard block |
||
| 23 | 23 | * @subpackage tx_dlf |
| 24 | 24 | * @access public |
| 25 | 25 | */ |
| 26 | -class tx_dlf_cli extends \TYPO3\CMS\Core\Controller\CommandLineController { |
|
| 26 | +class tx_dlf_cli extends \TYPO3\CMS\Core\Controller\CommandLineController |
|
| 27 | +{ |
|
| 27 | 28 | |
| 28 | 29 | /** |
| 29 | 30 | * This is the return code. |
@@ -40,7 +41,8 @@ discard block |
||
| 40 | 41 | * |
| 41 | 42 | * @return void |
| 42 | 43 | */ |
| 43 | - public function main() { |
|
| 44 | + public function main() |
|
| 45 | + { |
|
| 44 | 46 | |
| 45 | 47 | switch ((string) $this->cli_args['_DEFAULT'][1]) { |
| 46 | 48 | |
@@ -210,7 +212,8 @@ discard block |
||
| 210 | 212 | |
| 211 | 213 | } |
| 212 | 214 | |
| 213 | - public function __construct() { |
|
| 215 | + public function __construct() |
|
| 216 | + { |
|
| 214 | 217 | |
| 215 | 218 | // Set basic information about the script. |
| 216 | 219 | $this->cli_help = array ( |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | if (!\TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($this->cli_args['-doc'][0]) |
| 61 | 61 | && !\TYPO3\CMS\Core\Utility\GeneralUtility::isValidUrl($this->cli_args['-doc'][0])) { |
| 62 | 62 | |
| 63 | - $this->cli_echo('ERROR: "'.$this->cli_args['-doc'][0].'" is not a valid document UID or URL.'.LF, TRUE); |
|
| 63 | + $this->cli_echo('ERROR: "'.$this->cli_args['-doc'][0].'" is not a valid document UID or URL.'.LF, true); |
|
| 64 | 64 | |
| 65 | 65 | $this->return = 1; |
| 66 | 66 | |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | |
| 69 | 69 | if (!\TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($this->cli_args['-pid'][0])) { |
| 70 | 70 | |
| 71 | - $this->cli_echo('ERROR: "'.$this->cli_args['-pid'][0].'" is not a valid page UID.'.LF, TRUE); |
|
| 71 | + $this->cli_echo('ERROR: "'.$this->cli_args['-pid'][0].'" is not a valid page UID.'.LF, true); |
|
| 72 | 72 | |
| 73 | 73 | $this->return = 1; |
| 74 | 74 | |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | |
| 77 | 77 | if (!\TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($this->cli_args['-core'][0])) { |
| 78 | 78 | |
| 79 | - $this->cli_echo('ERROR: "'.$this->cli_args['-core'][0].'" is not a valid core UID.'.LF, TRUE); |
|
| 79 | + $this->cli_echo('ERROR: "'.$this->cli_args['-core'][0].'" is not a valid core UID.'.LF, true); |
|
| 80 | 80 | |
| 81 | 81 | $this->return = 1; |
| 82 | 82 | |
@@ -89,14 +89,14 @@ discard block |
||
| 89 | 89 | } |
| 90 | 90 | |
| 91 | 91 | // Get the document... |
| 92 | - $doc = & tx_dlf_document::getInstance($this->cli_args['-doc'][0], $this->cli_args['-pid'][0], TRUE); |
|
| 92 | + $doc = & tx_dlf_document::getInstance($this->cli_args['-doc'][0], $this->cli_args['-pid'][0], true); |
|
| 93 | 93 | |
| 94 | 94 | if ($doc->ready) { |
| 95 | 95 | |
| 96 | 96 | // ...and save it to the database... |
| 97 | 97 | if (!$doc->save(intval($this->cli_args['-pid'][0]), intval($this->cli_args['-core'][0]))) { |
| 98 | 98 | |
| 99 | - $this->cli_echo('ERROR: Document "'.$this->cli_args['-doc'][0].'" not saved and indexed.'.LF, TRUE); |
|
| 99 | + $this->cli_echo('ERROR: Document "'.$this->cli_args['-doc'][0].'" not saved and indexed.'.LF, true); |
|
| 100 | 100 | |
| 101 | 101 | $this->return = 1; |
| 102 | 102 | |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | |
| 105 | 105 | } else { |
| 106 | 106 | |
| 107 | - $this->cli_echo('ERROR: Document "'.$this->cli_args['-doc'][0].'" could not be loaded.'.LF, TRUE); |
|
| 107 | + $this->cli_echo('ERROR: Document "'.$this->cli_args['-doc'][0].'" could not be loaded.'.LF, true); |
|
| 108 | 108 | |
| 109 | 109 | $this->return = 1; |
| 110 | 110 | |
@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | |
| 128 | 128 | if (!\TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($this->cli_args['-coll'][0])) { |
| 129 | 129 | |
| 130 | - $this->cli_echo('ERROR: "'.$this->cli_args['-coll'][0].'" is not a valid collection UID.'.LF, TRUE); |
|
| 130 | + $this->cli_echo('ERROR: "'.$this->cli_args['-coll'][0].'" is not a valid collection UID.'.LF, true); |
|
| 131 | 131 | |
| 132 | 132 | $this->return = 1; |
| 133 | 133 | |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | |
| 136 | 136 | if (!\TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($this->cli_args['-pid'][0])) { |
| 137 | 137 | |
| 138 | - $this->cli_echo('ERROR: "'.$this->cli_args['-pid'][0].'" is not a valid page UID.'.LF, TRUE); |
|
| 138 | + $this->cli_echo('ERROR: "'.$this->cli_args['-pid'][0].'" is not a valid page UID.'.LF, true); |
|
| 139 | 139 | |
| 140 | 140 | $this->return = 1; |
| 141 | 141 | |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | |
| 144 | 144 | if (!\TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($this->cli_args['-core'][0])) { |
| 145 | 145 | |
| 146 | - $this->cli_echo('ERROR: "'.$this->cli_args['-core'][0].'" is not a valid core UID.'.LF, TRUE); |
|
| 146 | + $this->cli_echo('ERROR: "'.$this->cli_args['-core'][0].'" is not a valid core UID.'.LF, true); |
|
| 147 | 147 | |
| 148 | 148 | $this->return = 1; |
| 149 | 149 | |
@@ -170,14 +170,14 @@ discard block |
||
| 170 | 170 | while ($resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)) { |
| 171 | 171 | |
| 172 | 172 | // Get the document... |
| 173 | - $doc = & tx_dlf_document::getInstance($resArray['uid'], $this->cli_args['-pid'][0], TRUE); |
|
| 173 | + $doc = & tx_dlf_document::getInstance($resArray['uid'], $this->cli_args['-pid'][0], true); |
|
| 174 | 174 | |
| 175 | 175 | if ($doc->ready) { |
| 176 | 176 | |
| 177 | 177 | // ...and save it to the database... |
| 178 | 178 | if (!$doc->save(intval($this->cli_args['-pid'][0]), intval($this->cli_args['-core'][0]))) { |
| 179 | 179 | |
| 180 | - $this->cli_echo('ERROR: Document "'.$resArray['uid'].'" not saved and indexed.'.LF, TRUE); |
|
| 180 | + $this->cli_echo('ERROR: Document "'.$resArray['uid'].'" not saved and indexed.'.LF, true); |
|
| 181 | 181 | |
| 182 | 182 | $this->return = 1; |
| 183 | 183 | |
@@ -185,7 +185,7 @@ discard block |
||
| 185 | 185 | |
| 186 | 186 | } else { |
| 187 | 187 | |
| 188 | - $this->cli_echo('ERROR: Document "'.$resArray['uid'].'" could not be loaded.'.LF, TRUE); |
|
| 188 | + $this->cli_echo('ERROR: Document "'.$resArray['uid'].'" could not be loaded.'.LF, true); |
|
| 189 | 189 | |
| 190 | 190 | $this->return = 1; |
| 191 | 191 | |