Browse Source

Scrutinizer Auto-Fixes

This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
pull/257/head
Scrutinizer Auto-Fixer 5 years ago
parent
commit
eab6e1f0b2
  1. 6
      class.ext_update.php
  2. 12
      common/class.tx_dlf_document.php
  3. 4
      common/class.tx_dlf_helper.php
  4. 2
      common/class.tx_dlf_module.php
  5. 4
      common/class.tx_dlf_plugin.php
  6. 4
      common/class.tx_dlf_solr.php
  7. 10
      ext_emconf.php
  8. 2
      ext_localconf.php
  9. 42
      ext_tables.php
  10. 16
      hooks/class.tx_dlf_em.php
  11. 6
      plugins/audioplayer/class.tx_dlf_audioplayer.php
  12. 32
      plugins/basket/class.tx_dlf_basket.php
  13. 8
      plugins/listview/class.tx_dlf_listview.php
  14. 8
      plugins/navigation/class.tx_dlf_navigation.php
  15. 32
      plugins/newspaper/class.tx_dlf_newspaper.php
  16. 6
      plugins/oai/class.tx_dlf_oai.php
  17. 4
      plugins/pagegrid/class.tx_dlf_pagegrid.php
  18. 4
      plugins/pageview/class.tx_dlf_geturl_eid.php
  19. 26
      plugins/search/class.tx_dlf_search.php
  20. 4
      plugins/toc/class.tx_dlf_toc.php
  21. 4
      plugins/toolbox/tools/fulltext/class.tx_dlf_toolsFulltext.php
  22. 10
      plugins/toolbox/tools/imagedownload/class.tx_dlf_toolsImagedownload.php
  23. 18
      plugins/toolbox/tools/pdf/class.tx_dlf_toolsPdf.php

6
class.ext_update.php

@ -64,7 +64,7 @@ class ext_update {
// check if tx_dlf_metadata.xpath exists anyhow
$fieldsInDatabase = $GLOBALS['TYPO3_DB']->admin_get_fields('tx_dlf_metadata');
if (! in_array('xpath', array_keys($fieldsInDatabase))) {
if (!in_array('xpath', array_keys($fieldsInDatabase))) {
return $uids;
@ -141,7 +141,7 @@ class ext_update {
while ($resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)) {
if($resArray['column_name'] == 'tokenized'
if ($resArray['column_name'] == 'tokenized'
|| $resArray['column_name'] == 'stored'
|| $resArray['column_name'] == 'indexed'
|| $resArray['column_name'] == 'boost'
@ -173,7 +173,7 @@ class ext_update {
// Copy the content of the old tables to the new ones
$result = $GLOBALS['TYPO3_DB']->sql_query($sqlQuery);
if($result) {
if ($result) {
$message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',

12
common/class.tx_dlf_document.php

@ -572,7 +572,7 @@ final class tx_dlf_document {
$details['id'] = $attributes['ID'];
$details['dmdId'] = (isset($attributes['DMDID']) ? $attributes['DMDID'] : '');
$details['dmdId'] = (isset($attributes['DMDID']) ? $attributes['DMDID'] : '');
$details['label'] = (isset($attributes['LABEL']) ? $attributes['LABEL'] : '');
@ -921,7 +921,7 @@ final class tx_dlf_document {
*/
public function getPhysicalPage($logicalPage) {
if(!empty( $this->lastSearchedPhysicalPage['logicalPage']) && $this->lastSearchedPhysicalPage['logicalPage'] == $logicalPage) {
if (!empty($this->lastSearchedPhysicalPage['logicalPage']) && $this->lastSearchedPhysicalPage['logicalPage'] == $logicalPage) {
return $this->lastSearchedPhysicalPage['physicalPage'];
@ -929,9 +929,9 @@ final class tx_dlf_document {
$physicalPage = 0;
foreach($this->physicalStructureInfo as $page) {
foreach ($this->physicalStructureInfo as $page) {
if(strpos($page['orderlabel'], $logicalPage) !== FALSE) {
if (strpos($page['orderlabel'], $logicalPage) !== FALSE) {
$this->lastSearchedPhysicalPage['logicalPage'] = $logicalPage;
$this->lastSearchedPhysicalPage['physicalPage'] = $physicalPage;
@ -1355,7 +1355,7 @@ final class tx_dlf_document {
if (TYPO3_DLOG) {
\TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->save('.$_pid.', '.$_core.')] Could not identify document/structure type ' . $GLOBALS['TYPO3_DB']->fullQuoteStr($metadata['type'][0], 'tx_dlf_structures'),
\TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->save('.$_pid.', '.$_core.')] Could not identify document/structure type '.$GLOBALS['TYPO3_DB']->fullQuoteStr($metadata['type'][0], 'tx_dlf_structures'),
self::$extKey, SYSLOG_SEVERITY_ERROR);
}
@ -2440,7 +2440,7 @@ final class tx_dlf_document {
$hookObjects = tx_dlf_helper::getHookObjects('common/class.tx_dlf_document.php');
// Apply hooks.
foreach($hookObjects as $hookObj) {
foreach ($hookObjects as $hookObj) {
if (method_exists($hookObj, 'construct_postProcessRecordId')) {

4
common/class.tx_dlf_helper.php

@ -1028,7 +1028,7 @@ class tx_dlf_helper {
if ($flashMessage->getTitle() !== '') {
$messageContent = sprintf('<h4>%s</h4>', htmlspecialchars($flashMessage->getTitle())) . $messageContent;
$messageContent = sprintf('<h4>%s</h4>', htmlspecialchars($flashMessage->getTitle())).$messageContent;
}
@ -1218,7 +1218,7 @@ class tx_dlf_helper {
// Overlay localized labels if available.
if ($GLOBALS['TSFE']->sys_language_content > 0) {
$resArray = $GLOBALS['TSFE']->sys_page->getRecordOverlay($table, $resArray,$GLOBALS['TSFE']->sys_language_content, $GLOBALS['TSFE']->sys_language_contentOL);
$resArray = $GLOBALS['TSFE']->sys_page->getRecordOverlay($table, $resArray, $GLOBALS['TSFE']->sys_language_content, $GLOBALS['TSFE']->sys_language_contentOL);
}

2
common/class.tx_dlf_module.php

@ -105,7 +105,7 @@ abstract class tx_dlf_module extends \TYPO3\CMS\Backend\Module\BaseScriptClass {
$this->doc->setModuleTemplate('EXT:'.$this->extKey.'/modules/'.$this->modPath.'template.tmpl');
$this->doc->getPageRenderer()->addCssFile(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($this->extKey) . 'res/backend.css');
$this->doc->getPageRenderer()->addCssFile(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($this->extKey).'res/backend.css');
$this->doc->backPath = $GLOBALS['BACK_PATH'];

4
common/class.tx_dlf_plugin.php

@ -228,7 +228,7 @@ abstract class tx_dlf_plugin extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin {
foreach ($this->conf['_DEFAULT_PI_VARS.'] as $GPkey => $GPval) {
if (strpos($GPkey,'.')) {
if (strpos($GPkey, '.')) {
$GPkey = substr($GPkey, 0, -1);
@ -246,7 +246,7 @@ abstract class tx_dlf_plugin extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin {
}
$this->piVars = tx_dlf_helper::array_merge_recursive_overrule($this->conf['_DEFAULT_PI_VARS.'], is_array($this->piVars) ? $this->piVars : array());
$this->piVars = tx_dlf_helper::array_merge_recursive_overrule($this->conf['_DEFAULT_PI_VARS.'], is_array($this->piVars) ? $this->piVars : array ());
}

4
common/class.tx_dlf_solr.php

@ -139,12 +139,12 @@ class tx_dlf_solr {
if (preg_match('/^[[:alnum:]]+_[tu][su]i:\(.*\)$/', $query)) {
// Get all indexed fields.
$fields = array();
$fields = array ();
$result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
'tx_dlf_metadata.index_name,tx_dlf_metadata.index_tokenized,tx_dlf_metadata.index_stored',
'tx_dlf_metadata',
'tx_dlf_metadata.index_indexed=1 AND tx_dlf_metadata.pid=' . intval($pid) . ' AND (tx_dlf_metadata.sys_language_uid IN (-1,0) OR tx_dlf_metadata.l18n_parent=0)' . tx_dlf_helper::whereClause('tx_dlf_metadata'),
'tx_dlf_metadata.index_indexed=1 AND tx_dlf_metadata.pid='.intval($pid).' AND (tx_dlf_metadata.sys_language_uid IN (-1,0) OR tx_dlf_metadata.l18n_parent=0)'.tx_dlf_helper::whereClause('tx_dlf_metadata'),
'',
'',
''

10
ext_emconf.php

@ -9,7 +9,7 @@
* LICENSE.txt file that was distributed with this source code.
*/
$EM_CONF[$_EXTKEY] = array(
$EM_CONF[$_EXTKEY] = array (
'title' => 'Kitodo.Presentation',
'description' => 'Base plugins, modules, services and API of the Digital Library Framework. It is part of the community-based Kitodo Digitization Suite.',
'category' => 'fe',
@ -27,14 +27,14 @@ $EM_CONF[$_EXTKEY] = array(
'clearCacheOnLoad' => FALSE,
'lockType' => '',
'version' => '2.1.0',
'constraints' => array(
'depends' => array(
'constraints' => array (
'depends' => array (
'php' => '5.3.7-',
'typo3' => '6.2.0-7.9.99',
),
'conflicts' => array(
'conflicts' => array (
),
'suggests' => array(
'suggests' => array (
),
),
'_md5_values_when_last_written' => '',

2
ext_localconf.php

@ -9,7 +9,7 @@
* LICENSE.txt file that was distributed with this source code.
*/
if (!defined ('TYPO3_MODE')) {
if (!defined('TYPO3_MODE')) {
die ('Access denied.');
}

42
ext_tables.php

@ -9,7 +9,7 @@
* LICENSE.txt file that was distributed with this source code.
*/
if (!defined ('TYPO3_MODE')) {
if (!defined('TYPO3_MODE')) {
die ('Access denied.');
}
@ -21,7 +21,7 @@ $TCA['tt_content']['types']['list']['subtypes_excludelist'][$_EXTKEY.'_audioplay
$TCA['tt_content']['types']['list']['subtypes_addlist'][$_EXTKEY.'_audioplayer'] = 'pi_flexform';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array('LLL:EXT:dlf/locallang.xml:tt_content.dlf_audioplayer', $_EXTKEY.'_audioplayer'), 'list_type');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array ('LLL:EXT:dlf/locallang.xml:tt_content.dlf_audioplayer', $_EXTKEY.'_audioplayer'), 'list_type');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue($_EXTKEY.'_audioplayer', 'FILE:EXT:'.$_EXTKEY.'/plugins/audioplayer/flexform.xml');
@ -30,7 +30,7 @@ $TCA['tt_content']['types']['list']['subtypes_excludelist'][$_EXTKEY.'_basket']
$TCA['tt_content']['types']['list']['subtypes_addlist'][$_EXTKEY.'_basket'] = 'pi_flexform';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array('LLL:EXT:dlf/locallang.xml:tt_content.dlf_basket', $_EXTKEY.'_basket'), 'list_type');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array ('LLL:EXT:dlf/locallang.xml:tt_content.dlf_basket', $_EXTKEY.'_basket'), 'list_type');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue($_EXTKEY.'_basket', 'FILE:EXT:'.$_EXTKEY.'/plugins/basket/flexform.xml');
@ -39,7 +39,7 @@ $TCA['tt_content']['types']['list']['subtypes_excludelist'][$_EXTKEY.'_collectio
$TCA['tt_content']['types']['list']['subtypes_addlist'][$_EXTKEY.'_collection'] = 'pi_flexform';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array('LLL:EXT:dlf/locallang.xml:tt_content.dlf_collection', $_EXTKEY.'_collection'), 'list_type');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array ('LLL:EXT:dlf/locallang.xml:tt_content.dlf_collection', $_EXTKEY.'_collection'), 'list_type');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue($_EXTKEY.'_collection', 'FILE:EXT:'.$_EXTKEY.'/plugins/collection/flexform.xml');
@ -48,7 +48,7 @@ $TCA['tt_content']['types']['list']['subtypes_excludelist'][$_EXTKEY.'_feeds'] =
$TCA['tt_content']['types']['list']['subtypes_addlist'][$_EXTKEY.'_feeds'] = 'pi_flexform';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array('LLL:EXT:dlf/locallang.xml:tt_content.dlf_feeds', $_EXTKEY.'_feeds'), 'list_type');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array ('LLL:EXT:dlf/locallang.xml:tt_content.dlf_feeds', $_EXTKEY.'_feeds'), 'list_type');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue($_EXTKEY.'_feeds', 'FILE:EXT:'.$_EXTKEY.'/plugins/feeds/flexform.xml');
@ -57,7 +57,7 @@ $TCA['tt_content']['types']['list']['subtypes_excludelist'][$_EXTKEY.'_listview'
$TCA['tt_content']['types']['list']['subtypes_addlist'][$_EXTKEY.'_listview'] = 'pi_flexform';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array('LLL:EXT:dlf/locallang.xml:tt_content.dlf_listview', $_EXTKEY.'_listview'), 'list_type');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array ('LLL:EXT:dlf/locallang.xml:tt_content.dlf_listview', $_EXTKEY.'_listview'), 'list_type');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue($_EXTKEY.'_listview', 'FILE:EXT:'.$_EXTKEY.'/plugins/listview/flexform.xml');
@ -66,7 +66,7 @@ $TCA['tt_content']['types']['list']['subtypes_excludelist'][$_EXTKEY.'_metadata'
$TCA['tt_content']['types']['list']['subtypes_addlist'][$_EXTKEY.'_metadata'] = 'pi_flexform';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array('LLL:EXT:dlf/locallang.xml:tt_content.dlf_metadata', $_EXTKEY.'_metadata'), 'list_type');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array ('LLL:EXT:dlf/locallang.xml:tt_content.dlf_metadata', $_EXTKEY.'_metadata'), 'list_type');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue($_EXTKEY.'_metadata', 'FILE:EXT:'.$_EXTKEY.'/plugins/metadata/flexform.xml');
@ -75,7 +75,7 @@ $TCA['tt_content']['types']['list']['subtypes_excludelist'][$_EXTKEY.'_navigatio
$TCA['tt_content']['types']['list']['subtypes_addlist'][$_EXTKEY.'_navigation'] = 'pi_flexform';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array('LLL:EXT:dlf/locallang.xml:tt_content.dlf_navigation', $_EXTKEY.'_navigation'), 'list_type');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array ('LLL:EXT:dlf/locallang.xml:tt_content.dlf_navigation', $_EXTKEY.'_navigation'), 'list_type');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue($_EXTKEY.'_navigation', 'FILE:EXT:'.$_EXTKEY.'/plugins/navigation/flexform.xml');
@ -84,7 +84,7 @@ $TCA['tt_content']['types']['list']['subtypes_excludelist'][$_EXTKEY.'_newspaper
$TCA['tt_content']['types']['list']['subtypes_addlist'][$_EXTKEY.'_newspaper'] = 'pi_flexform';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array('LLL:EXT:dlf/locallang.xml:tt_content.dlf_newspaper', $_EXTKEY.'_newspaper'), 'list_type');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array ('LLL:EXT:dlf/locallang.xml:tt_content.dlf_newspaper', $_EXTKEY.'_newspaper'), 'list_type');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue($_EXTKEY.'_newspaper', 'FILE:EXT:'.$_EXTKEY.'/plugins/newspaper/flexform.xml');
@ -93,7 +93,7 @@ $TCA['tt_content']['types']['list']['subtypes_excludelist'][$_EXTKEY.'_oai'] = '
$TCA['tt_content']['types']['list']['subtypes_addlist'][$_EXTKEY.'_oai'] = 'pi_flexform';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array('LLL:EXT:dlf/locallang.xml:tt_content.dlf_oai', $_EXTKEY.'_oai'), 'list_type');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array ('LLL:EXT:dlf/locallang.xml:tt_content.dlf_oai', $_EXTKEY.'_oai'), 'list_type');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue($_EXTKEY.'_oai', 'FILE:EXT:'.$_EXTKEY.'/plugins/oai/flexform.xml');
@ -102,7 +102,7 @@ $TCA['tt_content']['types']['list']['subtypes_excludelist'][$_EXTKEY.'_pagegrid'
$TCA['tt_content']['types']['list']['subtypes_addlist'][$_EXTKEY.'_pagegrid'] = 'pi_flexform';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array('LLL:EXT:dlf/locallang.xml:tt_content.dlf_pagegrid', $_EXTKEY.'_pagegrid'), 'list_type');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array ('LLL:EXT:dlf/locallang.xml:tt_content.dlf_pagegrid', $_EXTKEY.'_pagegrid'), 'list_type');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue($_EXTKEY.'_pagegrid', 'FILE:EXT:'.$_EXTKEY.'/plugins/pagegrid/flexform.xml');
@ -111,7 +111,7 @@ $TCA['tt_content']['types']['list']['subtypes_excludelist'][$_EXTKEY.'_pageview'
$TCA['tt_content']['types']['list']['subtypes_addlist'][$_EXTKEY.'_pageview'] = 'pi_flexform';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array('LLL:EXT:dlf/locallang.xml:tt_content.dlf_pageview', $_EXTKEY.'_pageview'), 'list_type');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array ('LLL:EXT:dlf/locallang.xml:tt_content.dlf_pageview', $_EXTKEY.'_pageview'), 'list_type');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue($_EXTKEY.'_pageview', 'FILE:EXT:'.$_EXTKEY.'/plugins/pageview/flexform.xml');
@ -120,7 +120,7 @@ $TCA['tt_content']['types']['list']['subtypes_excludelist'][$_EXTKEY.'_search']
$TCA['tt_content']['types']['list']['subtypes_addlist'][$_EXTKEY.'_search'] = 'pi_flexform';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array('LLL:EXT:dlf/locallang.xml:tt_content.dlf_search', $_EXTKEY.'_search'), 'list_type');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array ('LLL:EXT:dlf/locallang.xml:tt_content.dlf_search', $_EXTKEY.'_search'), 'list_type');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'plugins/search/', 'Search Facets');
@ -131,7 +131,7 @@ $TCA['tt_content']['types']['list']['subtypes_excludelist'][$_EXTKEY.'_statistic
$TCA['tt_content']['types']['list']['subtypes_addlist'][$_EXTKEY.'_statistics'] = 'pi_flexform';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array('LLL:EXT:dlf/locallang.xml:tt_content.dlf_statistics', $_EXTKEY.'_statistics'), 'list_type');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array ('LLL:EXT:dlf/locallang.xml:tt_content.dlf_statistics', $_EXTKEY.'_statistics'), 'list_type');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue($_EXTKEY.'_statistics', 'FILE:EXT:'.$_EXTKEY.'/plugins/statistics/flexform.xml');
@ -140,7 +140,7 @@ $TCA['tt_content']['types']['list']['subtypes_excludelist'][$_EXTKEY.'_toc'] = '
$TCA['tt_content']['types']['list']['subtypes_addlist'][$_EXTKEY.'_toc'] = 'pi_flexform';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array('LLL:EXT:dlf/locallang.xml:tt_content.dlf_toc', $_EXTKEY.'_toc'), 'list_type');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array ('LLL:EXT:dlf/locallang.xml:tt_content.dlf_toc', $_EXTKEY.'_toc'), 'list_type');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'plugins/toc/', 'Table of Contents');
@ -151,7 +151,7 @@ $TCA['tt_content']['types']['list']['subtypes_excludelist'][$_EXTKEY.'_toolbox']
$TCA['tt_content']['types']['list']['subtypes_addlist'][$_EXTKEY.'_toolbox'] = 'pi_flexform';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array('LLL:EXT:dlf/locallang.xml:tt_content.dlf_toolbox', $_EXTKEY.'_toolbox'), 'list_type');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array ('LLL:EXT:dlf/locallang.xml:tt_content.dlf_toolbox', $_EXTKEY.'_toolbox'), 'list_type');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue($_EXTKEY.'_toolbox', 'FILE:EXT:'.$_EXTKEY.'/plugins/toolbox/flexform.xml');
@ -160,7 +160,7 @@ $TCA['tt_content']['types']['list']['subtypes_excludelist'][$_EXTKEY.'_validator
$TCA['tt_content']['types']['list']['subtypes_addlist'][$_EXTKEY.'_validator'] = 'pi_flexform';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array('LLL:EXT:dlf/locallang.xml:tt_content.dlf_validator', $_EXTKEY.'_validator'), 'list_type');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array ('LLL:EXT:dlf/locallang.xml:tt_content.dlf_validator', $_EXTKEY.'_validator'), 'list_type');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue($_EXTKEY.'_validator', 'FILE:EXT:'.$_EXTKEY.'/plugins/validator/flexform.xml');
@ -170,9 +170,9 @@ if (TYPO3_MODE == 'BE') {
// Add modules after "web".
if (!isset($TBE_MODULES['txdlfmodules'])) {
$modules = array();
$modules = array ();
foreach($TBE_MODULES as $key => $val) {
foreach ($TBE_MODULES as $key => $val) {
if ($key == 'web') {
@ -202,11 +202,11 @@ if (TYPO3_MODE == 'BE') {
// Module "indexing".
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule('txdlfmodules', 'txdlfindexing', '', \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY).'modules/indexing/');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('_MOD_txdlfmodules_txdlfindexing','EXT:dlf/modules/indexing/locallang_mod.xml');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('_MOD_txdlfmodules_txdlfindexing', 'EXT:dlf/modules/indexing/locallang_mod.xml');
// Module "newclient".
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule('txdlfmodules', 'txdlfnewclient', '', \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY).'modules/newclient/');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('_MOD_txdlfmodules_txdlfnewclient','EXT:dlf/modules/newclient/locallang_mod.xml');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('_MOD_txdlfmodules_txdlfnewclient', 'EXT:dlf/modules/newclient/locallang_mod.xml');
}

16
hooks/class.tx_dlf_em.php

@ -173,7 +173,7 @@ class tx_dlf_em {
$usergroup = array_unique(array_merge(array ($groupUid), $resArray['usergroup']));
// Try to configure user.
$data = array();
$data = array ();
$data['be_users'][$resArray['uid']] = array (
'admin' => 0,
'usergroup' => implode(',', $usergroup),
@ -230,7 +230,7 @@ class tx_dlf_em {
// Try to create user.
$tempUid = uniqid('NEW');
$data = array();
$data = array ();
$data['be_users'][$tempUid] = array (
'pid' => 0,
'username' => '_cli_dlf',
@ -342,10 +342,10 @@ class tx_dlf_em {
// Check if group "_cli_dlf" exists and is not disabled.
$result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
'uid,non_exclude_fields,tables_select,tables_modify,' .
'uid,non_exclude_fields,tables_select,tables_modify,'.
$GLOBALS['TCA']['be_groups']['ctrl']['enablecolumns']['disabled'],
'be_groups',
'title=' . $GLOBALS['TYPO3_DB']->fullQuoteStr('_cli_dlf', 'be_groups') .
'title='.$GLOBALS['TYPO3_DB']->fullQuoteStr('_cli_dlf', 'be_groups').
\TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause('be_groups')
);
@ -388,8 +388,8 @@ class tx_dlf_em {
$tables_modify = array_unique(array_merge($settings['tables_modify'], $resArray['tables_modify']));
// Try to configure usergroup.
$data = array();
$data['be_groups'][$resArray['uid']] = array(
$data = array ();
$data['be_groups'][$resArray['uid']] = array (
'non_exclude_fields' => implode(',', $non_exclude_fields),
'tables_select' => implode(',', $tables_select),
'tables_modify' => implode(',', $tables_modify),
@ -444,8 +444,8 @@ class tx_dlf_em {
// Try to create usergroup.
$tempUid = uniqid('NEW');
$data = array();
$data['be_groups'][$tempUid] = array(
$data = array ();
$data['be_groups'][$tempUid] = array (
'pid' => 0,
'title' => '_cli_dlf',
'description' => $GLOBALS['LANG']->getLL('cliUserGroup.grpDescription'),

6
plugins/audioplayer/class.tx_dlf_audioplayer.php

@ -55,9 +55,9 @@ class tx_dlf_audioplayer extends tx_dlf_plugin {
$(document).ready(function() {
tx_dlf_audioplayer = new dlfAudioPlayer({
audio: {
mimeType: "' . $this->audio['mimetype'] . '",
title: "' . $this->audio['label'] . '",
url: "' . $this->audio['url'] . '"
mimeType: "' . $this->audio['mimetype'].'",
title: "' . $this->audio['label'].'",
url: "' . $this->audio['url'].'"
},
parentElId: "tx-dlf-audio",
swfPath: "'.\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'lib/jPlayer/jquery.jplayer.swf"

32
plugins/basket/class.tx_dlf_basket.php

@ -210,13 +210,13 @@ class tx_dlf_basket extends tx_dlf_plugin {
if ($GLOBALS['TYPO3_DB']->sql_num_rows($resultMail) > 0) {
$mails = array();
$mails = array ();
$mailForm = '<select name="tx_dlf[mail_action]">';
$mailForm .= '<option value="">'.$this->pi_getLL('chooseMail', '', TRUE).'</option>';
while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($resultMail)) {
while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($resultMail)) {
$mails[] = $row;
@ -255,13 +255,13 @@ class tx_dlf_basket extends tx_dlf_plugin {
if ($GLOBALS['TYPO3_DB']->sql_num_rows($resultPrinter) > 0) {
$printers = array();
$printers = array ();
$printForm = '<select name="tx_dlf[print_action]">';
$printForm .= '<option value="">'.$this->pi_getLL('choosePrinter', '', TRUE).'</option>';
while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($resultPrinter)) {
while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($resultPrinter)) {
$printers[] = $row;
@ -414,7 +414,7 @@ class tx_dlf_basket extends tx_dlf_plugin {
if ($page != NULL || $_piVars['addToBasket'] == 'list') {
$documentItem = array(
$documentItem = array (
'id' => intval($_piVars['id']),
'startpage' => intval($_piVars['startpage']),
'endpage' => intval($_piVars['endpage']),
@ -434,12 +434,12 @@ class tx_dlf_basket extends tx_dlf_plugin {
} else {
$items = array();
$items = array ();
}
// get document instance to load further information
$document = tx_dlf_document::getInstance($documentItem['id'],0);
$document = tx_dlf_document::getInstance($documentItem['id'], 0);
// set endpage for toc and subentry based on logid
if (($_piVars['addToBasket'] == 'subentry') or ($_piVars['addToBasket'] == 'toc')) {
@ -523,7 +523,7 @@ class tx_dlf_basket extends tx_dlf_plugin {
}
$update = array('doc_ids' => json_encode($items));
$update = array ('doc_ids' => json_encode($items));
$GLOBALS['TYPO3_DB']->exec_UPDATEquery('tx_dlf_basket', 'uid='.intval($basketData['uid']), $update);
@ -531,7 +531,7 @@ class tx_dlf_basket extends tx_dlf_plugin {
}
return array('basketData' => $basketData, 'jsOutput' => $output);
return array ('basketData' => $basketData, 'jsOutput' => $output);
}
@ -581,11 +581,11 @@ class tx_dlf_basket extends tx_dlf_plugin {
if (empty($items)) {
$update = array('doc_ids' => '');
$update = array ('doc_ids' => '');
} else {
$update = array('doc_ids' => json_encode($items));
$update = array ('doc_ids' => json_encode($items));
}
@ -639,7 +639,7 @@ class tx_dlf_basket extends tx_dlf_plugin {
public function getDocumentData($id, $data) {
// get document instance to load further information
$document = tx_dlf_document::getInstance($id,0);
$document = tx_dlf_document::getInstance($id, 0);
if ($document) {
@ -714,7 +714,7 @@ class tx_dlf_basket extends tx_dlf_plugin {
}
return array(
return array (
'downloadUrl' => $downloadUrl,
'downloadLink' => $downloadLink,
'pageNums' => $pageNums,
@ -800,7 +800,7 @@ class tx_dlf_basket extends tx_dlf_plugin {
->setFrom($from)
// Set the To addresses with an associative array
->setTo(array($mailData['mail'] => $mailData['name']))
->setTo(array ($mailData['mail'] => $mailData['name']))
->setBody($body, 'text/html')
@ -808,7 +808,7 @@ class tx_dlf_basket extends tx_dlf_plugin {
;
// protocol
$insertArray = array(
$insertArray = array (
'pid' => $this->conf['pages'],
'file_name' => $pdfUrl,
'count_pages' => $numberOfPages,
@ -908,7 +908,7 @@ class tx_dlf_basket extends tx_dlf_plugin {
}
// protocol
$insertArray = array(
$insertArray = array (
'pid' => $this->conf['pages'],
'file_name' => $pdfUrl,
'count_pages' => $numberOfPages,

8
plugins/listview/class.tx_dlf_listview.php

@ -193,7 +193,7 @@ class tx_dlf_listview extends tx_dlf_plugin {
'page' => $this->list[$number]['page']
);
if(!empty($this->piVars['logicalPage'])) {
if (!empty($this->piVars['logicalPage'])) {
$additionalParams['logicalPage'] = $this->piVars['logicalPage'];
@ -318,9 +318,9 @@ class tx_dlf_listview extends tx_dlf_plugin {
'forceAbsoluteUrl' => 1
);
if(!empty($this->piVars['logicalPage'])) {
if (!empty($this->piVars['logicalPage'])) {
$linkConf['additionalParams'] = \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId,array('logicalPage' => $this->piVars['logicalPage']), '', TRUE, FALSE);
$linkConf['additionalParams'] = \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, array ('logicalPage' => $this->piVars['logicalPage']), '', TRUE, FALSE);
}
@ -437,7 +437,7 @@ class tx_dlf_listview extends tx_dlf_plugin {
'highlight_word' => preg_replace('/\s\s+/', ';', $this->list->metadata['searchString'])
);
if(!empty($this->piVars['logicalPage'])) {
if (!empty($this->piVars['logicalPage'])) {
$additionalParams['logicalPage'] = $this->piVars['logicalPage'];

8
plugins/navigation/class.tx_dlf_navigation.php

@ -139,9 +139,9 @@ class tx_dlf_navigation extends tx_dlf_plugin {
// Set default values if not set.
// $this->piVars['page'] may be integer or string (physical structure @ID)
if ( (int)$this->piVars['page'] > 0 || empty($this->piVars['page'])) {
if ((int) $this->piVars['page'] > 0 || empty($this->piVars['page'])) {
$this->piVars['page'] = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange((int)$this->piVars['page'], 1, $this->doc->numPages, 1);
$this->piVars['page'] = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange((int) $this->piVars['page'], 1, $this->doc->numPages, 1);
} else {
@ -279,11 +279,11 @@ class tx_dlf_navigation extends tx_dlf_plugin {
$markerArray['###LINKLISTVIEW###'] = $this->getLinkToListview();
// fill some language labels if available
$markerArray['###ZOOM_IN###'] = $this->pi_getLL('zoom-in', '', TRUE);
$markerArray['###ZOOM_IN###'] = $this->pi_getLL('zoom-in', '', TRUE);
$markerArray['###ZOOM_OUT###'] = $this->pi_getLL('zoom-out', '', TRUE);
$markerArray['###ZOOM_FULLSCREEN###'] = $this->pi_getLL('zoom-fullscreen', '', TRUE);
$markerArray['###ROTATE_LEFT###'] = $this->pi_getLL('rotate-left', '', TRUE);
$markerArray['###ROTATE_LEFT###'] = $this->pi_getLL('rotate-left', '', TRUE);
$markerArray['###ROTATE_RIGHT###'] = $this->pi_getLL('rotate-right', '', TRUE);
$markerArray['###ROTATE_RESET###'] = $this->pi_getLL('rotate-reset', '', TRUE);

32
plugins/newspaper/class.tx_dlf_newspaper.php

@ -130,22 +130,22 @@ class tx_dlf_newspaper extends tx_dlf_plugin {
'###DAYFRI_NAME###' => strftime('%a', strtotime('last Friday')),
'###DAYSAT_NAME###' => strftime('%a', strtotime('last Saturday')),
'###DAYSUN_NAME###' => strftime('%a', strtotime('last Sunday')),
'###MONTHNAME###' => strftime('%B', strtotime($year . '-' . ($i + 1) . '-1'))
'###MONTHNAME###' => strftime('%B', strtotime($year.'-'.($i + 1).'-1'))
);
// Reset week content of new month.
$subWeekPartContent = '';
$firstOfMonth = strtotime($year . '-' . ($i + 1) . '-1');
$firstOfMonth = strtotime($year.'-'.($i + 1).'-1');
$lastOfMonth = strtotime('last day of', ($firstOfMonth));
$firstOfMonthStart = strtotime('last Monday', $firstOfMonth);
// There are never more than 6 weeks in a month.
for ($j = 0; $j <= 5; $j++) {
$firstDayOfWeek = strtotime('+ ' . $j . ' Week', $firstOfMonthStart);
$firstDayOfWeek = strtotime('+ '.$j.' Week', $firstOfMonthStart);
$weekArray = array(
$weekArray = array (
'###DAYMON###' => '&nbsp;',
'###DAYTUE###' => '&nbsp;',
'###DAYWED###' => '&nbsp;',
@ -185,7 +185,7 @@ class tx_dlf_newspaper extends tx_dlf_plugin {
$linkConf = array (
'useCacheHash' => 1,
'parameter' => $this->conf['targetPid'],
'additionalParams' => '&' . $this->prefixId . '[id]=' . urlencode($issue['uid']),
'additionalParams' => '&'.$this->prefixId.'[id]='.urlencode($issue['uid']),
'ATagParams' => ' class="title"',
);
@ -212,7 +212,7 @@ class tx_dlf_newspaper extends tx_dlf_plugin {
}
$dayLinkDiv = '<div class="issues"><h4>' . strftime('%d', $currentDayTime) . '</h4><div>'.$dayLinksList.'</div></div>';
$dayLinkDiv = '<div class="issues"><h4>'.strftime('%d', $currentDayTime).'</h4><div>'.$dayLinksList.'</div></div>';
}
switch (strftime('%w', strtotime('+ '.$k.' Day', $firstDayOfWeek))) {
@ -260,22 +260,22 @@ class tx_dlf_newspaper extends tx_dlf_plugin {
$linkConf = array (
'useCacheHash' => 1,
'parameter' => $this->conf['targetPid'],
'additionalParams' => '&' . $this->prefixId . '[id]=' . urlencode($this->doc->parentId),
'additionalParams' => '&'.$this->prefixId.'[id]='.urlencode($this->doc->parentId),
);
$allYearsLink = $this->cObj->typoLink($this->pi_getLL('allYears', '', TRUE) . ' ' . $this->doc->getTitle($this->doc->parentId), $linkConf);
$allYearsLink = $this->cObj->typoLink($this->pi_getLL('allYears', '', TRUE).' '.$this->doc->getTitle($this->doc->parentId), $linkConf);
// Link to current year.
$linkConf = array (
'useCacheHash' => 1,
'parameter' => $this->conf['targetPid'],
'additionalParams' => '&' . $this->prefixId . '[id]=' . urlencode($this->doc->uid),
'additionalParams' => '&'.$this->prefixId.'[id]='.urlencode($this->doc->uid),
);
$yearLink = $this->cObj->typoLink($year, $linkConf);
// Prepare list as alternative of the calendar view.
foreach($allIssues as $dayTime => $issues) {
foreach ($allIssues as $dayTime => $issues) {
$markerArrayDay['###DATE_STRING###'] = strftime('%A, %x', $dayTime);
@ -385,14 +385,14 @@ class tx_dlf_newspaper extends tx_dlf_plugin {
foreach ($years as $id => $year) {
$linkConf = array(
$linkConf = array (
'useCacheHash' => 1,
'parameter' => $this->conf['targetPid'],
'additionalParams' => '&' . $this->prefixId . '[id]=' . urlencode($year['uid']),
'title' => $titleAnchor . ': ' . $year['title']
'additionalParams' => '&'.$this->prefixId.'[id]='.urlencode($year['uid']),
'title' => $titleAnchor.': '.$year['title']
);
$yearArray = array(
$yearArray = array (
'###YEARNAME###' => $this->cObj->typoLink($year['title'], $linkConf),
);
@ -405,9 +405,9 @@ class tx_dlf_newspaper extends tx_dlf_plugin {
$linkConf = array (
'useCacheHash' => 1,
'parameter' => $this->conf['targetPid'],
'additionalParams' => '&' . $this->prefixId . '[id]=' . $this->doc->uid,
'additionalParams' => '&'.$this->prefixId.'[id]='.$this->doc->uid,
);
$allYearsLink = $this->cObj->typoLink($this->pi_getLL('allYears', '', TRUE) . ' ' .$this->doc->getTitle($this->doc->uid), $linkConf);
$allYearsLink = $this->cObj->typoLink($this->pi_getLL('allYears', '', TRUE).' '.$this->doc->getTitle($this->doc->uid), $linkConf);
// Fill markers.
$markerArray = array (

6
plugins/oai/class.tx_dlf_oai.php

@ -955,7 +955,7 @@ class tx_dlf_oai extends tx_dlf_plugin {
$result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
'tx_dlf_documents.tstamp AS tstamp',
'tx_dlf_documents',
'tx_dlf_documents.pid=' . intval($this->conf['pages']),
'tx_dlf_documents.pid='.intval($this->conf['pages']),
'',
'tx_dlf_documents.tstamp ASC',
'1'
@ -970,8 +970,8 @@ class tx_dlf_oai extends tx_dlf_plugin {
if (TYPO3_DLOG) {
\TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_oai->verbIdentify()] No records found with PID "' .
$this->conf['pages'] . '"', $this->extKey, SYSLOG_SEVERITY_NOTICE);
\TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_oai->verbIdentify()] No records found with PID "'.
$this->conf['pages'].'"', $this->extKey, SYSLOG_SEVERITY_NOTICE);
}

4
plugins/pagegrid/class.tx_dlf_pagegrid.php

@ -233,9 +233,9 @@ class tx_dlf_pagegrid extends tx_dlf_plugin {
// Set some variable defaults.
// $this->piVars['page'] may be integer or string (physical structure @ID)
if ( (int)$this->piVars['page'] > 0 || empty($this->piVars['page'])) {
if ((int) $this->piVars['page'] > 0 || empty($this->piVars['page'])) {
$this->piVars['page'] = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange((int)$this->piVars['page'], 1, $this->doc->numPages, 1);
$this->piVars['page'] = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange((int) $this->piVars['page'], 1, $this->doc->numPages, 1);
} else {

4
plugins/pageview/class.tx_dlf_geturl_eid.php

@ -63,11 +63,11 @@ class tx_dlf_geturl_eid extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin {
}
// add some self calculated header tags
header('Last-Modified: ' . gmdate( "D, d M Y H:i:s" ) . 'GMT');
header('Last-Modified: '.gmdate("D, d M Y H:i:s").'GMT');
header('Cache-Control: max-age=3600, must-revalidate');
header('Content-Length: '.strlen($fetchedData));
$fi = finfo_open(FILEINFO_MIME);
header('Content-Type: ' . finfo_buffer($fi, $fetchedData));
header('Content-Type: '.finfo_buffer($fi, $fetchedData));
// take some tags from request header and overwrite in case already set
$fetchedHeader = explode("\n", GeneralUtility::getUrl($url, 2));

26
plugins/search/class.tx_dlf_search.php

@ -302,13 +302,13 @@ class tx_dlf_search extends tx_dlf_plugin {
// Check for plugin configuration.
if (!empty($this->conf['fulltext'])) {
$output .= ' <input class="tx-dlf-search-fulltext" id="tx-dlf-search-fulltext-no" type="radio" name="' . $this->prefixId . '[fulltext]" value="0" ' . ($isFulltextSearch == 0 ? 'checked="checked"' : '') .' />';
$output .= ' <input class="tx-dlf-search-fulltext" id="tx-dlf-search-fulltext-no" type="radio" name="'.$this->prefixId.'[fulltext]" value="0" '.($isFulltextSearch == 0 ? 'checked="checked"' : '').' />';
$output .= ' <label for="tx-dlf-search-fulltext-no">' . $this->pi_getLL('label.inMetadata', '') . '</label>';
$output .= ' <label for="tx-dlf-search-fulltext-no">'.$this->pi_getLL('label.inMetadata', '').'</label>';
$output .= ' <input class="tx-dlf-search-fulltext" id="tx-dlf-search-fulltext-yes" type="radio" name="' . $this->prefixId . '[fulltext]" value="1" ' . ($isFulltextSearch == 1 ? 'checked="checked"' : '') .'/>';
$output .= ' <input class="tx-dlf-search-fulltext" id="tx-dlf-search-fulltext-yes" type="radio" name="'.$this->prefixId.'[fulltext]" value="1" '.($isFulltextSearch == 1 ? 'checked="checked"' : '').'/>';
$output .= ' <label for="tx-dlf-search-fulltext-yes">' . $this->pi_getLL('label.inFulltext', '') . '</label>';
$output .= ' <label for="tx-dlf-search-fulltext-yes">'.$this->pi_getLL('label.inFulltext', '').'</label>';
}
@ -330,9 +330,9 @@ class tx_dlf_search extends tx_dlf_plugin {
// Check for plugin configuration.
if (!empty($this->conf['showLogicalPageField'])) {
$output .= ' <label for="tx-dlf-search-logical-page">' . $this->pi_getLL('label.logicalPage', '') . ': </label>';
$output .= ' <label for="tx-dlf-search-logical-page">'.$this->pi_getLL('label.logicalPage', '').': </label>';
$output .= ' <input class="tx-dlf-search-logical-page" id="tx-dlf-search-logical-page" type="text" name="' . $this->prefixId . '[logicalPage]" />';
$output .= ' <input class="tx-dlf-search-logical-page" id="tx-dlf-search-logical-page" type="text" name="'.$this->prefixId.'[logicalPage]" />';
}
@ -353,7 +353,7 @@ class tx_dlf_search extends tx_dlf_plugin {
*/
protected function getFacetsMenuEntry($field, $value, $count, $search, &$state) {
$entryArray = array();
$entryArray = array ();
// Translate value.
if ($field == 'owner_faceting') {
@ -553,7 +553,7 @@ class tx_dlf_search extends tx_dlf_plugin {
if ((!empty($this->conf['fulltext']) && !empty($this->piVars['fulltext'])) || preg_match('/fulltext:\((.*)\)/', $this->piVars['query'], $matches)) {
// If the query already is a fulltext query e.g using the facets
$this->piVars['query'] = empty($matches[1])?$this->piVars['query']:$matches[1];
$this->piVars['query'] = empty($matches[1]) ? $this->piVars['query'] : $matches[1];
// Search in fulltext field if applicable. query must not be empty!
if (!empty($this->piVars['query'])) {
@ -576,7 +576,7 @@ class tx_dlf_search extends tx_dlf_plugin {
// Add extended search query.
if (!empty($this->piVars['extQuery']) && is_array($this->piVars['extQuery'])) {
$allowedOperators = array('AND', 'OR', 'NOT');
$allowedOperators = array ('AND', 'OR', 'NOT');
$allowedFields = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->conf['extendedFields'], TRUE);
@ -679,22 +679,22 @@ class tx_dlf_search extends tx_dlf_plugin {
// Clean output buffer.
\TYPO3\CMS\Core\Utility\GeneralUtility::cleanOutputBuffers();
$additionalParams = array();
$additionalParams = array ();
if(!empty($this->piVars['logicalPage'])) {
if (!empty($this->piVars['logicalPage'])) {
$additionalParams['logicalPage'] = $this->piVars['logicalPage'];
}
// Jump directly to the page view, if there is only one result and it is configured
if($results->count() == 1 && !empty($this->conf['showSingleResult'])) {
if ($results->count() == 1 && !empty($this->conf['showSingleResult'])) {
$linkConf['parameter'] = $this->conf['targetPidPageView'];
$additionalParams['id'] = $results->current()['uid'];
$additionalParams['highlight_word'] = preg_replace('/\s\s+/', ';', $results->metadata['searchString']);
$additionalParams['page'] = count($results[0]['subparts']) == 1?$results[0]['subparts'][0]['page']:1;
$additionalParams['page'] = count($results[0]['subparts']) == 1 ? $results[0]['subparts'][0]['page'] : 1;
} else {

4
plugins/toc/class.tx_dlf_toc.php

@ -230,9 +230,9 @@ class tx_dlf_toc extends tx_dlf_plugin {
// Set default values for page if not set.
// $this->piVars['page'] may be integer or string (physical structure @ID)
if ( (int)$this->piVars['page'] > 0 || empty($this->piVars['page'])) {
if ((int) $this->piVars['page'] > 0 || empty($this->piVars['page'])) {
$this->piVars['page'] = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange((int)$this->piVars['page'], 1, $this->doc->numPages, 1);
$this->piVars['page'] = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange((int) $this->piVars['page'], 1, $this->doc->numPages, 1);
} else {

4
plugins/toolbox/tools/fulltext/class.tx_dlf_toolsFulltext.php

@ -59,7 +59,7 @@ class tx_dlf_toolsFulltext extends tx_dlf_plugin {
// Set default values if not set.
// $this->piVars['page'] may be integer or string (physical structure @ID)
if ( (int)$this->piVars['page'] > 0 || empty($this->piVars['page'])) {
if ((int) $this->piVars['page'] > 0 || empty($this->piVars['page'])) {
$this->piVars['page'] = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange((int) $this->piVars['page'], 1, $this->doc->numPages, 1);
@ -92,7 +92,7 @@ class tx_dlf_toolsFulltext extends tx_dlf_plugin {
.$this->pi_getLL('fulltext-on', '', TRUE).';fulltext-off:'
.$this->pi_getLL('fulltext-off', '', TRUE).'">&nbsp;</a>';
} else {
$markerArray['###FULLTEXT_SELECT###'] = '<span class="no-fulltext">' . $this->pi_getLL('fulltext-not-available', '', TRUE) . '</span>';
$markerArray['###FULLTEXT_SELECT###'] = '<span class="no-fulltext">'.$this->pi_getLL('fulltext-not-available', '', TRUE).'</span>';
}
$content .= $this->cObj->substituteMarkerArray($this->template, $markerArray);

10
plugins/toolbox/tools/imagedownload/class.tx_dlf_toolsImagedownload.php

@ -58,9 +58,9 @@ class tx_dlf_toolsImagedownload extends tx_dlf_plugin {
// Set default values if not set.
// $this->piVars['page'] may be integer or string (physical structure @ID)
if ( (int)$this->piVars['page'] > 0 || empty($this->piVars['page'])) {
if ((int) $this->piVars['page'] > 0 || empty($this->piVars['page'])) {
$this->piVars['page'] = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange((int)$this->piVars['page'], 1, $this->doc->numPages, 1);
$this->piVars['page'] = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange((int) $this->piVars['page'], 1, $this->doc->numPages, 1);
} else {
@ -84,7 +84,7 @@ class tx_dlf_toolsImagedownload extends tx_dlf_plugin {
}
// Get left or single page download.
$markerArray['###IMAGE_LEFT###'] = $this->piVars['double'] == 1 ? $this->getImage($this->piVars['page'], $this->pi_getLL('leftPage', '')) : $this->getImage($this->piVars['page'], $this->pi_getLL('singlePage', ''));
$markerArray['###IMAGE_LEFT###'] = $this->piVars['double'] == 1 ? $this->getImage($this->piVars['page'], $this->pi_getLL('leftPage', '')) : $this->getImage($this->piVars['page'], $this->pi_getLL('singlePage', ''));
// Get right page download.
$markerArray['###IMAGE_RIGHT###'] = $this->piVars['double'] == 1 ? $this->getImage($this->piVars['page'] + 1, $this->pi_getLL('rightPage', '')) : '';
@ -131,11 +131,11 @@ class tx_dlf_toolsImagedownload extends tx_dlf_plugin {
}
$linkConf = array (
'parameter' => $image['url'],
'title' => $label . ' ' . $mimetypeLabel,
'title' => $label.' '.$mimetypeLabel,
'additionalParams' => '',
);
$imageLink = $this->cObj->typoLink($label . ' ' . $mimetypeLabel, $linkConf);
$imageLink = $this->cObj->typoLink($label.' '.$mimetypeLabel, $linkConf);
break;

18
plugins/toolbox/tools/pdf/class.tx_dlf_toolsPdf.php

@ -59,9 +59,9 @@ class tx_dlf_toolsPdf extends tx_dlf_plugin {
// Set default values if not set.
// $this->piVars['page'] may be integer or string (physical structure @ID)
if ( (int)$this->piVars['page'] > 0 || empty($this->piVars['page'])) {
if ((int) $this->piVars['page'] > 0 || empty($this->piVars['page'])) {
$this->piVars['page'] = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange((int)$this->piVars['page'], 1, $this->doc->numPages, 1);
$this->piVars['page'] = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange((int) $this->piVars['page'], 1, $this->doc->numPages, 1);
} else {
@ -126,9 +126,9 @@ class tx_dlf_toolsPdf extends tx_dlf_plugin {
}
if (TYPO3_DLOG && empty($page1Link) && empty($page2Link)) {
\TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_toolsPdf->getPageLink()] ' .
'File not found in fileGrp "' .
$this->conf['fileGrpDownload'] . '"',
\TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_toolsPdf->getPageLink()] '.
'File not found in fileGrp "'.
$this->conf['fileGrpDownload'].'"',
$this->extKey,
SYSLOG_SEVERITY_WARNING);
}
@ -137,18 +137,18 @@ class tx_dlf_toolsPdf extends tx_dlf_plugin {
if (!empty($page1Link)) {
if ($this->piVars['double']) {
$page1Link = $this->cObj->typoLink($this->pi_getLL('leftPage', ''),
array('parameter' => $page1Link, 'title' => $this->pi_getLL('leftPage', '')));
array ('parameter' => $page1Link, 'title' => $this->pi_getLL('leftPage', '')));
} else {
$page1Link = $this->cObj->typoLink($this->pi_getLL('singlePage', ''),
array('parameter' => $page1Link, 'title' => $this->pi_getLL('singlePage', '')));
array ('parameter' => $page1Link, 'title' => $this->pi_getLL('singlePage', '')));
}
}
if (!empty($page2Link)) {
$page2Link = $this->cObj->typoLink($this->pi_getLL('rightPage', ''),
array('parameter' => $page2Link, 'title' => $this->pi_getLL('rightPage', '')));
array ('parameter' => $page2Link, 'title' => $this->pi_getLL('rightPage', '')));
}
return $page1Link . $page2Link;
return $page1Link.$page2Link;
}
/**

Loading…
Cancel
Save