We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -18,7 +18,8 @@ discard block |
||
18 | 18 | * @subpackage tx_dlf |
19 | 19 | * @access public |
20 | 20 | */ |
21 | -class tx_dlf_newspaper extends tx_dlf_plugin { |
|
21 | +class tx_dlf_newspaper extends tx_dlf_plugin |
|
22 | +{ |
|
22 | 23 | |
23 | 24 | public $extKey = 'dlf'; |
24 | 25 | |
@@ -36,7 +37,8 @@ discard block |
||
36 | 37 | * |
37 | 38 | * @return string The content that is displayed on the website |
38 | 39 | */ |
39 | - public function main($content, $conf) { |
|
40 | + public function main($content, $conf) |
|
41 | + { |
|
40 | 42 | |
41 | 43 | // Nothing to do here. |
42 | 44 | return $content; |
@@ -53,7 +55,8 @@ discard block |
||
53 | 55 | * |
54 | 56 | * @return string The content that is displayed on the website |
55 | 57 | */ |
56 | - public function calendar($content, $conf) { |
|
58 | + public function calendar($content, $conf) |
|
59 | + { |
|
57 | 60 | |
58 | 61 | $this->init($conf); |
59 | 62 | |
@@ -210,7 +213,8 @@ discard block |
||
210 | 213 | * @param int $firstMonth - January - 1, February - 2, ..., December - 12 |
211 | 214 | * @param int $lastMonth - January - 1, February - 2, ..., December - 12 |
212 | 215 | */ |
213 | - private function getCalendarYear($calendarIssues, $year, $firstMonth = 1, $lastMonth = 12) { |
|
216 | + private function getCalendarYear($calendarIssues, $year, $firstMonth = 1, $lastMonth = 12) |
|
217 | + { |
|
214 | 218 | |
215 | 219 | // Get subpart templates. |
216 | 220 | $subparts['list'] = $this->cObj->getSubpart($this->template, '###ISSUELIST###'); |
@@ -370,7 +374,8 @@ discard block |
||
370 | 374 | * |
371 | 375 | * @return string The content that is displayed on the website |
372 | 376 | */ |
373 | - public function years($content, $conf) { |
|
377 | + public function years($content, $conf) |
|
378 | + { |
|
374 | 379 | |
375 | 380 | $this->init($conf); |
376 | 381 |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | |
25 | 25 | public $scriptRelPath = 'plugins/newspaper/class.tx_dlf_newspaper.php'; |
26 | 26 | |
27 | - private $allIssues = array (); |
|
27 | + private $allIssues = array(); |
|
28 | 28 | |
29 | 29 | /** |
30 | 30 | * The main method of the PlugIn |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
83 | 83 | 'tx_dlf_documents.uid AS uid, tx_dlf_documents.mets_label AS label, tx_dlf_documents.mets_orderlabel AS orderlabel, tx_dlf_documents.title AS title, tx_dlf_documents.year AS year', |
84 | 84 | 'tx_dlf_documents', |
85 | - '(tx_dlf_documents.structure='.tx_dlf_helper::getIdFromIndexName('issue', 'tx_dlf_structures', $this->doc->pid).' AND tx_dlf_documents.partof='.intval($this->doc->uid).')'.tx_dlf_helper::whereClause('tx_dlf_documents'), |
|
85 | + '(tx_dlf_documents.structure=' . tx_dlf_helper::getIdFromIndexName('issue', 'tx_dlf_structures', $this->doc->pid) . ' AND tx_dlf_documents.partof=' . intval($this->doc->uid) . ')' . tx_dlf_helper::whereClause('tx_dlf_documents'), |
|
86 | 86 | '', |
87 | 87 | 'tx_dlf_documents.mets_orderlabel, tx_dlf_documents.mets_label ASC', |
88 | 88 | '' |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | } |
101 | 101 | } |
102 | 102 | |
103 | - $issues[] = array ( |
|
103 | + $issues[] = array( |
|
104 | 104 | 'uid' => $resArray['uid'], |
105 | 105 | 'title' => $title, |
106 | 106 | 'year' => $resArray['year'] |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | } |
110 | 110 | |
111 | 111 | // We need an array of issues with month number as key. |
112 | - $calendarIssuesByYear = array (); |
|
112 | + $calendarIssuesByYear = array(); |
|
113 | 113 | foreach ($issues as $issue) { |
114 | 114 | $dateTs = strtotime($issue['year']); |
115 | 115 | $calendarIssuesByYear[date('Y', $dateTs)][date('n', $dateTs)][date('j', $dateTs)][] = $issue; |
@@ -139,19 +139,19 @@ discard block |
||
139 | 139 | } |
140 | 140 | |
141 | 141 | // Link to years overview |
142 | - $linkConf = array ( |
|
142 | + $linkConf = array( |
|
143 | 143 | 'useCacheHash' => 1, |
144 | 144 | 'parameter' => $this->conf['targetPid'], |
145 | - 'additionalParams' => '&'.$this->prefixId.'[id]='.urlencode($this->doc->parentId), |
|
145 | + 'additionalParams' => '&' . $this->prefixId . '[id]=' . urlencode($this->doc->parentId), |
|
146 | 146 | ); |
147 | 147 | |
148 | - $allYearsLink = $this->cObj->typoLink($this->pi_getLL('allYears', '', TRUE).' '.$this->doc->getTitle($this->doc->parentId), $linkConf); |
|
148 | + $allYearsLink = $this->cObj->typoLink($this->pi_getLL('allYears', '', TRUE) . ' ' . $this->doc->getTitle($this->doc->parentId), $linkConf); |
|
149 | 149 | |
150 | 150 | // Link to current year. |
151 | - $linkConf = array ( |
|
151 | + $linkConf = array( |
|
152 | 152 | 'useCacheHash' => 1, |
153 | 153 | 'parameter' => $this->conf['targetPid'], |
154 | - 'additionalParams' => '&'.$this->prefixId.'[id]='.urlencode($this->doc->uid), |
|
154 | + 'additionalParams' => '&' . $this->prefixId . '[id]=' . urlencode($this->doc->uid), |
|
155 | 155 | ); |
156 | 156 | |
157 | 157 | $titleData = $this->doc->getTitledata(); |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | |
193 | 193 | } |
194 | 194 | |
195 | - $markerArray = array ( |
|
195 | + $markerArray = array( |
|
196 | 196 | '###CALENDARVIEWACTIVE###' => $listViewActive ? '' : 'active', |
197 | 197 | '###LISTVIEWACTIVE###' => $listViewActive ? 'active' : '', |
198 | 198 | '###CALYEAR###' => $yearLink, |
@@ -230,7 +230,7 @@ discard block |
||
230 | 230 | |
231 | 231 | for ($i = $firstMonth; $i <= $lastMonth; $i++) { |
232 | 232 | |
233 | - $markerArray = array ( |
|
233 | + $markerArray = array( |
|
234 | 234 | '###DAYMON_NAME###' => strftime('%a', strtotime('last Monday')), |
235 | 235 | '###DAYTUE_NAME###' => strftime('%a', strtotime('last Tuesday')), |
236 | 236 | '###DAYWED_NAME###' => strftime('%a', strtotime('last Wednesday')), |
@@ -238,23 +238,23 @@ discard block |
||
238 | 238 | '###DAYFRI_NAME###' => strftime('%a', strtotime('last Friday')), |
239 | 239 | '###DAYSAT_NAME###' => strftime('%a', strtotime('last Saturday')), |
240 | 240 | '###DAYSUN_NAME###' => strftime('%a', strtotime('last Sunday')), |
241 | - '###MONTHNAME###' => strftime('%B', strtotime($year.'-'.$i.'-1')) . ' ' . $year, |
|
241 | + '###MONTHNAME###' => strftime('%B', strtotime($year . '-' . $i . '-1')) . ' ' . $year, |
|
242 | 242 | '###CALYEAR###' => ($i == $firstMonth) ? '<div class="year">' . $year . '</div>' : '' |
243 | 243 | ); |
244 | 244 | |
245 | 245 | // Reset week content of new month. |
246 | 246 | $subWeekPartContent = ''; |
247 | 247 | |
248 | - $firstOfMonth = strtotime($year.'-'.$i.'-1'); |
|
248 | + $firstOfMonth = strtotime($year . '-' . $i . '-1'); |
|
249 | 249 | $lastOfMonth = strtotime('last day of', ($firstOfMonth)); |
250 | 250 | $firstOfMonthStart = strtotime('last Monday', $firstOfMonth); |
251 | 251 | |
252 | 252 | // There are never more than 6 weeks in a month. |
253 | 253 | for ($j = 0; $j <= 5; $j++) { |
254 | 254 | |
255 | - $firstDayOfWeek = strtotime('+ '.$j.' Week', $firstOfMonthStart); |
|
255 | + $firstDayOfWeek = strtotime('+ ' . $j . ' Week', $firstOfMonthStart); |
|
256 | 256 | |
257 | - $weekArray = array ( |
|
257 | + $weekArray = array( |
|
258 | 258 | '###DAYMON###' => ' ', |
259 | 259 | '###DAYTUE###' => ' ', |
260 | 260 | '###DAYWED###' => ' ', |
@@ -267,13 +267,13 @@ discard block |
||
267 | 267 | // Every week has seven days. ;-) |
268 | 268 | for ($k = 0; $k <= 6; $k++) { |
269 | 269 | |
270 | - $currentDayTime = strtotime('+ '.$k.' Day', $firstDayOfWeek); |
|
270 | + $currentDayTime = strtotime('+ ' . $k . ' Day', $firstDayOfWeek); |
|
271 | 271 | |
272 | 272 | if ($currentDayTime >= $firstOfMonth && $currentDayTime <= $lastOfMonth) { |
273 | 273 | |
274 | 274 | $dayLinks = ''; |
275 | 275 | |
276 | - $dayLinksText = array (); |
|
276 | + $dayLinksText = array(); |
|
277 | 277 | |
278 | 278 | $dayLinksList = ''; |
279 | 279 | |
@@ -291,10 +291,10 @@ discard block |
||
291 | 291 | |
292 | 292 | $dayLinkLabel = empty($issue['title']) ? strftime('%x', $currentDayTime) : $issue['title']; |
293 | 293 | |
294 | - $linkConf = array ( |
|
294 | + $linkConf = array( |
|
295 | 295 | 'useCacheHash' => 1, |
296 | 296 | 'parameter' => $this->conf['targetPid'], |
297 | - 'additionalParams' => '&'.$this->prefixId.'[id]='.urlencode($issue['uid']), |
|
297 | + 'additionalParams' => '&' . $this->prefixId . '[id]=' . urlencode($issue['uid']), |
|
298 | 298 | 'ATagParams' => ' class="title"', |
299 | 299 | ); |
300 | 300 | |
@@ -313,7 +313,7 @@ discard block |
||
313 | 313 | |
314 | 314 | foreach ($dayLinksText as $link) { |
315 | 315 | |
316 | - $dayLinksList .= '<li>'.$link.'</li>'; |
|
316 | + $dayLinksList .= '<li>' . $link . '</li>'; |
|
317 | 317 | |
318 | 318 | } |
319 | 319 | |
@@ -321,10 +321,10 @@ discard block |
||
321 | 321 | |
322 | 322 | } |
323 | 323 | |
324 | - $dayLinkDiv = '<div class="issues"><h4>'.strftime('%d', $currentDayTime).'</h4><div>'.$dayLinksList.'</div></div>'; |
|
324 | + $dayLinkDiv = '<div class="issues"><h4>' . strftime('%d', $currentDayTime) . '</h4><div>' . $dayLinksList . '</div></div>'; |
|
325 | 325 | } |
326 | 326 | |
327 | - switch (strftime('%w', strtotime('+ '.$k.' Day', $firstDayOfWeek))) { |
|
327 | + switch (strftime('%w', strtotime('+ ' . $k . ' Day', $firstDayOfWeek))) { |
|
328 | 328 | |
329 | 329 | case '0': $weekArray['###DAYSUN###'] = ((int) $dayLinks === (int) date('j', $currentDayTime)) ? $dayLinkDiv : strftime('%d', $currentDayTime); |
330 | 330 | break; |
@@ -412,7 +412,7 @@ discard block |
||
412 | 412 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
413 | 413 | 'tx_dlf_documents.uid AS uid, tx_dlf_documents.mets_label AS label, tx_dlf_documents.mets_orderlabel AS orderlabel, tx_dlf_documents.title AS title', |
414 | 414 | 'tx_dlf_documents', |
415 | - '(tx_dlf_documents.structure='.tx_dlf_helper::getIdFromIndexName('year', 'tx_dlf_structures', $this->doc->pid).' AND tx_dlf_documents.partof='.intval($this->doc->uid).')'.tx_dlf_helper::whereClause('tx_dlf_documents'), |
|
415 | + '(tx_dlf_documents.structure=' . tx_dlf_helper::getIdFromIndexName('year', 'tx_dlf_structures', $this->doc->pid) . ' AND tx_dlf_documents.partof=' . intval($this->doc->uid) . ')' . tx_dlf_helper::whereClause('tx_dlf_documents'), |
|
416 | 416 | '', |
417 | 417 | 'tx_dlf_documents.volume_sorting ASC', |
418 | 418 | '' |
@@ -420,7 +420,7 @@ discard block |
||
420 | 420 | |
421 | 421 | // Process results. |
422 | 422 | while ($resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)) { |
423 | - $years[] = array ( |
|
423 | + $years[] = array( |
|
424 | 424 | 'title' => !empty($resArray['label']) ? $resArray['label'] : (!empty($resArray['orderlabel']) ? $resArray['orderlabel'] : $resArray['title']), |
425 | 425 | 'uid' => $resArray['uid'] |
426 | 426 | ); |
@@ -432,14 +432,14 @@ discard block |
||
432 | 432 | |
433 | 433 | foreach ($years as $year) { |
434 | 434 | |
435 | - $linkConf = array ( |
|
435 | + $linkConf = array( |
|
436 | 436 | 'useCacheHash' => 1, |
437 | 437 | 'parameter' => $this->conf['targetPid'], |
438 | - 'additionalParams' => '&'.$this->prefixId.'[id]='.urlencode($year['uid']), |
|
439 | - 'title' => $titleAnchor.': '.$year['title'] |
|
438 | + 'additionalParams' => '&' . $this->prefixId . '[id]=' . urlencode($year['uid']), |
|
439 | + 'title' => $titleAnchor . ': ' . $year['title'] |
|
440 | 440 | ); |
441 | 441 | |
442 | - $yearArray = array ( |
|
442 | + $yearArray = array( |
|
443 | 443 | '###YEARNAME###' => $this->cObj->typoLink($year['title'], $linkConf), |
444 | 444 | ); |
445 | 445 | |
@@ -449,15 +449,15 @@ discard block |
||
449 | 449 | } |
450 | 450 | |
451 | 451 | // link to years overview (should be itself here) |
452 | - $linkConf = array ( |
|
452 | + $linkConf = array( |
|
453 | 453 | 'useCacheHash' => 1, |
454 | 454 | 'parameter' => $this->conf['targetPid'], |
455 | - 'additionalParams' => '&'.$this->prefixId.'[id]='.$this->doc->uid, |
|
455 | + 'additionalParams' => '&' . $this->prefixId . '[id]=' . $this->doc->uid, |
|
456 | 456 | ); |
457 | - $allYearsLink = $this->cObj->typoLink($this->pi_getLL('allYears', '', TRUE).' '.$this->doc->getTitle($this->doc->uid), $linkConf); |
|
457 | + $allYearsLink = $this->cObj->typoLink($this->pi_getLL('allYears', '', TRUE) . ' ' . $this->doc->getTitle($this->doc->uid), $linkConf); |
|
458 | 458 | |
459 | 459 | // Fill markers. |
460 | - $markerArray = array ( |
|
460 | + $markerArray = array( |
|
461 | 461 | '###LABEL_CHOOSE_YEAR###' => $this->pi_getLL('label.please_choose_year'), |
462 | 462 | '###CALALLYEARS###' => $allYearsLink |
463 | 463 | ); |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | // Load current document. |
61 | 61 | $this->loadDocument(); |
62 | 62 | |
63 | - if ($this->doc === NULL) { |
|
63 | + if ($this->doc === null) { |
|
64 | 64 | |
65 | 65 | // Quit without doing anything if required variables are not set. |
66 | 66 | return $content; |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | $title = $resArray['title']; |
96 | 96 | } else { |
97 | 97 | $title = !empty($resArray['label']) ? $resArray['label'] : $resArray['orderlabel']; |
98 | - if (strtotime($title) !== FALSE) { |
|
98 | + if (strtotime($title) !== false) { |
|
99 | 99 | $title = strftime('%x', strtotime($title)); |
100 | 100 | } |
101 | 101 | } |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | 'additionalParams' => '&'.$this->prefixId.'[id]='.urlencode($this->doc->parentId), |
146 | 146 | ); |
147 | 147 | |
148 | - $allYearsLink = $this->cObj->typoLink($this->pi_getLL('allYears', '', TRUE).' '.$this->doc->getTitle($this->doc->parentId), $linkConf); |
|
148 | + $allYearsLink = $this->cObj->typoLink($this->pi_getLL('allYears', '', true).' '.$this->doc->getTitle($this->doc->parentId), $linkConf); |
|
149 | 149 | |
150 | 150 | // Link to current year. |
151 | 151 | $linkConf = array ( |
@@ -184,11 +184,11 @@ discard block |
||
184 | 184 | |
185 | 185 | if (count($this->allIssues) < 6) { |
186 | 186 | |
187 | - $listViewActive = TRUE; |
|
187 | + $listViewActive = true; |
|
188 | 188 | |
189 | 189 | } else { |
190 | 190 | |
191 | - $listViewActive = FALSE; |
|
191 | + $listViewActive = false; |
|
192 | 192 | |
193 | 193 | } |
194 | 194 | |
@@ -384,7 +384,7 @@ discard block |
||
384 | 384 | // Load current document. |
385 | 385 | $this->loadDocument(); |
386 | 386 | |
387 | - if ($this->doc === NULL) { |
|
387 | + if ($this->doc === null) { |
|
388 | 388 | |
389 | 389 | // Quit without doing anything if required variables are not set. |
390 | 390 | return $content; |
@@ -454,7 +454,7 @@ discard block |
||
454 | 454 | 'parameter' => $this->conf['targetPid'], |
455 | 455 | 'additionalParams' => '&'.$this->prefixId.'[id]='.$this->doc->uid, |
456 | 456 | ); |
457 | - $allYearsLink = $this->cObj->typoLink($this->pi_getLL('allYears', '', TRUE).' '.$this->doc->getTitle($this->doc->uid), $linkConf); |
|
457 | + $allYearsLink = $this->cObj->typoLink($this->pi_getLL('allYears', '', true).' '.$this->doc->getTitle($this->doc->uid), $linkConf); |
|
458 | 458 | |
459 | 459 | // Fill markers. |
460 | 460 | $markerArray = array ( |
@@ -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 |
@@ -18,7 +18,8 @@ discard block |
||
18 | 18 | * @subpackage tx_dlf |
19 | 19 | * @access public |
20 | 20 | */ |
21 | -class tx_dlf_pagegrid extends tx_dlf_plugin { |
|
21 | +class tx_dlf_pagegrid extends tx_dlf_plugin |
|
22 | +{ |
|
22 | 23 | |
23 | 24 | public $scriptRelPath = 'plugins/pagegrid/class.tx_dlf_pagegrid.php'; |
24 | 25 | |
@@ -32,7 +33,8 @@ discard block |
||
32 | 33 | * |
33 | 34 | * @return string The rendered entry ready for output |
34 | 35 | */ |
35 | - protected function getEntry($number, $template) { |
|
36 | + protected function getEntry($number, $template) |
|
37 | + { |
|
36 | 38 | |
37 | 39 | // Set current page if applicable. |
38 | 40 | if (!empty($this->piVars['page']) && $this->piVars['page'] == $number) { |
@@ -97,7 +99,8 @@ discard block |
||
97 | 99 | * |
98 | 100 | * @return string The rendered page browser ready for output |
99 | 101 | */ |
100 | - protected function getPageBrowser() { |
|
102 | + protected function getPageBrowser() |
|
103 | + { |
|
101 | 104 | |
102 | 105 | // Get overall number of pages. |
103 | 106 | $maxPages = intval(ceil($this->doc->numPages / $this->conf['limit'])); |
@@ -179,7 +182,8 @@ discard block |
||
179 | 182 | * |
180 | 183 | * @return string The content that is displayed on the website |
181 | 184 | */ |
182 | - public function main($content, $conf) { |
|
185 | + public function main($content, $conf) |
|
186 | + { |
|
183 | 187 | |
184 | 188 | $this->init($conf); |
185 | 189 |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | $linkConf = array ( |
81 | 81 | 'useCacheHash' => 1, |
82 | 82 | 'parameter' => $this->conf['targetPid'], |
83 | - 'additionalParams' => \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, $piVars, '', TRUE, FALSE), |
|
83 | + 'additionalParams' => \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, $piVars, '', true, false), |
|
84 | 84 | 'title' => $markerArray['###PAGINATION###'] |
85 | 85 | ); |
86 | 86 | |
@@ -110,16 +110,16 @@ discard block |
||
110 | 110 | } |
111 | 111 | |
112 | 112 | // Get separator. |
113 | - $separator = $this->pi_getLL('separator', ' - ', TRUE); |
|
113 | + $separator = $this->pi_getLL('separator', ' - ', true); |
|
114 | 114 | |
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,21 +132,21 @@ 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 | |
143 | - $skip = TRUE; |
|
143 | + $skip = true; |
|
144 | 144 | |
145 | - } elseif ($skip == TRUE) { |
|
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 | - $skip = FALSE; |
|
149 | + $skip = false; |
|
150 | 150 | |
151 | 151 | } |
152 | 152 | |
@@ -157,11 +157,11 @@ 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 | |
164 | - $output .= $this->pi_getLL('nextPage', '>', TRUE); |
|
164 | + $output .= $this->pi_getLL('nextPage', '>', true); |
|
165 | 165 | |
166 | 166 | } |
167 | 167 | |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | |
186 | 186 | $this->loadDocument(); |
187 | 187 | |
188 | - if ($this->doc === NULL || $this->doc->numPages < 1 || empty($this->conf['fileGrpThumbs'])) { |
|
188 | + if ($this->doc === null || $this->doc->numPages < 1 || empty($this->conf['fileGrpThumbs'])) { |
|
189 | 189 | |
190 | 190 | // Quit without doing anything if required variables are not set. |
191 | 191 | return $content; |
@@ -281,7 +281,7 @@ discard block |
||
281 | 281 | $markerArray['###PAGEBROWSER###'] = $this->getPageBrowser(); |
282 | 282 | |
283 | 283 | // Merge everything with template. |
284 | - $content = $this->cObj->substituteMarkerArray($this->cObj->substituteSubpart($this->template, '###ENTRY###', $content, TRUE), $markerArray); |
|
284 | + $content = $this->cObj->substituteMarkerArray($this->cObj->substituteSubpart($this->template, '###ENTRY###', $content, true), $markerArray); |
|
285 | 285 | |
286 | 286 | return $this->pi_wrapInBaseClass($content); |
287 | 287 |
@@ -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 |
@@ -17,7 +17,8 @@ discard block |
||
17 | 17 | * @subpackage tx_dlf |
18 | 18 | * @access public |
19 | 19 | */ |
20 | -class tx_dlf_audioplayer extends tx_dlf_plugin { |
|
20 | +class tx_dlf_audioplayer extends tx_dlf_plugin |
|
21 | +{ |
|
21 | 22 | |
22 | 23 | public $scriptRelPath = 'plugins/audioplayer/class.tx_dlf_audioplayer.php'; |
23 | 24 | |
@@ -36,7 +37,8 @@ discard block |
||
36 | 37 | * |
37 | 38 | * @return string Player script tags ready for output |
38 | 39 | */ |
39 | - protected function addPlayerJS() { |
|
40 | + protected function addPlayerJS() |
|
41 | + { |
|
40 | 42 | |
41 | 43 | $output = array (); |
42 | 44 | |
@@ -79,7 +81,8 @@ discard block |
||
79 | 81 | * |
80 | 82 | * @return string The content that is displayed on the website |
81 | 83 | */ |
82 | - public function main($content, $conf) { |
|
84 | + public function main($content, $conf) |
|
85 | + { |
|
83 | 86 | |
84 | 87 | $this->init($conf); |
85 | 88 |
@@ -86,7 +86,7 @@ |
||
86 | 86 | // Load current document. |
87 | 87 | $this->loadDocument(); |
88 | 88 | |
89 | - if ($this->doc === NULL || $this->doc->numPages < 1) { |
|
89 | + if ($this->doc === null || $this->doc->numPages < 1) { |
|
90 | 90 | |
91 | 91 | // Quit without doing anything if required variables are not set. |
92 | 92 | return $content; |
@@ -17,7 +17,8 @@ discard block |
||
17 | 17 | * @subpackage tx_dlf |
18 | 18 | * @access public |
19 | 19 | */ |
20 | -class tx_dlf_navigation extends tx_dlf_plugin { |
|
20 | +class tx_dlf_navigation extends tx_dlf_plugin |
|
21 | +{ |
|
21 | 22 | |
22 | 23 | public $scriptRelPath = 'plugins/navigation/class.tx_dlf_navigation.php'; |
23 | 24 | |
@@ -28,7 +29,8 @@ discard block |
||
28 | 29 | * |
29 | 30 | * @return string Link to the list view ready to output |
30 | 31 | */ |
31 | - protected function getLinkToListview() { |
|
32 | + protected function getLinkToListview() |
|
33 | + { |
|
32 | 34 | |
33 | 35 | if (!empty($this->conf['targetPid'])) { |
34 | 36 | |
@@ -61,7 +63,8 @@ discard block |
||
61 | 63 | * |
62 | 64 | * @return string Page selector ready to output |
63 | 65 | */ |
64 | - protected function getPageSelector() { |
|
66 | + protected function getPageSelector() |
|
67 | + { |
|
65 | 68 | |
66 | 69 | // Configure @action URL for form. |
67 | 70 | $linkConf = array ( |
@@ -108,7 +111,8 @@ discard block |
||
108 | 111 | * |
109 | 112 | * @return string The content that is displayed on the website |
110 | 113 | */ |
111 | - public function main($content, $conf) { |
|
114 | + public function main($content, $conf) |
|
115 | + { |
|
112 | 116 | |
113 | 117 | $this->init($conf); |
114 | 118 | |
@@ -303,7 +307,8 @@ discard block |
||
303 | 307 | * |
304 | 308 | * @return string Typolink ready to output |
305 | 309 | */ |
306 | - protected function makeLink($label, array $overrulePIvars = array (), $aTagParams = '') { |
|
310 | + protected function makeLink($label, array $overrulePIvars = array (), $aTagParams = '') |
|
311 | + { |
|
307 | 312 | |
308 | 313 | // Merge plugin variables with new set of values. |
309 | 314 | if (is_array($this->piVars)) { |
@@ -41,10 +41,10 @@ discard block |
||
41 | 41 | $conf = array ( |
42 | 42 | 'useCacheHash' => 1, |
43 | 43 | 'parameter' => $this->conf['targetPid'], |
44 | - 'title' => $this->pi_getLL('linkToList', '', TRUE) |
|
44 | + 'title' => $this->pi_getLL('linkToList', '', true) |
|
45 | 45 | ); |
46 | 46 | |
47 | - return $this->cObj->typoLink($this->pi_getLL('linkToList', '', TRUE), $conf); |
|
47 | + return $this->cObj->typoLink($this->pi_getLL('linkToList', '', true), $conf); |
|
48 | 48 | |
49 | 49 | } |
50 | 50 | |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | // Add page selector. |
85 | 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 | |
@@ -113,12 +113,12 @@ discard block |
||
113 | 113 | $this->init($conf); |
114 | 114 | |
115 | 115 | // Turn cache on. |
116 | - $this->setCache(TRUE); |
|
116 | + $this->setCache(true); |
|
117 | 117 | |
118 | 118 | // Load current document. |
119 | 119 | $this->loadDocument(); |
120 | 120 | |
121 | - if ($this->doc === NULL) { |
|
121 | + if ($this->doc === null) { |
|
122 | 122 | |
123 | 123 | // Quit without doing anything if required variables are not set. |
124 | 124 | return $content; |
@@ -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 | |
@@ -278,13 +278,13 @@ discard block |
||
278 | 278 | $markerArray['###LINKLISTVIEW###'] = $this->getLinkToListview(); |
279 | 279 | |
280 | 280 | // fill some language labels if available |
281 | - $markerArray['###ZOOM_IN###'] = $this->pi_getLL('zoom-in', '', TRUE); |
|
282 | - $markerArray['###ZOOM_OUT###'] = $this->pi_getLL('zoom-out', '', TRUE); |
|
283 | - $markerArray['###ZOOM_FULLSCREEN###'] = $this->pi_getLL('zoom-fullscreen', '', TRUE); |
|
281 | + $markerArray['###ZOOM_IN###'] = $this->pi_getLL('zoom-in', '', true); |
|
282 | + $markerArray['###ZOOM_OUT###'] = $this->pi_getLL('zoom-out', '', true); |
|
283 | + $markerArray['###ZOOM_FULLSCREEN###'] = $this->pi_getLL('zoom-fullscreen', '', true); |
|
284 | 284 | |
285 | - $markerArray['###ROTATE_LEFT###'] = $this->pi_getLL('rotate-left', '', TRUE); |
|
286 | - $markerArray['###ROTATE_RIGHT###'] = $this->pi_getLL('rotate-right', '', TRUE); |
|
287 | - $markerArray['###ROTATE_RESET###'] = $this->pi_getLL('rotate-reset', '', TRUE); |
|
285 | + $markerArray['###ROTATE_LEFT###'] = $this->pi_getLL('rotate-left', '', true); |
|
286 | + $markerArray['###ROTATE_RIGHT###'] = $this->pi_getLL('rotate-right', '', true); |
|
287 | + $markerArray['###ROTATE_RESET###'] = $this->pi_getLL('rotate-reset', '', true); |
|
288 | 288 | |
289 | 289 | $content .= $this->cObj->substituteMarkerArray($this->template, $markerArray); |
290 | 290 | |
@@ -321,7 +321,7 @@ discard block |
||
321 | 321 | 'useCacheHash' => 1, |
322 | 322 | 'parameter' => $GLOBALS['TSFE']->id, |
323 | 323 | 'ATagParams' => $aTagParams, |
324 | - 'additionalParams' => \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, $overrulePIvars, '', TRUE, FALSE), |
|
324 | + 'additionalParams' => \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, $overrulePIvars, '', true, false), |
|
325 | 325 | 'title' => $label |
326 | 326 | ); |
327 | 327 |
@@ -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, |
@@ -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 |
@@ -17,7 +17,8 @@ discard block |
||
17 | 17 | * @subpackage tx_dlf |
18 | 18 | * @access public |
19 | 19 | */ |
20 | -class tx_dlf_statistics extends tx_dlf_plugin { |
|
20 | +class tx_dlf_statistics extends tx_dlf_plugin |
|
21 | +{ |
|
21 | 22 | |
22 | 23 | public $scriptRelPath = 'plugins/statistics/class.tx_dlf_statistics.php'; |
23 | 24 | |
@@ -31,7 +32,8 @@ discard block |
||
31 | 32 | * |
32 | 33 | * @return string The content that is displayed on the website |
33 | 34 | */ |
34 | - public function main($content, $conf) { |
|
35 | + public function main($content, $conf) |
|
36 | + { |
|
35 | 37 | |
36 | 38 | $this->init($conf); |
37 | 39 |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | $this->init($conf); |
37 | 37 | |
38 | 38 | // Turn cache on. |
39 | - $this->setCache(TRUE); |
|
39 | + $this->setCache(true); |
|
40 | 40 | |
41 | 41 | // Quit without doing anything if required configuration variables are not set. |
42 | 42 | if (empty($this->conf['pages'])) { |
@@ -114,8 +114,8 @@ discard block |
||
114 | 114 | '###VOLUMES###' |
115 | 115 | ), |
116 | 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)) |
|
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 |
@@ -20,7 +20,8 @@ discard block |
||
20 | 20 | * @subpackage tx_dlf |
21 | 21 | * @access public |
22 | 22 | */ |
23 | -class tx_dlf_geturl_eid extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin { |
|
23 | +class tx_dlf_geturl_eid extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin |
|
24 | +{ |
|
24 | 25 | |
25 | 26 | /** |
26 | 27 | * |
@@ -38,7 +39,8 @@ discard block |
||
38 | 39 | * |
39 | 40 | * @return void |
40 | 41 | */ |
41 | - public function main($content = '', $conf = array ()) { |
|
42 | + public function main($content = '', $conf = array ()) |
|
43 | + { |
|
42 | 44 | |
43 | 45 | $this->cObj = GeneralUtility::makeInstance('TYPO3\\CMS\\Frontend\\ContentObject\\ContentObjectRenderer'); |
44 | 46 |
@@ -74,7 +74,7 @@ |
||
74 | 74 | $fetchedHeader = explode("\n", GeneralUtility::getUrl($url, 2)); |
75 | 75 | |
76 | 76 | foreach ($fetchedHeader as $headerline) { |
77 | - if (stripos($headerline, 'Last-Modified:') !== FALSE) { |
|
77 | + if (stripos($headerline, 'Last-Modified:') !== false) { |
|
78 | 78 | header($headerline); |
79 | 79 | } |
80 | 80 | } |
@@ -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 | |
@@ -60,11 +60,11 @@ discard block |
||
60 | 60 | $fetchedData = GeneralUtility::getUrl($url); |
61 | 61 | |
62 | 62 | // add some self calculated header tags |
63 | - header('Last-Modified: '.gmdate("D, d M Y H:i:s").'GMT'); |
|
63 | + header('Last-Modified: ' . gmdate("D, d M Y H:i:s") . 'GMT'); |
|
64 | 64 | header('Cache-Control: max-age=3600, must-revalidate'); |
65 | - header('Content-Length: '.strlen($fetchedData)); |
|
65 | + header('Content-Length: ' . strlen($fetchedData)); |
|
66 | 66 | $fi = finfo_open(FILEINFO_MIME); |
67 | - header('Content-Type: '.finfo_buffer($fi, $fetchedData)); |
|
67 | + header('Content-Type: ' . finfo_buffer($fi, $fetchedData)); |
|
68 | 68 | |
69 | 69 | // take some tags from request header and overwrite in case already set |
70 | 70 | $fetchedHeader = explode("\n", GeneralUtility::getUrl($url, 2)); |
@@ -17,7 +17,8 @@ discard block |
||
17 | 17 | * @subpackage tx_dlf |
18 | 18 | * @access public |
19 | 19 | */ |
20 | -class tx_dlf_pageview extends tx_dlf_plugin { |
|
20 | +class tx_dlf_pageview extends tx_dlf_plugin |
|
21 | +{ |
|
21 | 22 | |
22 | 23 | public $scriptRelPath = 'plugins/pageview/class.tx_dlf_pageview.php'; |
23 | 24 | |
@@ -52,7 +53,8 @@ discard block |
||
52 | 53 | * |
53 | 54 | * @return string Viewer script tags ready for output |
54 | 55 | */ |
55 | - protected function addViewerJS() { |
|
56 | + protected function addViewerJS() |
|
57 | + { |
|
56 | 58 | |
57 | 59 | $output = array (); |
58 | 60 | |
@@ -107,7 +109,8 @@ discard block |
||
107 | 109 | * |
108 | 110 | * @return array Marker array |
109 | 111 | */ |
110 | - protected function addInteraction() { |
|
112 | + protected function addInteraction() |
|
113 | + { |
|
111 | 114 | |
112 | 115 | $markerArray = array (); |
113 | 116 | |
@@ -155,7 +158,8 @@ discard block |
||
155 | 158 | * |
156 | 159 | * @return array Marker array |
157 | 160 | */ |
158 | - protected function addBasketForm() { |
|
161 | + protected function addBasketForm() |
|
162 | + { |
|
159 | 163 | |
160 | 164 | $markerArray = array (); |
161 | 165 | |
@@ -232,7 +236,8 @@ discard block |
||
232 | 236 | * |
233 | 237 | * @return array URL and MIME type of image file |
234 | 238 | */ |
235 | - protected function getImage($page) { |
|
239 | + protected function getImage($page) |
|
240 | + { |
|
236 | 241 | |
237 | 242 | $image = array (); |
238 | 243 | |
@@ -285,7 +290,8 @@ discard block |
||
285 | 290 | * |
286 | 291 | * @return array URL and MIME type of fulltext file |
287 | 292 | */ |
288 | - protected function getFulltext($page) { |
|
293 | + protected function getFulltext($page) |
|
294 | + { |
|
289 | 295 | |
290 | 296 | $fulltext = array (); |
291 | 297 | |
@@ -328,7 +334,8 @@ discard block |
||
328 | 334 | * |
329 | 335 | * @return string The content that is displayed on the website |
330 | 336 | */ |
331 | - public function main($content, $conf) { |
|
337 | + public function main($content, $conf) |
|
338 | + { |
|
332 | 339 | |
333 | 340 | $this->init($conf); |
334 | 341 |
@@ -121,9 +121,9 @@ discard block |
||
121 | 121 | |
122 | 122 | if ($this->conf['crop']) { |
123 | 123 | |
124 | - $markerArray['###EDITBUTTON###'] = '<a href="javascript: tx_dlf_viewer.activateSelection();">'.$this->pi_getLL('editMode', '', TRUE).'</a>'; |
|
124 | + $markerArray['###EDITBUTTON###'] = '<a href="javascript: tx_dlf_viewer.activateSelection();">'.$this->pi_getLL('editMode', '', true).'</a>'; |
|
125 | 125 | |
126 | - $markerArray['###EDITREMOVE###'] = '<a href="javascript: tx_dlf_viewer.resetCropSelection();">'.$this->pi_getLL('editRemove', '', TRUE).'</a>'; |
|
126 | + $markerArray['###EDITREMOVE###'] = '<a href="javascript: tx_dlf_viewer.resetCropSelection();">'.$this->pi_getLL('editRemove', '', true).'</a>'; |
|
127 | 127 | |
128 | 128 | } else { |
129 | 129 | |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | |
136 | 136 | if ($this->conf['magnifier']) { |
137 | 137 | |
138 | - $markerArray['###MAGNIFIER###'] = '<a href="javascript: tx_dlf_viewer.activateMagnifier();">'.$this->pi_getLL('magnifier', '', TRUE).'</a>'; |
|
138 | + $markerArray['###MAGNIFIER###'] = '<a href="javascript: tx_dlf_viewer.activateMagnifier();">'.$this->pi_getLL('magnifier', '', true).'</a>'; |
|
139 | 139 | |
140 | 140 | } else { |
141 | 141 | |
@@ -162,11 +162,11 @@ discard block |
||
162 | 162 | // Add basket button |
163 | 163 | if ($this->conf['basketButton'] && $this->conf['targetBasket'] && $this->piVars['id']) { |
164 | 164 | |
165 | - $label = $this->pi_getLL('addBasket', '', TRUE); |
|
165 | + $label = $this->pi_getLL('addBasket', '', true); |
|
166 | 166 | |
167 | 167 | $params = array ( |
168 | 168 | 'id' => $this->piVars['id'], |
169 | - 'addToBasket' => TRUE |
|
169 | + 'addToBasket' => true |
|
170 | 170 | ); |
171 | 171 | |
172 | 172 | if (empty($this->piVars['page'])) { |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | |
178 | 178 | $basketConf = array ( |
179 | 179 | 'parameter' => $this->conf['targetBasket'], |
180 | - 'additionalParams' => \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, $params, '', TRUE, FALSE), |
|
180 | + 'additionalParams' => \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, $params, '', true, false), |
|
181 | 181 | 'title' => $label |
182 | 182 | ); |
183 | 183 | |
@@ -335,7 +335,7 @@ discard block |
||
335 | 335 | // Load current document. |
336 | 336 | $this->loadDocument(); |
337 | 337 | |
338 | - if ($this->doc === NULL || $this->doc->numPages < 1) { |
|
338 | + if ($this->doc === null || $this->doc->numPages < 1) { |
|
339 | 339 | |
340 | 340 | // Quit without doing anything if required variables are not set. |
341 | 341 | return $content; |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | * @var array |
28 | 28 | * @access protected |
29 | 29 | */ |
30 | - protected $controls = array (); |
|
30 | + protected $controls = array(); |
|
31 | 31 | |
32 | 32 | /** |
33 | 33 | * Holds the current images' URLs and MIME types |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | * @var array |
36 | 36 | * @access protected |
37 | 37 | */ |
38 | - protected $images = array (); |
|
38 | + protected $images = array(); |
|
39 | 39 | |
40 | 40 | /** |
41 | 41 | * Holds the current fulltexts' URLs |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | * @var array |
44 | 44 | * @access protected |
45 | 45 | */ |
46 | - protected $fulltexts = array (); |
|
46 | + protected $fulltexts = array(); |
|
47 | 47 | |
48 | 48 | /** |
49 | 49 | * Adds Viewer javascript |
@@ -54,31 +54,31 @@ discard block |
||
54 | 54 | */ |
55 | 55 | protected function addViewerJS() { |
56 | 56 | |
57 | - $output = array (); |
|
57 | + $output = array(); |
|
58 | 58 | |
59 | 59 | // Add OpenLayers library. |
60 | - $output[] = '<link type="text/css" rel="stylesheet" href="'.\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'lib/OpenLayers/ol3.css">'; |
|
60 | + $output[] = '<link type="text/css" rel="stylesheet" href="' . \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey) . 'lib/OpenLayers/ol3.css">'; |
|
61 | 61 | |
62 | - $output[] = '<script type="text/javascript" src="'.\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'lib/OpenLayers/glif.min.js"></script>'; |
|
62 | + $output[] = '<script type="text/javascript" src="' . \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey) . 'lib/OpenLayers/glif.min.js"></script>'; |
|
63 | 63 | |
64 | - $output[] = '<script type="text/javascript" src="'.\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'lib/OpenLayers/ol3-dlf.js"></script>'; |
|
64 | + $output[] = '<script type="text/javascript" src="' . \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey) . 'lib/OpenLayers/ol3-dlf.js"></script>'; |
|
65 | 65 | |
66 | 66 | // Add viewer library. |
67 | - $output[] = '<script type="text/javascript" src="'.\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'plugins/pageview/tx_dlf_utils.js"></script>'; |
|
67 | + $output[] = '<script type="text/javascript" src="' . \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey) . 'plugins/pageview/tx_dlf_utils.js"></script>'; |
|
68 | 68 | |
69 | - $output[] = '<script type="text/javascript" src="'.\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'plugins/pageview/tx_dlf_ol3.js"></script>'; |
|
69 | + $output[] = '<script type="text/javascript" src="' . \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey) . 'plugins/pageview/tx_dlf_ol3.js"></script>'; |
|
70 | 70 | |
71 | - $output[] = '<script type="text/javascript" src="'.\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'plugins/pageview/tx_dlf_ol3_styles.js"></script>'; |
|
71 | + $output[] = '<script type="text/javascript" src="' . \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey) . 'plugins/pageview/tx_dlf_ol3_styles.js"></script>'; |
|
72 | 72 | |
73 | - $output[] = '<script type="text/javascript" src="'.\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'plugins/pageview/tx_dlf_ol3_source.js"></script>'; |
|
73 | + $output[] = '<script type="text/javascript" src="' . \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey) . 'plugins/pageview/tx_dlf_ol3_source.js"></script>'; |
|
74 | 74 | |
75 | - $output[] = '<script type="text/javascript" src="'.\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'plugins/pageview/tx_dlf_altoparser.js"></script>'; |
|
75 | + $output[] = '<script type="text/javascript" src="' . \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey) . 'plugins/pageview/tx_dlf_altoparser.js"></script>'; |
|
76 | 76 | |
77 | - $output[] = '<script type="text/javascript" src="'.\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'plugins/pageview/tx_dlf_pageview_imagemanipulation_control.js"></script>'; |
|
77 | + $output[] = '<script type="text/javascript" src="' . \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey) . 'plugins/pageview/tx_dlf_pageview_imagemanipulation_control.js"></script>'; |
|
78 | 78 | |
79 | - $output[] = '<script type="text/javascript" src="'.\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'plugins/pageview/tx_dlf_pageview_fulltext_control.js"></script>'; |
|
79 | + $output[] = '<script type="text/javascript" src="' . \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey) . 'plugins/pageview/tx_dlf_pageview_fulltext_control.js"></script>'; |
|
80 | 80 | |
81 | - $output[] = '<script type="text/javascript" src="'.\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'plugins/pageview/tx_dlf_pageview.js"></script>'; |
|
81 | + $output[] = '<script type="text/javascript" src="' . \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey) . 'plugins/pageview/tx_dlf_pageview.js"></script>'; |
|
82 | 82 | |
83 | 83 | // Add viewer configuration. |
84 | 84 | $output[] = ' |
@@ -86,11 +86,11 @@ discard block |
||
86 | 86 | window.onload = function() { |
87 | 87 | if (dlfUtils.exists(dlfViewer)) { |
88 | 88 | tx_dlf_viewer = new dlfViewer({ |
89 | - controls: ["'.implode('", "', $this->controls).'"], |
|
90 | - div: "'.$this->conf['elementId'].'", |
|
91 | - images: '.json_encode($this->images).', |
|
92 | - fulltexts: '.json_encode($this->fulltexts).', |
|
93 | - useInternalProxy: '.($this->conf['useInternalProxy'] ? 1 : 0).' |
|
89 | + controls: ["'.implode('", "', $this->controls) . '"], |
|
90 | + div: "'.$this->conf['elementId'] . '", |
|
91 | + images: '.json_encode($this->images) . ', |
|
92 | + fulltexts: '.json_encode($this->fulltexts) . ', |
|
93 | + useInternalProxy: '.($this->conf['useInternalProxy'] ? 1 : 0) . ' |
|
94 | 94 | }) |
95 | 95 | } |
96 | 96 | } |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | */ |
110 | 110 | protected function addInteraction() { |
111 | 111 | |
112 | - $markerArray = array (); |
|
112 | + $markerArray = array(); |
|
113 | 113 | |
114 | 114 | if ($this->piVars['id']) { |
115 | 115 | |
@@ -121,9 +121,9 @@ discard block |
||
121 | 121 | |
122 | 122 | if ($this->conf['crop']) { |
123 | 123 | |
124 | - $markerArray['###EDITBUTTON###'] = '<a href="javascript: tx_dlf_viewer.activateSelection();">'.$this->pi_getLL('editMode', '', TRUE).'</a>'; |
|
124 | + $markerArray['###EDITBUTTON###'] = '<a href="javascript: tx_dlf_viewer.activateSelection();">' . $this->pi_getLL('editMode', '', TRUE) . '</a>'; |
|
125 | 125 | |
126 | - $markerArray['###EDITREMOVE###'] = '<a href="javascript: tx_dlf_viewer.resetCropSelection();">'.$this->pi_getLL('editRemove', '', TRUE).'</a>'; |
|
126 | + $markerArray['###EDITREMOVE###'] = '<a href="javascript: tx_dlf_viewer.resetCropSelection();">' . $this->pi_getLL('editRemove', '', TRUE) . '</a>'; |
|
127 | 127 | |
128 | 128 | } else { |
129 | 129 | |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | |
136 | 136 | if ($this->conf['magnifier']) { |
137 | 137 | |
138 | - $markerArray['###MAGNIFIER###'] = '<a href="javascript: tx_dlf_viewer.activateMagnifier();">'.$this->pi_getLL('magnifier', '', TRUE).'</a>'; |
|
138 | + $markerArray['###MAGNIFIER###'] = '<a href="javascript: tx_dlf_viewer.activateMagnifier();">' . $this->pi_getLL('magnifier', '', TRUE) . '</a>'; |
|
139 | 139 | |
140 | 140 | } else { |
141 | 141 | |
@@ -157,14 +157,14 @@ discard block |
||
157 | 157 | */ |
158 | 158 | protected function addBasketForm() { |
159 | 159 | |
160 | - $markerArray = array (); |
|
160 | + $markerArray = array(); |
|
161 | 161 | |
162 | 162 | // Add basket button |
163 | 163 | if ($this->conf['basketButton'] && $this->conf['targetBasket'] && $this->piVars['id']) { |
164 | 164 | |
165 | 165 | $label = $this->pi_getLL('addBasket', '', TRUE); |
166 | 166 | |
167 | - $params = array ( |
|
167 | + $params = array( |
|
168 | 168 | 'id' => $this->piVars['id'], |
169 | 169 | 'addToBasket' => TRUE |
170 | 170 | ); |
@@ -175,17 +175,17 @@ discard block |
||
175 | 175 | |
176 | 176 | } |
177 | 177 | |
178 | - $basketConf = array ( |
|
178 | + $basketConf = array( |
|
179 | 179 | 'parameter' => $this->conf['targetBasket'], |
180 | 180 | 'additionalParams' => \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, $params, '', TRUE, FALSE), |
181 | 181 | 'title' => $label |
182 | 182 | ); |
183 | 183 | |
184 | - $output = '<form id="addToBasketForm" action="'.$this->cObj->typoLink_URL($basketConf).'" method="post">'; |
|
184 | + $output = '<form id="addToBasketForm" action="' . $this->cObj->typoLink_URL($basketConf) . '" method="post">'; |
|
185 | 185 | |
186 | - $output .= '<input type="hidden" name="tx_dlf[startpage]" id="startpage" value="'.htmlspecialchars($this->piVars['page']).'">'; |
|
186 | + $output .= '<input type="hidden" name="tx_dlf[startpage]" id="startpage" value="' . htmlspecialchars($this->piVars['page']) . '">'; |
|
187 | 187 | |
188 | - $output .= '<input type="hidden" name="tx_dlf[endpage]" id="endpage" value="'.htmlspecialchars($this->piVars['page']).'">'; |
|
188 | + $output .= '<input type="hidden" name="tx_dlf[endpage]" id="endpage" value="' . htmlspecialchars($this->piVars['page']) . '">'; |
|
189 | 189 | |
190 | 190 | $output .= '<input type="hidden" name="tx_dlf[startX]" id="startX">'; |
191 | 191 | |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | |
198 | 198 | $output .= '<input type="hidden" name="tx_dlf[rotation]" id="rotation">'; |
199 | 199 | |
200 | - $output .= '<button id="submitBasketForm" onclick="this.form.submit()">'.$label.'</button>'; |
|
200 | + $output .= '<button id="submitBasketForm" onclick="this.form.submit()">' . $label . '</button>'; |
|
201 | 201 | |
202 | 202 | $output .= '</form>'; |
203 | 203 | |
@@ -234,7 +234,7 @@ discard block |
||
234 | 234 | */ |
235 | 235 | protected function getImage($page) { |
236 | 236 | |
237 | - $image = array (); |
|
237 | + $image = array(); |
|
238 | 238 | |
239 | 239 | // Get @USE value of METS fileGrp. |
240 | 240 | $fileGrps = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->conf['fileGrps']); |
@@ -248,9 +248,9 @@ discard block |
||
248 | 248 | |
249 | 249 | if ($this->conf['useInternalProxy']) { |
250 | 250 | // Configure @action URL for form. |
251 | - $linkConf = array ( |
|
251 | + $linkConf = array( |
|
252 | 252 | 'parameter' => $GLOBALS['TSFE']->id, |
253 | - 'additionalParams' => '&eID=tx_dlf_geturl_eid&url='.urlencode($image['url']) . '&uHash=' . \TYPO3\CMS\Core\Utility\GeneralUtility::hmac($image['url'], 'PageViewProxy'), |
|
253 | + 'additionalParams' => '&eID=tx_dlf_geturl_eid&url=' . urlencode($image['url']) . '&uHash=' . \TYPO3\CMS\Core\Utility\GeneralUtility::hmac($image['url'], 'PageViewProxy'), |
|
254 | 254 | ); |
255 | 255 | |
256 | 256 | $image['url'] = $this->cObj->typoLink_URL($linkConf); |
@@ -264,7 +264,7 @@ discard block |
||
264 | 264 | |
265 | 265 | if (TYPO3_DLOG) { |
266 | 266 | |
267 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_pageview->getImage('.$page.')] File not found in fileGrp "'.$fileGrp.'"', $this->extKey, SYSLOG_SEVERITY_WARNING); |
|
267 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_pageview->getImage(' . $page . ')] File not found in fileGrp "' . $fileGrp . '"', $this->extKey, SYSLOG_SEVERITY_WARNING); |
|
268 | 268 | |
269 | 269 | } |
270 | 270 | |
@@ -287,7 +287,7 @@ discard block |
||
287 | 287 | */ |
288 | 288 | protected function getFulltext($page) { |
289 | 289 | |
290 | - $fulltext = array (); |
|
290 | + $fulltext = array(); |
|
291 | 291 | |
292 | 292 | // Get fulltext link. |
293 | 293 | if (!empty($this->doc->physicalStructureInfo[$this->doc->physicalStructure[$page]]['files'][$this->conf['fileGrpFulltext']])) { |
@@ -295,9 +295,9 @@ discard block |
||
295 | 295 | $fulltext['url'] = $this->doc->getFileLocation($this->doc->physicalStructureInfo[$this->doc->physicalStructure[$page]]['files'][$this->conf['fileGrpFulltext']]); |
296 | 296 | |
297 | 297 | // Configure @action URL for form. |
298 | - $linkConf = array ( |
|
298 | + $linkConf = array( |
|
299 | 299 | 'parameter' => $GLOBALS['TSFE']->id, |
300 | - 'additionalParams' => '&eID=tx_dlf_geturl_eid&url='.urlencode($fulltext['url']) . '&uHash=' . \TYPO3\CMS\Core\Utility\GeneralUtility::hmac($fulltext['url'], 'PageViewProxy'), |
|
300 | + 'additionalParams' => '&eID=tx_dlf_geturl_eid&url=' . urlencode($fulltext['url']) . '&uHash=' . \TYPO3\CMS\Core\Utility\GeneralUtility::hmac($fulltext['url'], 'PageViewProxy'), |
|
301 | 301 | ); |
302 | 302 | |
303 | 303 | $fulltext['url'] = $this->cObj->typoLink_URL($linkConf); |
@@ -308,7 +308,7 @@ discard block |
||
308 | 308 | |
309 | 309 | if (TYPO3_DLOG) { |
310 | 310 | |
311 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_pageview->getFulltext('.$page.')] File not found in fileGrp "'.$this->conf['fileGrpFulltext'].'"', $this->extKey, SYSLOG_SEVERITY_WARNING); |
|
311 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_pageview->getFulltext(' . $page . ')] File not found in fileGrp "' . $this->conf['fileGrpFulltext'] . '"', $this->extKey, SYSLOG_SEVERITY_WARNING); |
|
312 | 312 | |
313 | 313 | } |
314 | 314 | |
@@ -392,7 +392,7 @@ discard block |
||
392 | 392 | $this->controls = explode(',', $this->conf['features']); |
393 | 393 | |
394 | 394 | // Fill in the template markers. |
395 | - $markerArray = array ( |
|
395 | + $markerArray = array( |
|
396 | 396 | '###VIEWER_JS###' => $this->addViewerJS() |
397 | 397 | ); |
398 | 398 |
@@ -17,7 +17,8 @@ discard block |
||
17 | 17 | * @subpackage tx_dlf |
18 | 18 | * @access public |
19 | 19 | */ |
20 | -class tx_dlf_validator extends tx_dlf_plugin { |
|
20 | +class tx_dlf_validator extends tx_dlf_plugin |
|
21 | +{ |
|
21 | 22 | |
22 | 23 | public $scriptRelPath = 'plugins/validator/class.tx_dlf_validator.php'; |
23 | 24 | |
@@ -31,7 +32,8 @@ discard block |
||
31 | 32 | * |
32 | 33 | * @return string The content that is displayed on the website |
33 | 34 | */ |
34 | - public function main($content, $conf) { |
|
35 | + public function main($content, $conf) |
|
36 | + { |
|
35 | 37 | |
36 | 38 | $this->init($conf); |
37 | 39 |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | $this->init($conf); |
37 | 37 | |
38 | 38 | // Disable caching for this plugin. |
39 | - $this->setCache(FALSE); |
|
39 | + $this->setCache(false); |
|
40 | 40 | |
41 | 41 | // Load template file. |
42 | 42 | if (!empty($this->conf['templateFile'])) { |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | // Load current document. |
53 | 53 | $this->loadDocument(); |
54 | 54 | |
55 | - if ($this->doc === NULL) { |
|
55 | + if ($this->doc === null) { |
|
56 | 56 | |
57 | 57 | // Document could not be loaded. |
58 | 58 | // Check: |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | * @var array |
28 | 28 | * @access protected |
29 | 29 | */ |
30 | - protected $activeEntries = array (); |
|
30 | + protected $activeEntries = array(); |
|
31 | 31 | |
32 | 32 | /** |
33 | 33 | * This builds an array for one menu entry |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | */ |
42 | 42 | protected function getMenuEntry(array $entry, $recursive = FALSE) { |
43 | 43 | |
44 | - $entryArray = array (); |
|
44 | + $entryArray = array(); |
|
45 | 45 | |
46 | 46 | // Set "title", "volume", "type" and "pagination" from $entry array. |
47 | 47 | $entryArray['title'] = !empty($entry['label']) ? $entry['label'] : $entry['orderlabel']; |
@@ -63,37 +63,37 @@ discard block |
||
63 | 63 | // Build menu links based on the $entry['points'] array. |
64 | 64 | if (!empty($entry['points']) && \TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($entry['points'])) { |
65 | 65 | |
66 | - $entryArray['_OVERRIDE_HREF'] = $this->pi_linkTP_keepPIvars_url(array ('page' => $entry['points']), TRUE, FALSE, $this->conf['targetPid']); |
|
66 | + $entryArray['_OVERRIDE_HREF'] = $this->pi_linkTP_keepPIvars_url(array('page' => $entry['points']), TRUE, FALSE, $this->conf['targetPid']); |
|
67 | 67 | |
68 | 68 | $entryArray['doNotLinkIt'] = 0; |
69 | 69 | |
70 | 70 | if ($this->conf['basketButton']) { |
71 | 71 | |
72 | - $entryArray['basketButtonHref'] = '<a href="'.$this->pi_linkTP_keepPIvars_url(array ('addToBasket' => 'toc', 'logId' => $entry['id'], 'startpage' => $entry['points']), TRUE, FALSE, $this->conf['targetBasket']).'">'.$this->pi_getLL('basketButton', '', TRUE).'</a>'; |
|
72 | + $entryArray['basketButtonHref'] = '<a href="' . $this->pi_linkTP_keepPIvars_url(array('addToBasket' => 'toc', 'logId' => $entry['id'], 'startpage' => $entry['points']), TRUE, FALSE, $this->conf['targetBasket']) . '">' . $this->pi_getLL('basketButton', '', TRUE) . '</a>'; |
|
73 | 73 | |
74 | 74 | } |
75 | 75 | |
76 | 76 | } elseif (!empty($entry['points']) && is_string($entry['points'])) { |
77 | 77 | |
78 | - $entryArray['_OVERRIDE_HREF'] = $this->pi_linkTP_keepPIvars_url(array ('id' => $entry['points'], 'page' => 1), TRUE, FALSE, $this->conf['targetPid']); |
|
78 | + $entryArray['_OVERRIDE_HREF'] = $this->pi_linkTP_keepPIvars_url(array('id' => $entry['points'], 'page' => 1), TRUE, FALSE, $this->conf['targetPid']); |
|
79 | 79 | |
80 | 80 | $entryArray['doNotLinkIt'] = 0; |
81 | 81 | |
82 | 82 | if ($this->conf['basketButton']) { |
83 | 83 | |
84 | - $entryArray['basketButtonHref'] = '<a href="'.$this->pi_linkTP_keepPIvars_url(array ('addToBasket' => 'toc', 'logId' => $entry['id'], 'startpage' => $entry['points']), TRUE, FALSE, $this->conf['targetBasket']).'">'.$this->pi_getLL('basketButton', '', TRUE).'</a>'; |
|
84 | + $entryArray['basketButtonHref'] = '<a href="' . $this->pi_linkTP_keepPIvars_url(array('addToBasket' => 'toc', 'logId' => $entry['id'], 'startpage' => $entry['points']), TRUE, FALSE, $this->conf['targetBasket']) . '">' . $this->pi_getLL('basketButton', '', TRUE) . '</a>'; |
|
85 | 85 | |
86 | 86 | } |
87 | 87 | |
88 | 88 | } elseif (!empty($entry['targetUid'])) { |
89 | 89 | |
90 | - $entryArray['_OVERRIDE_HREF'] = $this->pi_linkTP_keepPIvars_url(array ('id' => $entry['targetUid'], 'page' => 1), TRUE, FALSE, $this->conf['targetPid']); |
|
90 | + $entryArray['_OVERRIDE_HREF'] = $this->pi_linkTP_keepPIvars_url(array('id' => $entry['targetUid'], 'page' => 1), TRUE, FALSE, $this->conf['targetPid']); |
|
91 | 91 | |
92 | 92 | $entryArray['doNotLinkIt'] = 0; |
93 | 93 | |
94 | 94 | if ($this->conf['basketButton']) { |
95 | 95 | |
96 | - $entryArray['basketButtonHref'] = '<a href="'.$this->pi_linkTP_keepPIvars_url(array ('addToBasket' => 'toc', 'logId' => $entry['id'], 'startpage' => $entry['targetUid']), TRUE, FALSE, $this->conf['targetBasket']).'">'.$this->pi_getLL('basketButton', '', TRUE).'</a>'; |
|
96 | + $entryArray['basketButtonHref'] = '<a href="' . $this->pi_linkTP_keepPIvars_url(array('addToBasket' => 'toc', 'logId' => $entry['id'], 'startpage' => $entry['targetUid']), TRUE, FALSE, $this->conf['targetBasket']) . '">' . $this->pi_getLL('basketButton', '', TRUE) . '</a>'; |
|
97 | 97 | |
98 | 98 | } |
99 | 99 | |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | // 4. Current menu node has no corresponding images |
117 | 117 | if (!empty($this->conf['menuConf.']['expAll']) || $entryArray['ITEM_STATE'] == 'CUR' || is_string($entry['points']) || empty($this->doc->smLinks['l2p'][$entry['id']])) { |
118 | 118 | |
119 | - $entryArray['_SUB_MENU'] = array (); |
|
119 | + $entryArray['_SUB_MENU'] = array(); |
|
120 | 120 | |
121 | 121 | foreach ($entry['children'] as $child) { |
122 | 122 | |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | } |
135 | 135 | |
136 | 136 | // Append "IFSUB" to "ITEM_STATE" if this entry has sub-entries. |
137 | - $entryArray['ITEM_STATE'] = ($entryArray['ITEM_STATE'] == 'NO' ? 'IFSUB' : $entryArray['ITEM_STATE'].'IFSUB'); |
|
137 | + $entryArray['ITEM_STATE'] = ($entryArray['ITEM_STATE'] == 'NO' ? 'IFSUB' : $entryArray['ITEM_STATE'] . 'IFSUB'); |
|
138 | 138 | |
139 | 139 | } |
140 | 140 | |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | |
162 | 162 | if (TYPO3_DLOG) { |
163 | 163 | |
164 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_toc->main('.$content.', [data])] Incomplete plugin configuration', $this->extKey, SYSLOG_SEVERITY_WARNING, $conf); |
|
164 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_toc->main(' . $content . ', [data])] Incomplete plugin configuration', $this->extKey, SYSLOG_SEVERITY_WARNING, $conf); |
|
165 | 165 | |
166 | 166 | } |
167 | 167 | |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | |
181 | 181 | } |
182 | 182 | |
183 | - $TSconfig = array (); |
|
183 | + $TSconfig = array(); |
|
184 | 184 | |
185 | 185 | $TSconfig['special'] = 'userfunction'; |
186 | 186 | |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | if ($this->doc === NULL) { |
217 | 217 | |
218 | 218 | // Quit without doing anything if required variables are not set. |
219 | - return array (); |
|
219 | + return array(); |
|
220 | 220 | |
221 | 221 | } else { |
222 | 222 | |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | |
245 | 245 | } |
246 | 246 | |
247 | - $menuArray = array (); |
|
247 | + $menuArray = array(); |
|
248 | 248 | |
249 | 249 | // Does the document have physical elements or is it an external file? |
250 | 250 | if ($this->doc->physicalStructure || !\TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($this->doc->uid)) { |
@@ -279,11 +279,11 @@ discard block |
||
279 | 279 | } |
280 | 280 | |
281 | 281 | // Get all child documents from database. |
282 | - $whereClause = 'tx_dlf_documents.partof='.intval($this->doc->uid).' AND tx_dlf_documents.structure=tx_dlf_structures.uid AND tx_dlf_structures.pid='.$this->doc->pid.tx_dlf_helper::whereClause('tx_dlf_documents').tx_dlf_helper::whereClause('tx_dlf_structures'); |
|
282 | + $whereClause = 'tx_dlf_documents.partof=' . intval($this->doc->uid) . ' AND tx_dlf_documents.structure=tx_dlf_structures.uid AND tx_dlf_structures.pid=' . $this->doc->pid . tx_dlf_helper::whereClause('tx_dlf_documents') . tx_dlf_helper::whereClause('tx_dlf_structures'); |
|
283 | 283 | |
284 | 284 | if ($this->conf['excludeOther']) { |
285 | 285 | |
286 | - $whereClause .= ' AND tx_dlf_documents.pid='.intval($this->conf['pages']); |
|
286 | + $whereClause .= ' AND tx_dlf_documents.pid=' . intval($this->conf['pages']); |
|
287 | 287 | |
288 | 288 | } |
289 | 289 | |
@@ -301,11 +301,11 @@ discard block |
||
301 | 301 | |
302 | 302 | $menuArray[0]['ITEM_STATE'] = 'CURIFSUB'; |
303 | 303 | |
304 | - $menuArray[0]['_SUB_MENU'] = array (); |
|
304 | + $menuArray[0]['_SUB_MENU'] = array(); |
|
305 | 305 | |
306 | 306 | while ($resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)) { |
307 | 307 | |
308 | - $entry = array ( |
|
308 | + $entry = array( |
|
309 | 309 | 'label' => $resArray['title'], |
310 | 310 | 'type' => $resArray['type'], |
311 | 311 | 'volume' => $resArray['volume'], |
@@ -17,7 +17,8 @@ discard block |
||
17 | 17 | * @subpackage tx_dlf |
18 | 18 | * @access public |
19 | 19 | */ |
20 | -class tx_dlf_toc extends tx_dlf_plugin { |
|
20 | +class tx_dlf_toc extends tx_dlf_plugin |
|
21 | +{ |
|
21 | 22 | |
22 | 23 | public $scriptRelPath = 'plugins/toc/class.tx_dlf_toc.php'; |
23 | 24 | |
@@ -39,7 +40,8 @@ discard block |
||
39 | 40 | * |
40 | 41 | * @return array HMENU array for menu entry |
41 | 42 | */ |
42 | - protected function getMenuEntry(array $entry, $recursive = FALSE) { |
|
43 | + protected function getMenuEntry(array $entry, $recursive = FALSE) |
|
44 | + { |
|
43 | 45 | |
44 | 46 | $entryArray = array (); |
45 | 47 | |
@@ -152,7 +154,8 @@ discard block |
||
152 | 154 | * |
153 | 155 | * @return string The content that is displayed on the website |
154 | 156 | */ |
155 | - public function main($content, $conf) { |
|
157 | + public function main($content, $conf) |
|
158 | + { |
|
156 | 159 | |
157 | 160 | $this->init($conf); |
158 | 161 | |
@@ -206,7 +209,8 @@ discard block |
||
206 | 209 | * |
207 | 210 | * @return array HMENU array |
208 | 211 | */ |
209 | - public function makeMenuArray($content, $conf) { |
|
212 | + public function makeMenuArray($content, $conf) |
|
213 | + { |
|
210 | 214 | |
211 | 215 | $this->init($conf); |
212 | 216 |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | * |
40 | 40 | * @return array HMENU array for menu entry |
41 | 41 | */ |
42 | - protected function getMenuEntry(array $entry, $recursive = FALSE) { |
|
42 | + protected function getMenuEntry(array $entry, $recursive = false) { |
|
43 | 43 | |
44 | 44 | $entryArray = array (); |
45 | 45 | |
@@ -63,37 +63,37 @@ discard block |
||
63 | 63 | // Build menu links based on the $entry['points'] array. |
64 | 64 | if (!empty($entry['points']) && \TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($entry['points'])) { |
65 | 65 | |
66 | - $entryArray['_OVERRIDE_HREF'] = $this->pi_linkTP_keepPIvars_url(array ('page' => $entry['points']), TRUE, FALSE, $this->conf['targetPid']); |
|
66 | + $entryArray['_OVERRIDE_HREF'] = $this->pi_linkTP_keepPIvars_url(array ('page' => $entry['points']), true, false, $this->conf['targetPid']); |
|
67 | 67 | |
68 | 68 | $entryArray['doNotLinkIt'] = 0; |
69 | 69 | |
70 | 70 | if ($this->conf['basketButton']) { |
71 | 71 | |
72 | - $entryArray['basketButtonHref'] = '<a href="'.$this->pi_linkTP_keepPIvars_url(array ('addToBasket' => 'toc', 'logId' => $entry['id'], 'startpage' => $entry['points']), TRUE, FALSE, $this->conf['targetBasket']).'">'.$this->pi_getLL('basketButton', '', TRUE).'</a>'; |
|
72 | + $entryArray['basketButtonHref'] = '<a href="'.$this->pi_linkTP_keepPIvars_url(array ('addToBasket' => 'toc', 'logId' => $entry['id'], 'startpage' => $entry['points']), true, false, $this->conf['targetBasket']).'">'.$this->pi_getLL('basketButton', '', true).'</a>'; |
|
73 | 73 | |
74 | 74 | } |
75 | 75 | |
76 | 76 | } elseif (!empty($entry['points']) && is_string($entry['points'])) { |
77 | 77 | |
78 | - $entryArray['_OVERRIDE_HREF'] = $this->pi_linkTP_keepPIvars_url(array ('id' => $entry['points'], 'page' => 1), TRUE, FALSE, $this->conf['targetPid']); |
|
78 | + $entryArray['_OVERRIDE_HREF'] = $this->pi_linkTP_keepPIvars_url(array ('id' => $entry['points'], 'page' => 1), true, false, $this->conf['targetPid']); |
|
79 | 79 | |
80 | 80 | $entryArray['doNotLinkIt'] = 0; |
81 | 81 | |
82 | 82 | if ($this->conf['basketButton']) { |
83 | 83 | |
84 | - $entryArray['basketButtonHref'] = '<a href="'.$this->pi_linkTP_keepPIvars_url(array ('addToBasket' => 'toc', 'logId' => $entry['id'], 'startpage' => $entry['points']), TRUE, FALSE, $this->conf['targetBasket']).'">'.$this->pi_getLL('basketButton', '', TRUE).'</a>'; |
|
84 | + $entryArray['basketButtonHref'] = '<a href="'.$this->pi_linkTP_keepPIvars_url(array ('addToBasket' => 'toc', 'logId' => $entry['id'], 'startpage' => $entry['points']), true, false, $this->conf['targetBasket']).'">'.$this->pi_getLL('basketButton', '', true).'</a>'; |
|
85 | 85 | |
86 | 86 | } |
87 | 87 | |
88 | 88 | } elseif (!empty($entry['targetUid'])) { |
89 | 89 | |
90 | - $entryArray['_OVERRIDE_HREF'] = $this->pi_linkTP_keepPIvars_url(array ('id' => $entry['targetUid'], 'page' => 1), TRUE, FALSE, $this->conf['targetPid']); |
|
90 | + $entryArray['_OVERRIDE_HREF'] = $this->pi_linkTP_keepPIvars_url(array ('id' => $entry['targetUid'], 'page' => 1), true, false, $this->conf['targetPid']); |
|
91 | 91 | |
92 | 92 | $entryArray['doNotLinkIt'] = 0; |
93 | 93 | |
94 | 94 | if ($this->conf['basketButton']) { |
95 | 95 | |
96 | - $entryArray['basketButtonHref'] = '<a href="'.$this->pi_linkTP_keepPIvars_url(array ('addToBasket' => 'toc', 'logId' => $entry['id'], 'startpage' => $entry['targetUid']), TRUE, FALSE, $this->conf['targetBasket']).'">'.$this->pi_getLL('basketButton', '', TRUE).'</a>'; |
|
96 | + $entryArray['basketButtonHref'] = '<a href="'.$this->pi_linkTP_keepPIvars_url(array ('addToBasket' => 'toc', 'logId' => $entry['id'], 'startpage' => $entry['targetUid']), true, false, $this->conf['targetBasket']).'">'.$this->pi_getLL('basketButton', '', true).'</a>'; |
|
97 | 97 | |
98 | 98 | } |
99 | 99 | |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | } |
108 | 108 | |
109 | 109 | // Build sub-menu if available and called recursively. |
110 | - if ($recursive == TRUE && !empty($entry['children'])) { |
|
110 | + if ($recursive == true && !empty($entry['children'])) { |
|
111 | 111 | |
112 | 112 | // Build sub-menu only if one of the following conditions apply: |
113 | 113 | // 1. "expAll" is set for menu |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | |
128 | 128 | } |
129 | 129 | |
130 | - $entryArray['_SUB_MENU'][] = $this->getMenuEntry($child, TRUE); |
|
130 | + $entryArray['_SUB_MENU'][] = $this->getMenuEntry($child, true); |
|
131 | 131 | |
132 | 132 | } |
133 | 133 | |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | // Load current document. |
214 | 214 | $this->loadDocument(); |
215 | 215 | |
216 | - if ($this->doc === NULL) { |
|
216 | + if ($this->doc === null) { |
|
217 | 217 | |
218 | 218 | // Quit without doing anything if required variables are not set. |
219 | 219 | return array (); |
@@ -265,7 +265,7 @@ discard block |
||
265 | 265 | // Go through table of contents and create all menu entries. |
266 | 266 | foreach ($this->doc->tableOfContents as $entry) { |
267 | 267 | |
268 | - $menuArray[] = $this->getMenuEntry($entry, TRUE); |
|
268 | + $menuArray[] = $this->getMenuEntry($entry, true); |
|
269 | 269 | |
270 | 270 | } |
271 | 271 | |
@@ -274,7 +274,7 @@ discard block |
||
274 | 274 | // Go through table of contents and create top-level menu entries. |
275 | 275 | foreach ($this->doc->tableOfContents as $entry) { |
276 | 276 | |
277 | - $menuArray[] = $this->getMenuEntry($entry, FALSE); |
|
277 | + $menuArray[] = $this->getMenuEntry($entry, false); |
|
278 | 278 | |
279 | 279 | } |
280 | 280 | |
@@ -313,7 +313,7 @@ discard block |
||
313 | 313 | 'targetUid' => $resArray['uid'] |
314 | 314 | ); |
315 | 315 | |
316 | - $menuArray[0]['_SUB_MENU'][] = $this->getMenuEntry($entry, FALSE); |
|
316 | + $menuArray[0]['_SUB_MENU'][] = $this->getMenuEntry($entry, false); |
|
317 | 317 | |
318 | 318 | } |
319 | 319 |