We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | */ |
| 109 | 109 | protected function getImage($page, $label) { |
| 110 | 110 | |
| 111 | - $image = array (); |
|
| 111 | + $image = array(); |
|
| 112 | 112 | |
| 113 | 113 | // Get @USE value of METS fileGrp. |
| 114 | 114 | $fileGrps = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->conf['fileGrpsImageDownload']); |
@@ -129,13 +129,13 @@ discard block |
||
| 129 | 129 | break; |
| 130 | 130 | default: $mimetypeLabel = ''; |
| 131 | 131 | } |
| 132 | - $linkConf = array ( |
|
| 132 | + $linkConf = array( |
|
| 133 | 133 | 'parameter' => $image['url'], |
| 134 | - 'title' => $label.' '.$mimetypeLabel, |
|
| 134 | + 'title' => $label . ' ' . $mimetypeLabel, |
|
| 135 | 135 | 'additionalParams' => '', |
| 136 | 136 | ); |
| 137 | 137 | |
| 138 | - $imageLink = $this->cObj->typoLink($label.' '.$mimetypeLabel, $linkConf); |
|
| 138 | + $imageLink = $this->cObj->typoLink($label . ' ' . $mimetypeLabel, $linkConf); |
|
| 139 | 139 | |
| 140 | 140 | break; |
| 141 | 141 | |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | |
| 144 | 144 | if (TYPO3_DLOG) { |
| 145 | 145 | |
| 146 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_toolsImagedownload->getImage('.$page.')] File not found in fileGrp "'.$fileGrp.'"', $this->extKey, SYSLOG_SEVERITY_WARNING); |
|
| 146 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_toolsImagedownload->getImage(' . $page . ')] File not found in fileGrp "' . $fileGrp . '"', $this->extKey, SYSLOG_SEVERITY_WARNING); |
|
| 147 | 147 | |
| 148 | 148 | } |
| 149 | 149 | |
@@ -53,15 +53,15 @@ |
||
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | $markerArray['###IMAGEMANIPULATION_SELECT###'] = '<span class="tx-dlf-tools-imagetools" id="tx-dlf-tools-imagetools" data-dic="imagemanipulation-on:' |
| 56 | - .$this->pi_getLL('imagemanipulation-on', '', TRUE).';imagemanipulation-off:' |
|
| 57 | - .$this->pi_getLL('imagemanipulation-off', '', TRUE).';reset:' |
|
| 58 | - .$this->pi_getLL('reset', '', TRUE).';saturation:' |
|
| 59 | - .$this->pi_getLL('saturation', '', TRUE).';hue:' |
|
| 60 | - .$this->pi_getLL('hue', '', TRUE).';contrast:' |
|
| 61 | - .$this->pi_getLL('contrast', '', TRUE).';brightness:' |
|
| 62 | - .$this->pi_getLL('brightness', '', TRUE).';invert:' |
|
| 63 | - .$this->pi_getLL('invert', '', TRUE).'" title="' |
|
| 64 | - .$this->pi_getLL('no-support', '', TRUE).'"></span>'; |
|
| 56 | + .$this->pi_getLL('imagemanipulation-on', '', TRUE) . ';imagemanipulation-off:' |
|
| 57 | + .$this->pi_getLL('imagemanipulation-off', '', TRUE) . ';reset:' |
|
| 58 | + .$this->pi_getLL('reset', '', TRUE) . ';saturation:' |
|
| 59 | + .$this->pi_getLL('saturation', '', TRUE) . ';hue:' |
|
| 60 | + .$this->pi_getLL('hue', '', TRUE) . ';contrast:' |
|
| 61 | + .$this->pi_getLL('contrast', '', TRUE) . ';brightness:' |
|
| 62 | + .$this->pi_getLL('brightness', '', TRUE) . ';invert:' |
|
| 63 | + .$this->pi_getLL('invert', '', TRUE) . '" title="' |
|
| 64 | + .$this->pi_getLL('no-support', '', TRUE) . '"></span>'; |
|
| 65 | 65 | |
| 66 | 66 | $content .= $this->cObj->substituteMarkerArray($this->template, $markerArray); |
| 67 | 67 | |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | // Build data array. |
| 57 | - $data = array ( |
|
| 57 | + $data = array( |
|
| 58 | 58 | 'conf' => $this->conf, |
| 59 | 59 | 'piVars' => $this->piVars, |
| 60 | 60 | ); |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | |
| 74 | 74 | $cObj->data = $data; |
| 75 | 75 | |
| 76 | - $content .= $this->cObj->substituteMarkerArray($subpart, array ('###TOOL###' => $cObj->cObjGetSingle($GLOBALS['TSFE']->tmpl->setup['plugin.'][$tool], $GLOBALS['TSFE']->tmpl->setup['plugin.'][$tool.'.']))); |
|
| 76 | + $content .= $this->cObj->substituteMarkerArray($subpart, array('###TOOL###' => $cObj->cObjGetSingle($GLOBALS['TSFE']->tmpl->setup['plugin.'][$tool], $GLOBALS['TSFE']->tmpl->setup['plugin.'][$tool . '.']))); |
|
| 77 | 77 | |
| 78 | 78 | } |
| 79 | 79 | |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | * @var array |
| 29 | 29 | * @access protected |
| 30 | 30 | */ |
| 31 | - protected $hookObjects = array (); |
|
| 31 | + protected $hookObjects = array(); |
|
| 32 | 32 | |
| 33 | 33 | /** |
| 34 | 34 | * The main method of the PlugIn |
@@ -66,18 +66,18 @@ discard block |
||
| 66 | 66 | |
| 67 | 67 | } |
| 68 | 68 | |
| 69 | - $metadata = array (); |
|
| 69 | + $metadata = array(); |
|
| 70 | 70 | |
| 71 | 71 | if ($this->conf['rootline'] < 2) { |
| 72 | 72 | |
| 73 | 73 | // Get current structure's @ID. |
| 74 | - $ids = array (); |
|
| 74 | + $ids = array(); |
|
| 75 | 75 | |
| 76 | 76 | if (!empty($this->doc->physicalStructure[$this->piVars['page']]) && !empty($this->doc->smLinks['p2l'][$this->doc->physicalStructure[$this->piVars['page']]])) { |
| 77 | 77 | |
| 78 | 78 | foreach ($this->doc->smLinks['p2l'][$this->doc->physicalStructure[$this->piVars['page']]] as $logId) { |
| 79 | 79 | |
| 80 | - $count = count($this->doc->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="'.$logId.'"]/ancestor::*')); |
|
| 80 | + $count = count($this->doc->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="' . $logId . '"]/ancestor::*')); |
|
| 81 | 81 | |
| 82 | 82 | $ids[$count][] = $logId; |
| 83 | 83 | |
@@ -151,7 +151,7 @@ discard block |
||
| 151 | 151 | |
| 152 | 152 | if (TYPO3_DLOG) { |
| 153 | 153 | |
| 154 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_metadata->main('.$content.', [data])] No metadata found for document with UID "'.$this->doc->uid.'"', $this->extKey, SYSLOG_SEVERITY_WARNING, $conf); |
|
| 154 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_metadata->main(' . $content . ', [data])] No metadata found for document with UID "' . $this->doc->uid . '"', $this->extKey, SYSLOG_SEVERITY_WARNING, $conf); |
|
| 155 | 155 | |
| 156 | 156 | } |
| 157 | 157 | |
@@ -208,12 +208,12 @@ discard block |
||
| 208 | 208 | $subpart['block'] = $this->cObj->getSubpart($this->template, '###BLOCK###'); |
| 209 | 209 | |
| 210 | 210 | // Get list of metadata to show. |
| 211 | - $metaList = array (); |
|
| 211 | + $metaList = array(); |
|
| 212 | 212 | |
| 213 | 213 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
| 214 | 214 | 'tx_dlf_metadata.index_name AS index_name,tx_dlf_metadata.is_listed AS is_listed,tx_dlf_metadata.wrap AS wrap', |
| 215 | 215 | 'tx_dlf_metadata', |
| 216 | - 'tx_dlf_metadata.pid='.intval($this->conf['pages']).tx_dlf_helper::whereClause('tx_dlf_metadata').' AND (sys_language_uid IN (-1,0) OR (sys_language_uid = '.$GLOBALS['TSFE']->sys_language_uid.' AND l18n_parent = 0))', |
|
| 216 | + 'tx_dlf_metadata.pid=' . intval($this->conf['pages']) . tx_dlf_helper::whereClause('tx_dlf_metadata') . ' AND (sys_language_uid IN (-1,0) OR (sys_language_uid = ' . $GLOBALS['TSFE']->sys_language_uid . ' AND l18n_parent = 0))', |
|
| 217 | 217 | '', |
| 218 | 218 | 'tx_dlf_metadata.sorting', |
| 219 | 219 | '' |
@@ -234,7 +234,7 @@ discard block |
||
| 234 | 234 | // do stuff with the row entry data like built HTML or prepare further usage |
| 235 | 235 | if ($this->conf['showFull'] || $resArray['is_listed']) { |
| 236 | 236 | |
| 237 | - $metaList[$resArray['index_name']] = array ( |
|
| 237 | + $metaList[$resArray['index_name']] = array( |
|
| 238 | 238 | 'wrap' => $resArray['wrap'], |
| 239 | 239 | 'label' => tx_dlf_helper::translate($resArray['index_name'], 'tx_dlf_metadata', $this->conf['pages']) |
| 240 | 240 | ); |
@@ -246,12 +246,12 @@ discard block |
||
| 246 | 246 | } |
| 247 | 247 | |
| 248 | 248 | // Get list of collections to show. |
| 249 | - $collList = array (); |
|
| 249 | + $collList = array(); |
|
| 250 | 250 | |
| 251 | 251 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
| 252 | 252 | 'tx_dlf_collections.index_name AS index_name', |
| 253 | 253 | 'tx_dlf_collections', |
| 254 | - 'tx_dlf_collections.pid='.intval($this->conf['pages']).tx_dlf_helper::whereClause('tx_dlf_collections'), |
|
| 254 | + 'tx_dlf_collections.pid=' . intval($this->conf['pages']) . tx_dlf_helper::whereClause('tx_dlf_collections'), |
|
| 255 | 255 | '', |
| 256 | 256 | '', |
| 257 | 257 | '' |
@@ -309,7 +309,7 @@ discard block |
||
| 309 | 309 | |
| 310 | 310 | if (!empty($superiorTitle)) { |
| 311 | 311 | |
| 312 | - $value = '['.$superiorTitle.']'; |
|
| 312 | + $value = '[' . $superiorTitle . ']'; |
|
| 313 | 313 | |
| 314 | 314 | } |
| 315 | 315 | |
@@ -324,7 +324,7 @@ discard block |
||
| 324 | 324 | |
| 325 | 325 | $details = $this->doc->getLogicalStructure($metadata['_id']); |
| 326 | 326 | |
| 327 | - $value = $this->pi_linkTP($value, array ($this->prefixId => array ('id' => $this->doc->uid, 'page' => (!empty($details['points']) ? intval($details['points']) : 1))), TRUE, $this->conf['targetPid']); |
|
| 327 | + $value = $this->pi_linkTP($value, array($this->prefixId => array('id' => $this->doc->uid, 'page' => (!empty($details['points']) ? intval($details['points']) : 1))), TRUE, $this->conf['targetPid']); |
|
| 328 | 328 | |
| 329 | 329 | } |
| 330 | 330 | |
@@ -62,11 +62,11 @@ discard block |
||
| 62 | 62 | |
| 63 | 63 | } else { |
| 64 | 64 | |
| 65 | - $thumbnailFile = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'plugins/pagegrid/placeholder.jpg'; |
|
| 65 | + $thumbnailFile = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey) . 'plugins/pagegrid/placeholder.jpg'; |
|
| 66 | 66 | |
| 67 | 67 | } |
| 68 | 68 | |
| 69 | - $thumbnail = '<img alt="'.$markerArray['###PAGINATION###'].'" src="'.$thumbnailFile.'" />'; |
|
| 69 | + $thumbnail = '<img alt="' . $markerArray['###PAGINATION###'] . '" src="' . $thumbnailFile . '" />'; |
|
| 70 | 70 | |
| 71 | 71 | // Get new plugin variables for typolink. |
| 72 | 72 | $piVars = $this->piVars; |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | |
| 78 | 78 | $piVars['page'] = $number; |
| 79 | 79 | |
| 80 | - $linkConf = array ( |
|
| 80 | + $linkConf = array( |
|
| 81 | 81 | 'useCacheHash' => 1, |
| 82 | 82 | 'parameter' => $this->conf['targetPid'], |
| 83 | 83 | 'additionalParams' => \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, $piVars, '', TRUE, FALSE), |
@@ -115,11 +115,11 @@ discard block |
||
| 115 | 115 | // Add link to previous page. |
| 116 | 116 | if ($this->piVars['pointer'] > 0) { |
| 117 | 117 | |
| 118 | - $output = $this->pi_linkTP_keepPIvars($this->pi_getLL('prevPage', '<', TRUE), array ('pointer' => $this->piVars['pointer'] - 1, 'page' => (($this->piVars['pointer'] - 1) * $this->conf['limit']) + 1), TRUE).$separator; |
|
| 118 | + $output = $this->pi_linkTP_keepPIvars($this->pi_getLL('prevPage', '<', TRUE), array('pointer' => $this->piVars['pointer'] - 1, 'page' => (($this->piVars['pointer'] - 1) * $this->conf['limit']) + 1), TRUE) . $separator; |
|
| 119 | 119 | |
| 120 | 120 | } else { |
| 121 | 121 | |
| 122 | - $output = $this->pi_getLL('prevPage', '<', TRUE).$separator; |
|
| 122 | + $output = $this->pi_getLL('prevPage', '<', TRUE) . $separator; |
|
| 123 | 123 | |
| 124 | 124 | } |
| 125 | 125 | |
@@ -132,11 +132,11 @@ discard block |
||
| 132 | 132 | |
| 133 | 133 | if ($this->piVars['pointer'] != $i) { |
| 134 | 134 | |
| 135 | - $output .= $this->pi_linkTP_keepPIvars(sprintf($this->pi_getLL('page', '%d', TRUE), $i + 1), array ('pointer' => $i, 'page' => ($i * $this->conf['limit']) + 1), TRUE).$separator; |
|
| 135 | + $output .= $this->pi_linkTP_keepPIvars(sprintf($this->pi_getLL('page', '%d', TRUE), $i + 1), array('pointer' => $i, 'page' => ($i * $this->conf['limit']) + 1), TRUE) . $separator; |
|
| 136 | 136 | |
| 137 | 137 | } else { |
| 138 | 138 | |
| 139 | - $output .= sprintf($this->pi_getLL('page', '%d', TRUE), $i + 1).$separator; |
|
| 139 | + $output .= sprintf($this->pi_getLL('page', '%d', TRUE), $i + 1) . $separator; |
|
| 140 | 140 | |
| 141 | 141 | } |
| 142 | 142 | |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | |
| 145 | 145 | } elseif ($skip == TRUE) { |
| 146 | 146 | |
| 147 | - $output .= $this->pi_getLL('skip', '...', TRUE).$separator; |
|
| 147 | + $output .= $this->pi_getLL('skip', '...', TRUE) . $separator; |
|
| 148 | 148 | |
| 149 | 149 | $skip = FALSE; |
| 150 | 150 | |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | // Add link to next page. |
| 158 | 158 | if ($this->piVars['pointer'] < $maxPages - 1) { |
| 159 | 159 | |
| 160 | - $output .= $this->pi_linkTP_keepPIvars($this->pi_getLL('nextPage', '>', TRUE), array ('pointer' => $this->piVars['pointer'] + 1, 'page' => ($this->piVars['pointer'] + 1) * $this->conf['limit'] + 1), TRUE); |
|
| 160 | + $output .= $this->pi_linkTP_keepPIvars($this->pi_getLL('nextPage', '>', TRUE), array('pointer' => $this->piVars['pointer'] + 1, 'page' => ($this->piVars['pointer'] + 1) * $this->conf['limit'] + 1), TRUE); |
|
| 161 | 161 | |
| 162 | 162 | } else { |
| 163 | 163 | |
@@ -214,7 +214,7 @@ discard block |
||
| 214 | 214 | |
| 215 | 215 | if (TYPO3_DLOG) { |
| 216 | 216 | |
| 217 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_pagegrid->main('.$content.', [data])] No template subpart for list entry found', $this->extKey, SYSLOG_SEVERITY_WARNING, $conf); |
|
| 217 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_pagegrid->main(' . $content . ', [data])] No template subpart for list entry found', $this->extKey, SYSLOG_SEVERITY_WARNING, $conf); |
|
| 218 | 218 | |
| 219 | 219 | } |
| 220 | 220 | |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | * @var array |
| 28 | 28 | * @access protected |
| 29 | 29 | */ |
| 30 | - protected $audio = array (); |
|
| 30 | + protected $audio = array(); |
|
| 31 | 31 | |
| 32 | 32 | /** |
| 33 | 33 | * Adds Player javascript |
@@ -38,13 +38,13 @@ discard block |
||
| 38 | 38 | */ |
| 39 | 39 | protected function addPlayerJS() { |
| 40 | 40 | |
| 41 | - $output = array (); |
|
| 41 | + $output = array(); |
|
| 42 | 42 | |
| 43 | - $output[] = '<link type="text/css" rel="stylesheet" href="'.\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'lib/jPlayer/blue.monday/css/jplayer.blue.monday.min.css">'; |
|
| 43 | + $output[] = '<link type="text/css" rel="stylesheet" href="' . \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey) . 'lib/jPlayer/blue.monday/css/jplayer.blue.monday.min.css">'; |
|
| 44 | 44 | |
| 45 | - $output[] = '<script type="text/javascript" src="'.\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'lib/jPlayer/jquery.jplayer.min.js"></script>'; |
|
| 45 | + $output[] = '<script type="text/javascript" src="' . \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey) . 'lib/jPlayer/jquery.jplayer.min.js"></script>'; |
|
| 46 | 46 | |
| 47 | - $output[] = '<script type="text/javascript" src="'.\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'plugins/audioplayer/js/tx_dlf_audioplayer.js"></script>'; |
|
| 47 | + $output[] = '<script type="text/javascript" src="' . \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey) . 'plugins/audioplayer/js/tx_dlf_audioplayer.js"></script>'; |
|
| 48 | 48 | |
| 49 | 49 | // Add player configuration. |
| 50 | 50 | $output[] = ' |
@@ -55,12 +55,12 @@ discard block |
||
| 55 | 55 | $(document).ready(function() { |
| 56 | 56 | tx_dlf_audioplayer = new dlfAudioPlayer({ |
| 57 | 57 | audio: { |
| 58 | - mimeType: "' . $this->audio['mimetype'].'", |
|
| 59 | - title: "' . $this->audio['label'].'", |
|
| 60 | - url: "' . $this->audio['url'].'" |
|
| 58 | + mimeType: "' . $this->audio['mimetype'] . '", |
|
| 59 | + title: "' . $this->audio['label'] . '", |
|
| 60 | + url: "' . $this->audio['url'] . '" |
|
| 61 | 61 | }, |
| 62 | 62 | parentElId: "tx-dlf-audio", |
| 63 | - swfPath: "'.\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'lib/jPlayer/jquery.jplayer.swf" |
|
| 63 | + swfPath: "'.\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey) . 'lib/jPlayer/jquery.jplayer.swf" |
|
| 64 | 64 | }); |
| 65 | 65 | }); |
| 66 | 66 | </script>'; |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | } |
| 139 | 139 | |
| 140 | 140 | // Fill in the template markers. |
| 141 | - $markerArray = array ( |
|
| 141 | + $markerArray = array( |
|
| 142 | 142 | '###PLAYER_JS###' => $this->addPlayerJS() |
| 143 | 143 | ); |
| 144 | 144 | |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | if (count($list) > 0) { |
| 39 | 39 | |
| 40 | 40 | // Build typolink configuration array. |
| 41 | - $conf = array ( |
|
| 41 | + $conf = array( |
|
| 42 | 42 | 'useCacheHash' => 1, |
| 43 | 43 | 'parameter' => $this->conf['targetPid'], |
| 44 | 44 | 'title' => $this->pi_getLL('linkToList', '', TRUE) |
@@ -64,31 +64,31 @@ discard block |
||
| 64 | 64 | protected function getPageSelector() { |
| 65 | 65 | |
| 66 | 66 | // Configure @action URL for form. |
| 67 | - $linkConf = array ( |
|
| 67 | + $linkConf = array( |
|
| 68 | 68 | 'parameter' => $GLOBALS['TSFE']->id |
| 69 | 69 | ); |
| 70 | 70 | |
| 71 | - $output = '<form action="'.$this->cObj->typoLink_URL($linkConf).'" method="get"><div><input type="hidden" name="id" value="'.$GLOBALS['TSFE']->id.'" />'; |
|
| 71 | + $output = '<form action="' . $this->cObj->typoLink_URL($linkConf) . '" method="get"><div><input type="hidden" name="id" value="' . $GLOBALS['TSFE']->id . '" />'; |
|
| 72 | 72 | |
| 73 | 73 | // Add plugin variables. |
| 74 | 74 | foreach ($this->piVars as $piVar => $value) { |
| 75 | 75 | |
| 76 | 76 | if ($piVar != 'page' && $piVars != 'DATA' && !empty($value)) { |
| 77 | 77 | |
| 78 | - $output .= '<input type="hidden" name="'.$this->prefixId.'['.$piVar.']" value="'.$value.'" />'; |
|
| 78 | + $output .= '<input type="hidden" name="' . $this->prefixId . '[' . $piVar . ']" value="' . $value . '" />'; |
|
| 79 | 79 | |
| 80 | 80 | } |
| 81 | 81 | |
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | // Add page selector. |
| 85 | - $uniqId = uniqid(str_replace('_', '-', get_class($this)).'-'); |
|
| 85 | + $uniqId = uniqid(str_replace('_', '-', get_class($this)) . '-'); |
|
| 86 | 86 | |
| 87 | - $output .= '<label for="'.$uniqId.'">'.$this->pi_getLL('selectPage', '', TRUE).'</label><select id="'.$uniqId.'" name="'.$this->prefixId.'[page]" onchange="javascript:this.form.submit();"'.($this->doc->numPages < 1 ? ' disabled="disabled"' : '').'>'; |
|
| 87 | + $output .= '<label for="' . $uniqId . '">' . $this->pi_getLL('selectPage', '', TRUE) . '</label><select id="' . $uniqId . '" name="' . $this->prefixId . '[page]" onchange="javascript:this.form.submit();"' . ($this->doc->numPages < 1 ? ' disabled="disabled"' : '') . '>'; |
|
| 88 | 88 | |
| 89 | 89 | for ($i = 1; $i <= $this->doc->numPages; $i++) { |
| 90 | 90 | |
| 91 | - $output .= '<option value="'.$i.'"'.($this->piVars['page'] == $i ? ' selected="selected"' : '').'>['.$i.']'.($this->doc->physicalStructureInfo[$this->doc->physicalStructure[$i]]['orderlabel'] ? ' - '.htmlspecialchars($this->doc->physicalStructureInfo[$this->doc->physicalStructure[$i]]['orderlabel']) : '').'</option>'; |
|
| 91 | + $output .= '<option value="' . $i . '"' . ($this->piVars['page'] == $i ? ' selected="selected"' : '') . '>[' . $i . ']' . ($this->doc->physicalStructureInfo[$this->doc->physicalStructure[$i]]['orderlabel'] ? ' - ' . htmlspecialchars($this->doc->physicalStructureInfo[$this->doc->physicalStructure[$i]]['orderlabel']) : '') . '</option>'; |
|
| 92 | 92 | |
| 93 | 93 | } |
| 94 | 94 | |
@@ -177,66 +177,66 @@ discard block |
||
| 177 | 177 | // Link to first page. |
| 178 | 178 | if ($this->piVars['page'] > 1) { |
| 179 | 179 | |
| 180 | - $markerArray['###FIRST###'] = $this->makeLink($this->pi_getLL('firstPage', '', TRUE), array ('page' => 1)); |
|
| 180 | + $markerArray['###FIRST###'] = $this->makeLink($this->pi_getLL('firstPage', '', TRUE), array('page' => 1)); |
|
| 181 | 181 | |
| 182 | 182 | } else { |
| 183 | 183 | |
| 184 | - $markerArray['###FIRST###'] = '<span>'.$this->pi_getLL('firstPage', '', TRUE).'</span>'; |
|
| 184 | + $markerArray['###FIRST###'] = '<span>' . $this->pi_getLL('firstPage', '', TRUE) . '</span>'; |
|
| 185 | 185 | |
| 186 | 186 | } |
| 187 | 187 | |
| 188 | 188 | // Link back X pages. |
| 189 | 189 | if ($this->piVars['page'] > $pageSteps) { |
| 190 | 190 | |
| 191 | - $markerArray['###BACK###'] = $this->makeLink(sprintf($this->pi_getLL('backXPages', '', TRUE), $pageSteps), array ('page' => $this->piVars['page'] - $pageSteps)); |
|
| 191 | + $markerArray['###BACK###'] = $this->makeLink(sprintf($this->pi_getLL('backXPages', '', TRUE), $pageSteps), array('page' => $this->piVars['page'] - $pageSteps)); |
|
| 192 | 192 | |
| 193 | 193 | } else { |
| 194 | 194 | |
| 195 | - $markerArray['###BACK###'] = '<span>'.sprintf($this->pi_getLL('backXPages', '', TRUE), $pageSteps).'</span>'; |
|
| 195 | + $markerArray['###BACK###'] = '<span>' . sprintf($this->pi_getLL('backXPages', '', TRUE), $pageSteps) . '</span>'; |
|
| 196 | 196 | |
| 197 | 197 | } |
| 198 | 198 | |
| 199 | 199 | // Link to previous page. |
| 200 | 200 | if ($this->piVars['page'] > (1 + $this->piVars['double'])) { |
| 201 | 201 | |
| 202 | - $markerArray['###PREVIOUS###'] = $this->makeLink($this->pi_getLL('prevPage', '', TRUE), array ('page' => $this->piVars['page'] - (1 + $this->piVars['double']))); |
|
| 202 | + $markerArray['###PREVIOUS###'] = $this->makeLink($this->pi_getLL('prevPage', '', TRUE), array('page' => $this->piVars['page'] - (1 + $this->piVars['double']))); |
|
| 203 | 203 | |
| 204 | 204 | } else { |
| 205 | 205 | |
| 206 | - $markerArray['###PREVIOUS###'] = '<span>'.$this->pi_getLL('prevPage', '', TRUE).'</span>'; |
|
| 206 | + $markerArray['###PREVIOUS###'] = '<span>' . $this->pi_getLL('prevPage', '', TRUE) . '</span>'; |
|
| 207 | 207 | |
| 208 | 208 | } |
| 209 | 209 | |
| 210 | 210 | // Link to next page. |
| 211 | 211 | if ($this->piVars['page'] < ($this->doc->numPages - $this->piVars['double'])) { |
| 212 | 212 | |
| 213 | - $markerArray['###NEXT###'] = $this->makeLink($this->pi_getLL('nextPage', '', TRUE), array ('page' => $this->piVars['page'] + (1 + $this->piVars['double']))); |
|
| 213 | + $markerArray['###NEXT###'] = $this->makeLink($this->pi_getLL('nextPage', '', TRUE), array('page' => $this->piVars['page'] + (1 + $this->piVars['double']))); |
|
| 214 | 214 | |
| 215 | 215 | } else { |
| 216 | 216 | |
| 217 | - $markerArray['###NEXT###'] = '<span>'.$this->pi_getLL('nextPage', '', TRUE).'</span>'; |
|
| 217 | + $markerArray['###NEXT###'] = '<span>' . $this->pi_getLL('nextPage', '', TRUE) . '</span>'; |
|
| 218 | 218 | |
| 219 | 219 | } |
| 220 | 220 | |
| 221 | 221 | // Link forward X pages. |
| 222 | 222 | if ($this->piVars['page'] <= ($this->doc->numPages - $pageSteps)) { |
| 223 | 223 | |
| 224 | - $markerArray['###FORWARD###'] = $this->makeLink(sprintf($this->pi_getLL('forwardXPages', '', TRUE), $pageSteps), array ('page' => $this->piVars['page'] + $pageSteps)); |
|
| 224 | + $markerArray['###FORWARD###'] = $this->makeLink(sprintf($this->pi_getLL('forwardXPages', '', TRUE), $pageSteps), array('page' => $this->piVars['page'] + $pageSteps)); |
|
| 225 | 225 | |
| 226 | 226 | } else { |
| 227 | 227 | |
| 228 | - $markerArray['###FORWARD###'] = '<span>'.sprintf($this->pi_getLL('forwardXPages', '', TRUE), $pageSteps).'</span>'; |
|
| 228 | + $markerArray['###FORWARD###'] = '<span>' . sprintf($this->pi_getLL('forwardXPages', '', TRUE), $pageSteps) . '</span>'; |
|
| 229 | 229 | |
| 230 | 230 | } |
| 231 | 231 | |
| 232 | 232 | // Link to last page. |
| 233 | 233 | if ($this->piVars['page'] < $this->doc->numPages) { |
| 234 | 234 | |
| 235 | - $markerArray['###LAST###'] = $this->makeLink($this->pi_getLL('lastPage', '', TRUE), array ('page' => $this->doc->numPages)); |
|
| 235 | + $markerArray['###LAST###'] = $this->makeLink($this->pi_getLL('lastPage', '', TRUE), array('page' => $this->doc->numPages)); |
|
| 236 | 236 | |
| 237 | 237 | } else { |
| 238 | 238 | |
| 239 | - $markerArray['###LAST###'] = '<span>'.$this->pi_getLL('lastPage', '', TRUE).'</span>'; |
|
| 239 | + $markerArray['###LAST###'] = '<span>' . $this->pi_getLL('lastPage', '', TRUE) . '</span>'; |
|
| 240 | 240 | |
| 241 | 241 | } |
| 242 | 242 | |
@@ -245,29 +245,29 @@ discard block |
||
| 245 | 245 | |
| 246 | 246 | if (!$this->piVars['double']) { |
| 247 | 247 | |
| 248 | - $markerArray['###DOUBLEPAGE###'] = $this->makeLink($this->pi_getLL('doublePageOn', '', TRUE), array ('double' => 1), 'class="tx-dlf-navigation-doubleOn"'); |
|
| 248 | + $markerArray['###DOUBLEPAGE###'] = $this->makeLink($this->pi_getLL('doublePageOn', '', TRUE), array('double' => 1), 'class="tx-dlf-navigation-doubleOn"'); |
|
| 249 | 249 | |
| 250 | 250 | } else { |
| 251 | 251 | |
| 252 | - $markerArray['###DOUBLEPAGE###'] = $this->makeLink($this->pi_getLL('doublePageOff', '', TRUE), array ('double' => 0), 'class="tx-dlf-navigation-doubleOff"'); |
|
| 252 | + $markerArray['###DOUBLEPAGE###'] = $this->makeLink($this->pi_getLL('doublePageOff', '', TRUE), array('double' => 0), 'class="tx-dlf-navigation-doubleOff"'); |
|
| 253 | 253 | |
| 254 | 254 | } |
| 255 | 255 | |
| 256 | 256 | if ($this->piVars['double'] && $this->piVars['page'] < $this->doc->numPages) { |
| 257 | 257 | |
| 258 | - $markerArray['###DOUBLEPAGE+1###'] = $this->makeLink($this->pi_getLL('doublePage+1', '', TRUE), array ('page' => $this->piVars['page'] + 1)); |
|
| 258 | + $markerArray['###DOUBLEPAGE+1###'] = $this->makeLink($this->pi_getLL('doublePage+1', '', TRUE), array('page' => $this->piVars['page'] + 1)); |
|
| 259 | 259 | |
| 260 | 260 | } else { |
| 261 | 261 | |
| 262 | - $markerArray['###DOUBLEPAGE+1###'] = '<span>'.$this->pi_getLL('doublePage+1', '', TRUE).'</span>'; |
|
| 262 | + $markerArray['###DOUBLEPAGE+1###'] = '<span>' . $this->pi_getLL('doublePage+1', '', TRUE) . '</span>'; |
|
| 263 | 263 | |
| 264 | 264 | } |
| 265 | 265 | |
| 266 | 266 | } else { |
| 267 | 267 | |
| 268 | - $markerArray['###DOUBLEPAGE###'] = '<span>'.$this->pi_getLL('doublePageOn', '', TRUE).'</span>'; |
|
| 268 | + $markerArray['###DOUBLEPAGE###'] = '<span>' . $this->pi_getLL('doublePageOn', '', TRUE) . '</span>'; |
|
| 269 | 269 | |
| 270 | - $markerArray['###DOUBLEPAGE+1###'] = '<span>'.$this->pi_getLL('doublePage+1', '', TRUE).'</span>'; |
|
| 270 | + $markerArray['###DOUBLEPAGE+1###'] = '<span>' . $this->pi_getLL('doublePage+1', '', TRUE) . '</span>'; |
|
| 271 | 271 | |
| 272 | 272 | } |
| 273 | 273 | |
@@ -303,7 +303,7 @@ discard block |
||
| 303 | 303 | * |
| 304 | 304 | * @return string Typolink ready to output |
| 305 | 305 | */ |
| 306 | - protected function makeLink($label, array $overrulePIvars = array (), $aTagParams = '') { |
|
| 306 | + protected function makeLink($label, array $overrulePIvars = array(), $aTagParams = '') { |
|
| 307 | 307 | |
| 308 | 308 | // Merge plugin variables with new set of values. |
| 309 | 309 | if (is_array($this->piVars)) { |
@@ -317,7 +317,7 @@ discard block |
||
| 317 | 317 | } |
| 318 | 318 | |
| 319 | 319 | // Build typolink configuration array. |
| 320 | - $conf = array ( |
|
| 320 | + $conf = array( |
|
| 321 | 321 | 'useCacheHash' => 1, |
| 322 | 322 | 'parameter' => $GLOBALS['TSFE']->id, |
| 323 | 323 | 'ATagParams' => $aTagParams, |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | |
| 44 | 44 | if (TYPO3_DLOG) { |
| 45 | 45 | |
| 46 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_statistics->main('.$content.', [data])] Incomplete plugin configuration', $this->extKey, SYSLOG_SEVERITY_WARNING, $conf); |
|
| 46 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_statistics->main(' . $content . ', [data])] Incomplete plugin configuration', $this->extKey, SYSLOG_SEVERITY_WARNING, $conf); |
|
| 47 | 47 | |
| 48 | 48 | } |
| 49 | 49 | |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | 'tx_dlf_documents', |
| 64 | 64 | 'tx_dlf_relations', |
| 65 | 65 | 'tx_dlf_collections', |
| 66 | - 'AND tx_dlf_documents.pid='.intval($this->conf['pages']).' AND tx_dlf_collections.pid='.intval($this->conf['pages']).' AND tx_dlf_documents.partof=0 AND tx_dlf_collections.uid IN ('.$GLOBALS['TYPO3_DB']->cleanIntList($this->conf['collections']).') 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'), |
|
| 66 | + 'AND tx_dlf_documents.pid=' . intval($this->conf['pages']) . ' AND tx_dlf_collections.pid=' . intval($this->conf['pages']) . ' AND tx_dlf_documents.partof=0 AND tx_dlf_collections.uid IN (' . $GLOBALS['TYPO3_DB']->cleanIntList($this->conf['collections']) . ') 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'), |
|
| 67 | 67 | 'tx_dlf_documents.uid', |
| 68 | 68 | '', |
| 69 | 69 | '' |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | 'tx_dlf_documents', |
| 75 | 75 | 'tx_dlf_relations', |
| 76 | 76 | 'tx_dlf_collections', |
| 77 | - 'AND tx_dlf_documents.pid='.intval($this->conf['pages']).' AND tx_dlf_collections.pid='.intval($this->conf['pages']).' AND NOT tx_dlf_documents.uid IN (SELECT DISTINCT tx_dlf_documents.partof FROM tx_dlf_documents WHERE NOT tx_dlf_documents.partof=0'.tx_dlf_helper::whereClause('tx_dlf_documents').') AND tx_dlf_collections.uid IN ('.$GLOBALS['TYPO3_DB']->cleanIntList($this->conf['collections']).') 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'), |
|
| 77 | + 'AND tx_dlf_documents.pid=' . intval($this->conf['pages']) . ' AND tx_dlf_collections.pid=' . intval($this->conf['pages']) . ' AND NOT tx_dlf_documents.uid IN (SELECT DISTINCT tx_dlf_documents.partof FROM tx_dlf_documents WHERE NOT tx_dlf_documents.partof=0' . tx_dlf_helper::whereClause('tx_dlf_documents') . ') AND tx_dlf_collections.uid IN (' . $GLOBALS['TYPO3_DB']->cleanIntList($this->conf['collections']) . ') 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'), |
|
| 78 | 78 | 'tx_dlf_documents.uid', |
| 79 | 79 | '', |
| 80 | 80 | '' |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | $resultTitles = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
| 87 | 87 | 'tx_dlf_documents.uid AS uid', |
| 88 | 88 | 'tx_dlf_documents', |
| 89 | - 'tx_dlf_documents.pid='.intval($this->conf['pages']).' AND tx_dlf_documents.partof=0'.tx_dlf_helper::whereClause('tx_dlf_documents'), |
|
| 89 | + 'tx_dlf_documents.pid=' . intval($this->conf['pages']) . ' AND tx_dlf_documents.partof=0' . tx_dlf_helper::whereClause('tx_dlf_documents'), |
|
| 90 | 90 | '', |
| 91 | 91 | '', |
| 92 | 92 | '' |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | $resultVolumes = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
| 96 | 96 | 'tx_dlf_documents.uid AS uid', |
| 97 | 97 | 'tx_dlf_documents', |
| 98 | - 'tx_dlf_documents.pid='.intval($this->conf['pages']).' AND NOT tx_dlf_documents.uid IN (SELECT DISTINCT tx_dlf_documents.partof FROM tx_dlf_documents WHERE NOT tx_dlf_documents.partof=0'.tx_dlf_helper::whereClause('tx_dlf_documents').')'.tx_dlf_helper::whereClause('tx_dlf_documents'), |
|
| 98 | + 'tx_dlf_documents.pid=' . intval($this->conf['pages']) . ' AND NOT tx_dlf_documents.uid IN (SELECT DISTINCT tx_dlf_documents.partof FROM tx_dlf_documents WHERE NOT tx_dlf_documents.partof=0' . tx_dlf_helper::whereClause('tx_dlf_documents') . ')' . tx_dlf_helper::whereClause('tx_dlf_documents'), |
|
| 99 | 99 | '', |
| 100 | 100 | '', |
| 101 | 101 | '' |
@@ -108,14 +108,14 @@ discard block |
||
| 108 | 108 | $countVolumes = $GLOBALS['TYPO3_DB']->sql_num_rows($resultVolumes); |
| 109 | 109 | |
| 110 | 110 | // Set replacements. |
| 111 | - $replace = array ( |
|
| 112 | - 'key' => array ( |
|
| 111 | + $replace = array( |
|
| 112 | + 'key' => array( |
|
| 113 | 113 | '###TITLES###', |
| 114 | 114 | '###VOLUMES###' |
| 115 | 115 | ), |
| 116 | - 'value' => array ( |
|
| 117 | - $countTitles.($countTitles > 1 ? $this->pi_getLL('titles', '', TRUE) : $this->pi_getLL('title', '', TRUE)), |
|
| 118 | - $countVolumes.($countVolumes > 1 ? $this->pi_getLL('volumes', '', TRUE) : $this->pi_getLL('volume', '', TRUE)) |
|
| 116 | + 'value' => array( |
|
| 117 | + $countTitles . ($countTitles > 1 ? $this->pi_getLL('titles', '', TRUE) : $this->pi_getLL('title', '', TRUE)), |
|
| 118 | + $countVolumes . ($countVolumes > 1 ? $this->pi_getLL('volumes', '', TRUE) : $this->pi_getLL('volume', '', TRUE)) |
|
| 119 | 119 | ) |
| 120 | 120 | ); |
| 121 | 121 | |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | * |
| 39 | 39 | * @return void |
| 40 | 40 | */ |
| 41 | - public function main($content = '', $conf = array ()) { |
|
| 41 | + public function main($content = '', $conf = array()) { |
|
| 42 | 42 | |
| 43 | 43 | $this->cObj = GeneralUtility::makeInstance('TYPO3\\CMS\\Frontend\\ContentObject\\ContentObjectRenderer'); |
| 44 | 44 | |
@@ -64,11 +64,11 @@ discard block |
||
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | // add some self calculated header tags |
| 67 | - header('Last-Modified: '.gmdate("D, d M Y H:i:s").'GMT'); |
|
| 67 | + header('Last-Modified: ' . gmdate("D, d M Y H:i:s") . 'GMT'); |
|
| 68 | 68 | header('Cache-Control: max-age=3600, must-revalidate'); |
| 69 | - header('Content-Length: '.strlen($fetchedData)); |
|
| 69 | + header('Content-Length: ' . strlen($fetchedData)); |
|
| 70 | 70 | $fi = finfo_open(FILEINFO_MIME); |
| 71 | - header('Content-Type: '.finfo_buffer($fi, $fetchedData)); |
|
| 71 | + header('Content-Type: ' . finfo_buffer($fi, $fetchedData)); |
|
| 72 | 72 | |
| 73 | 73 | // take some tags from request header and overwrite in case already set |
| 74 | 74 | $fetchedHeader = explode("\n", GeneralUtility::getUrl($url, 2)); |