We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | * LICENSE.txt file that was distributed with this source code. |
10 | 10 | */ |
11 | 11 | |
12 | -$EM_CONF[$_EXTKEY] = array ( |
|
12 | +$EM_CONF[$_EXTKEY] = array( |
|
13 | 13 | 'title' => 'Kitodo.Presentation', |
14 | 14 | 'description' => 'Base plugins, modules, services and API of the Digital Library Framework. It is part of the community-based Kitodo Digitization Suite.', |
15 | 15 | 'category' => 'fe', |
@@ -22,18 +22,18 @@ discard block |
||
22 | 22 | 'createDirs' => '', |
23 | 23 | 'clearCacheOnLoad' => FALSE, |
24 | 24 | 'version' => '2.3.1', |
25 | - 'constraints' => array ( |
|
26 | - 'depends' => array ( |
|
25 | + 'constraints' => array( |
|
26 | + 'depends' => array( |
|
27 | 27 | 'php' => '7.0.0-', |
28 | 28 | 'typo3' => '7.6.0-', |
29 | 29 | ), |
30 | - 'conflicts' => array ( |
|
30 | + 'conflicts' => array( |
|
31 | 31 | ), |
32 | - 'suggests' => array ( |
|
32 | + 'suggests' => array( |
|
33 | 33 | ), |
34 | 34 | ), |
35 | - 'autoload' => array ( |
|
36 | - 'classmap' => array ( |
|
35 | + 'autoload' => array( |
|
36 | + 'classmap' => array( |
|
37 | 37 | 'vendor/solarium', |
38 | 38 | 'vendor/symfony/event-dispatcher', |
39 | 39 | 'cli/class.tx_dlf_cli.php', |
@@ -18,9 +18,9 @@ |
||
18 | 18 | 'author_company' => 'http://www.kitodo.org/', |
19 | 19 | 'state' => 'stable', |
20 | 20 | 'internal' => '', |
21 | - 'uploadfolder' => TRUE, |
|
21 | + 'uploadfolder' => true, |
|
22 | 22 | 'createDirs' => '', |
23 | - 'clearCacheOnLoad' => FALSE, |
|
23 | + 'clearCacheOnLoad' => false, |
|
24 | 24 | 'version' => '2.3.1', |
25 | 25 | 'constraints' => array ( |
26 | 26 | 'depends' => array ( |
@@ -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.'['.preg_replace('/[^A-Za-z0-9_-]/', '', $piVar).']" value="'.htmlspecialchars($value).'" />'; |
|
78 | + $output .= '<input type="hidden" name="' . $this->prefixId . '[' . preg_replace('/[^A-Za-z0-9_-]/', '', $piVar) . ']" value="' . htmlspecialchars($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, |
@@ -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'])); |