We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -20,271 +20,271 @@ |
||
20 | 20 | */ |
21 | 21 | class tx_dlf_pagegrid extends tx_dlf_plugin { |
22 | 22 | |
23 | - public $scriptRelPath = 'plugins/pagegrid/class.tx_dlf_pagegrid.php'; |
|
23 | + public $scriptRelPath = 'plugins/pagegrid/class.tx_dlf_pagegrid.php'; |
|
24 | 24 | |
25 | - /** |
|
26 | - * Renders entry for one page of the current document. |
|
27 | - * |
|
28 | - * @access protected |
|
29 | - * |
|
30 | - * @param integer $number: The page to render |
|
31 | - * @param string $template: Parsed template subpart |
|
32 | - * |
|
33 | - * @return string The rendered entry ready for output |
|
34 | - */ |
|
35 | - protected function getEntry($number, $template) { |
|
25 | + /** |
|
26 | + * Renders entry for one page of the current document. |
|
27 | + * |
|
28 | + * @access protected |
|
29 | + * |
|
30 | + * @param integer $number: The page to render |
|
31 | + * @param string $template: Parsed template subpart |
|
32 | + * |
|
33 | + * @return string The rendered entry ready for output |
|
34 | + */ |
|
35 | + protected function getEntry($number, $template) { |
|
36 | 36 | |
37 | - // Set current page if applicable. |
|
38 | - if (!empty($this->piVars['page']) && $this->piVars['page'] == $number) { |
|
37 | + // Set current page if applicable. |
|
38 | + if (!empty($this->piVars['page']) && $this->piVars['page'] == $number) { |
|
39 | 39 | |
40 | - $markerArray['###STATE###'] = 'cur'; |
|
40 | + $markerArray['###STATE###'] = 'cur'; |
|
41 | 41 | |
42 | - } else { |
|
42 | + } else { |
|
43 | 43 | |
44 | - $markerArray['###STATE###'] = 'no'; |
|
44 | + $markerArray['###STATE###'] = 'no'; |
|
45 | 45 | |
46 | - } |
|
46 | + } |
|
47 | 47 | |
48 | - // Set page number. |
|
49 | - $markerArray['###NUMBER###'] = $number; |
|
48 | + // Set page number. |
|
49 | + $markerArray['###NUMBER###'] = $number; |
|
50 | 50 | |
51 | - // Set pagination. |
|
52 | - $markerArray['###PAGINATION###'] = $this->doc->physicalStructureInfo[$this->doc->physicalStructure[$number]]['orderlabel']; |
|
51 | + // Set pagination. |
|
52 | + $markerArray['###PAGINATION###'] = $this->doc->physicalStructureInfo[$this->doc->physicalStructure[$number]]['orderlabel']; |
|
53 | 53 | |
54 | - // Get thumbnail or placeholder. |
|
55 | - if (!empty($this->doc->physicalStructureInfo[$this->doc->physicalStructure[$number]]['files'][$this->conf['fileGrpThumbs']])) { |
|
54 | + // Get thumbnail or placeholder. |
|
55 | + if (!empty($this->doc->physicalStructureInfo[$this->doc->physicalStructure[$number]]['files'][$this->conf['fileGrpThumbs']])) { |
|
56 | 56 | |
57 | - $thumbnailFile = $this->doc->getFileLocation($this->doc->physicalStructureInfo[$this->doc->physicalStructure[$number]]['files'][$this->conf['fileGrpThumbs']]); |
|
57 | + $thumbnailFile = $this->doc->getFileLocation($this->doc->physicalStructureInfo[$this->doc->physicalStructure[$number]]['files'][$this->conf['fileGrpThumbs']]); |
|
58 | 58 | |
59 | - } elseif (!empty($this->conf['placeholder'])) { |
|
59 | + } elseif (!empty($this->conf['placeholder'])) { |
|
60 | 60 | |
61 | - $thumbnailFile = $GLOBALS['TSFE']->tmpl->getFileName($this->conf['placeholder']); |
|
61 | + $thumbnailFile = $GLOBALS['TSFE']->tmpl->getFileName($this->conf['placeholder']); |
|
62 | 62 | |
63 | - } else { |
|
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 | - // Get new plugin variables for typolink. |
|
72 | - $piVars = $this->piVars; |
|
71 | + // Get new plugin variables for typolink. |
|
72 | + $piVars = $this->piVars; |
|
73 | 73 | |
74 | - // Unset no longer needed plugin variables. |
|
75 | - // unset($piVars['pagegrid']) is for DFG Viewer compatibility! |
|
76 | - unset($piVars['pointer'], $piVars['DATA'], $piVars['pagegrid']); |
|
74 | + // Unset no longer needed plugin variables. |
|
75 | + // unset($piVars['pagegrid']) is for DFG Viewer compatibility! |
|
76 | + unset($piVars['pointer'], $piVars['DATA'], $piVars['pagegrid']); |
|
77 | 77 | |
78 | - $piVars['page'] = $number; |
|
78 | + $piVars['page'] = $number; |
|
79 | 79 | |
80 | - $linkConf = array ( |
|
81 | - 'useCacheHash' => 1, |
|
82 | - 'parameter' => $this->conf['targetPid'], |
|
83 | - 'additionalParams' => \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, $piVars, '', TRUE, FALSE), |
|
84 | - 'title' => $markerArray['###PAGINATION###'] |
|
85 | - ); |
|
80 | + $linkConf = array ( |
|
81 | + 'useCacheHash' => 1, |
|
82 | + 'parameter' => $this->conf['targetPid'], |
|
83 | + 'additionalParams' => \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, $piVars, '', TRUE, FALSE), |
|
84 | + 'title' => $markerArray['###PAGINATION###'] |
|
85 | + ); |
|
86 | 86 | |
87 | - $markerArray['###THUMBNAIL###'] = $this->cObj->typoLink($thumbnail, $linkConf); |
|
87 | + $markerArray['###THUMBNAIL###'] = $this->cObj->typoLink($thumbnail, $linkConf); |
|
88 | 88 | |
89 | - return $this->cObj->substituteMarkerArray($template, $markerArray); |
|
89 | + return $this->cObj->substituteMarkerArray($template, $markerArray); |
|
90 | 90 | |
91 | - } |
|
91 | + } |
|
92 | 92 | |
93 | - /** |
|
94 | - * Renders the page browser |
|
95 | - * |
|
96 | - * @access protected |
|
97 | - * |
|
98 | - * @return string The rendered page browser ready for output |
|
99 | - */ |
|
100 | - protected function getPageBrowser() { |
|
93 | + /** |
|
94 | + * Renders the page browser |
|
95 | + * |
|
96 | + * @access protected |
|
97 | + * |
|
98 | + * @return string The rendered page browser ready for output |
|
99 | + */ |
|
100 | + protected function getPageBrowser() { |
|
101 | 101 | |
102 | - // Get overall number of pages. |
|
103 | - $maxPages = intval(ceil($this->doc->numPages / $this->conf['limit'])); |
|
102 | + // Get overall number of pages. |
|
103 | + $maxPages = intval(ceil($this->doc->numPages / $this->conf['limit'])); |
|
104 | 104 | |
105 | - // Return empty pagebrowser if there is just one page. |
|
106 | - if ($maxPages < 2) { |
|
105 | + // Return empty pagebrowser if there is just one page. |
|
106 | + if ($maxPages < 2) { |
|
107 | 107 | |
108 | - return ''; |
|
108 | + return ''; |
|
109 | 109 | |
110 | - } |
|
110 | + } |
|
111 | 111 | |
112 | - // Get separator. |
|
113 | - $separator = $this->pi_getLL('separator', ' - ', TRUE); |
|
112 | + // Get separator. |
|
113 | + $separator = $this->pi_getLL('separator', ' - ', TRUE); |
|
114 | 114 | |
115 | - // Add link to previous page. |
|
116 | - if ($this->piVars['pointer'] > 0) { |
|
115 | + // Add link to previous page. |
|
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 | - } else { |
|
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 | |
126 | - $i = 0; |
|
126 | + $i = 0; |
|
127 | 127 | |
128 | - // Add links to pages. |
|
129 | - while ($i < $maxPages) { |
|
128 | + // Add links to pages. |
|
129 | + while ($i < $maxPages) { |
|
130 | 130 | |
131 | - if ($i < 3 || ($i > $this->piVars['pointer'] - 3 && $i < $this->piVars['pointer'] + 3) || $i > $maxPages - 4) { |
|
131 | + if ($i < 3 || ($i > $this->piVars['pointer'] - 3 && $i < $this->piVars['pointer'] + 3) || $i > $maxPages - 4) { |
|
132 | 132 | |
133 | - if ($this->piVars['pointer'] != $i) { |
|
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 | - } else { |
|
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 | |
153 | - $i++; |
|
153 | + $i++; |
|
154 | 154 | |
155 | - } |
|
155 | + } |
|
156 | 156 | |
157 | - // Add link to next page. |
|
158 | - if ($this->piVars['pointer'] < $maxPages - 1) { |
|
157 | + // Add link to next page. |
|
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 | - } else { |
|
162 | + } else { |
|
163 | 163 | |
164 | - $output .= $this->pi_getLL('nextPage', '>', TRUE); |
|
164 | + $output .= $this->pi_getLL('nextPage', '>', TRUE); |
|
165 | 165 | |
166 | - } |
|
166 | + } |
|
167 | 167 | |
168 | - return $output; |
|
168 | + return $output; |
|
169 | 169 | |
170 | - } |
|
170 | + } |
|
171 | 171 | |
172 | - /** |
|
173 | - * The main method of the PlugIn |
|
174 | - * |
|
175 | - * @access public |
|
176 | - * |
|
177 | - * @param string $content: The PlugIn content |
|
178 | - * @param array $conf: The PlugIn configuration |
|
179 | - * |
|
180 | - * @return string The content that is displayed on the website |
|
181 | - */ |
|
182 | - public function main($content, $conf) { |
|
172 | + /** |
|
173 | + * The main method of the PlugIn |
|
174 | + * |
|
175 | + * @access public |
|
176 | + * |
|
177 | + * @param string $content: The PlugIn content |
|
178 | + * @param array $conf: The PlugIn configuration |
|
179 | + * |
|
180 | + * @return string The content that is displayed on the website |
|
181 | + */ |
|
182 | + public function main($content, $conf) { |
|
183 | 183 | |
184 | - $this->init($conf); |
|
184 | + $this->init($conf); |
|
185 | 185 | |
186 | - $this->loadDocument(); |
|
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 | - // Quit without doing anything if required variables are not set. |
|
191 | - return $content; |
|
190 | + // Quit without doing anything if required variables are not set. |
|
191 | + return $content; |
|
192 | 192 | |
193 | - } else { |
|
193 | + } else { |
|
194 | 194 | |
195 | - // Set default values for page if not set. |
|
196 | - $this->piVars['pointer'] = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange($this->piVars['pointer'], 0, $this->doc->numPages, 0); |
|
195 | + // Set default values for page if not set. |
|
196 | + $this->piVars['pointer'] = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange($this->piVars['pointer'], 0, $this->doc->numPages, 0); |
|
197 | 197 | |
198 | - } |
|
198 | + } |
|
199 | 199 | |
200 | - // Load template file. |
|
201 | - if (!empty($this->conf['templateFile'])) { |
|
200 | + // Load template file. |
|
201 | + if (!empty($this->conf['templateFile'])) { |
|
202 | 202 | |
203 | - $this->template = $this->cObj->getSubpart($this->cObj->fileResource($this->conf['templateFile']), '###TEMPLATE###'); |
|
203 | + $this->template = $this->cObj->getSubpart($this->cObj->fileResource($this->conf['templateFile']), '###TEMPLATE###'); |
|
204 | 204 | |
205 | - } else { |
|
205 | + } else { |
|
206 | 206 | |
207 | - $this->template = $this->cObj->getSubpart($this->cObj->fileResource('EXT:dlf/plugins/pagegrid/template.tmpl'), '###TEMPLATE###'); |
|
207 | + $this->template = $this->cObj->getSubpart($this->cObj->fileResource('EXT:dlf/plugins/pagegrid/template.tmpl'), '###TEMPLATE###'); |
|
208 | 208 | |
209 | - } |
|
209 | + } |
|
210 | 210 | |
211 | - $entryTemplate = $this->cObj->getSubpart($this->template, '###ENTRY###'); |
|
211 | + $entryTemplate = $this->cObj->getSubpart($this->template, '###ENTRY###'); |
|
212 | 212 | |
213 | - if (empty($entryTemplate)) { |
|
213 | + if (empty($entryTemplate)) { |
|
214 | 214 | |
215 | - if (TYPO3_DLOG) { |
|
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 | |
221 | - // Quit without doing anything if required variables are not set. |
|
222 | - return $content; |
|
221 | + // Quit without doing anything if required variables are not set. |
|
222 | + return $content; |
|
223 | 223 | |
224 | - } |
|
224 | + } |
|
225 | 225 | |
226 | - if (!empty($this->piVars['logicalPage'])) { |
|
226 | + if (!empty($this->piVars['logicalPage'])) { |
|
227 | 227 | |
228 | - $this->piVars['page'] = $this->doc->getPhysicalPage($this->piVars['logicalPage']); |
|
229 | - // The logical page parameter should not appear |
|
230 | - unset($this->piVars['logicalPage']); |
|
228 | + $this->piVars['page'] = $this->doc->getPhysicalPage($this->piVars['logicalPage']); |
|
229 | + // The logical page parameter should not appear |
|
230 | + unset($this->piVars['logicalPage']); |
|
231 | 231 | |
232 | - } |
|
232 | + } |
|
233 | 233 | |
234 | - // Set some variable defaults. |
|
235 | - // $this->piVars['page'] may be integer or string (physical structure @ID) |
|
236 | - if ( (int)$this->piVars['page'] > 0 || empty($this->piVars['page'])) { |
|
234 | + // Set some variable defaults. |
|
235 | + // $this->piVars['page'] may be integer or string (physical structure @ID) |
|
236 | + if ( (int)$this->piVars['page'] > 0 || empty($this->piVars['page'])) { |
|
237 | 237 | |
238 | - $this->piVars['page'] = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange((int)$this->piVars['page'], 1, $this->doc->numPages, 1); |
|
238 | + $this->piVars['page'] = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange((int)$this->piVars['page'], 1, $this->doc->numPages, 1); |
|
239 | 239 | |
240 | - } else { |
|
240 | + } else { |
|
241 | 241 | |
242 | - $this->piVars['page'] = array_search($this->piVars['page'], $this->doc->physicalStructure); |
|
242 | + $this->piVars['page'] = array_search($this->piVars['page'], $this->doc->physicalStructure); |
|
243 | 243 | |
244 | - } |
|
244 | + } |
|
245 | 245 | |
246 | - if (!empty($this->piVars['page'])) { |
|
246 | + if (!empty($this->piVars['page'])) { |
|
247 | 247 | |
248 | - $this->piVars['pointer'] = intval(floor(($this->piVars['page'] - 1) / $this->conf['limit'])); |
|
248 | + $this->piVars['pointer'] = intval(floor(($this->piVars['page'] - 1) / $this->conf['limit'])); |
|
249 | 249 | |
250 | - } |
|
250 | + } |
|
251 | 251 | |
252 | - if (!empty($this->piVars['pointer']) && (($this->piVars['pointer'] * $this->conf['limit']) + 1) <= $this->doc->numPages) { |
|
252 | + if (!empty($this->piVars['pointer']) && (($this->piVars['pointer'] * $this->conf['limit']) + 1) <= $this->doc->numPages) { |
|
253 | 253 | |
254 | - $this->piVars['pointer'] = max(intval($this->piVars['pointer']), 0); |
|
254 | + $this->piVars['pointer'] = max(intval($this->piVars['pointer']), 0); |
|
255 | 255 | |
256 | - } else { |
|
256 | + } else { |
|
257 | 257 | |
258 | - $this->piVars['pointer'] = 0; |
|
258 | + $this->piVars['pointer'] = 0; |
|
259 | 259 | |
260 | - } |
|
260 | + } |
|
261 | 261 | |
262 | - // Iterate through visible page set and display thumbnails. |
|
263 | - for ($i = $this->piVars['pointer'] * $this->conf['limit'], $j = ($this->piVars['pointer'] + 1) * $this->conf['limit']; $i < $j; $i++) { |
|
262 | + // Iterate through visible page set and display thumbnails. |
|
263 | + for ($i = $this->piVars['pointer'] * $this->conf['limit'], $j = ($this->piVars['pointer'] + 1) * $this->conf['limit']; $i < $j; $i++) { |
|
264 | 264 | |
265 | - // +1 because page counting starts at 1. |
|
266 | - $number = $i + 1; |
|
265 | + // +1 because page counting starts at 1. |
|
266 | + $number = $i + 1; |
|
267 | 267 | |
268 | - if ($number > $this->doc->numPages) { |
|
268 | + if ($number > $this->doc->numPages) { |
|
269 | 269 | |
270 | - break; |
|
270 | + break; |
|
271 | 271 | |
272 | - } else { |
|
272 | + } else { |
|
273 | 273 | |
274 | - $content .= $this->getEntry($number, $entryTemplate); |
|
274 | + $content .= $this->getEntry($number, $entryTemplate); |
|
275 | 275 | |
276 | - } |
|
276 | + } |
|
277 | 277 | |
278 | - } |
|
278 | + } |
|
279 | 279 | |
280 | - // Render page browser. |
|
281 | - $markerArray['###PAGEBROWSER###'] = $this->getPageBrowser(); |
|
280 | + // Render page browser. |
|
281 | + $markerArray['###PAGEBROWSER###'] = $this->getPageBrowser(); |
|
282 | 282 | |
283 | - // Merge everything with template. |
|
284 | - $content = $this->cObj->substituteMarkerArray($this->cObj->substituteSubpart($this->template, '###ENTRY###', $content, TRUE), $markerArray); |
|
283 | + // Merge everything with template. |
|
284 | + $content = $this->cObj->substituteMarkerArray($this->cObj->substituteSubpart($this->template, '###ENTRY###', $content, TRUE), $markerArray); |
|
285 | 285 | |
286 | - return $this->pi_wrapInBaseClass($content); |
|
286 | + return $this->pi_wrapInBaseClass($content); |
|
287 | 287 | |
288 | - } |
|
288 | + } |
|
289 | 289 | |
290 | 290 | } |
@@ -225,9 +225,9 @@ |
||
225 | 225 | |
226 | 226 | // Set some variable defaults. |
227 | 227 | // $this->piVars['page'] may be integer or string (physical structure @ID) |
228 | - if ( (int)$this->piVars['page'] > 0 || empty($this->piVars['page'])) { |
|
228 | + if ((int) $this->piVars['page'] > 0 || empty($this->piVars['page'])) { |
|
229 | 229 | |
230 | - $this->piVars['page'] = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange((int)$this->piVars['page'], 1, $this->doc->numPages, 1); |
|
230 | + $this->piVars['page'] = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange((int) $this->piVars['page'], 1, $this->doc->numPages, 1); |
|
231 | 231 | |
232 | 232 | } else { |
233 | 233 |
@@ -19,66 +19,66 @@ |
||
19 | 19 | */ |
20 | 20 | class tx_dlf_toolbox extends tx_dlf_plugin { |
21 | 21 | |
22 | - public $scriptRelPath = 'plugins/toolbox/class.tx_dlf_toolbox.php'; |
|
22 | + public $scriptRelPath = 'plugins/toolbox/class.tx_dlf_toolbox.php'; |
|
23 | 23 | |
24 | - /** |
|
25 | - * The main method of the PlugIn |
|
26 | - * |
|
27 | - * @access public |
|
28 | - * |
|
29 | - * @param string $content: The PlugIn content |
|
30 | - * @param array $conf: The PlugIn configuration |
|
31 | - * |
|
32 | - * @return string The content that is displayed on the website |
|
33 | - */ |
|
34 | - public function main($content, $conf) { |
|
24 | + /** |
|
25 | + * The main method of the PlugIn |
|
26 | + * |
|
27 | + * @access public |
|
28 | + * |
|
29 | + * @param string $content: The PlugIn content |
|
30 | + * @param array $conf: The PlugIn configuration |
|
31 | + * |
|
32 | + * @return string The content that is displayed on the website |
|
33 | + */ |
|
34 | + public function main($content, $conf) { |
|
35 | 35 | |
36 | - $this->init($conf); |
|
36 | + $this->init($conf); |
|
37 | 37 | |
38 | - // Quit without doing anything if required variable is not set. |
|
39 | - if (empty($this->piVars['id'])) { |
|
38 | + // Quit without doing anything if required variable is not set. |
|
39 | + if (empty($this->piVars['id'])) { |
|
40 | 40 | |
41 | - return $content; |
|
41 | + return $content; |
|
42 | 42 | |
43 | - } |
|
43 | + } |
|
44 | 44 | |
45 | - // Load template file. |
|
46 | - if (!empty($this->conf['templateFile'])) { |
|
45 | + // Load template file. |
|
46 | + if (!empty($this->conf['templateFile'])) { |
|
47 | 47 | |
48 | - $this->template = $this->cObj->getSubpart($this->cObj->fileResource($this->conf['templateFile']), '###TEMPLATE###'); |
|
48 | + $this->template = $this->cObj->getSubpart($this->cObj->fileResource($this->conf['templateFile']), '###TEMPLATE###'); |
|
49 | 49 | |
50 | - } else { |
|
50 | + } else { |
|
51 | 51 | |
52 | - $this->template = $this->cObj->getSubpart($this->cObj->fileResource('EXT:dlf/plugins/toolbox/template.tmpl'), '###TEMPLATE###'); |
|
52 | + $this->template = $this->cObj->getSubpart($this->cObj->fileResource('EXT:dlf/plugins/toolbox/template.tmpl'), '###TEMPLATE###'); |
|
53 | 53 | |
54 | - } |
|
54 | + } |
|
55 | 55 | |
56 | - // Build data array. |
|
57 | - $data = array ( |
|
58 | - 'conf' => $this->conf, |
|
59 | - 'piVars' => $this->piVars, |
|
60 | - ); |
|
56 | + // Build data array. |
|
57 | + $data = array ( |
|
58 | + 'conf' => $this->conf, |
|
59 | + 'piVars' => $this->piVars, |
|
60 | + ); |
|
61 | 61 | |
62 | - // Get template subpart for tools. |
|
63 | - $subpart = $this->cObj->getSubpart($this->template, '###TOOLS###'); |
|
62 | + // Get template subpart for tools. |
|
63 | + $subpart = $this->cObj->getSubpart($this->template, '###TOOLS###'); |
|
64 | 64 | |
65 | - $tools = explode(',', $this->conf['tools']); |
|
65 | + $tools = explode(',', $this->conf['tools']); |
|
66 | 66 | |
67 | - // Add the tools to the toolbox. |
|
68 | - foreach ($tools as $tool) { |
|
67 | + // Add the tools to the toolbox. |
|
68 | + foreach ($tools as $tool) { |
|
69 | 69 | |
70 | - $tool = trim($tool); |
|
70 | + $tool = trim($tool); |
|
71 | 71 | |
72 | - $cObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Frontend\\ContentObject\\ContentObjectRenderer'); |
|
72 | + $cObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Frontend\\ContentObject\\ContentObjectRenderer'); |
|
73 | 73 | |
74 | - $cObj->data = $data; |
|
74 | + $cObj->data = $data; |
|
75 | 75 | |
76 | - $content .= $this->cObj->substituteMarkerArray($subpart, array ('###TOOL###' => $cObj->cObjGetSingle($GLOBALS['TSFE']->tmpl->setup['plugin.'][$tool], $GLOBALS['TSFE']->tmpl->setup['plugin.'][$tool.'.']))); |
|
76 | + $content .= $this->cObj->substituteMarkerArray($subpart, array ('###TOOL###' => $cObj->cObjGetSingle($GLOBALS['TSFE']->tmpl->setup['plugin.'][$tool], $GLOBALS['TSFE']->tmpl->setup['plugin.'][$tool.'.']))); |
|
77 | 77 | |
78 | - } |
|
78 | + } |
|
79 | 79 | |
80 | - return $this->pi_wrapInBaseClass($this->cObj->substituteSubpart($this->template, '###TOOLS###', $content, TRUE)); |
|
80 | + return $this->pi_wrapInBaseClass($this->cObj->substituteSubpart($this->template, '###TOOLS###', $content, TRUE)); |
|
81 | 81 | |
82 | - } |
|
82 | + } |
|
83 | 83 | |
84 | 84 | } |
@@ -20,182 +20,182 @@ |
||
20 | 20 | */ |
21 | 21 | class tx_dlf_toolsPdf extends tx_dlf_plugin { |
22 | 22 | |
23 | - public $scriptRelPath = 'plugins/toolbox/tools/pdf/class.tx_dlf_toolsPdf.php'; |
|
23 | + public $scriptRelPath = 'plugins/toolbox/tools/pdf/class.tx_dlf_toolsPdf.php'; |
|
24 | 24 | |
25 | - /** |
|
26 | - * The main method of the PlugIn |
|
27 | - * |
|
28 | - * @access public |
|
29 | - * |
|
30 | - * @param string $content: The PlugIn content |
|
31 | - * @param array $conf: The PlugIn configuration |
|
32 | - * |
|
33 | - * @return string The content that is displayed on the website |
|
34 | - */ |
|
35 | - public function main($content, $conf) { |
|
25 | + /** |
|
26 | + * The main method of the PlugIn |
|
27 | + * |
|
28 | + * @access public |
|
29 | + * |
|
30 | + * @param string $content: The PlugIn content |
|
31 | + * @param array $conf: The PlugIn configuration |
|
32 | + * |
|
33 | + * @return string The content that is displayed on the website |
|
34 | + */ |
|
35 | + public function main($content, $conf) { |
|
36 | 36 | |
37 | - $this->init($conf); |
|
37 | + $this->init($conf); |
|
38 | 38 | |
39 | - // Merge configuration with conf array of toolbox. |
|
40 | - $this->conf = tx_dlf_helper::array_merge_recursive_overrule($this->cObj->data['conf'], $this->conf); |
|
39 | + // Merge configuration with conf array of toolbox. |
|
40 | + $this->conf = tx_dlf_helper::array_merge_recursive_overrule($this->cObj->data['conf'], $this->conf); |
|
41 | 41 | |
42 | - // Load current document. |
|
43 | - $this->loadDocument(); |
|
42 | + // Load current document. |
|
43 | + $this->loadDocument(); |
|
44 | 44 | |
45 | - if ($this->doc === NULL || $this->doc->numPages < 1 || empty($this->conf['fileGrpDownload'])) { |
|
45 | + if ($this->doc === NULL || $this->doc->numPages < 1 || empty($this->conf['fileGrpDownload'])) { |
|
46 | 46 | |
47 | - // Quit without doing anything if required variables are not set. |
|
48 | - return $content; |
|
47 | + // Quit without doing anything if required variables are not set. |
|
48 | + return $content; |
|
49 | 49 | |
50 | - } else { |
|
50 | + } else { |
|
51 | 51 | |
52 | - if (!empty($this->piVars['logicalPage'])) { |
|
52 | + if (!empty($this->piVars['logicalPage'])) { |
|
53 | 53 | |
54 | - $this->piVars['page'] = $this->doc->getPhysicalPage($this->piVars['logicalPage']); |
|
55 | - // The logical page parameter should not appear again |
|
56 | - unset($this->piVars['logicalPage']); |
|
54 | + $this->piVars['page'] = $this->doc->getPhysicalPage($this->piVars['logicalPage']); |
|
55 | + // The logical page parameter should not appear again |
|
56 | + unset($this->piVars['logicalPage']); |
|
57 | 57 | |
58 | - } |
|
58 | + } |
|
59 | 59 | |
60 | - // Set default values if not set. |
|
61 | - // $this->piVars['page'] may be integer or string (physical structure @ID) |
|
62 | - if ( (int)$this->piVars['page'] > 0 || empty($this->piVars['page'])) { |
|
60 | + // Set default values if not set. |
|
61 | + // $this->piVars['page'] may be integer or string (physical structure @ID) |
|
62 | + if ( (int)$this->piVars['page'] > 0 || empty($this->piVars['page'])) { |
|
63 | 63 | |
64 | - $this->piVars['page'] = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange((int)$this->piVars['page'], 1, $this->doc->numPages, 1); |
|
64 | + $this->piVars['page'] = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange((int)$this->piVars['page'], 1, $this->doc->numPages, 1); |
|
65 | 65 | |
66 | - } else { |
|
66 | + } else { |
|
67 | 67 | |
68 | - $this->piVars['page'] = array_search($this->piVars['page'], $this->doc->physicalStructure); |
|
68 | + $this->piVars['page'] = array_search($this->piVars['page'], $this->doc->physicalStructure); |
|
69 | 69 | |
70 | - } |
|
70 | + } |
|
71 | 71 | |
72 | - $this->piVars['double'] = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange($this->piVars['double'], 0, 1, 0); |
|
72 | + $this->piVars['double'] = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange($this->piVars['double'], 0, 1, 0); |
|
73 | 73 | |
74 | - } |
|
74 | + } |
|
75 | 75 | |
76 | - // Load template file. |
|
77 | - if (!empty($this->conf['toolTemplateFile'])) { |
|
76 | + // Load template file. |
|
77 | + if (!empty($this->conf['toolTemplateFile'])) { |
|
78 | 78 | |
79 | - $this->template = $this->cObj->getSubpart($this->cObj->fileResource($this->conf['toolTemplateFile']), '###TEMPLATE###'); |
|
79 | + $this->template = $this->cObj->getSubpart($this->cObj->fileResource($this->conf['toolTemplateFile']), '###TEMPLATE###'); |
|
80 | 80 | |
81 | - } else { |
|
81 | + } else { |
|
82 | 82 | |
83 | - $this->template = $this->cObj->getSubpart($this->cObj->fileResource('EXT:dlf/plugins/toolbox/tools/pdf/template.tmpl'), '###TEMPLATE###'); |
|
83 | + $this->template = $this->cObj->getSubpart($this->cObj->fileResource('EXT:dlf/plugins/toolbox/tools/pdf/template.tmpl'), '###TEMPLATE###'); |
|
84 | 84 | |
85 | - } |
|
85 | + } |
|
86 | 86 | |
87 | - // Get single page downloads. |
|
88 | - $markerArray['###PAGE###'] = $this->getPageLink(); |
|
87 | + // Get single page downloads. |
|
88 | + $markerArray['###PAGE###'] = $this->getPageLink(); |
|
89 | 89 | |
90 | - // Get work download. |
|
91 | - $markerArray['###WORK###'] = $this->getWorkLink(); |
|
90 | + // Get work download. |
|
91 | + $markerArray['###WORK###'] = $this->getWorkLink(); |
|
92 | 92 | |
93 | - $content .= $this->cObj->substituteMarkerArray($this->template, $markerArray); |
|
93 | + $content .= $this->cObj->substituteMarkerArray($this->template, $markerArray); |
|
94 | 94 | |
95 | - return $this->pi_wrapInBaseClass($content); |
|
95 | + return $this->pi_wrapInBaseClass($content); |
|
96 | 96 | |
97 | - } |
|
97 | + } |
|
98 | 98 | |
99 | - /** |
|
100 | - * Get page's download link |
|
101 | - * |
|
102 | - * @access protected |
|
103 | - * |
|
104 | - * @return string Link to downloadable page |
|
105 | - */ |
|
106 | - protected function getPageLink() { |
|
99 | + /** |
|
100 | + * Get page's download link |
|
101 | + * |
|
102 | + * @access protected |
|
103 | + * |
|
104 | + * @return string Link to downloadable page |
|
105 | + */ |
|
106 | + protected function getPageLink() { |
|
107 | 107 | |
108 | - $page1Link = ''; |
|
109 | - $page2Link = ''; |
|
110 | - $pageNumber = $this->piVars['page']; |
|
108 | + $page1Link = ''; |
|
109 | + $page2Link = ''; |
|
110 | + $pageNumber = $this->piVars['page']; |
|
111 | 111 | |
112 | - // Get image link. |
|
113 | - $details = $this->doc->physicalStructureInfo[$this->doc->physicalStructure[$pageNumber]]; |
|
114 | - $file = $details['files'][$this->conf['fileGrpDownload']]; |
|
115 | - if (!empty($file)) { |
|
116 | - $page1Link = $this->doc->getFileLocation($file); |
|
117 | - } |
|
112 | + // Get image link. |
|
113 | + $details = $this->doc->physicalStructureInfo[$this->doc->physicalStructure[$pageNumber]]; |
|
114 | + $file = $details['files'][$this->conf['fileGrpDownload']]; |
|
115 | + if (!empty($file)) { |
|
116 | + $page1Link = $this->doc->getFileLocation($file); |
|
117 | + } |
|
118 | 118 | |
119 | - // Get second page, too, if double page view is activated. |
|
120 | - if ($this->piVars['double'] && $pageNumber < $this->doc->numPages) { |
|
121 | - $details = $this->doc->physicalStructureInfo[$this->doc->physicalStructure[$pageNumber + 1]]; |
|
122 | - $file = $details['files'][$this->conf['fileGrpDownload']]; |
|
123 | - if (!empty($file)) { |
|
124 | - $page2Link = $this->doc->getFileLocation($file); |
|
125 | - } |
|
126 | - } |
|
119 | + // Get second page, too, if double page view is activated. |
|
120 | + if ($this->piVars['double'] && $pageNumber < $this->doc->numPages) { |
|
121 | + $details = $this->doc->physicalStructureInfo[$this->doc->physicalStructure[$pageNumber + 1]]; |
|
122 | + $file = $details['files'][$this->conf['fileGrpDownload']]; |
|
123 | + if (!empty($file)) { |
|
124 | + $page2Link = $this->doc->getFileLocation($file); |
|
125 | + } |
|
126 | + } |
|
127 | 127 | |
128 | - if (TYPO3_DLOG && empty($page1Link) && empty($page2Link)) { |
|
129 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_toolsPdf->getPageLink()] ' . |
|
130 | - 'File not found in fileGrp "' . |
|
131 | - $this->conf['fileGrpDownload'] . '"', |
|
132 | - $this->extKey, |
|
133 | - SYSLOG_SEVERITY_WARNING); |
|
134 | - } |
|
128 | + if (TYPO3_DLOG && empty($page1Link) && empty($page2Link)) { |
|
129 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_toolsPdf->getPageLink()] ' . |
|
130 | + 'File not found in fileGrp "' . |
|
131 | + $this->conf['fileGrpDownload'] . '"', |
|
132 | + $this->extKey, |
|
133 | + SYSLOG_SEVERITY_WARNING); |
|
134 | + } |
|
135 | 135 | |
136 | - // Wrap URLs with HTML. |
|
137 | - if (!empty($page1Link)) { |
|
138 | - if ($this->piVars['double']) { |
|
139 | - $page1Link = $this->cObj->typoLink($this->pi_getLL('leftPage', ''), |
|
140 | - array('parameter' => $page1Link, 'title' => $this->pi_getLL('leftPage', ''))); |
|
141 | - } else { |
|
142 | - $page1Link = $this->cObj->typoLink($this->pi_getLL('singlePage', ''), |
|
143 | - array('parameter' => $page1Link, 'title' => $this->pi_getLL('singlePage', ''))); |
|
144 | - } |
|
145 | - } |
|
146 | - if (!empty($page2Link)) { |
|
147 | - $page2Link = $this->cObj->typoLink($this->pi_getLL('rightPage', ''), |
|
148 | - array('parameter' => $page2Link, 'title' => $this->pi_getLL('rightPage', ''))); |
|
149 | - } |
|
136 | + // Wrap URLs with HTML. |
|
137 | + if (!empty($page1Link)) { |
|
138 | + if ($this->piVars['double']) { |
|
139 | + $page1Link = $this->cObj->typoLink($this->pi_getLL('leftPage', ''), |
|
140 | + array('parameter' => $page1Link, 'title' => $this->pi_getLL('leftPage', ''))); |
|
141 | + } else { |
|
142 | + $page1Link = $this->cObj->typoLink($this->pi_getLL('singlePage', ''), |
|
143 | + array('parameter' => $page1Link, 'title' => $this->pi_getLL('singlePage', ''))); |
|
144 | + } |
|
145 | + } |
|
146 | + if (!empty($page2Link)) { |
|
147 | + $page2Link = $this->cObj->typoLink($this->pi_getLL('rightPage', ''), |
|
148 | + array('parameter' => $page2Link, 'title' => $this->pi_getLL('rightPage', ''))); |
|
149 | + } |
|
150 | 150 | |
151 | - return $page1Link . $page2Link; |
|
152 | - } |
|
151 | + return $page1Link . $page2Link; |
|
152 | + } |
|
153 | 153 | |
154 | - /** |
|
155 | - * Get work's download link |
|
156 | - * |
|
157 | - * @access protected |
|
158 | - * |
|
159 | - * @return string Link to downloadable work |
|
160 | - */ |
|
161 | - protected function getWorkLink() { |
|
154 | + /** |
|
155 | + * Get work's download link |
|
156 | + * |
|
157 | + * @access protected |
|
158 | + * |
|
159 | + * @return string Link to downloadable work |
|
160 | + */ |
|
161 | + protected function getWorkLink() { |
|
162 | 162 | |
163 | - $workLink = ''; |
|
163 | + $workLink = ''; |
|
164 | 164 | |
165 | - // Get work link. |
|
166 | - if (!empty($this->doc->physicalStructureInfo[$this->doc->physicalStructure[0]]['files'][$this->conf['fileGrpDownload']])) { |
|
165 | + // Get work link. |
|
166 | + if (!empty($this->doc->physicalStructureInfo[$this->doc->physicalStructure[0]]['files'][$this->conf['fileGrpDownload']])) { |
|
167 | 167 | |
168 | - $workLink = $this->doc->getFileLocation($this->doc->physicalStructureInfo[$this->doc->physicalStructure[0]]['files'][$this->conf['fileGrpDownload']]); |
|
168 | + $workLink = $this->doc->getFileLocation($this->doc->physicalStructureInfo[$this->doc->physicalStructure[0]]['files'][$this->conf['fileGrpDownload']]); |
|
169 | 169 | |
170 | - } else { |
|
170 | + } else { |
|
171 | 171 | |
172 | - $details = $this->doc->getLogicalStructure($this->doc->toplevelId); |
|
172 | + $details = $this->doc->getLogicalStructure($this->doc->toplevelId); |
|
173 | 173 | |
174 | - if (!empty($details['files'][$this->conf['fileGrpDownload']])) { |
|
174 | + if (!empty($details['files'][$this->conf['fileGrpDownload']])) { |
|
175 | 175 | |
176 | - $workLink = $this->doc->getFileLocation($details['files'][$this->conf['fileGrpDownload']]); |
|
176 | + $workLink = $this->doc->getFileLocation($details['files'][$this->conf['fileGrpDownload']]); |
|
177 | 177 | |
178 | - } |
|
178 | + } |
|
179 | 179 | |
180 | - } |
|
180 | + } |
|
181 | 181 | |
182 | - // Wrap URLs with HTML. |
|
183 | - if (!empty($workLink)) { |
|
182 | + // Wrap URLs with HTML. |
|
183 | + if (!empty($workLink)) { |
|
184 | 184 | |
185 | - $workLink = $this->cObj->typoLink($this->pi_getLL('work', ''), array ('parameter' => $workLink, 'title' => $this->pi_getLL('work', ''))); |
|
185 | + $workLink = $this->cObj->typoLink($this->pi_getLL('work', ''), array ('parameter' => $workLink, 'title' => $this->pi_getLL('work', ''))); |
|
186 | 186 | |
187 | - } else { |
|
187 | + } else { |
|
188 | 188 | |
189 | - if (TYPO3_DLOG) { |
|
189 | + if (TYPO3_DLOG) { |
|
190 | 190 | |
191 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_toolsPdf->getWorkLink()] File not found in fileGrp "'.$this->conf['fileGrpDownload'].'"', $this->extKey, SYSLOG_SEVERITY_WARNING); |
|
191 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_toolsPdf->getWorkLink()] File not found in fileGrp "'.$this->conf['fileGrpDownload'].'"', $this->extKey, SYSLOG_SEVERITY_WARNING); |
|
192 | 192 | |
193 | - } |
|
193 | + } |
|
194 | 194 | |
195 | - } |
|
195 | + } |
|
196 | 196 | |
197 | - return $workLink; |
|
197 | + return $workLink; |
|
198 | 198 | |
199 | - } |
|
199 | + } |
|
200 | 200 | |
201 | 201 | } |
@@ -51,9 +51,9 @@ discard block |
||
51 | 51 | |
52 | 52 | // Set default values if not set. |
53 | 53 | // $this->piVars['page'] may be integer or string (physical structure @ID) |
54 | - if ( (int)$this->piVars['page'] > 0 || empty($this->piVars['page'])) { |
|
54 | + if ((int) $this->piVars['page'] > 0 || empty($this->piVars['page'])) { |
|
55 | 55 | |
56 | - $this->piVars['page'] = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange((int)$this->piVars['page'], 1, $this->doc->numPages, 1); |
|
56 | + $this->piVars['page'] = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange((int) $this->piVars['page'], 1, $this->doc->numPages, 1); |
|
57 | 57 | |
58 | 58 | } else { |
59 | 59 | |
@@ -118,9 +118,9 @@ discard block |
||
118 | 118 | } |
119 | 119 | |
120 | 120 | if (TYPO3_DLOG && empty($page1Link) && empty($page2Link)) { |
121 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_toolsPdf->getPageLink()] ' . |
|
122 | - 'File not found in fileGrp "' . |
|
123 | - $this->conf['fileGrpDownload'] . '"', |
|
121 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_toolsPdf->getPageLink()] '. |
|
122 | + 'File not found in fileGrp "'. |
|
123 | + $this->conf['fileGrpDownload'].'"', |
|
124 | 124 | $this->extKey, |
125 | 125 | SYSLOG_SEVERITY_WARNING); |
126 | 126 | } |
@@ -129,18 +129,18 @@ discard block |
||
129 | 129 | if (!empty($page1Link)) { |
130 | 130 | if ($this->piVars['double']) { |
131 | 131 | $page1Link = $this->cObj->typoLink($this->pi_getLL('leftPage', ''), |
132 | - array('parameter' => $page1Link, 'title' => $this->pi_getLL('leftPage', ''))); |
|
132 | + array ('parameter' => $page1Link, 'title' => $this->pi_getLL('leftPage', ''))); |
|
133 | 133 | } else { |
134 | 134 | $page1Link = $this->cObj->typoLink($this->pi_getLL('singlePage', ''), |
135 | - array('parameter' => $page1Link, 'title' => $this->pi_getLL('singlePage', ''))); |
|
135 | + array ('parameter' => $page1Link, 'title' => $this->pi_getLL('singlePage', ''))); |
|
136 | 136 | } |
137 | 137 | } |
138 | 138 | if (!empty($page2Link)) { |
139 | 139 | $page2Link = $this->cObj->typoLink($this->pi_getLL('rightPage', ''), |
140 | - array('parameter' => $page2Link, 'title' => $this->pi_getLL('rightPage', ''))); |
|
140 | + array ('parameter' => $page2Link, 'title' => $this->pi_getLL('rightPage', ''))); |
|
141 | 141 | } |
142 | 142 | |
143 | - return $page1Link . $page2Link; |
|
143 | + return $page1Link.$page2Link; |
|
144 | 144 | } |
145 | 145 | |
146 | 146 | /** |
@@ -20,85 +20,85 @@ |
||
20 | 20 | */ |
21 | 21 | class tx_dlf_toolsFulltext extends tx_dlf_plugin { |
22 | 22 | |
23 | - public $scriptRelPath = 'plugins/toolbox/tools/fulltext/class.tx_dlf_toolsFulltext.php'; |
|
23 | + public $scriptRelPath = 'plugins/toolbox/tools/fulltext/class.tx_dlf_toolsFulltext.php'; |
|
24 | 24 | |
25 | - /** |
|
26 | - * The main method of the PlugIn |
|
27 | - * |
|
28 | - * @access public |
|
29 | - * |
|
30 | - * @param string $content: The PlugIn content |
|
31 | - * @param array $conf: The PlugIn configuration |
|
32 | - * |
|
33 | - * @return string The content that is displayed on the website |
|
34 | - */ |
|
35 | - public function main($content, $conf) { |
|
25 | + /** |
|
26 | + * The main method of the PlugIn |
|
27 | + * |
|
28 | + * @access public |
|
29 | + * |
|
30 | + * @param string $content: The PlugIn content |
|
31 | + * @param array $conf: The PlugIn configuration |
|
32 | + * |
|
33 | + * @return string The content that is displayed on the website |
|
34 | + */ |
|
35 | + public function main($content, $conf) { |
|
36 | 36 | |
37 | - $this->init($conf); |
|
37 | + $this->init($conf); |
|
38 | 38 | |
39 | - // Merge configuration with conf array of toolbox. |
|
40 | - $this->conf = tx_dlf_helper::array_merge_recursive_overrule($this->cObj->data['conf'], $this->conf); |
|
39 | + // Merge configuration with conf array of toolbox. |
|
40 | + $this->conf = tx_dlf_helper::array_merge_recursive_overrule($this->cObj->data['conf'], $this->conf); |
|
41 | 41 | |
42 | - // Load current document. |
|
43 | - $this->loadDocument(); |
|
42 | + // Load current document. |
|
43 | + $this->loadDocument(); |
|
44 | 44 | |
45 | - if ($this->doc === NULL || $this->doc->numPages < 1 || empty($this->conf['fileGrpFulltext'])) { |
|
45 | + if ($this->doc === NULL || $this->doc->numPages < 1 || empty($this->conf['fileGrpFulltext'])) { |
|
46 | 46 | |
47 | - // Quit without doing anything if required variables are not set. |
|
48 | - return $content; |
|
47 | + // Quit without doing anything if required variables are not set. |
|
48 | + return $content; |
|
49 | 49 | |
50 | - } else { |
|
50 | + } else { |
|
51 | 51 | |
52 | - if (!empty($this->piVars['logicalPage'])) { |
|
52 | + if (!empty($this->piVars['logicalPage'])) { |
|
53 | 53 | |
54 | - $this->piVars['page'] = $this->doc->getPhysicalPage($this->piVars['logicalPage']); |
|
55 | - // The logical page parameter should not appear again |
|
56 | - unset($this->piVars['logicalPage']); |
|
54 | + $this->piVars['page'] = $this->doc->getPhysicalPage($this->piVars['logicalPage']); |
|
55 | + // The logical page parameter should not appear again |
|
56 | + unset($this->piVars['logicalPage']); |
|
57 | 57 | |
58 | - } |
|
58 | + } |
|
59 | 59 | |
60 | - // Set default values if not set. |
|
61 | - // $this->piVars['page'] may be integer or string (physical structure @ID) |
|
62 | - if ( (int)$this->piVars['page'] > 0 || empty($this->piVars['page'])) { |
|
60 | + // Set default values if not set. |
|
61 | + // $this->piVars['page'] may be integer or string (physical structure @ID) |
|
62 | + if ( (int)$this->piVars['page'] > 0 || empty($this->piVars['page'])) { |
|
63 | 63 | |
64 | - $this->piVars['page'] = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange((int) $this->piVars['page'], 1, $this->doc->numPages, 1); |
|
64 | + $this->piVars['page'] = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange((int) $this->piVars['page'], 1, $this->doc->numPages, 1); |
|
65 | 65 | |
66 | - } else { |
|
66 | + } else { |
|
67 | 67 | |
68 | - $this->piVars['page'] = array_search($this->piVars['page'], $this->doc->physicalStructure); |
|
68 | + $this->piVars['page'] = array_search($this->piVars['page'], $this->doc->physicalStructure); |
|
69 | 69 | |
70 | - } |
|
70 | + } |
|
71 | 71 | |
72 | - $this->piVars['double'] = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange($this->piVars['double'], 0, 1, 0); |
|
72 | + $this->piVars['double'] = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange($this->piVars['double'], 0, 1, 0); |
|
73 | 73 | |
74 | - } |
|
74 | + } |
|
75 | 75 | |
76 | - // Load template file. |
|
77 | - if (!empty($this->conf['toolTemplateFile'])) { |
|
76 | + // Load template file. |
|
77 | + if (!empty($this->conf['toolTemplateFile'])) { |
|
78 | 78 | |
79 | - $this->template = $this->cObj->getSubpart($this->cObj->fileResource($this->conf['toolTemplateFile']), '###TEMPLATE###'); |
|
79 | + $this->template = $this->cObj->getSubpart($this->cObj->fileResource($this->conf['toolTemplateFile']), '###TEMPLATE###'); |
|
80 | 80 | |
81 | - } else { |
|
81 | + } else { |
|
82 | 82 | |
83 | - $this->template = $this->cObj->getSubpart($this->cObj->fileResource('EXT:dlf/plugins/toolbox/tools/fulltext/template.tmpl'), '###TEMPLATE###'); |
|
83 | + $this->template = $this->cObj->getSubpart($this->cObj->fileResource('EXT:dlf/plugins/toolbox/tools/fulltext/template.tmpl'), '###TEMPLATE###'); |
|
84 | 84 | |
85 | - } |
|
85 | + } |
|
86 | 86 | |
87 | 87 | |
88 | - $fullTextFile = $this->doc->physicalStructureInfo[$this->doc->physicalStructure[$this->piVars['page']]]['files'][$this->conf['fileGrpFulltext']]; |
|
88 | + $fullTextFile = $this->doc->physicalStructureInfo[$this->doc->physicalStructure[$this->piVars['page']]]['files'][$this->conf['fileGrpFulltext']]; |
|
89 | 89 | |
90 | - if (!empty($fullTextFile)) { |
|
91 | - $markerArray['###FULLTEXT_SELECT###'] = '<a class="select switchoff" id="tx-dlf-tools-fulltext" title="" data-dic="fulltext-on:' |
|
92 | - .$this->pi_getLL('fulltext-on', '', TRUE).';fulltext-off:' |
|
93 | - .$this->pi_getLL('fulltext-off', '', TRUE).'"> </a>'; |
|
94 | - } else { |
|
95 | - $markerArray['###FULLTEXT_SELECT###'] = '<span class="no-fulltext">' . $this->pi_getLL('fulltext-not-available', '', TRUE) . '</span>'; |
|
96 | - } |
|
90 | + if (!empty($fullTextFile)) { |
|
91 | + $markerArray['###FULLTEXT_SELECT###'] = '<a class="select switchoff" id="tx-dlf-tools-fulltext" title="" data-dic="fulltext-on:' |
|
92 | + .$this->pi_getLL('fulltext-on', '', TRUE).';fulltext-off:' |
|
93 | + .$this->pi_getLL('fulltext-off', '', TRUE).'"> </a>'; |
|
94 | + } else { |
|
95 | + $markerArray['###FULLTEXT_SELECT###'] = '<span class="no-fulltext">' . $this->pi_getLL('fulltext-not-available', '', TRUE) . '</span>'; |
|
96 | + } |
|
97 | 97 | |
98 | - $content .= $this->cObj->substituteMarkerArray($this->template, $markerArray); |
|
98 | + $content .= $this->cObj->substituteMarkerArray($this->template, $markerArray); |
|
99 | 99 | |
100 | - return $this->pi_wrapInBaseClass($content); |
|
100 | + return $this->pi_wrapInBaseClass($content); |
|
101 | 101 | |
102 | - } |
|
102 | + } |
|
103 | 103 | |
104 | 104 | } |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | |
52 | 52 | // Set default values if not set. |
53 | 53 | // $this->piVars['page'] may be integer or string (physical structure @ID) |
54 | - if ( (int)$this->piVars['page'] > 0 || empty($this->piVars['page'])) { |
|
54 | + if ((int) $this->piVars['page'] > 0 || empty($this->piVars['page'])) { |
|
55 | 55 | |
56 | 56 | $this->piVars['page'] = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange((int) $this->piVars['page'], 1, $this->doc->numPages, 1); |
57 | 57 | |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | .$this->pi_getLL('fulltext-on', '', TRUE).';fulltext-off:' |
85 | 85 | .$this->pi_getLL('fulltext-off', '', TRUE).'"> </a>'; |
86 | 86 | } else { |
87 | - $markerArray['###FULLTEXT_SELECT###'] = '<span class="no-fulltext">' . $this->pi_getLL('fulltext-not-available', '', TRUE) . '</span>'; |
|
87 | + $markerArray['###FULLTEXT_SELECT###'] = '<span class="no-fulltext">'.$this->pi_getLL('fulltext-not-available', '', TRUE).'</span>'; |
|
88 | 88 | } |
89 | 89 | |
90 | 90 | $content .= $this->cObj->substituteMarkerArray($this->template, $markerArray); |
@@ -19,54 +19,54 @@ |
||
19 | 19 | */ |
20 | 20 | class tx_dlf_toolsImagemanipulation extends tx_dlf_plugin { |
21 | 21 | |
22 | - public $scriptRelPath = 'plugins/toolbox/tools/imagemanipulation/class.tx_dlf_toolsImagemanipulation.php'; |
|
22 | + public $scriptRelPath = 'plugins/toolbox/tools/imagemanipulation/class.tx_dlf_toolsImagemanipulation.php'; |
|
23 | 23 | |
24 | - /** |
|
25 | - * The main method of the PlugIn |
|
26 | - * |
|
27 | - * @access public |
|
28 | - * |
|
29 | - * @param string $content: The PlugIn content |
|
30 | - * @param array $conf: The PlugIn configuration |
|
31 | - * |
|
32 | - * @return string The content that is displayed on the website |
|
33 | - */ |
|
34 | - public function main($content, $conf) { |
|
24 | + /** |
|
25 | + * The main method of the PlugIn |
|
26 | + * |
|
27 | + * @access public |
|
28 | + * |
|
29 | + * @param string $content: The PlugIn content |
|
30 | + * @param array $conf: The PlugIn configuration |
|
31 | + * |
|
32 | + * @return string The content that is displayed on the website |
|
33 | + */ |
|
34 | + public function main($content, $conf) { |
|
35 | 35 | |
36 | - $this->init($conf); |
|
36 | + $this->init($conf); |
|
37 | 37 | |
38 | - // Merge configuration with conf array of toolbox. |
|
39 | - $this->conf = tx_dlf_helper::array_merge_recursive_overrule($this->cObj->data['conf'], $this->conf); |
|
38 | + // Merge configuration with conf array of toolbox. |
|
39 | + $this->conf = tx_dlf_helper::array_merge_recursive_overrule($this->cObj->data['conf'], $this->conf); |
|
40 | 40 | |
41 | - // Load current document. |
|
42 | - $this->loadDocument(); |
|
41 | + // Load current document. |
|
42 | + $this->loadDocument(); |
|
43 | 43 | |
44 | - // Load template file. |
|
45 | - if (!empty($this->conf['toolTemplateFile'])) { |
|
44 | + // Load template file. |
|
45 | + if (!empty($this->conf['toolTemplateFile'])) { |
|
46 | 46 | |
47 | - $this->template = $this->cObj->getSubpart($this->cObj->fileResource($this->conf['toolTemplateFile']), '###TEMPLATE###'); |
|
47 | + $this->template = $this->cObj->getSubpart($this->cObj->fileResource($this->conf['toolTemplateFile']), '###TEMPLATE###'); |
|
48 | 48 | |
49 | - } else { |
|
49 | + } else { |
|
50 | 50 | |
51 | - $this->template = $this->cObj->getSubpart($this->cObj->fileResource('EXT:dlf/plugins/toolbox/tools/imagemanipulation/template.tmpl'), '###TEMPLATE###'); |
|
51 | + $this->template = $this->cObj->getSubpart($this->cObj->fileResource('EXT:dlf/plugins/toolbox/tools/imagemanipulation/template.tmpl'), '###TEMPLATE###'); |
|
52 | 52 | |
53 | - } |
|
53 | + } |
|
54 | 54 | |
55 | - $markerArray['###IMAGEMANIPULATION_SELECT###'] = '<span class="tx-dlf-tools-imagetools" id="tx-dlf-tools-imagetools" data-dic="imagemanipulation-on:' |
|
56 | - .$this->pi_getLL('imagemanipulation-on', '', TRUE).';imagemanipulation-off:' |
|
57 | - .$this->pi_getLL('imagemanipulation-off', '', TRUE).';reset:' |
|
58 | - .$this->pi_getLL('reset', '', TRUE).';saturation:' |
|
59 | - .$this->pi_getLL('saturation', '', TRUE).';hue:' |
|
60 | - .$this->pi_getLL('hue', '', TRUE).';contrast:' |
|
61 | - .$this->pi_getLL('contrast', '', TRUE).';brightness:' |
|
62 | - .$this->pi_getLL('brightness', '', TRUE).';invert:' |
|
63 | - .$this->pi_getLL('invert', '', TRUE).'" title="' |
|
64 | - .$this->pi_getLL('no-support', '', TRUE).'"></span>'; |
|
55 | + $markerArray['###IMAGEMANIPULATION_SELECT###'] = '<span class="tx-dlf-tools-imagetools" id="tx-dlf-tools-imagetools" data-dic="imagemanipulation-on:' |
|
56 | + .$this->pi_getLL('imagemanipulation-on', '', TRUE).';imagemanipulation-off:' |
|
57 | + .$this->pi_getLL('imagemanipulation-off', '', TRUE).';reset:' |
|
58 | + .$this->pi_getLL('reset', '', TRUE).';saturation:' |
|
59 | + .$this->pi_getLL('saturation', '', TRUE).';hue:' |
|
60 | + .$this->pi_getLL('hue', '', TRUE).';contrast:' |
|
61 | + .$this->pi_getLL('contrast', '', TRUE).';brightness:' |
|
62 | + .$this->pi_getLL('brightness', '', TRUE).';invert:' |
|
63 | + .$this->pi_getLL('invert', '', TRUE).'" title="' |
|
64 | + .$this->pi_getLL('no-support', '', TRUE).'"></span>'; |
|
65 | 65 | |
66 | - $content .= $this->cObj->substituteMarkerArray($this->template, $markerArray); |
|
66 | + $content .= $this->cObj->substituteMarkerArray($this->template, $markerArray); |
|
67 | 67 | |
68 | - return $this->pi_wrapInBaseClass($content); |
|
68 | + return $this->pi_wrapInBaseClass($content); |
|
69 | 69 | |
70 | - } |
|
70 | + } |
|
71 | 71 | |
72 | 72 | } |
@@ -19,140 +19,140 @@ |
||
19 | 19 | */ |
20 | 20 | class tx_dlf_toolsImagedownload extends tx_dlf_plugin { |
21 | 21 | |
22 | - public $scriptRelPath = 'plugins/toolbox/tools/imagedownload/class.tx_dlf_toolsImagedownload.php'; |
|
22 | + public $scriptRelPath = 'plugins/toolbox/tools/imagedownload/class.tx_dlf_toolsImagedownload.php'; |
|
23 | 23 | |
24 | - /** |
|
25 | - * The main method of the PlugIn |
|
26 | - * |
|
27 | - * @access public |
|
28 | - * |
|
29 | - * @param string $content: The PlugIn content |
|
30 | - * @param array $conf: The PlugIn configuration |
|
31 | - * |
|
32 | - * @return string The content that is displayed on the website |
|
33 | - */ |
|
34 | - public function main($content, $conf) { |
|
24 | + /** |
|
25 | + * The main method of the PlugIn |
|
26 | + * |
|
27 | + * @access public |
|
28 | + * |
|
29 | + * @param string $content: The PlugIn content |
|
30 | + * @param array $conf: The PlugIn configuration |
|
31 | + * |
|
32 | + * @return string The content that is displayed on the website |
|
33 | + */ |
|
34 | + public function main($content, $conf) { |
|
35 | 35 | |
36 | - $this->init($conf); |
|
36 | + $this->init($conf); |
|
37 | 37 | |
38 | - // Merge configuration with conf array of toolbox. |
|
39 | - $this->conf = tx_dlf_helper::array_merge_recursive_overrule($this->cObj->data['conf'], $this->conf); |
|
38 | + // Merge configuration with conf array of toolbox. |
|
39 | + $this->conf = tx_dlf_helper::array_merge_recursive_overrule($this->cObj->data['conf'], $this->conf); |
|
40 | 40 | |
41 | - // Load current document. |
|
42 | - $this->loadDocument(); |
|
41 | + // Load current document. |
|
42 | + $this->loadDocument(); |
|
43 | 43 | |
44 | - if ($this->doc === NULL || $this->doc->numPages < 1 || empty($this->conf['fileGrpsImageDownload'])) { |
|
44 | + if ($this->doc === NULL || $this->doc->numPages < 1 || empty($this->conf['fileGrpsImageDownload'])) { |
|
45 | 45 | |
46 | - // Quit without doing anything if required variables are not set. |
|
47 | - return $content; |
|
46 | + // Quit without doing anything if required variables are not set. |
|
47 | + return $content; |
|
48 | 48 | |
49 | - } else { |
|
49 | + } else { |
|
50 | 50 | |
51 | - if (!empty($this->piVars['logicalPage'])) { |
|
51 | + if (!empty($this->piVars['logicalPage'])) { |
|
52 | 52 | |
53 | - $this->piVars['page'] = $this->doc->getPhysicalPage($this->piVars['logicalPage']); |
|
54 | - // The logical page parameter should not appear again |
|
55 | - unset($this->piVars['logicalPage']); |
|
53 | + $this->piVars['page'] = $this->doc->getPhysicalPage($this->piVars['logicalPage']); |
|
54 | + // The logical page parameter should not appear again |
|
55 | + unset($this->piVars['logicalPage']); |
|
56 | 56 | |
57 | - } |
|
57 | + } |
|
58 | 58 | |
59 | - // Set default values if not set. |
|
60 | - // $this->piVars['page'] may be integer or string (physical structure @ID) |
|
61 | - if ( (int)$this->piVars['page'] > 0 || empty($this->piVars['page'])) { |
|
59 | + // Set default values if not set. |
|
60 | + // $this->piVars['page'] may be integer or string (physical structure @ID) |
|
61 | + if ( (int)$this->piVars['page'] > 0 || empty($this->piVars['page'])) { |
|
62 | 62 | |
63 | - $this->piVars['page'] = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange((int)$this->piVars['page'], 1, $this->doc->numPages, 1); |
|
63 | + $this->piVars['page'] = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange((int)$this->piVars['page'], 1, $this->doc->numPages, 1); |
|
64 | 64 | |
65 | - } else { |
|
65 | + } else { |
|
66 | 66 | |
67 | - $this->piVars['page'] = array_search($this->piVars['page'], $this->doc->physicalStructure); |
|
67 | + $this->piVars['page'] = array_search($this->piVars['page'], $this->doc->physicalStructure); |
|
68 | 68 | |
69 | - } |
|
69 | + } |
|
70 | 70 | |
71 | - $this->piVars['double'] = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange($this->piVars['double'], 0, 1, 0); |
|
71 | + $this->piVars['double'] = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange($this->piVars['double'], 0, 1, 0); |
|
72 | 72 | |
73 | - } |
|
73 | + } |
|
74 | 74 | |
75 | - // Load template file. |
|
76 | - if (!empty($this->conf['toolTemplateFile'])) { |
|
75 | + // Load template file. |
|
76 | + if (!empty($this->conf['toolTemplateFile'])) { |
|
77 | 77 | |
78 | - $this->template = $this->cObj->getSubpart($this->cObj->fileResource($this->conf['toolTemplateFile']), '###TEMPLATE###'); |
|
78 | + $this->template = $this->cObj->getSubpart($this->cObj->fileResource($this->conf['toolTemplateFile']), '###TEMPLATE###'); |
|
79 | 79 | |
80 | - } else { |
|
80 | + } else { |
|
81 | 81 | |
82 | - $this->template = $this->cObj->getSubpart($this->cObj->fileResource('EXT:dlf/plugins/toolbox/tools/imagedownload/template.tmpl'), '###TEMPLATE###'); |
|
82 | + $this->template = $this->cObj->getSubpart($this->cObj->fileResource('EXT:dlf/plugins/toolbox/tools/imagedownload/template.tmpl'), '###TEMPLATE###'); |
|
83 | 83 | |
84 | - } |
|
84 | + } |
|
85 | 85 | |
86 | - // Get left or single page download. |
|
87 | - $markerArray['###IMAGE_LEFT###'] = $this->piVars['double'] == 1 ? $this->getImage($this->piVars['page'], $this->pi_getLL('leftPage', '')) : $this->getImage($this->piVars['page'], $this->pi_getLL('singlePage', '')); |
|
86 | + // Get left or single page download. |
|
87 | + $markerArray['###IMAGE_LEFT###'] = $this->piVars['double'] == 1 ? $this->getImage($this->piVars['page'], $this->pi_getLL('leftPage', '')) : $this->getImage($this->piVars['page'], $this->pi_getLL('singlePage', '')); |
|
88 | 88 | |
89 | - // Get right page download. |
|
90 | - $markerArray['###IMAGE_RIGHT###'] = $this->piVars['double'] == 1 ? $this->getImage($this->piVars['page'] + 1, $this->pi_getLL('rightPage', '')) : ''; |
|
89 | + // Get right page download. |
|
90 | + $markerArray['###IMAGE_RIGHT###'] = $this->piVars['double'] == 1 ? $this->getImage($this->piVars['page'] + 1, $this->pi_getLL('rightPage', '')) : ''; |
|
91 | 91 | |
92 | - $content .= $this->cObj->substituteMarkerArray($this->template, $markerArray); |
|
92 | + $content .= $this->cObj->substituteMarkerArray($this->template, $markerArray); |
|
93 | 93 | |
94 | - return $this->pi_wrapInBaseClass($content); |
|
94 | + return $this->pi_wrapInBaseClass($content); |
|
95 | 95 | |
96 | - } |
|
96 | + } |
|
97 | 97 | |
98 | 98 | |
99 | - /** |
|
100 | - * Get image's URL and MIME type |
|
101 | - * |
|
102 | - * @access protected |
|
103 | - * |
|
104 | - * @param integer $page: Page number |
|
105 | - * @param string $label: Link title and label |
|
106 | - * |
|
107 | - * @return string linkt to image file with given label |
|
108 | - */ |
|
109 | - protected function getImage($page, $label) { |
|
99 | + /** |
|
100 | + * Get image's URL and MIME type |
|
101 | + * |
|
102 | + * @access protected |
|
103 | + * |
|
104 | + * @param integer $page: Page number |
|
105 | + * @param string $label: Link title and label |
|
106 | + * |
|
107 | + * @return string linkt to image file with given label |
|
108 | + */ |
|
109 | + protected function getImage($page, $label) { |
|
110 | 110 | |
111 | - $image = array (); |
|
111 | + $image = array (); |
|
112 | 112 | |
113 | - // Get @USE value of METS fileGrp. |
|
114 | - $fileGrps = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->conf['fileGrpsImageDownload']); |
|
113 | + // Get @USE value of METS fileGrp. |
|
114 | + $fileGrps = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->conf['fileGrpsImageDownload']); |
|
115 | 115 | |
116 | - while ($fileGrp = @array_pop($fileGrps)) { |
|
116 | + while ($fileGrp = @array_pop($fileGrps)) { |
|
117 | 117 | |
118 | - // Get image link. |
|
119 | - if (!empty($this->doc->physicalStructureInfo[$this->doc->physicalStructure[$page]]['files'][$fileGrp])) { |
|
118 | + // Get image link. |
|
119 | + if (!empty($this->doc->physicalStructureInfo[$this->doc->physicalStructure[$page]]['files'][$fileGrp])) { |
|
120 | 120 | |
121 | - $image['url'] = $this->doc->getFileLocation($this->doc->physicalStructureInfo[$this->doc->physicalStructure[$page]]['files'][$fileGrp]); |
|
121 | + $image['url'] = $this->doc->getFileLocation($this->doc->physicalStructureInfo[$this->doc->physicalStructure[$page]]['files'][$fileGrp]); |
|
122 | 122 | |
123 | - $image['mimetype'] = $this->doc->getFileMimeType($this->doc->physicalStructureInfo[$this->doc->physicalStructure[$page]]['files'][$fileGrp]); |
|
123 | + $image['mimetype'] = $this->doc->getFileMimeType($this->doc->physicalStructureInfo[$this->doc->physicalStructure[$page]]['files'][$fileGrp]); |
|
124 | 124 | |
125 | - switch ($image['mimetype']) { |
|
126 | - case 'image/jpeg': $mimetypeLabel = '(JPG)'; |
|
127 | - break; |
|
128 | - case 'image/tiff': $mimetypeLabel = '(TIFF)'; |
|
129 | - break; |
|
130 | - default: $mimetypeLabel = ''; |
|
131 | - } |
|
132 | - $linkConf = array ( |
|
133 | - 'parameter' => $image['url'], |
|
134 | - 'title' => $label . ' ' . $mimetypeLabel, |
|
135 | - 'additionalParams' => '', |
|
136 | - ); |
|
125 | + switch ($image['mimetype']) { |
|
126 | + case 'image/jpeg': $mimetypeLabel = '(JPG)'; |
|
127 | + break; |
|
128 | + case 'image/tiff': $mimetypeLabel = '(TIFF)'; |
|
129 | + break; |
|
130 | + default: $mimetypeLabel = ''; |
|
131 | + } |
|
132 | + $linkConf = array ( |
|
133 | + 'parameter' => $image['url'], |
|
134 | + 'title' => $label . ' ' . $mimetypeLabel, |
|
135 | + 'additionalParams' => '', |
|
136 | + ); |
|
137 | 137 | |
138 | - $imageLink = $this->cObj->typoLink($label . ' ' . $mimetypeLabel, $linkConf); |
|
138 | + $imageLink = $this->cObj->typoLink($label . ' ' . $mimetypeLabel, $linkConf); |
|
139 | 139 | |
140 | - break; |
|
140 | + break; |
|
141 | 141 | |
142 | - } else { |
|
142 | + } else { |
|
143 | 143 | |
144 | - if (TYPO3_DLOG) { |
|
144 | + if (TYPO3_DLOG) { |
|
145 | 145 | |
146 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_toolsImagedownload->getImage('.$page.')] File not found in fileGrp "'.$fileGrp.'"', $this->extKey, SYSLOG_SEVERITY_WARNING); |
|
146 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_toolsImagedownload->getImage('.$page.')] File not found in fileGrp "'.$fileGrp.'"', $this->extKey, SYSLOG_SEVERITY_WARNING); |
|
147 | 147 | |
148 | - } |
|
148 | + } |
|
149 | 149 | |
150 | - } |
|
150 | + } |
|
151 | 151 | |
152 | - } |
|
152 | + } |
|
153 | 153 | |
154 | - return $imageLink; |
|
154 | + return $imageLink; |
|
155 | 155 | |
156 | - } |
|
156 | + } |
|
157 | 157 | |
158 | 158 | } |
@@ -50,9 +50,9 @@ discard block |
||
50 | 50 | |
51 | 51 | // Set default values if not set. |
52 | 52 | // $this->piVars['page'] may be integer or string (physical structure @ID) |
53 | - if ( (int)$this->piVars['page'] > 0 || empty($this->piVars['page'])) { |
|
53 | + if ((int) $this->piVars['page'] > 0 || empty($this->piVars['page'])) { |
|
54 | 54 | |
55 | - $this->piVars['page'] = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange((int)$this->piVars['page'], 1, $this->doc->numPages, 1); |
|
55 | + $this->piVars['page'] = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange((int) $this->piVars['page'], 1, $this->doc->numPages, 1); |
|
56 | 56 | |
57 | 57 | } else { |
58 | 58 | |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | } |
77 | 77 | |
78 | 78 | // Get left or single page download. |
79 | - $markerArray['###IMAGE_LEFT###'] = $this->piVars['double'] == 1 ? $this->getImage($this->piVars['page'], $this->pi_getLL('leftPage', '')) : $this->getImage($this->piVars['page'], $this->pi_getLL('singlePage', '')); |
|
79 | + $markerArray['###IMAGE_LEFT###'] = $this->piVars['double'] == 1 ? $this->getImage($this->piVars['page'], $this->pi_getLL('leftPage', '')) : $this->getImage($this->piVars['page'], $this->pi_getLL('singlePage', '')); |
|
80 | 80 | |
81 | 81 | // Get right page download. |
82 | 82 | $markerArray['###IMAGE_RIGHT###'] = $this->piVars['double'] == 1 ? $this->getImage($this->piVars['page'] + 1, $this->pi_getLL('rightPage', '')) : ''; |
@@ -123,11 +123,11 @@ discard block |
||
123 | 123 | } |
124 | 124 | $linkConf = array ( |
125 | 125 | 'parameter' => $image['url'], |
126 | - 'title' => $label . ' ' . $mimetypeLabel, |
|
126 | + 'title' => $label.' '.$mimetypeLabel, |
|
127 | 127 | 'additionalParams' => '', |
128 | 128 | ); |
129 | 129 | |
130 | - $imageLink = $this->cObj->typoLink($label . ' ' . $mimetypeLabel, $linkConf); |
|
130 | + $imageLink = $this->cObj->typoLink($label.' '.$mimetypeLabel, $linkConf); |
|
131 | 131 | |
132 | 132 | break; |
133 | 133 |
@@ -20,406 +20,406 @@ |
||
20 | 20 | */ |
21 | 21 | class tx_dlf_newspaper extends tx_dlf_plugin { |
22 | 22 | |
23 | - public $extKey = 'dlf'; |
|
23 | + public $extKey = 'dlf'; |
|
24 | 24 | |
25 | - public $scriptRelPath = 'plugins/newspaper/class.tx_dlf_newspaper.php'; |
|
25 | + public $scriptRelPath = 'plugins/newspaper/class.tx_dlf_newspaper.php'; |
|
26 | 26 | |
27 | - /** |
|
28 | - * The main method of the PlugIn |
|
29 | - * |
|
30 | - * @access public |
|
31 | - * |
|
32 | - * @param string $content: The PlugIn content |
|
33 | - * @param array $conf: The PlugIn configuration |
|
34 | - * |
|
35 | - * @return string The content that is displayed on the website |
|
36 | - */ |
|
37 | - public function main($content, $conf) { |
|
27 | + /** |
|
28 | + * The main method of the PlugIn |
|
29 | + * |
|
30 | + * @access public |
|
31 | + * |
|
32 | + * @param string $content: The PlugIn content |
|
33 | + * @param array $conf: The PlugIn configuration |
|
34 | + * |
|
35 | + * @return string The content that is displayed on the website |
|
36 | + */ |
|
37 | + public function main($content, $conf) { |
|
38 | 38 | |
39 | - // Nothing to do here. |
|
40 | - return $content; |
|
39 | + // Nothing to do here. |
|
40 | + return $content; |
|
41 | 41 | |
42 | - } |
|
42 | + } |
|
43 | 43 | |
44 | - /** |
|
45 | - * The Calendar Method |
|
46 | - * |
|
47 | - * @access public |
|
48 | - * |
|
49 | - * @param string $content: The PlugIn content |
|
50 | - * @param array $conf: The PlugIn configuration |
|
51 | - * |
|
52 | - * @return string The content that is displayed on the website |
|
53 | - */ |
|
54 | - public function calendar($content, $conf) { |
|
44 | + /** |
|
45 | + * The Calendar Method |
|
46 | + * |
|
47 | + * @access public |
|
48 | + * |
|
49 | + * @param string $content: The PlugIn content |
|
50 | + * @param array $conf: The PlugIn configuration |
|
51 | + * |
|
52 | + * @return string The content that is displayed on the website |
|
53 | + */ |
|
54 | + public function calendar($content, $conf) { |
|
55 | 55 | |
56 | - $this->init($conf); |
|
56 | + $this->init($conf); |
|
57 | 57 | |
58 | - // Load current document. |
|
59 | - $this->loadDocument(); |
|
58 | + // Load current document. |
|
59 | + $this->loadDocument(); |
|
60 | 60 | |
61 | - if ($this->doc === NULL) { |
|
61 | + if ($this->doc === NULL) { |
|
62 | 62 | |
63 | - // Quit without doing anything if required variables are not set. |
|
64 | - return $content; |
|
63 | + // Quit without doing anything if required variables are not set. |
|
64 | + return $content; |
|
65 | 65 | |
66 | - } |
|
66 | + } |
|
67 | 67 | |
68 | - // Load template file. |
|
69 | - if (!empty($this->conf['templateFile'])) { |
|
68 | + // Load template file. |
|
69 | + if (!empty($this->conf['templateFile'])) { |
|
70 | 70 | |
71 | - $this->template = $this->cObj->getSubpart($this->cObj->fileResource($this->conf['templateFile']), '###TEMPLATECALENDAR###'); |
|
71 | + $this->template = $this->cObj->getSubpart($this->cObj->fileResource($this->conf['templateFile']), '###TEMPLATECALENDAR###'); |
|
72 | 72 | |
73 | - } else { |
|
73 | + } else { |
|
74 | 74 | |
75 | - $this->template = $this->cObj->getSubpart($this->cObj->fileResource('EXT:dlf/plugins/newspaper/template.tmpl'), '###TEMPLATECALENDAR###'); |
|
75 | + $this->template = $this->cObj->getSubpart($this->cObj->fileResource('EXT:dlf/plugins/newspaper/template.tmpl'), '###TEMPLATECALENDAR###'); |
|
76 | 76 | |
77 | - } |
|
77 | + } |
|
78 | 78 | |
79 | - // Get all children of year anchor. |
|
80 | - $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
|
81 | - 'tx_dlf_documents.uid AS uid, tx_dlf_documents.title AS title, tx_dlf_documents.year AS year', |
|
82 | - 'tx_dlf_documents', |
|
83 | - '(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'), |
|
84 | - '', |
|
85 | - 'title ASC', |
|
86 | - '' |
|
87 | - ); |
|
79 | + // Get all children of year anchor. |
|
80 | + $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
|
81 | + 'tx_dlf_documents.uid AS uid, tx_dlf_documents.title AS title, tx_dlf_documents.year AS year', |
|
82 | + 'tx_dlf_documents', |
|
83 | + '(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'), |
|
84 | + '', |
|
85 | + 'title ASC', |
|
86 | + '' |
|
87 | + ); |
|
88 | 88 | |
89 | - // Process results. |
|
90 | - while ($resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)) { |
|
89 | + // Process results. |
|
90 | + while ($resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)) { |
|
91 | 91 | |
92 | - $issues[] = array ( |
|
93 | - 'uid' => $resArray['uid'], |
|
94 | - 'title' => $resArray['title'], |
|
95 | - 'year' => $resArray['year'] |
|
96 | - ); |
|
92 | + $issues[] = array ( |
|
93 | + 'uid' => $resArray['uid'], |
|
94 | + 'title' => $resArray['title'], |
|
95 | + 'year' => $resArray['year'] |
|
96 | + ); |
|
97 | 97 | |
98 | - } |
|
98 | + } |
|
99 | 99 | |
100 | - // We need an array of issues with month number as key. |
|
101 | - $calendarIssues = array (); |
|
100 | + // We need an array of issues with month number as key. |
|
101 | + $calendarIssues = array (); |
|
102 | 102 | |
103 | - foreach ($issues as $issue) { |
|
103 | + foreach ($issues as $issue) { |
|
104 | 104 | |
105 | - $calendarIssues[date('n', strtotime($issue['year']))][date('j', strtotime($issue['year']))][] = $issue; |
|
105 | + $calendarIssues[date('n', strtotime($issue['year']))][date('j', strtotime($issue['year']))][] = $issue; |
|
106 | 106 | |
107 | - } |
|
107 | + } |
|
108 | 108 | |
109 | - $allIssues = array (); |
|
109 | + $allIssues = array (); |
|
110 | 110 | |
111 | - // Get subpart templates. |
|
112 | - $subparts['list'] = $this->cObj->getSubpart($this->template, '###ISSUELIST###'); |
|
111 | + // Get subpart templates. |
|
112 | + $subparts['list'] = $this->cObj->getSubpart($this->template, '###ISSUELIST###'); |
|
113 | 113 | |
114 | - $subparts['month'] = $this->cObj->getSubpart($this->template, '###CALMONTH###'); |
|
114 | + $subparts['month'] = $this->cObj->getSubpart($this->template, '###CALMONTH###'); |
|
115 | 115 | |
116 | - $subparts['week'] = $this->cObj->getSubpart($subparts['month'], '###CALWEEK###'); |
|
116 | + $subparts['week'] = $this->cObj->getSubpart($subparts['month'], '###CALWEEK###'); |
|
117 | 117 | |
118 | - $subparts['singleday'] = $this->cObj->getSubpart($subparts['list'], '###SINGLEDAY###'); |
|
118 | + $subparts['singleday'] = $this->cObj->getSubpart($subparts['list'], '###SINGLEDAY###'); |
|
119 | 119 | |
120 | - // Build calendar for given year. |
|
121 | - $year = date('Y', strtotime($issues[0]['year'])); |
|
120 | + // Build calendar for given year. |
|
121 | + $year = date('Y', strtotime($issues[0]['year'])); |
|
122 | 122 | |
123 | - for ($i = 0; $i <= 11; $i++) { |
|
123 | + for ($i = 0; $i <= 11; $i++) { |
|
124 | 124 | |
125 | - $markerArray = array ( |
|
126 | - '###DAYMON_NAME###' => strftime('%a', strtotime('last Monday')), |
|
127 | - '###DAYTUE_NAME###' => strftime('%a', strtotime('last Tuesday')), |
|
128 | - '###DAYWED_NAME###' => strftime('%a', strtotime('last Wednesday')), |
|
129 | - '###DAYTHU_NAME###' => strftime('%a', strtotime('last Thursday')), |
|
130 | - '###DAYFRI_NAME###' => strftime('%a', strtotime('last Friday')), |
|
131 | - '###DAYSAT_NAME###' => strftime('%a', strtotime('last Saturday')), |
|
132 | - '###DAYSUN_NAME###' => strftime('%a', strtotime('last Sunday')), |
|
133 | - '###MONTHNAME###' => strftime('%B', strtotime($year . '-' . ($i + 1) . '-1')) |
|
134 | - ); |
|
125 | + $markerArray = array ( |
|
126 | + '###DAYMON_NAME###' => strftime('%a', strtotime('last Monday')), |
|
127 | + '###DAYTUE_NAME###' => strftime('%a', strtotime('last Tuesday')), |
|
128 | + '###DAYWED_NAME###' => strftime('%a', strtotime('last Wednesday')), |
|
129 | + '###DAYTHU_NAME###' => strftime('%a', strtotime('last Thursday')), |
|
130 | + '###DAYFRI_NAME###' => strftime('%a', strtotime('last Friday')), |
|
131 | + '###DAYSAT_NAME###' => strftime('%a', strtotime('last Saturday')), |
|
132 | + '###DAYSUN_NAME###' => strftime('%a', strtotime('last Sunday')), |
|
133 | + '###MONTHNAME###' => strftime('%B', strtotime($year . '-' . ($i + 1) . '-1')) |
|
134 | + ); |
|
135 | 135 | |
136 | - // Reset week content of new month. |
|
137 | - $subWeekPartContent = ''; |
|
136 | + // Reset week content of new month. |
|
137 | + $subWeekPartContent = ''; |
|
138 | 138 | |
139 | - $firstOfMonth = strtotime($year . '-' . ($i + 1) . '-1'); |
|
140 | - $lastOfMonth = strtotime('last day of', ($firstOfMonth)); |
|
141 | - $firstOfMonthStart = strtotime('last Monday', $firstOfMonth); |
|
139 | + $firstOfMonth = strtotime($year . '-' . ($i + 1) . '-1'); |
|
140 | + $lastOfMonth = strtotime('last day of', ($firstOfMonth)); |
|
141 | + $firstOfMonthStart = strtotime('last Monday', $firstOfMonth); |
|
142 | 142 | |
143 | - // There are never more than 6 weeks in a month. |
|
144 | - for ($j = 0; $j <= 5; $j++) { |
|
143 | + // There are never more than 6 weeks in a month. |
|
144 | + for ($j = 0; $j <= 5; $j++) { |
|
145 | 145 | |
146 | - $firstDayOfWeek = strtotime('+ ' . $j . ' Week', $firstOfMonthStart); |
|
146 | + $firstDayOfWeek = strtotime('+ ' . $j . ' Week', $firstOfMonthStart); |
|
147 | 147 | |
148 | - $weekArray = array( |
|
149 | - '###DAYMON###' => ' ', |
|
150 | - '###DAYTUE###' => ' ', |
|
151 | - '###DAYWED###' => ' ', |
|
152 | - '###DAYTHU###' => ' ', |
|
153 | - '###DAYFRI###' => ' ', |
|
154 | - '###DAYSAT###' => ' ', |
|
155 | - '###DAYSUN###' => ' ', |
|
156 | - ); |
|
148 | + $weekArray = array( |
|
149 | + '###DAYMON###' => ' ', |
|
150 | + '###DAYTUE###' => ' ', |
|
151 | + '###DAYWED###' => ' ', |
|
152 | + '###DAYTHU###' => ' ', |
|
153 | + '###DAYFRI###' => ' ', |
|
154 | + '###DAYSAT###' => ' ', |
|
155 | + '###DAYSUN###' => ' ', |
|
156 | + ); |
|
157 | 157 | |
158 | - // Every week has seven days. ;-) |
|
159 | - for ($k = 0; $k <= 6; $k++) { |
|
158 | + // Every week has seven days. ;-) |
|
159 | + for ($k = 0; $k <= 6; $k++) { |
|
160 | 160 | |
161 | - $currentDayTime = strtotime('+ '.$k.' Day', $firstDayOfWeek); |
|
161 | + $currentDayTime = strtotime('+ '.$k.' Day', $firstDayOfWeek); |
|
162 | 162 | |
163 | - if ($currentDayTime >= $firstOfMonth && $currentDayTime <= $lastOfMonth) { |
|
163 | + if ($currentDayTime >= $firstOfMonth && $currentDayTime <= $lastOfMonth) { |
|
164 | 164 | |
165 | - $dayLinks = ''; |
|
165 | + $dayLinks = ''; |
|
166 | 166 | |
167 | - $dayLinksText = array (); |
|
167 | + $dayLinksText = array (); |
|
168 | 168 | |
169 | - $dayLinksList = ''; |
|
169 | + $dayLinksList = ''; |
|
170 | 170 | |
171 | - $currentMonth = date('n', $currentDayTime); |
|
171 | + $currentMonth = date('n', $currentDayTime); |
|
172 | 172 | |
173 | - if (is_array($calendarIssues[$currentMonth])) { |
|
173 | + if (is_array($calendarIssues[$currentMonth])) { |
|
174 | 174 | |
175 | - foreach ($calendarIssues[$currentMonth] as $id => $day) { |
|
175 | + foreach ($calendarIssues[$currentMonth] as $id => $day) { |
|
176 | 176 | |
177 | - if ($id == date('j', $currentDayTime)) { |
|
177 | + if ($id == date('j', $currentDayTime)) { |
|
178 | 178 | |
179 | - $dayLinks = $id; |
|
179 | + $dayLinks = $id; |
|
180 | 180 | |
181 | - foreach ($day as $issue) { |
|
181 | + foreach ($day as $issue) { |
|
182 | 182 | |
183 | - $dayLinkLabel = empty($issue['title']) ? strftime('%x', $currentDayTime) : $issue['title']; |
|
183 | + $dayLinkLabel = empty($issue['title']) ? strftime('%x', $currentDayTime) : $issue['title']; |
|
184 | 184 | |
185 | - $linkConf = array ( |
|
186 | - 'useCacheHash' => 1, |
|
187 | - 'parameter' => $this->conf['targetPid'], |
|
188 | - 'additionalParams' => '&' . $this->prefixId . '[id]=' . urlencode($issue['uid']), |
|
189 | - 'ATagParams' => ' class="title"', |
|
190 | - ); |
|
185 | + $linkConf = array ( |
|
186 | + 'useCacheHash' => 1, |
|
187 | + 'parameter' => $this->conf['targetPid'], |
|
188 | + 'additionalParams' => '&' . $this->prefixId . '[id]=' . urlencode($issue['uid']), |
|
189 | + 'ATagParams' => ' class="title"', |
|
190 | + ); |
|
191 | 191 | |
192 | - $dayLinksText[] = $this->cObj->typoLink($dayLinkLabel, $linkConf); |
|
192 | + $dayLinksText[] = $this->cObj->typoLink($dayLinkLabel, $linkConf); |
|
193 | 193 | |
194 | - // Save issues for list view. |
|
195 | - $allIssues[$currentDayTime][] = $this->cObj->typoLink($dayLinkLabel, $linkConf); |
|
196 | - } |
|
197 | - } |
|
194 | + // Save issues for list view. |
|
195 | + $allIssues[$currentDayTime][] = $this->cObj->typoLink($dayLinkLabel, $linkConf); |
|
196 | + } |
|
197 | + } |
|
198 | 198 | |
199 | - } |
|
199 | + } |
|
200 | 200 | |
201 | - if (!empty($dayLinksText)) { |
|
201 | + if (!empty($dayLinksText)) { |
|
202 | 202 | |
203 | - $dayLinksList = '<ul>'; |
|
203 | + $dayLinksList = '<ul>'; |
|
204 | 204 | |
205 | - foreach ($dayLinksText as $link) { |
|
205 | + foreach ($dayLinksText as $link) { |
|
206 | 206 | |
207 | - $dayLinksList .= '<li>'.$link.'</li>'; |
|
207 | + $dayLinksList .= '<li>'.$link.'</li>'; |
|
208 | 208 | |
209 | - } |
|
209 | + } |
|
210 | 210 | |
211 | - $dayLinksList .= '</ul>'; |
|
211 | + $dayLinksList .= '</ul>'; |
|
212 | 212 | |
213 | - } |
|
213 | + } |
|
214 | 214 | |
215 | - $dayLinkDiv = '<div class="issues"><h4>' . strftime('%d', $currentDayTime) . '</h4><div>'.$dayLinksList.'</div></div>'; |
|
216 | - } |
|
215 | + $dayLinkDiv = '<div class="issues"><h4>' . strftime('%d', $currentDayTime) . '</h4><div>'.$dayLinksList.'</div></div>'; |
|
216 | + } |
|
217 | 217 | |
218 | - switch (strftime('%w', strtotime('+ '.$k.' Day', $firstDayOfWeek))) { |
|
218 | + switch (strftime('%w', strtotime('+ '.$k.' Day', $firstDayOfWeek))) { |
|
219 | 219 | |
220 | - case '0': $weekArray['###DAYSUN###'] = ((int) $dayLinks === (int) date('j', $currentDayTime)) ? $dayLinkDiv : strftime('%d', $currentDayTime); |
|
221 | - break; |
|
220 | + case '0': $weekArray['###DAYSUN###'] = ((int) $dayLinks === (int) date('j', $currentDayTime)) ? $dayLinkDiv : strftime('%d', $currentDayTime); |
|
221 | + break; |
|
222 | 222 | |
223 | - case '1': $weekArray['###DAYMON###'] = ((int) $dayLinks === (int) date('j', $currentDayTime)) ? $dayLinkDiv : strftime('%d', $currentDayTime); |
|
224 | - break; |
|
223 | + case '1': $weekArray['###DAYMON###'] = ((int) $dayLinks === (int) date('j', $currentDayTime)) ? $dayLinkDiv : strftime('%d', $currentDayTime); |
|
224 | + break; |
|
225 | 225 | |
226 | - case '2': $weekArray['###DAYTUE###'] = ((int) $dayLinks === (int) date('j', $currentDayTime)) ? $dayLinkDiv : strftime('%d', $currentDayTime); |
|
227 | - break; |
|
226 | + case '2': $weekArray['###DAYTUE###'] = ((int) $dayLinks === (int) date('j', $currentDayTime)) ? $dayLinkDiv : strftime('%d', $currentDayTime); |
|
227 | + break; |
|
228 | 228 | |
229 | - case '3': $weekArray['###DAYWED###'] = ((int) $dayLinks === (int) date('j', $currentDayTime)) ? $dayLinkDiv : strftime('%d', $currentDayTime); |
|
230 | - break; |
|
229 | + case '3': $weekArray['###DAYWED###'] = ((int) $dayLinks === (int) date('j', $currentDayTime)) ? $dayLinkDiv : strftime('%d', $currentDayTime); |
|
230 | + break; |
|
231 | 231 | |
232 | - case '4': $weekArray['###DAYTHU###'] = ((int) $dayLinks === (int) date('j', $currentDayTime)) ? $dayLinkDiv : strftime('%d', $currentDayTime); |
|
233 | - break; |
|
232 | + case '4': $weekArray['###DAYTHU###'] = ((int) $dayLinks === (int) date('j', $currentDayTime)) ? $dayLinkDiv : strftime('%d', $currentDayTime); |
|
233 | + break; |
|
234 | 234 | |
235 | - case '5': $weekArray['###DAYFRI###'] = ((int) $dayLinks === (int) date('j', $currentDayTime)) ? $dayLinkDiv : strftime('%d', $currentDayTime); |
|
236 | - break; |
|
235 | + case '5': $weekArray['###DAYFRI###'] = ((int) $dayLinks === (int) date('j', $currentDayTime)) ? $dayLinkDiv : strftime('%d', $currentDayTime); |
|
236 | + break; |
|
237 | 237 | |
238 | - case '6': $weekArray['###DAYSAT###'] = ((int) $dayLinks === (int) date('j', $currentDayTime)) ? $dayLinkDiv : strftime('%d', $currentDayTime); |
|
239 | - break; |
|
238 | + case '6': $weekArray['###DAYSAT###'] = ((int) $dayLinks === (int) date('j', $currentDayTime)) ? $dayLinkDiv : strftime('%d', $currentDayTime); |
|
239 | + break; |
|
240 | 240 | |
241 | - } |
|
241 | + } |
|
242 | 242 | |
243 | - } |
|
243 | + } |
|
244 | 244 | |
245 | - } |
|
245 | + } |
|
246 | 246 | |
247 | - // Fill the weeks. |
|
248 | - $subWeekPartContent .= $this->cObj->substituteMarkerArray($subparts['week'], $weekArray); |
|
247 | + // Fill the weeks. |
|
248 | + $subWeekPartContent .= $this->cObj->substituteMarkerArray($subparts['week'], $weekArray); |
|
249 | 249 | |
250 | - } |
|
250 | + } |
|
251 | 251 | |
252 | - // Fill the month markers. |
|
253 | - $subPartContent .= $this->cObj->substituteMarkerArray($subparts['month'], $markerArray); |
|
252 | + // Fill the month markers. |
|
253 | + $subPartContent .= $this->cObj->substituteMarkerArray($subparts['month'], $markerArray); |
|
254 | 254 | |
255 | - // Fill the week markers with the week entries. |
|
256 | - $subPartContent = $this->cObj->substituteSubpart($subPartContent, '###CALWEEK###', $subWeekPartContent); |
|
257 | - } |
|
255 | + // Fill the week markers with the week entries. |
|
256 | + $subPartContent = $this->cObj->substituteSubpart($subPartContent, '###CALWEEK###', $subWeekPartContent); |
|
257 | + } |
|
258 | 258 | |
259 | - // Link to years overview |
|
260 | - $linkConf = array ( |
|
261 | - 'useCacheHash' => 1, |
|
262 | - 'parameter' => $this->conf['targetPid'], |
|
263 | - 'additionalParams' => '&' . $this->prefixId . '[id]=' . urlencode($this->doc->parentId), |
|
264 | - ); |
|
259 | + // Link to years overview |
|
260 | + $linkConf = array ( |
|
261 | + 'useCacheHash' => 1, |
|
262 | + 'parameter' => $this->conf['targetPid'], |
|
263 | + 'additionalParams' => '&' . $this->prefixId . '[id]=' . urlencode($this->doc->parentId), |
|
264 | + ); |
|
265 | 265 | |
266 | - $allYearsLink = $this->cObj->typoLink($this->pi_getLL('allYears', '', TRUE) . ' ' . $this->doc->getTitle($this->doc->parentId), $linkConf); |
|
266 | + $allYearsLink = $this->cObj->typoLink($this->pi_getLL('allYears', '', TRUE) . ' ' . $this->doc->getTitle($this->doc->parentId), $linkConf); |
|
267 | 267 | |
268 | - // Link to current year. |
|
269 | - $linkConf = array ( |
|
270 | - 'useCacheHash' => 1, |
|
271 | - 'parameter' => $this->conf['targetPid'], |
|
272 | - 'additionalParams' => '&' . $this->prefixId . '[id]=' . urlencode($this->doc->uid), |
|
273 | - ); |
|
268 | + // Link to current year. |
|
269 | + $linkConf = array ( |
|
270 | + 'useCacheHash' => 1, |
|
271 | + 'parameter' => $this->conf['targetPid'], |
|
272 | + 'additionalParams' => '&' . $this->prefixId . '[id]=' . urlencode($this->doc->uid), |
|
273 | + ); |
|
274 | 274 | |
275 | - $yearLink = $this->cObj->typoLink($year, $linkConf); |
|
275 | + $yearLink = $this->cObj->typoLink($year, $linkConf); |
|
276 | 276 | |
277 | - // Prepare list as alternative of the calendar view. |
|
278 | - foreach($allIssues as $dayTime => $issues) { |
|
277 | + // Prepare list as alternative of the calendar view. |
|
278 | + foreach($allIssues as $dayTime => $issues) { |
|
279 | 279 | |
280 | - $markerArrayDay['###DATE_STRING###'] = strftime('%A, %x', $dayTime); |
|
280 | + $markerArrayDay['###DATE_STRING###'] = strftime('%A, %x', $dayTime); |
|
281 | 281 | |
282 | - $markerArrayDay['###ITEMS###'] = ''; |
|
282 | + $markerArrayDay['###ITEMS###'] = ''; |
|
283 | 283 | |
284 | - foreach ($issues as $issue) { |
|
284 | + foreach ($issues as $issue) { |
|
285 | 285 | |
286 | - $markerArrayDay['###ITEMS###'] .= $issue; |
|
286 | + $markerArrayDay['###ITEMS###'] .= $issue; |
|
287 | 287 | |
288 | - } |
|
288 | + } |
|
289 | 289 | |
290 | - $subPartContentList .= $this->cObj->substituteMarkerArray($subparts['singleday'], $markerArrayDay); |
|
290 | + $subPartContentList .= $this->cObj->substituteMarkerArray($subparts['singleday'], $markerArrayDay); |
|
291 | 291 | |
292 | - } |
|
292 | + } |
|
293 | 293 | |
294 | - $this->template = $this->cObj->substituteSubpart($this->template, '###SINGLEDAY###', $subPartContentList); |
|
294 | + $this->template = $this->cObj->substituteSubpart($this->template, '###SINGLEDAY###', $subPartContentList); |
|
295 | 295 | |
296 | - if (count($allIssues) < 6) { |
|
296 | + if (count($allIssues) < 6) { |
|
297 | 297 | |
298 | - $listViewActive = TRUE; |
|
298 | + $listViewActive = TRUE; |
|
299 | 299 | |
300 | - } else { |
|
300 | + } else { |
|
301 | 301 | |
302 | - $listViewActive = FALSE; |
|
302 | + $listViewActive = FALSE; |
|
303 | 303 | |
304 | - } |
|
304 | + } |
|
305 | 305 | |
306 | - $markerArray = array ( |
|
307 | - '###CALENDARVIEWACTIVE###' => $listViewActive ? '' : 'active', |
|
308 | - '###LISTVIEWACTIVE###' => $listViewActive ? 'active' : '', |
|
309 | - '###CALYEAR###' => $yearLink, |
|
310 | - '###CALALLYEARS###' => $allYearsLink, |
|
311 | - '###LABEL_CALENDAR###' => $this->pi_getLL('label.view_calendar'), |
|
312 | - '###LABEL_LIST_VIEW###' => $this->pi_getLL('label.view_list'), |
|
313 | - ); |
|
306 | + $markerArray = array ( |
|
307 | + '###CALENDARVIEWACTIVE###' => $listViewActive ? '' : 'active', |
|
308 | + '###LISTVIEWACTIVE###' => $listViewActive ? 'active' : '', |
|
309 | + '###CALYEAR###' => $yearLink, |
|
310 | + '###CALALLYEARS###' => $allYearsLink, |
|
311 | + '###LABEL_CALENDAR###' => $this->pi_getLL('label.view_calendar'), |
|
312 | + '###LABEL_LIST_VIEW###' => $this->pi_getLL('label.view_list'), |
|
313 | + ); |
|
314 | 314 | |
315 | - $this->template = $this->cObj->substituteMarkerArray($this->template, $markerArray); |
|
315 | + $this->template = $this->cObj->substituteMarkerArray($this->template, $markerArray); |
|
316 | 316 | |
317 | - return $this->cObj->substituteSubpart($this->template, '###CALMONTH###', $subPartContent); |
|
317 | + return $this->cObj->substituteSubpart($this->template, '###CALMONTH###', $subPartContent); |
|
318 | 318 | |
319 | - } |
|
319 | + } |
|
320 | 320 | |
321 | - /** |
|
322 | - * The Year Method |
|
323 | - * |
|
324 | - * @access public |
|
325 | - * |
|
326 | - * @param string $content: The PlugIn content |
|
327 | - * @param array $conf: The PlugIn configuration |
|
328 | - * |
|
329 | - * @return string The content that is displayed on the website |
|
330 | - */ |
|
331 | - public function years($content, $conf) { |
|
321 | + /** |
|
322 | + * The Year Method |
|
323 | + * |
|
324 | + * @access public |
|
325 | + * |
|
326 | + * @param string $content: The PlugIn content |
|
327 | + * @param array $conf: The PlugIn configuration |
|
328 | + * |
|
329 | + * @return string The content that is displayed on the website |
|
330 | + */ |
|
331 | + public function years($content, $conf) { |
|
332 | 332 | |
333 | - $this->init($conf); |
|
333 | + $this->init($conf); |
|
334 | 334 | |
335 | - // Load current document. |
|
336 | - $this->loadDocument(); |
|
335 | + // Load current document. |
|
336 | + $this->loadDocument(); |
|
337 | 337 | |
338 | - if ($this->doc === NULL) { |
|
338 | + if ($this->doc === NULL) { |
|
339 | 339 | |
340 | - // Quit without doing anything if required variables are not set. |
|
341 | - return $content; |
|
340 | + // Quit without doing anything if required variables are not set. |
|
341 | + return $content; |
|
342 | 342 | |
343 | - } |
|
343 | + } |
|
344 | 344 | |
345 | - // Load template file. |
|
346 | - if (!empty($this->conf['templateFile'])) { |
|
345 | + // Load template file. |
|
346 | + if (!empty($this->conf['templateFile'])) { |
|
347 | 347 | |
348 | - $this->template = $this->cObj->getSubpart($this->cObj->fileResource($this->conf['templateFile']), '###TEMPLATEYEAR###'); |
|
348 | + $this->template = $this->cObj->getSubpart($this->cObj->fileResource($this->conf['templateFile']), '###TEMPLATEYEAR###'); |
|
349 | 349 | |
350 | - } else { |
|
350 | + } else { |
|
351 | 351 | |
352 | - $this->template = $this->cObj->getSubpart($this->cObj->fileResource('EXT:dlf/plugins/newspaper/template.tmpl'), '###TEMPLATEYEAR###'); |
|
352 | + $this->template = $this->cObj->getSubpart($this->cObj->fileResource('EXT:dlf/plugins/newspaper/template.tmpl'), '###TEMPLATEYEAR###'); |
|
353 | 353 | |
354 | - } |
|
354 | + } |
|
355 | 355 | |
356 | - // Get subpart templates |
|
357 | - $subparts['year'] = $this->cObj->getSubpart($this->template, '###LISTYEAR###'); |
|
356 | + // Get subpart templates |
|
357 | + $subparts['year'] = $this->cObj->getSubpart($this->template, '###LISTYEAR###'); |
|
358 | 358 | |
359 | - // get the title of the anchor file |
|
360 | - $titleAnchor = $this->doc->getTitle($this->doc->uid); |
|
359 | + // get the title of the anchor file |
|
360 | + $titleAnchor = $this->doc->getTitle($this->doc->uid); |
|
361 | 361 | |
362 | - // get all children of anchor. this should be the year anchor documents |
|
363 | - $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
|
364 | - 'tx_dlf_documents.uid AS uid, tx_dlf_documents.title AS title', |
|
365 | - 'tx_dlf_documents', |
|
366 | - '(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'), |
|
367 | - '', |
|
368 | - 'title ASC', |
|
369 | - '' |
|
370 | - ); |
|
362 | + // get all children of anchor. this should be the year anchor documents |
|
363 | + $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
|
364 | + 'tx_dlf_documents.uid AS uid, tx_dlf_documents.title AS title', |
|
365 | + 'tx_dlf_documents', |
|
366 | + '(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'), |
|
367 | + '', |
|
368 | + 'title ASC', |
|
369 | + '' |
|
370 | + ); |
|
371 | 371 | |
372 | - // Process results. |
|
373 | - while ($resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)) { |
|
372 | + // Process results. |
|
373 | + while ($resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)) { |
|
374 | 374 | |
375 | - $years[] = array ( |
|
376 | - 'title' => $resArray['title'], |
|
377 | - 'uid' => $resArray['uid'] |
|
378 | - ); |
|
375 | + $years[] = array ( |
|
376 | + 'title' => $resArray['title'], |
|
377 | + 'uid' => $resArray['uid'] |
|
378 | + ); |
|
379 | 379 | |
380 | - } |
|
380 | + } |
|
381 | 381 | |
382 | - $subYearPartContent = ''; |
|
382 | + $subYearPartContent = ''; |
|
383 | 383 | |
384 | - if (count($years) > 0) { |
|
384 | + if (count($years) > 0) { |
|
385 | 385 | |
386 | - foreach ($years as $id => $year) { |
|
386 | + foreach ($years as $id => $year) { |
|
387 | 387 | |
388 | - $linkConf = array( |
|
389 | - 'useCacheHash' => 1, |
|
390 | - 'parameter' => $this->conf['targetPid'], |
|
391 | - 'additionalParams' => '&' . $this->prefixId . '[id]=' . urlencode($year['uid']), |
|
392 | - 'title' => $titleAnchor . ': ' . $year['title'] |
|
393 | - ); |
|
388 | + $linkConf = array( |
|
389 | + 'useCacheHash' => 1, |
|
390 | + 'parameter' => $this->conf['targetPid'], |
|
391 | + 'additionalParams' => '&' . $this->prefixId . '[id]=' . urlencode($year['uid']), |
|
392 | + 'title' => $titleAnchor . ': ' . $year['title'] |
|
393 | + ); |
|
394 | 394 | |
395 | - $yearArray = array( |
|
396 | - '###YEARNAME###' => $this->cObj->typoLink($year['title'], $linkConf), |
|
397 | - ); |
|
395 | + $yearArray = array( |
|
396 | + '###YEARNAME###' => $this->cObj->typoLink($year['title'], $linkConf), |
|
397 | + ); |
|
398 | 398 | |
399 | - $subYearPartContent .= $this->cObj->substituteMarkerArray($subparts['year'], $yearArray); |
|
399 | + $subYearPartContent .= $this->cObj->substituteMarkerArray($subparts['year'], $yearArray); |
|
400 | 400 | |
401 | - } |
|
402 | - } |
|
401 | + } |
|
402 | + } |
|
403 | 403 | |
404 | - // link to years overview (should be itself here) |
|
405 | - $linkConf = array ( |
|
406 | - 'useCacheHash' => 1, |
|
407 | - 'parameter' => $this->conf['targetPid'], |
|
408 | - 'additionalParams' => '&' . $this->prefixId . '[id]=' . $this->doc->uid, |
|
409 | - ); |
|
410 | - $allYearsLink = $this->cObj->typoLink($this->pi_getLL('allYears', '', TRUE) . ' ' .$this->doc->getTitle($this->doc->uid), $linkConf); |
|
404 | + // link to years overview (should be itself here) |
|
405 | + $linkConf = array ( |
|
406 | + 'useCacheHash' => 1, |
|
407 | + 'parameter' => $this->conf['targetPid'], |
|
408 | + 'additionalParams' => '&' . $this->prefixId . '[id]=' . $this->doc->uid, |
|
409 | + ); |
|
410 | + $allYearsLink = $this->cObj->typoLink($this->pi_getLL('allYears', '', TRUE) . ' ' .$this->doc->getTitle($this->doc->uid), $linkConf); |
|
411 | 411 | |
412 | - // Fill markers. |
|
413 | - $markerArray = array ( |
|
414 | - '###LABEL_CHOOSE_YEAR###' => $this->pi_getLL('label.please_choose_year'), |
|
415 | - '###CALALLYEARS###' => $allYearsLink |
|
416 | - ); |
|
412 | + // Fill markers. |
|
413 | + $markerArray = array ( |
|
414 | + '###LABEL_CHOOSE_YEAR###' => $this->pi_getLL('label.please_choose_year'), |
|
415 | + '###CALALLYEARS###' => $allYearsLink |
|
416 | + ); |
|
417 | 417 | |
418 | - $this->template = $this->cObj->substituteMarkerArray($this->template, $markerArray); |
|
418 | + $this->template = $this->cObj->substituteMarkerArray($this->template, $markerArray); |
|
419 | 419 | |
420 | - // fill the week markers |
|
421 | - return $this->cObj->substituteSubpart($this->template, '###LISTYEAR###', $subYearPartContent); |
|
420 | + // fill the week markers |
|
421 | + return $this->cObj->substituteSubpart($this->template, '###LISTYEAR###', $subYearPartContent); |
|
422 | 422 | |
423 | - } |
|
423 | + } |
|
424 | 424 | |
425 | 425 | } |
@@ -130,22 +130,22 @@ discard block |
||
130 | 130 | '###DAYFRI_NAME###' => strftime('%a', strtotime('last Friday')), |
131 | 131 | '###DAYSAT_NAME###' => strftime('%a', strtotime('last Saturday')), |
132 | 132 | '###DAYSUN_NAME###' => strftime('%a', strtotime('last Sunday')), |
133 | - '###MONTHNAME###' => strftime('%B', strtotime($year . '-' . ($i + 1) . '-1')) |
|
133 | + '###MONTHNAME###' => strftime('%B', strtotime($year.'-'.($i + 1).'-1')) |
|
134 | 134 | ); |
135 | 135 | |
136 | 136 | // Reset week content of new month. |
137 | 137 | $subWeekPartContent = ''; |
138 | 138 | |
139 | - $firstOfMonth = strtotime($year . '-' . ($i + 1) . '-1'); |
|
139 | + $firstOfMonth = strtotime($year.'-'.($i + 1).'-1'); |
|
140 | 140 | $lastOfMonth = strtotime('last day of', ($firstOfMonth)); |
141 | 141 | $firstOfMonthStart = strtotime('last Monday', $firstOfMonth); |
142 | 142 | |
143 | 143 | // There are never more than 6 weeks in a month. |
144 | 144 | for ($j = 0; $j <= 5; $j++) { |
145 | 145 | |
146 | - $firstDayOfWeek = strtotime('+ ' . $j . ' Week', $firstOfMonthStart); |
|
146 | + $firstDayOfWeek = strtotime('+ '.$j.' Week', $firstOfMonthStart); |
|
147 | 147 | |
148 | - $weekArray = array( |
|
148 | + $weekArray = array ( |
|
149 | 149 | '###DAYMON###' => ' ', |
150 | 150 | '###DAYTUE###' => ' ', |
151 | 151 | '###DAYWED###' => ' ', |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | $linkConf = array ( |
186 | 186 | 'useCacheHash' => 1, |
187 | 187 | 'parameter' => $this->conf['targetPid'], |
188 | - 'additionalParams' => '&' . $this->prefixId . '[id]=' . urlencode($issue['uid']), |
|
188 | + 'additionalParams' => '&'.$this->prefixId.'[id]='.urlencode($issue['uid']), |
|
189 | 189 | 'ATagParams' => ' class="title"', |
190 | 190 | ); |
191 | 191 | |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | |
213 | 213 | } |
214 | 214 | |
215 | - $dayLinkDiv = '<div class="issues"><h4>' . strftime('%d', $currentDayTime) . '</h4><div>'.$dayLinksList.'</div></div>'; |
|
215 | + $dayLinkDiv = '<div class="issues"><h4>'.strftime('%d', $currentDayTime).'</h4><div>'.$dayLinksList.'</div></div>'; |
|
216 | 216 | } |
217 | 217 | |
218 | 218 | switch (strftime('%w', strtotime('+ '.$k.' Day', $firstDayOfWeek))) { |
@@ -260,22 +260,22 @@ discard block |
||
260 | 260 | $linkConf = array ( |
261 | 261 | 'useCacheHash' => 1, |
262 | 262 | 'parameter' => $this->conf['targetPid'], |
263 | - 'additionalParams' => '&' . $this->prefixId . '[id]=' . urlencode($this->doc->parentId), |
|
263 | + 'additionalParams' => '&'.$this->prefixId.'[id]='.urlencode($this->doc->parentId), |
|
264 | 264 | ); |
265 | 265 | |
266 | - $allYearsLink = $this->cObj->typoLink($this->pi_getLL('allYears', '', TRUE) . ' ' . $this->doc->getTitle($this->doc->parentId), $linkConf); |
|
266 | + $allYearsLink = $this->cObj->typoLink($this->pi_getLL('allYears', '', TRUE).' '.$this->doc->getTitle($this->doc->parentId), $linkConf); |
|
267 | 267 | |
268 | 268 | // Link to current year. |
269 | 269 | $linkConf = array ( |
270 | 270 | 'useCacheHash' => 1, |
271 | 271 | 'parameter' => $this->conf['targetPid'], |
272 | - 'additionalParams' => '&' . $this->prefixId . '[id]=' . urlencode($this->doc->uid), |
|
272 | + 'additionalParams' => '&'.$this->prefixId.'[id]='.urlencode($this->doc->uid), |
|
273 | 273 | ); |
274 | 274 | |
275 | 275 | $yearLink = $this->cObj->typoLink($year, $linkConf); |
276 | 276 | |
277 | 277 | // Prepare list as alternative of the calendar view. |
278 | - foreach($allIssues as $dayTime => $issues) { |
|
278 | + foreach ($allIssues as $dayTime => $issues) { |
|
279 | 279 | |
280 | 280 | $markerArrayDay['###DATE_STRING###'] = strftime('%A, %x', $dayTime); |
281 | 281 | |
@@ -385,14 +385,14 @@ discard block |
||
385 | 385 | |
386 | 386 | foreach ($years as $id => $year) { |
387 | 387 | |
388 | - $linkConf = array( |
|
388 | + $linkConf = array ( |
|
389 | 389 | 'useCacheHash' => 1, |
390 | 390 | 'parameter' => $this->conf['targetPid'], |
391 | - 'additionalParams' => '&' . $this->prefixId . '[id]=' . urlencode($year['uid']), |
|
392 | - 'title' => $titleAnchor . ': ' . $year['title'] |
|
391 | + 'additionalParams' => '&'.$this->prefixId.'[id]='.urlencode($year['uid']), |
|
392 | + 'title' => $titleAnchor.': '.$year['title'] |
|
393 | 393 | ); |
394 | 394 | |
395 | - $yearArray = array( |
|
395 | + $yearArray = array ( |
|
396 | 396 | '###YEARNAME###' => $this->cObj->typoLink($year['title'], $linkConf), |
397 | 397 | ); |
398 | 398 | |
@@ -405,9 +405,9 @@ discard block |
||
405 | 405 | $linkConf = array ( |
406 | 406 | 'useCacheHash' => 1, |
407 | 407 | 'parameter' => $this->conf['targetPid'], |
408 | - 'additionalParams' => '&' . $this->prefixId . '[id]=' . $this->doc->uid, |
|
408 | + 'additionalParams' => '&'.$this->prefixId.'[id]='.$this->doc->uid, |
|
409 | 409 | ); |
410 | - $allYearsLink = $this->cObj->typoLink($this->pi_getLL('allYears', '', TRUE) . ' ' .$this->doc->getTitle($this->doc->uid), $linkConf); |
|
410 | + $allYearsLink = $this->cObj->typoLink($this->pi_getLL('allYears', '', TRUE).' '.$this->doc->getTitle($this->doc->uid), $linkConf); |
|
411 | 411 | |
412 | 412 | // Fill markers. |
413 | 413 | $markerArray = array ( |
@@ -12,45 +12,45 @@ |
||
12 | 12 | $extensionPath = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('dlf'); |
13 | 13 | |
14 | 14 | return array ( |
15 | - 'tx_dlf_cli' => $extensionPath.'cli/class.tx_dlf_cli.php', |
|
16 | - 'tx_dlf_alto' => $extensionPath.'common/class.tx_dlf_alto.php', |
|
17 | - 'tx_dlf_document' => $extensionPath.'common/class.tx_dlf_document.php', |
|
18 | - 'tx_dlf_format' => $extensionPath.'common/class.tx_dlf_format.php', |
|
19 | - 'tx_dlf_fulltext' => $extensionPath.'common/class.tx_dlf_fulltext.php', |
|
20 | - 'tx_dlf_helper' => $extensionPath.'common/class.tx_dlf_helper.php', |
|
21 | - 'tx_dlf_indexing' => $extensionPath.'common/class.tx_dlf_indexing.php', |
|
22 | - 'tx_dlf_list' => $extensionPath.'common/class.tx_dlf_list.php', |
|
23 | - 'tx_dlf_mods' => $extensionPath.'common/class.tx_dlf_mods.php', |
|
24 | - 'tx_dlf_module' => $extensionPath.'common/class.tx_dlf_module.php', |
|
25 | - 'tx_dlf_plugin' => $extensionPath.'common/class.tx_dlf_plugin.php', |
|
26 | - 'tx_dlf_solr' => $extensionPath.'common/class.tx_dlf_solr.php', |
|
27 | - 'tx_dlf_teihdr' => $extensionPath.'common/class.tx_dlf_teihdr.php', |
|
28 | - 'tx_dlf_doctype' => $extensionPath.'hooks/class.tx_dlf_doctype.php', |
|
29 | - 'tx_dlf_em' => $extensionPath.'hooks/class.tx_dlf_em.php', |
|
30 | - 'tx_dlf_hacks' => $extensionPath.'hooks/class.tx_dlf_hacks.php', |
|
31 | - 'tx_dlf_tceforms' => $extensionPath.'hooks/class.tx_dlf_tceforms.php', |
|
32 | - 'tx_dlf_tcemain' => $extensionPath.'hooks/class.tx_dlf_tcemain.php', |
|
33 | - 'tx_dlf_modIndexing' => $extensionPath.'modules/indexing/index.php', |
|
34 | - 'tx_dlf_modNewclient' => $extensionPath.'modules/newclient/index.php', |
|
35 | - 'tx_dlf_audioplayer' => $extensionPath.'plugins/audioplayer/class.tx_dlf_audioplayer.php', |
|
15 | + 'tx_dlf_cli' => $extensionPath.'cli/class.tx_dlf_cli.php', |
|
16 | + 'tx_dlf_alto' => $extensionPath.'common/class.tx_dlf_alto.php', |
|
17 | + 'tx_dlf_document' => $extensionPath.'common/class.tx_dlf_document.php', |
|
18 | + 'tx_dlf_format' => $extensionPath.'common/class.tx_dlf_format.php', |
|
19 | + 'tx_dlf_fulltext' => $extensionPath.'common/class.tx_dlf_fulltext.php', |
|
20 | + 'tx_dlf_helper' => $extensionPath.'common/class.tx_dlf_helper.php', |
|
21 | + 'tx_dlf_indexing' => $extensionPath.'common/class.tx_dlf_indexing.php', |
|
22 | + 'tx_dlf_list' => $extensionPath.'common/class.tx_dlf_list.php', |
|
23 | + 'tx_dlf_mods' => $extensionPath.'common/class.tx_dlf_mods.php', |
|
24 | + 'tx_dlf_module' => $extensionPath.'common/class.tx_dlf_module.php', |
|
25 | + 'tx_dlf_plugin' => $extensionPath.'common/class.tx_dlf_plugin.php', |
|
26 | + 'tx_dlf_solr' => $extensionPath.'common/class.tx_dlf_solr.php', |
|
27 | + 'tx_dlf_teihdr' => $extensionPath.'common/class.tx_dlf_teihdr.php', |
|
28 | + 'tx_dlf_doctype' => $extensionPath.'hooks/class.tx_dlf_doctype.php', |
|
29 | + 'tx_dlf_em' => $extensionPath.'hooks/class.tx_dlf_em.php', |
|
30 | + 'tx_dlf_hacks' => $extensionPath.'hooks/class.tx_dlf_hacks.php', |
|
31 | + 'tx_dlf_tceforms' => $extensionPath.'hooks/class.tx_dlf_tceforms.php', |
|
32 | + 'tx_dlf_tcemain' => $extensionPath.'hooks/class.tx_dlf_tcemain.php', |
|
33 | + 'tx_dlf_modIndexing' => $extensionPath.'modules/indexing/index.php', |
|
34 | + 'tx_dlf_modNewclient' => $extensionPath.'modules/newclient/index.php', |
|
35 | + 'tx_dlf_audioplayer' => $extensionPath.'plugins/audioplayer/class.tx_dlf_audioplayer.php', |
|
36 | 36 | 'tx_dlf_basket' => $extensionPath.'plugins/basket/class.tx_dlf_basket.php', |
37 | 37 | 'tx_dlf_collection' => $extensionPath.'plugins/collection/class.tx_dlf_collection.php', |
38 | - 'tx_dlf_feeds' => $extensionPath.'plugins/feeds/class.tx_dlf_feeds.php', |
|
39 | - 'tx_dlf_listview' => $extensionPath.'plugins/listview/class.tx_dlf_listview.php', |
|
40 | - 'tx_dlf_metadata' => $extensionPath.'plugins/metadata/class.tx_dlf_metadata.php', |
|
41 | - 'tx_dlf_navigation' => $extensionPath.'plugins/navigation/class.tx_dlf_navigation.php', |
|
42 | - 'tx_dlf_newspaper' => $extensionPath.'plugins/newspaper/class.tx_dlf_newspaper.php', |
|
43 | - 'tx_dlf_oai' => $extensionPath.'plugins/oai/class.tx_dlf_oai.php', |
|
44 | - 'tx_dlf_pagegrid' => $extensionPath.'plugins/pagegrid/class.tx_dlf_pagegrid.php', |
|
45 | - 'tx_dlf_pageview' => $extensionPath.'plugins/pageview/class.tx_dlf_pageview.php', |
|
46 | - 'tx_dlf_search' => $extensionPath.'plugins/search/class.tx_dlf_search.php', |
|
47 | - 'tx_dlf_search_suggest' => $extensionPath.'plugins/search/class.tx_dlf_search_suggest.php', |
|
48 | - 'tx_dlf_statistics' => $extensionPath.'plugins/statistics/class.tx_dlf_statistics.php', |
|
49 | - 'tx_dlf_toc' => $extensionPath.'plugins/toc/class.tx_dlf_toc.php', |
|
50 | - 'tx_dlf_toolbox' => $extensionPath.'plugins/toolbox/class.tx_dlf_toolbox.php', |
|
51 | - 'tx_dlf_toolsPdf' => $extensionPath.'plugins/toolbox/tools/pdf/class.tx_dlf_toolsPdf.php', |
|
52 | - 'tx_dlf_toolsFulltext' => $extensionPath.'plugins/toolbox/tools/fulltext/class.tx_dlf_toolsFulltext.php', |
|
53 | - 'tx_dlf_toolsImagemanipulation' => $extensionPath.'plugins/toolbox/tools/imagemanipulation/class.tx_dlf_toolsImagemanipulation.php', |
|
54 | - 'tx_dlf_toolsImagedownload' => $extensionPath.'plugins/toolbox/tools/imagedownload/class.tx_dlf_toolsImagedownload.php', |
|
55 | - 'tx_dlf_validator' => $extensionPath.'plugins/validator/class.tx_dlf_validator.php' |
|
38 | + 'tx_dlf_feeds' => $extensionPath.'plugins/feeds/class.tx_dlf_feeds.php', |
|
39 | + 'tx_dlf_listview' => $extensionPath.'plugins/listview/class.tx_dlf_listview.php', |
|
40 | + 'tx_dlf_metadata' => $extensionPath.'plugins/metadata/class.tx_dlf_metadata.php', |
|
41 | + 'tx_dlf_navigation' => $extensionPath.'plugins/navigation/class.tx_dlf_navigation.php', |
|
42 | + 'tx_dlf_newspaper' => $extensionPath.'plugins/newspaper/class.tx_dlf_newspaper.php', |
|
43 | + 'tx_dlf_oai' => $extensionPath.'plugins/oai/class.tx_dlf_oai.php', |
|
44 | + 'tx_dlf_pagegrid' => $extensionPath.'plugins/pagegrid/class.tx_dlf_pagegrid.php', |
|
45 | + 'tx_dlf_pageview' => $extensionPath.'plugins/pageview/class.tx_dlf_pageview.php', |
|
46 | + 'tx_dlf_search' => $extensionPath.'plugins/search/class.tx_dlf_search.php', |
|
47 | + 'tx_dlf_search_suggest' => $extensionPath.'plugins/search/class.tx_dlf_search_suggest.php', |
|
48 | + 'tx_dlf_statistics' => $extensionPath.'plugins/statistics/class.tx_dlf_statistics.php', |
|
49 | + 'tx_dlf_toc' => $extensionPath.'plugins/toc/class.tx_dlf_toc.php', |
|
50 | + 'tx_dlf_toolbox' => $extensionPath.'plugins/toolbox/class.tx_dlf_toolbox.php', |
|
51 | + 'tx_dlf_toolsPdf' => $extensionPath.'plugins/toolbox/tools/pdf/class.tx_dlf_toolsPdf.php', |
|
52 | + 'tx_dlf_toolsFulltext' => $extensionPath.'plugins/toolbox/tools/fulltext/class.tx_dlf_toolsFulltext.php', |
|
53 | + 'tx_dlf_toolsImagemanipulation' => $extensionPath.'plugins/toolbox/tools/imagemanipulation/class.tx_dlf_toolsImagemanipulation.php', |
|
54 | + 'tx_dlf_toolsImagedownload' => $extensionPath.'plugins/toolbox/tools/imagedownload/class.tx_dlf_toolsImagedownload.php', |
|
55 | + 'tx_dlf_validator' => $extensionPath.'plugins/validator/class.tx_dlf_validator.php' |
|
56 | 56 | ); |
@@ -165,46 +165,46 @@ |
||
165 | 165 | // Register modules. |
166 | 166 | if (TYPO3_MODE == 'BE') { |
167 | 167 | |
168 | - // Add modules after "web". |
|
169 | - if (!isset($TBE_MODULES['txdlfmodules'])) { |
|
168 | + // Add modules after "web". |
|
169 | + if (!isset($TBE_MODULES['txdlfmodules'])) { |
|
170 | 170 | |
171 | - $modules = array(); |
|
171 | + $modules = array(); |
|
172 | 172 | |
173 | - foreach($TBE_MODULES as $key => $val) { |
|
173 | + foreach($TBE_MODULES as $key => $val) { |
|
174 | 174 | |
175 | - if ($key == 'web') { |
|
175 | + if ($key == 'web') { |
|
176 | 176 | |
177 | - $modules[$key] = $val; |
|
177 | + $modules[$key] = $val; |
|
178 | 178 | |
179 | - $modules['txdlfmodules'] = ''; |
|
179 | + $modules['txdlfmodules'] = ''; |
|
180 | 180 | |
181 | - } else { |
|
181 | + } else { |
|
182 | 182 | |
183 | - $modules[$key] = $val; |
|
183 | + $modules[$key] = $val; |
|
184 | 184 | |
185 | - } |
|
185 | + } |
|
186 | 186 | |
187 | - } |
|
187 | + } |
|
188 | 188 | |
189 | - $TBE_MODULES = $modules; |
|
189 | + $TBE_MODULES = $modules; |
|
190 | 190 | |
191 | - unset($modules); |
|
191 | + unset($modules); |
|
192 | 192 | |
193 | - } |
|
193 | + } |
|
194 | 194 | |
195 | - // Main "dlf" module. |
|
196 | - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule('txdlfmodules', '', '', \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY).'modules/'); |
|
195 | + // Main "dlf" module. |
|
196 | + \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule('txdlfmodules', '', '', \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY).'modules/'); |
|
197 | 197 | |
198 | - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addNavigationComponent('txdlfmodules', 'typo3-pagetree'); |
|
198 | + \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addNavigationComponent('txdlfmodules', 'typo3-pagetree'); |
|
199 | 199 | |
200 | - // Module "indexing". |
|
201 | - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule('txdlfmodules', 'txdlfindexing', '', \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY).'modules/indexing/'); |
|
200 | + // Module "indexing". |
|
201 | + \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule('txdlfmodules', 'txdlfindexing', '', \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY).'modules/indexing/'); |
|
202 | 202 | |
203 | - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('_MOD_txdlfmodules_txdlfindexing','EXT:dlf/modules/indexing/locallang_mod.xml'); |
|
203 | + \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('_MOD_txdlfmodules_txdlfindexing','EXT:dlf/modules/indexing/locallang_mod.xml'); |
|
204 | 204 | |
205 | - // Module "newclient". |
|
206 | - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule('txdlfmodules', 'txdlfnewclient', '', \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY).'modules/newclient/'); |
|
205 | + // Module "newclient". |
|
206 | + \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule('txdlfmodules', 'txdlfnewclient', '', \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY).'modules/newclient/'); |
|
207 | 207 | |
208 | - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('_MOD_txdlfmodules_txdlfnewclient','EXT:dlf/modules/newclient/locallang_mod.xml'); |
|
208 | + \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('_MOD_txdlfmodules_txdlfnewclient','EXT:dlf/modules/newclient/locallang_mod.xml'); |
|
209 | 209 | |
210 | 210 | } |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | * LICENSE.txt file that was distributed with this source code. |
10 | 10 | */ |
11 | 11 | |
12 | -if (!defined ('TYPO3_MODE')) die ('Access denied.'); |
|
12 | +if (!defined('TYPO3_MODE')) die ('Access denied.'); |
|
13 | 13 | |
14 | 14 | // Register static typoscript. |
15 | 15 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'Configuration/TypoScript/', 'Basic Configuration'); |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | |
20 | 20 | $TCA['tt_content']['types']['list']['subtypes_addlist'][$_EXTKEY.'_audioplayer'] = 'pi_flexform'; |
21 | 21 | |
22 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array('LLL:EXT:dlf/locallang.xml:tt_content.dlf_audioplayer', $_EXTKEY.'_audioplayer'), 'list_type'); |
|
22 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array ('LLL:EXT:dlf/locallang.xml:tt_content.dlf_audioplayer', $_EXTKEY.'_audioplayer'), 'list_type'); |
|
23 | 23 | |
24 | 24 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue($_EXTKEY.'_audioplayer', 'FILE:EXT:'.$_EXTKEY.'/plugins/audioplayer/flexform.xml'); |
25 | 25 | |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | |
29 | 29 | $TCA['tt_content']['types']['list']['subtypes_addlist'][$_EXTKEY.'_basket'] = 'pi_flexform'; |
30 | 30 | |
31 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array('LLL:EXT:dlf/locallang.xml:tt_content.dlf_basket', $_EXTKEY.'_basket'), 'list_type'); |
|
31 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array ('LLL:EXT:dlf/locallang.xml:tt_content.dlf_basket', $_EXTKEY.'_basket'), 'list_type'); |
|
32 | 32 | |
33 | 33 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue($_EXTKEY.'_basket', 'FILE:EXT:'.$_EXTKEY.'/plugins/basket/flexform.xml'); |
34 | 34 | |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | |
38 | 38 | $TCA['tt_content']['types']['list']['subtypes_addlist'][$_EXTKEY.'_collection'] = 'pi_flexform'; |
39 | 39 | |
40 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array('LLL:EXT:dlf/locallang.xml:tt_content.dlf_collection', $_EXTKEY.'_collection'), 'list_type'); |
|
40 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array ('LLL:EXT:dlf/locallang.xml:tt_content.dlf_collection', $_EXTKEY.'_collection'), 'list_type'); |
|
41 | 41 | |
42 | 42 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue($_EXTKEY.'_collection', 'FILE:EXT:'.$_EXTKEY.'/plugins/collection/flexform.xml'); |
43 | 43 | |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | |
47 | 47 | $TCA['tt_content']['types']['list']['subtypes_addlist'][$_EXTKEY.'_feeds'] = 'pi_flexform'; |
48 | 48 | |
49 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array('LLL:EXT:dlf/locallang.xml:tt_content.dlf_feeds', $_EXTKEY.'_feeds'), 'list_type'); |
|
49 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array ('LLL:EXT:dlf/locallang.xml:tt_content.dlf_feeds', $_EXTKEY.'_feeds'), 'list_type'); |
|
50 | 50 | |
51 | 51 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue($_EXTKEY.'_feeds', 'FILE:EXT:'.$_EXTKEY.'/plugins/feeds/flexform.xml'); |
52 | 52 | |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | |
56 | 56 | $TCA['tt_content']['types']['list']['subtypes_addlist'][$_EXTKEY.'_listview'] = 'pi_flexform'; |
57 | 57 | |
58 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array('LLL:EXT:dlf/locallang.xml:tt_content.dlf_listview', $_EXTKEY.'_listview'), 'list_type'); |
|
58 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array ('LLL:EXT:dlf/locallang.xml:tt_content.dlf_listview', $_EXTKEY.'_listview'), 'list_type'); |
|
59 | 59 | |
60 | 60 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue($_EXTKEY.'_listview', 'FILE:EXT:'.$_EXTKEY.'/plugins/listview/flexform.xml'); |
61 | 61 | |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | |
65 | 65 | $TCA['tt_content']['types']['list']['subtypes_addlist'][$_EXTKEY.'_metadata'] = 'pi_flexform'; |
66 | 66 | |
67 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array('LLL:EXT:dlf/locallang.xml:tt_content.dlf_metadata', $_EXTKEY.'_metadata'), 'list_type'); |
|
67 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array ('LLL:EXT:dlf/locallang.xml:tt_content.dlf_metadata', $_EXTKEY.'_metadata'), 'list_type'); |
|
68 | 68 | |
69 | 69 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue($_EXTKEY.'_metadata', 'FILE:EXT:'.$_EXTKEY.'/plugins/metadata/flexform.xml'); |
70 | 70 | |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | |
74 | 74 | $TCA['tt_content']['types']['list']['subtypes_addlist'][$_EXTKEY.'_navigation'] = 'pi_flexform'; |
75 | 75 | |
76 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array('LLL:EXT:dlf/locallang.xml:tt_content.dlf_navigation', $_EXTKEY.'_navigation'), 'list_type'); |
|
76 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array ('LLL:EXT:dlf/locallang.xml:tt_content.dlf_navigation', $_EXTKEY.'_navigation'), 'list_type'); |
|
77 | 77 | |
78 | 78 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue($_EXTKEY.'_navigation', 'FILE:EXT:'.$_EXTKEY.'/plugins/navigation/flexform.xml'); |
79 | 79 | |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | |
83 | 83 | $TCA['tt_content']['types']['list']['subtypes_addlist'][$_EXTKEY.'_newspaper'] = 'pi_flexform'; |
84 | 84 | |
85 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array('LLL:EXT:dlf/locallang.xml:tt_content.dlf_newspaper', $_EXTKEY.'_newspaper'), 'list_type'); |
|
85 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array ('LLL:EXT:dlf/locallang.xml:tt_content.dlf_newspaper', $_EXTKEY.'_newspaper'), 'list_type'); |
|
86 | 86 | |
87 | 87 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue($_EXTKEY.'_newspaper', 'FILE:EXT:'.$_EXTKEY.'/plugins/newspaper/flexform.xml'); |
88 | 88 | |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | |
92 | 92 | $TCA['tt_content']['types']['list']['subtypes_addlist'][$_EXTKEY.'_oai'] = 'pi_flexform'; |
93 | 93 | |
94 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array('LLL:EXT:dlf/locallang.xml:tt_content.dlf_oai', $_EXTKEY.'_oai'), 'list_type'); |
|
94 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array ('LLL:EXT:dlf/locallang.xml:tt_content.dlf_oai', $_EXTKEY.'_oai'), 'list_type'); |
|
95 | 95 | |
96 | 96 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue($_EXTKEY.'_oai', 'FILE:EXT:'.$_EXTKEY.'/plugins/oai/flexform.xml'); |
97 | 97 | |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | |
101 | 101 | $TCA['tt_content']['types']['list']['subtypes_addlist'][$_EXTKEY.'_pagegrid'] = 'pi_flexform'; |
102 | 102 | |
103 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array('LLL:EXT:dlf/locallang.xml:tt_content.dlf_pagegrid', $_EXTKEY.'_pagegrid'), 'list_type'); |
|
103 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array ('LLL:EXT:dlf/locallang.xml:tt_content.dlf_pagegrid', $_EXTKEY.'_pagegrid'), 'list_type'); |
|
104 | 104 | |
105 | 105 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue($_EXTKEY.'_pagegrid', 'FILE:EXT:'.$_EXTKEY.'/plugins/pagegrid/flexform.xml'); |
106 | 106 | |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | |
110 | 110 | $TCA['tt_content']['types']['list']['subtypes_addlist'][$_EXTKEY.'_pageview'] = 'pi_flexform'; |
111 | 111 | |
112 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array('LLL:EXT:dlf/locallang.xml:tt_content.dlf_pageview', $_EXTKEY.'_pageview'), 'list_type'); |
|
112 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array ('LLL:EXT:dlf/locallang.xml:tt_content.dlf_pageview', $_EXTKEY.'_pageview'), 'list_type'); |
|
113 | 113 | |
114 | 114 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue($_EXTKEY.'_pageview', 'FILE:EXT:'.$_EXTKEY.'/plugins/pageview/flexform.xml'); |
115 | 115 | |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | |
119 | 119 | $TCA['tt_content']['types']['list']['subtypes_addlist'][$_EXTKEY.'_search'] = 'pi_flexform'; |
120 | 120 | |
121 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array('LLL:EXT:dlf/locallang.xml:tt_content.dlf_search', $_EXTKEY.'_search'), 'list_type'); |
|
121 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array ('LLL:EXT:dlf/locallang.xml:tt_content.dlf_search', $_EXTKEY.'_search'), 'list_type'); |
|
122 | 122 | |
123 | 123 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'plugins/search/', 'Search Facets'); |
124 | 124 | |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | |
130 | 130 | $TCA['tt_content']['types']['list']['subtypes_addlist'][$_EXTKEY.'_statistics'] = 'pi_flexform'; |
131 | 131 | |
132 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array('LLL:EXT:dlf/locallang.xml:tt_content.dlf_statistics', $_EXTKEY.'_statistics'), 'list_type'); |
|
132 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array ('LLL:EXT:dlf/locallang.xml:tt_content.dlf_statistics', $_EXTKEY.'_statistics'), 'list_type'); |
|
133 | 133 | |
134 | 134 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue($_EXTKEY.'_statistics', 'FILE:EXT:'.$_EXTKEY.'/plugins/statistics/flexform.xml'); |
135 | 135 | |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | |
139 | 139 | $TCA['tt_content']['types']['list']['subtypes_addlist'][$_EXTKEY.'_toc'] = 'pi_flexform'; |
140 | 140 | |
141 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array('LLL:EXT:dlf/locallang.xml:tt_content.dlf_toc', $_EXTKEY.'_toc'), 'list_type'); |
|
141 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array ('LLL:EXT:dlf/locallang.xml:tt_content.dlf_toc', $_EXTKEY.'_toc'), 'list_type'); |
|
142 | 142 | |
143 | 143 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'plugins/toc/', 'Table of Contents'); |
144 | 144 | |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | |
150 | 150 | $TCA['tt_content']['types']['list']['subtypes_addlist'][$_EXTKEY.'_toolbox'] = 'pi_flexform'; |
151 | 151 | |
152 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array('LLL:EXT:dlf/locallang.xml:tt_content.dlf_toolbox', $_EXTKEY.'_toolbox'), 'list_type'); |
|
152 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array ('LLL:EXT:dlf/locallang.xml:tt_content.dlf_toolbox', $_EXTKEY.'_toolbox'), 'list_type'); |
|
153 | 153 | |
154 | 154 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue($_EXTKEY.'_toolbox', 'FILE:EXT:'.$_EXTKEY.'/plugins/toolbox/flexform.xml'); |
155 | 155 | |
@@ -158,21 +158,21 @@ discard block |
||
158 | 158 | |
159 | 159 | $TCA['tt_content']['types']['list']['subtypes_addlist'][$_EXTKEY.'_validator'] = 'pi_flexform'; |
160 | 160 | |
161 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array('LLL:EXT:dlf/locallang.xml:tt_content.dlf_validator', $_EXTKEY.'_validator'), 'list_type'); |
|
161 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array ('LLL:EXT:dlf/locallang.xml:tt_content.dlf_validator', $_EXTKEY.'_validator'), 'list_type'); |
|
162 | 162 | |
163 | 163 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue($_EXTKEY.'_validator', 'FILE:EXT:'.$_EXTKEY.'/plugins/validator/flexform.xml'); |
164 | 164 | |
165 | 165 | // Register modules. |
166 | -if (TYPO3_MODE == 'BE') { |
|
166 | +if (TYPO3_MODE == 'BE') { |
|
167 | 167 | |
168 | 168 | // Add modules after "web". |
169 | - if (!isset($TBE_MODULES['txdlfmodules'])) { |
|
169 | + if (!isset($TBE_MODULES['txdlfmodules'])) { |
|
170 | 170 | |
171 | - $modules = array(); |
|
171 | + $modules = array (); |
|
172 | 172 | |
173 | - foreach($TBE_MODULES as $key => $val) { |
|
173 | + foreach ($TBE_MODULES as $key => $val) { |
|
174 | 174 | |
175 | - if ($key == 'web') { |
|
175 | + if ($key == 'web') { |
|
176 | 176 | |
177 | 177 | $modules[$key] = $val; |
178 | 178 | |
@@ -200,11 +200,11 @@ discard block |
||
200 | 200 | // Module "indexing". |
201 | 201 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule('txdlfmodules', 'txdlfindexing', '', \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY).'modules/indexing/'); |
202 | 202 | |
203 | - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('_MOD_txdlfmodules_txdlfindexing','EXT:dlf/modules/indexing/locallang_mod.xml'); |
|
203 | + \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('_MOD_txdlfmodules_txdlfindexing', 'EXT:dlf/modules/indexing/locallang_mod.xml'); |
|
204 | 204 | |
205 | 205 | // Module "newclient". |
206 | 206 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule('txdlfmodules', 'txdlfnewclient', '', \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY).'modules/newclient/'); |
207 | 207 | |
208 | - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('_MOD_txdlfmodules_txdlfnewclient','EXT:dlf/modules/newclient/locallang_mod.xml'); |
|
208 | + \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('_MOD_txdlfmodules_txdlfnewclient', 'EXT:dlf/modules/newclient/locallang_mod.xml'); |
|
209 | 209 | |
210 | 210 | } |
@@ -9,7 +9,9 @@ discard block |
||
9 | 9 | * LICENSE.txt file that was distributed with this source code. |
10 | 10 | */ |
11 | 11 | |
12 | -if (!defined ('TYPO3_MODE')) die ('Access denied.'); |
|
12 | +if (!defined ('TYPO3_MODE')) { |
|
13 | + die ('Access denied.'); |
|
14 | +} |
|
13 | 15 | |
14 | 16 | // Register static typoscript. |
15 | 17 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'Configuration/TypoScript/', 'Basic Configuration'); |
@@ -163,16 +165,16 @@ discard block |
||
163 | 165 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue($_EXTKEY.'_validator', 'FILE:EXT:'.$_EXTKEY.'/plugins/validator/flexform.xml'); |
164 | 166 | |
165 | 167 | // Register modules. |
166 | -if (TYPO3_MODE == 'BE') { |
|
168 | +if (TYPO3_MODE == 'BE') { |
|
167 | 169 | |
168 | 170 | // Add modules after "web". |
169 | - if (!isset($TBE_MODULES['txdlfmodules'])) { |
|
171 | + if (!isset($TBE_MODULES['txdlfmodules'])) { |
|
170 | 172 | |
171 | 173 | $modules = array(); |
172 | 174 | |
173 | - foreach($TBE_MODULES as $key => $val) { |
|
175 | + foreach($TBE_MODULES as $key => $val) { |
|
174 | 176 | |
175 | - if ($key == 'web') { |
|
177 | + if ($key == 'web') { |
|
176 | 178 | |
177 | 179 | $modules[$key] = $val; |
178 | 180 |