Passed
Push — master ( 35afea...25c114 )
by
unknown
07:21 queued 11s
created
Classes/Plugin/Navigation.php 2 patches
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -25,8 +25,7 @@  discard block
 block discarded – undo
25 25
  * @subpackage dlf
26 26
  * @access public
27 27
  */
28
-class Navigation extends \Kitodo\Dlf\Common\AbstractPlugin
29
-{
28
+class Navigation extends \Kitodo\Dlf\Common\AbstractPlugin {
30 29
     public $scriptRelPath = 'Classes/Plugin/Navigation.php';
31 30
 
32 31
     /**
@@ -36,8 +35,7 @@  discard block
 block discarded – undo
36 35
      *
37 36
      * @return string Link to the list view ready to output
38 37
      */
39
-    protected function getLinkToListview()
40
-    {
38
+    protected function getLinkToListview() {
41 39
         if (!empty($this->conf['targetPid'])) {
42 40
             // Load the list.
43 41
             $list = GeneralUtility::makeInstance(DocumentList::class);
@@ -63,8 +61,7 @@  discard block
 block discarded – undo
63 61
      *
64 62
      * @return string Page selector ready to output
65 63
      */
66
-    protected function getPageSelector()
67
-    {
64
+    protected function getPageSelector() {
68 65
         // Configure @action URL for form.
69 66
         $linkConf = [
70 67
             'parameter' => $GLOBALS['TSFE']->id,
@@ -98,8 +95,7 @@  discard block
 block discarded – undo
98 95
      *
99 96
      * @return string The content that is displayed on the website
100 97
      */
101
-    public function main($content, $conf)
102
-    {
98
+    public function main($content, $conf) {
103 99
         $this->init($conf);
104 100
         // Turn cache on.
105 101
         $this->setCache(true);
@@ -214,8 +210,7 @@  discard block
 block discarded – undo
214 210
      *
215 211
      * @return string Typolink ready to output
216 212
      */
217
-    protected function makeLink($label, array $overrulePIvars = [], $aTagParams = '')
218
-    {
213
+    protected function makeLink($label, array $overrulePIvars = [], $aTagParams = '') {
219 214
         // Merge plugin variables with new set of values.
220 215
         if (is_array($this->piVars)) {
221 216
             $piVars = $this->piVars;
Please login to merge, or discard this patch.
Upper-Lower-Casing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -102,10 +102,10 @@  discard block
 block discarded – undo
102 102
     {
103 103
         $this->init($conf);
104 104
         // Turn cache on.
105
-        $this->setCache(true);
105
+        $this->setCache(TRUE);
106 106
         // Load current document.
107 107
         $this->loadDocument();
108
-        if ($this->doc === null) {
108
+        if ($this->doc === NULL) {
109 109
             // Quit without doing anything if required variables are not set.
110 110
             return $content;
111 111
         } else {
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
             'forceAbsoluteUrl' => !empty($this->conf['forceAbsoluteUrl']) ? 1 : 0,
230 230
             'forceAbsoluteUrl.' => ['scheme' => !empty($this->conf['forceAbsoluteUrl']) && !empty($this->conf['forceAbsoluteUrlHttps']) ? 'https' : 'http'],
231 231
             'ATagParams' => $aTagParams,
232
-            'additionalParams' => GeneralUtility::implodeArrayForUrl($this->prefixId, $overrulePIvars, '', true, false),
232
+            'additionalParams' => GeneralUtility::implodeArrayForUrl($this->prefixId, $overrulePIvars, '', TRUE, FALSE),
233 233
             'title' => $label
234 234
         ];
235 235
         return $this->cObj->typoLink($label, $conf);
Please login to merge, or discard this patch.
Classes/Plugin/Collection.php 2 patches
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -176,12 +176,12 @@  discard block
 block discarded – undo
176 176
         foreach ($collections as $collection) {
177 177
             $solr_query = '';
178 178
             if ($collection['index_query'] != '') {
179
-                $solr_query .= '(' . $collection['index_query'] . ')';
179
+                $solr_query .= '('.$collection['index_query'].')';
180 180
             } else {
181
-                $solr_query .= 'collection:("' . $collection['index_name'] . '")';
181
+                $solr_query .= 'collection:("'.$collection['index_name'].'")';
182 182
             }
183
-            $partOfNothing = $solr->search_raw($solr_query . ' AND partof:0 AND toplevel:true', $params);
184
-            $partOfSomething = $solr->search_raw($solr_query . ' AND NOT partof:0 AND toplevel:true', $params);
183
+            $partOfNothing = $solr->search_raw($solr_query.' AND partof:0 AND toplevel:true', $params);
184
+            $partOfSomething = $solr->search_raw($solr_query.' AND NOT partof:0 AND toplevel:true', $params);
185 185
             // Titles are all documents that are "root" elements i.e. partof == 0
186 186
             $collection['titles'] = [];
187 187
             foreach ($partOfNothing as $doc) {
@@ -219,14 +219,14 @@  discard block
 block discarded – undo
219 219
             $markerArray[$_key]['###TITLE###'] = $this->cObj->typoLink(htmlspecialchars($collection['label']), $conf);
220 220
             // Add feed link if applicable.
221 221
             if (!empty($this->conf['targetFeed'])) {
222
-                $img = '<img src="' . \TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($this->extKey)) . 'Resources/Public/Icons/txdlffeeds.png" alt="' . htmlspecialchars($this->pi_getLL('feedAlt', '')) . '" title="' . htmlspecialchars($this->pi_getLL('feedTitle', '')) . '" />';
222
+                $img = '<img src="'.\TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($this->extKey)).'Resources/Public/Icons/txdlffeeds.png" alt="'.htmlspecialchars($this->pi_getLL('feedAlt', '')).'" title="'.htmlspecialchars($this->pi_getLL('feedTitle', '')).'" />';
223 223
                 $markerArray[$_key]['###FEED###'] = $this->pi_linkTP($img, [$this->prefixId => ['collection' => $collection['uid']]], false, $this->conf['targetFeed']);
224 224
             } else {
225 225
                 $markerArray[$_key]['###FEED###'] = '';
226 226
             }
227 227
             // Add thumbnail.
228 228
             if (!empty($collection['thumbnail'])) {
229
-                $markerArray[$_key]['###THUMBNAIL###'] = '<img alt="" title="' . htmlspecialchars($collection['label']) . '" src="' . $collection['thumbnail'] . '" />';
229
+                $markerArray[$_key]['###THUMBNAIL###'] = '<img alt="" title="'.htmlspecialchars($collection['label']).'" src="'.$collection['thumbnail'].'" />';
230 230
             } else {
231 231
                 $markerArray[$_key]['###THUMBNAIL###'] = '';
232 232
             }
@@ -234,9 +234,9 @@  discard block
 block discarded – undo
234 234
             $markerArray[$_key]['###DESCRIPTION###'] = $this->pi_RTEcssText($collection['description']);
235 235
             // Build statistic's output.
236 236
             $labelTitles = $this->pi_getLL((count($collection['titles']) > 1 ? 'titles' : 'title'), '');
237
-            $markerArray[$_key]['###COUNT_TITLES###'] = htmlspecialchars(count($collection['titles']) . $labelTitles);
237
+            $markerArray[$_key]['###COUNT_TITLES###'] = htmlspecialchars(count($collection['titles']).$labelTitles);
238 238
             $labelVolumes = $this->pi_getLL((count($collection['volumes']) > 1 ? 'volumes' : 'volume'), '');
239
-            $markerArray[$_key]['###COUNT_VOLUMES###'] = htmlspecialchars(count($collection['volumes']) . $labelVolumes);
239
+            $markerArray[$_key]['###COUNT_VOLUMES###'] = htmlspecialchars(count($collection['volumes']).$labelVolumes);
240 240
         }
241 241
         // Randomize sorting?
242 242
         if (!empty($this->conf['randomize'])) {
@@ -320,14 +320,14 @@  discard block
 block discarded – undo
320 320
                 $collectionData = $resArray;
321 321
             }
322 322
         } else {
323
-            $this->logger->warning('No collection with UID ' . $id . ' found.');
323
+            $this->logger->warning('No collection with UID '.$id.' found.');
324 324
             return;
325 325
         }
326 326
         // Fetch corresponding document UIDs from Solr.
327 327
         if ($collectionData['index_search'] != '') {
328
-            $solr_query = '(' . $collectionData['index_search'] . ')';
328
+            $solr_query = '('.$collectionData['index_search'].')';
329 329
         } else {
330
-            $solr_query = 'collection:("' . $collectionData['index_name'] . '") AND toplevel:true';
330
+            $solr_query = 'collection:("'.$collectionData['index_name'].'") AND toplevel:true';
331 331
         }
332 332
         $solr = Solr::getInstance($this->conf['solrcore']);
333 333
         if (!$solr->ready) {
@@ -376,7 +376,7 @@  discard block
 block discarded – undo
376 376
                         'source' => 'collection',
377 377
                         'select' => $id,
378 378
                         'userid' => $collectionData['userid'],
379
-                        'params' => ['filterquery' => [['query' => 'collection_faceting:("' . $collectionData['index_name'] . '")']]],
379
+                        'params' => ['filterquery' => [['query' => 'collection_faceting:("'.$collectionData['index_name'].'")']]],
380 380
                         'core' => '',
381 381
                         'pid' => $this->conf['pages'],
382 382
                         'order' => 'title',
@@ -405,7 +405,7 @@  discard block
 block discarded – undo
405 405
                 ];
406 406
             } else {
407 407
                 // volume_sorting should be always set - but it's not a required field. We append the uid to the array key to make it always unique.
408
-                $subparts[$resArray['partof']][$resArray['volume_sorting'] . str_pad($resArray['uid'], 9, '0', STR_PAD_LEFT)] = [
408
+                $subparts[$resArray['partof']][$resArray['volume_sorting'].str_pad($resArray['uid'], 9, '0', STR_PAD_LEFT)] = [
409 409
                     'u' => $resArray['uid'],
410 410
                     'h' => '',
411 411
                     's' => $sorting,
@@ -440,7 +440,7 @@  discard block
 block discarded – undo
440 440
             'forceAbsoluteUrl' => !empty($this->conf['forceAbsoluteUrl']) ? 1 : 0,
441 441
             'forceAbsoluteUrl.' => ['scheme' => !empty($this->conf['forceAbsoluteUrl']) && !empty($this->conf['forceAbsoluteUrlHttps']) ? 'https' : 'http']
442 442
         ];
443
-        header('Location: ' . GeneralUtility::locationHeaderUrl($this->cObj->typoLink_URL($linkConf)));
443
+        header('Location: '.GeneralUtility::locationHeaderUrl($this->cObj->typoLink_URL($linkConf)));
444 444
         exit;
445 445
     }
446 446
 }
Please login to merge, or discard this patch.
Upper-Lower-Casing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
     {
54 54
         $this->init($conf);
55 55
         // Turn cache on.
56
-        $this->setCache(true);
56
+        $this->setCache(TRUE);
57 57
         // Quit without doing anything if required configuration variables are not set.
58 58
         if (empty($this->conf['pages'])) {
59 59
             $this->logger->warning('Incomplete plugin configuration');
@@ -213,14 +213,14 @@  discard block
 block discarded – undo
213 213
                 'parameter' => $GLOBALS['TSFE']->id,
214 214
                 'forceAbsoluteUrl' => !empty($this->conf['forceAbsoluteUrl']) ? 1 : 0,
215 215
                 'forceAbsoluteUrl.' => ['scheme' => !empty($this->conf['forceAbsoluteUrl']) && !empty($this->conf['forceAbsoluteUrlHttps']) ? 'https' : 'http'],
216
-                'additionalParams' => GeneralUtility::implodeArrayForUrl($this->prefixId, $additionalParams, '', true, false)
216
+                'additionalParams' => GeneralUtility::implodeArrayForUrl($this->prefixId, $additionalParams, '', TRUE, FALSE)
217 217
             ];
218 218
             // Link collection's title to list view.
219 219
             $markerArray[$_key]['###TITLE###'] = $this->cObj->typoLink(htmlspecialchars($collection['label']), $conf);
220 220
             // Add feed link if applicable.
221 221
             if (!empty($this->conf['targetFeed'])) {
222 222
                 $img = '<img src="' . \TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($this->extKey)) . 'Resources/Public/Icons/txdlffeeds.png" alt="' . htmlspecialchars($this->pi_getLL('feedAlt', '')) . '" title="' . htmlspecialchars($this->pi_getLL('feedTitle', '')) . '" />';
223
-                $markerArray[$_key]['###FEED###'] = $this->pi_linkTP($img, [$this->prefixId => ['collection' => $collection['uid']]], false, $this->conf['targetFeed']);
223
+                $markerArray[$_key]['###FEED###'] = $this->pi_linkTP($img, [$this->prefixId => ['collection' => $collection['uid']]], FALSE, $this->conf['targetFeed']);
224 224
             } else {
225 225
                 $markerArray[$_key]['###FEED###'] = '';
226 226
             }
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
         if (!empty($this->conf['randomize'])) {
243 243
             ksort($markerArray, SORT_NUMERIC);
244 244
             // Don't cache the output.
245
-            $this->setCache(false);
245
+            $this->setCache(FALSE);
246 246
         }
247 247
         $entry = $this->templateService->getSubpart($this->template, '###ENTRY###');
248 248
         foreach ($markerArray as $marker) {
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
                 $hookObj->showCollectionList_getCustomCollectionList($this, $this->conf['templateFile'], $content, $markerArray);
255 255
             }
256 256
         }
257
-        return $this->templateService->substituteSubpart($this->template, '###ENTRY###', $content, true);
257
+        return $this->templateService->substituteSubpart($this->template, '###ENTRY###', $content, TRUE);
258 258
     }
259 259
 
260 260
     /**
@@ -380,7 +380,7 @@  discard block
 block discarded – undo
380 380
                         'core' => '',
381 381
                         'pid' => $this->conf['pages'],
382 382
                         'order' => 'title',
383
-                        'order.asc' => true
383
+                        'order.asc' => TRUE
384 384
                     ]
385 385
                 ];
386 386
             }
Please login to merge, or discard this patch.
Classes/Plugin/Feeds.php 1 patch
Upper-Lower-Casing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
     {
44 44
         $this->init($conf);
45 45
         // Don't cache the output.
46
-        $this->setCache(false);
46
+        $this->setCache(FALSE);
47 47
         // Create XML document.
48 48
         $rss = new \DOMDocument('1.0', 'utf-8');
49 49
         // Add mandatory root element.
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
                     if ((empty($resArray['title']) || !empty($this->conf['prependSuperiorTitle']))
144 144
                         && !empty($resArray['partof'])
145 145
                     ) {
146
-                        $superiorTitle = Document::getTitle($resArray['partof'], true);
146
+                        $superiorTitle = Document::getTitle($resArray['partof'], TRUE);
147 147
                         if (!empty($superiorTitle)) {
148 148
                             $title .= '[' . $superiorTitle . ']';
149 149
                         }
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
                         'parameter' => $this->conf['targetPid'],
173 173
                         'forceAbsoluteUrl' => 1,
174 174
                         'forceAbsoluteUrl.' => ['scheme' => !empty($this->conf['forceAbsoluteUrlHttps']) ? 'https' : 'http'],
175
-                        'additionalParams' => GeneralUtility::implodeArrayForUrl($this->prefixId, ['id' => $resArray['uid']], '', true, false)
175
+                        'additionalParams' => GeneralUtility::implodeArrayForUrl($this->prefixId, ['id' => $resArray['uid']], '', TRUE, FALSE)
176 176
                     ];
177 177
                     $item->appendChild($rss->createElement('link', htmlspecialchars($this->cObj->typoLink_URL($linkConf), ENT_NOQUOTES, 'UTF-8')));
178 178
                     // Add author if applicable.
Please login to merge, or discard this patch.
Classes/Plugin/OaiPmh.php 1 patch
Spacing   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -159,13 +159,13 @@  discard block
 block discarded – undo
159 159
         $oai_dc = $this->oai->createElementNS($this->formats['oai_dc']['namespace'], 'oai_dc:dc');
160 160
         $oai_dc->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:dc', 'http://purl.org/dc/elements/1.1/');
161 161
         $oai_dc->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance');
162
-        $oai_dc->setAttributeNS('http://www.w3.org/2001/XMLSchema-instance', 'xsi:schemaLocation', $this->formats['oai_dc']['namespace'] . ' ' . $this->formats['oai_dc']['schema']);
162
+        $oai_dc->setAttributeNS('http://www.w3.org/2001/XMLSchema-instance', 'xsi:schemaLocation', $this->formats['oai_dc']['namespace'].' '.$this->formats['oai_dc']['schema']);
163 163
         $oai_dc->appendChild($this->oai->createElementNS('http://purl.org/dc/elements/1.1/', 'dc:identifier', htmlspecialchars($metadata['record_id'], ENT_NOQUOTES, 'UTF-8')));
164 164
         if (!empty($metadata['purl'])) {
165 165
             $oai_dc->appendChild($this->oai->createElementNS('http://purl.org/dc/elements/1.1/', 'dc:identifier', htmlspecialchars($metadata['purl'], ENT_NOQUOTES, 'UTF-8')));
166 166
         }
167 167
         if (!empty($metadata['prod_id'])) {
168
-            $oai_dc->appendChild($this->oai->createElementNS('http://purl.org/dc/elements/1.1/', 'dc:identifier', 'kitodo:production:' . htmlspecialchars($metadata['prod_id'], ENT_NOQUOTES, 'UTF-8')));
168
+            $oai_dc->appendChild($this->oai->createElementNS('http://purl.org/dc/elements/1.1/', 'dc:identifier', 'kitodo:production:'.htmlspecialchars($metadata['prod_id'], ENT_NOQUOTES, 'UTF-8')));
169 169
         }
170 170
         if (!empty($metadata['urn'])) {
171 171
             $oai_dc->appendChild($this->oai->createElementNS('http://purl.org/dc/elements/1.1/', 'dc:identifier', htmlspecialchars($metadata['urn'], ENT_NOQUOTES, 'UTF-8')));
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
         }
263 263
         // Add attributes and build XML tree.
264 264
         $epicur->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance');
265
-        $epicur->setAttributeNS('http://www.w3.org/2001/XMLSchema-instance', 'xsi:schemaLocation', $this->formats['epicur']['namespace'] . ' ' . $this->formats['epicur']['schema']);
265
+        $epicur->setAttributeNS('http://www.w3.org/2001/XMLSchema-instance', 'xsi:schemaLocation', $this->formats['epicur']['namespace'].' '.$this->formats['epicur']['schema']);
266 266
         // Do we update an URN or register a new one?
267 267
         if ($metadata['tstamp'] == $metadata['crdate']) {
268 268
             $update->setAttribute('type', 'urn_new');
@@ -309,10 +309,10 @@  discard block
 block discarded – undo
309 309
                 // Import node into \DOMDocument.
310 310
                 $mets = $this->oai->importNode($root->item(0), true);
311 311
             } else {
312
-                $this->logger->error('No METS part found in document with location "' . $metadata['location'] . '"');
312
+                $this->logger->error('No METS part found in document with location "'.$metadata['location'].'"');
313 313
             }
314 314
         } else {
315
-            $this->logger->error('Could not load XML file from "' . $metadata['location'] . '"');
315
+            $this->logger->error('Could not load XML file from "'.$metadata['location'].'"');
316 316
         }
317 317
         if ($mets === null) {
318 318
             $mets = $this->oai->createElementNS('http://kitodo.org/', 'kitodo:error', htmlspecialchars($this->pi_getLL('error', 'Error!'), ENT_NOQUOTES, 'UTF-8'));
@@ -348,15 +348,15 @@  discard block
 block discarded – undo
348 348
             if (strpos($this->conf['stylesheet'], 'EXT:') === 0) {
349 349
                 [$extKey, $filePath] = explode('/', substr($this->conf['stylesheet'], 4), 2);
350 350
                 if (ExtensionManagementUtility::isLoaded($extKey)) {
351
-                    $this->conf['stylesheet'] = PathUtility::stripPathSitePrefix(ExtensionManagementUtility::extPath($extKey)) . $filePath;
351
+                    $this->conf['stylesheet'] = PathUtility::stripPathSitePrefix(ExtensionManagementUtility::extPath($extKey)).$filePath;
352 352
                 }
353 353
             }
354 354
             $stylesheet = GeneralUtility::locationHeaderUrl($this->conf['stylesheet']);
355 355
         } else {
356 356
             // Use default stylesheet if no custom stylesheet is given.
357
-            $stylesheet = GeneralUtility::locationHeaderUrl(PathUtility::stripPathSitePrefix(ExtensionManagementUtility::extPath($this->extKey)) . 'Resources/Public/Stylesheets/OaiPmh.xsl');
357
+            $stylesheet = GeneralUtility::locationHeaderUrl(PathUtility::stripPathSitePrefix(ExtensionManagementUtility::extPath($this->extKey)).'Resources/Public/Stylesheets/OaiPmh.xsl');
358 358
         }
359
-        $this->oai->appendChild($this->oai->createProcessingInstruction('xml-stylesheet', 'type="text/xsl" href="' . htmlspecialchars($stylesheet, ENT_NOQUOTES, 'UTF-8') . '"'));
359
+        $this->oai->appendChild($this->oai->createProcessingInstruction('xml-stylesheet', 'type="text/xsl" href="'.htmlspecialchars($stylesheet, ENT_NOQUOTES, 'UTF-8').'"'));
360 360
         // Create root element.
361 361
         $root = $this->oai->createElementNS('http://www.openarchives.org/OAI/2.0/', 'OAI-PMH');
362 362
         $root->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance');
@@ -407,10 +407,10 @@  discard block
 block discarded – undo
407 407
         // Send headers.
408 408
         header('HTTP/1.1 200 OK');
409 409
         header('Cache-Control: no-cache');
410
-        header('Content-Length: ' . strlen($content));
410
+        header('Content-Length: '.strlen($content));
411 411
         header('Content-Type: text/xml; charset=utf-8');
412
-        header('Date: ' . date('r', $GLOBALS['EXEC_TIME']));
413
-        header('Expires: ' . date('r', $GLOBALS['EXEC_TIME'] + $this->conf['expired']));
412
+        header('Date: '.date('r', $GLOBALS['EXEC_TIME']));
413
+        header('Expires: '.date('r', $GLOBALS['EXEC_TIME'] + $this->conf['expired']));
414 414
         echo $content;
415 415
         exit;
416 416
     }
@@ -471,16 +471,16 @@  discard block
 block discarded – undo
471 471
 
472 472
         $connection = GeneralUtility::makeInstance(ConnectionPool::class)->getConnectionForTable('tx_dlf_documents');
473 473
 
474
-        $sql = 'SELECT `tx_dlf_documents`.*, GROUP_CONCAT(DISTINCT `tx_dlf_collections`.`oai_name` ORDER BY `tx_dlf_collections`.`oai_name` SEPARATOR " ") AS `collections` ' .
475
-            'FROM `tx_dlf_documents` ' .
476
-            'INNER JOIN `tx_dlf_relations` ON `tx_dlf_relations`.`uid_local` = `tx_dlf_documents`.`uid` ' .
477
-            'INNER JOIN `tx_dlf_collections` ON `tx_dlf_collections`.`uid` = `tx_dlf_relations`.`uid_foreign` ' .
478
-            'WHERE `tx_dlf_documents`.`record_id` = ? ' .
479
-            'AND `tx_dlf_documents`.`pid` = ? ' .
480
-            'AND `tx_dlf_collections`.`pid` = ? ' .
481
-            'AND `tx_dlf_relations`.`ident`="docs_colls" ' .
482
-            $where .
483
-            'AND ' . Helper::whereExpression('tx_dlf_collections');
474
+        $sql = 'SELECT `tx_dlf_documents`.*, GROUP_CONCAT(DISTINCT `tx_dlf_collections`.`oai_name` ORDER BY `tx_dlf_collections`.`oai_name` SEPARATOR " ") AS `collections` '.
475
+            'FROM `tx_dlf_documents` '.
476
+            'INNER JOIN `tx_dlf_relations` ON `tx_dlf_relations`.`uid_local` = `tx_dlf_documents`.`uid` '.
477
+            'INNER JOIN `tx_dlf_collections` ON `tx_dlf_collections`.`uid` = `tx_dlf_relations`.`uid_foreign` '.
478
+            'WHERE `tx_dlf_documents`.`record_id` = ? '.
479
+            'AND `tx_dlf_documents`.`pid` = ? '.
480
+            'AND `tx_dlf_collections`.`pid` = ? '.
481
+            'AND `tx_dlf_relations`.`ident`="docs_colls" '.
482
+            $where.
483
+            'AND '.Helper::whereExpression('tx_dlf_collections');
484 484
 
485 485
         $values = [
486 486
             $this->piVars['identifier'],
@@ -607,7 +607,7 @@  discard block
 block discarded – undo
607 607
             $timestamp = $resArray['tstamp'];
608 608
             $earliestDatestamp = gmdate('Y-m-d\TH:i:s\Z', $timestamp);
609 609
         } else {
610
-            $this->logger->notice('No records found with PID ' . $this->conf['pages']);
610
+            $this->logger->notice('No records found with PID '.$this->conf['pages']);
611 611
         }
612 612
         $linkConf = [
613 613
             'parameter' => $GLOBALS['TSFE']->id,
@@ -868,9 +868,9 @@  discard block
 block discarded – undo
868 868
             }
869 869
             $resArray = $allResults[0];
870 870
             if ($resArray['index_query'] != "") {
871
-                $solr_query .= '(' . $resArray['index_query'] . ')';
871
+                $solr_query .= '('.$resArray['index_query'].')';
872 872
             } else {
873
-                $solr_query .= 'collection:' . '"' . $resArray['index_name'] . '"';
873
+                $solr_query .= 'collection:'.'"'.$resArray['index_name'].'"';
874 874
             }
875 875
         } else {
876 876
             // If no set is specified we have to query for all collections
@@ -878,7 +878,7 @@  discard block
 block discarded – undo
878 878
         }
879 879
         // Check for required fields.
880 880
         foreach ($this->formats[$this->piVars['metadataPrefix']]['requiredFields'] as $required) {
881
-            $solr_query .= ' NOT ' . $required . ':""';
881
+            $solr_query .= ' NOT '.$required.':""';
882 882
         }
883 883
         // toplevel="true" is always required
884 884
         $solr_query .= ' AND toplevel:true';
@@ -891,7 +891,7 @@  discard block
 block discarded – undo
891 891
                 || is_array($date_array = strptime($this->piVars['from'], '%Y-%m-%d'))
892 892
             ) {
893 893
                 $timestamp = gmmktime($date_array['tm_hour'], $date_array['tm_min'], $date_array['tm_sec'], $date_array['tm_mon'] + 1, $date_array['tm_mday'], $date_array['tm_year'] + 1900);
894
-                $from = date("Y-m-d", $timestamp) . 'T' . date("H:i:s", $timestamp) . '.000Z';
894
+                $from = date("Y-m-d", $timestamp).'T'.date("H:i:s", $timestamp).'.000Z';
895 895
             } else {
896 896
                 throw new \Exception('badArgument');
897 897
             }
@@ -905,7 +905,7 @@  discard block
 block discarded – undo
905 905
                 || is_array($date_array = strptime($this->piVars['until'], '%Y-%m-%d'))
906 906
             ) {
907 907
                 $timestamp = gmmktime($date_array['tm_hour'], $date_array['tm_min'], $date_array['tm_sec'], $date_array['tm_mon'] + 1, $date_array['tm_mday'], $date_array['tm_year'] + 1900);
908
-                $until = date("Y-m-d", $timestamp) . 'T' . date("H:i:s", $timestamp) . '.999Z';
908
+                $until = date("Y-m-d", $timestamp).'T'.date("H:i:s", $timestamp).'.999Z';
909 909
                 if ($from != "*" && $from > $until) {
910 910
                     throw new \Exception('badArgument');
911 911
                 }
@@ -922,7 +922,7 @@  discard block
 block discarded – undo
922 922
                 throw new \Exception('badArgument');
923 923
             }
924 924
         }
925
-        $solr_query .= ' AND timestamp:[' . $from . ' TO ' . $until . ']';
925
+        $solr_query .= ' AND timestamp:['.$from.' TO '.$until.']';
926 926
         $documentSet = [];
927 927
         $solr = Solr::getInstance($this->conf['solrcore']);
928 928
         if (!$solr->ready) {
@@ -965,16 +965,16 @@  discard block
 block discarded – undo
965 965
         $connection = GeneralUtility::makeInstance(ConnectionPool::class)
966 966
             ->getConnectionForTable('tx_dlf_documents');
967 967
 
968
-        $sql = 'SELECT `tx_dlf_documents`.*, GROUP_CONCAT(DISTINCT `tx_dlf_collections`.`oai_name` ORDER BY `tx_dlf_collections`.`oai_name` SEPARATOR " ") AS `collections` ' .
969
-            'FROM `tx_dlf_documents` ' .
970
-            'INNER JOIN `tx_dlf_relations` ON `tx_dlf_relations`.`uid_local` = `tx_dlf_documents`.`uid` ' .
971
-            'INNER JOIN `tx_dlf_collections` ON `tx_dlf_collections`.`uid` = `tx_dlf_relations`.`uid_foreign` ' .
972
-            'WHERE `tx_dlf_documents`.`uid` IN ( ? ) ' .
973
-            'AND `tx_dlf_documents`.`pid` = ? ' .
974
-            'AND `tx_dlf_collections`.`pid` = ? ' .
975
-            'AND `tx_dlf_relations`.`ident`="docs_colls" ' .
976
-            'AND ' . Helper::whereExpression('tx_dlf_collections') . ' ' .
977
-            'GROUP BY `tx_dlf_documents`.`uid` ' .
968
+        $sql = 'SELECT `tx_dlf_documents`.*, GROUP_CONCAT(DISTINCT `tx_dlf_collections`.`oai_name` ORDER BY `tx_dlf_collections`.`oai_name` SEPARATOR " ") AS `collections` '.
969
+            'FROM `tx_dlf_documents` '.
970
+            'INNER JOIN `tx_dlf_relations` ON `tx_dlf_relations`.`uid_local` = `tx_dlf_documents`.`uid` '.
971
+            'INNER JOIN `tx_dlf_collections` ON `tx_dlf_collections`.`uid` = `tx_dlf_relations`.`uid_foreign` '.
972
+            'WHERE `tx_dlf_documents`.`uid` IN ( ? ) '.
973
+            'AND `tx_dlf_documents`.`pid` = ? '.
974
+            'AND `tx_dlf_collections`.`pid` = ? '.
975
+            'AND `tx_dlf_relations`.`ident`="docs_colls" '.
976
+            'AND '.Helper::whereExpression('tx_dlf_collections').' '.
977
+            'GROUP BY `tx_dlf_documents`.`uid` '.
978 978
             'LIMIT ?';
979 979
 
980 980
         $values = [
Please login to merge, or discard this patch.
Classes/Plugin/ListView.php 2 patches
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -81,12 +81,12 @@  discard block
 block discarded – undo
81 81
             return '';
82 82
         }
83 83
         // Get separator.
84
-        $separator = '<span class="separator">' . htmlspecialchars($this->pi_getLL('separator', ' - ')) . '</span>';
84
+        $separator = '<span class="separator">'.htmlspecialchars($this->pi_getLL('separator', ' - ')).'</span>';
85 85
         // Add link to previous page.
86 86
         if ($this->piVars['pointer'] > 0) {
87
-            $output = $this->pi_linkTP_keepPIvars(htmlspecialchars($this->pi_getLL('prevPage', '<')), ['pointer' => $this->piVars['pointer'] - 1], true) . $separator;
87
+            $output = $this->pi_linkTP_keepPIvars(htmlspecialchars($this->pi_getLL('prevPage', '<')), ['pointer' => $this->piVars['pointer'] - 1], true).$separator;
88 88
         } else {
89
-            $output = '<span>' . htmlspecialchars($this->pi_getLL('prevPage', '<')) . '</span>' . $separator;
89
+            $output = '<span>'.htmlspecialchars($this->pi_getLL('prevPage', '<')).'</span>'.$separator;
90 90
         }
91 91
         $i = 0;
92 92
         $skip = null;
@@ -94,13 +94,13 @@  discard block
 block discarded – undo
94 94
         while ($i < $maxPages) {
95 95
             if ($i < 3 || ($i > $this->piVars['pointer'] - 3 && $i < $this->piVars['pointer'] + 3) || $i > $maxPages - 4) {
96 96
                 if ($this->piVars['pointer'] != $i) {
97
-                    $output .= $this->pi_linkTP_keepPIvars(htmlspecialchars(sprintf($this->pi_getLL('page', '%d'), $i + 1)), ['pointer' => $i], true) . $separator;
97
+                    $output .= $this->pi_linkTP_keepPIvars(htmlspecialchars(sprintf($this->pi_getLL('page', '%d'), $i + 1)), ['pointer' => $i], true).$separator;
98 98
                 } else {
99
-                    $output .= '<span class="active">' . htmlspecialchars(sprintf($this->pi_getLL('page', '%d'), $i + 1)) . '</span>' . $separator;
99
+                    $output .= '<span class="active">'.htmlspecialchars(sprintf($this->pi_getLL('page', '%d'), $i + 1)).'</span>'.$separator;
100 100
                 }
101 101
                 $skip = true;
102 102
             } elseif ($skip === true) {
103
-                $output .= '<span class="skip">' . htmlspecialchars($this->pi_getLL('skip', '...')) . '</span>' . $separator;
103
+                $output .= '<span class="skip">'.htmlspecialchars($this->pi_getLL('skip', '...')).'</span>'.$separator;
104 104
                 $skip = false;
105 105
             }
106 106
             $i++;
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
         if ($this->piVars['pointer'] < $maxPages - 1) {
110 110
             $output .= $this->pi_linkTP_keepPIvars(htmlspecialchars($this->pi_getLL('nextPage', '>')), ['pointer' => $this->piVars['pointer'] + 1], true);
111 111
         } else {
112
-            $output .= '<span>' . htmlspecialchars($this->pi_getLL('nextPage', '>')) . '</span>';
112
+            $output .= '<span>'.htmlspecialchars($this->pi_getLL('nextPage', '>')).'</span>';
113 113
         }
114 114
         return $output;
115 115
     }
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
                         if (empty($value) && $this->conf['getTitle']) {
147 147
                             $superiorTitle = Document::getTitle($this->list[$number]['uid'], true);
148 148
                             if (!empty($superiorTitle)) {
149
-                                $value = '[' . $superiorTitle . ']';
149
+                                $value = '['.$superiorTitle.']';
150 150
                             }
151 151
                         }
152 152
                         // Set fake title if still not present.
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
         }
196 196
         // Add thumbnail.
197 197
         if (!empty($this->list[$number]['thumbnail'])) {
198
-            $markerArray['###THUMBNAIL###'] = '<img alt="' . $imgAlt . '" src="' . $this->list[$number]['thumbnail'] . '" />';
198
+            $markerArray['###THUMBNAIL###'] = '<img alt="'.$imgAlt.'" src="'.$this->list[$number]['thumbnail'].'" />';
199 199
         }
200 200
         // Add preview.
201 201
         if (!empty($this->list[$number]['preview'])) {
@@ -265,28 +265,28 @@  discard block
 block discarded – undo
265 265
             $linkConf['additionalParams'] = GeneralUtility::implodeArrayForUrl($this->prefixId, ['logicalPage' => $this->piVars['logicalPage']], '', true, false);
266 266
         }
267 267
         // Build HTML form.
268
-        $sorting = '<form action="' . $this->cObj->typoLink_URL($linkConf) . '" method="get"><div><input type="hidden" name="id" value="' . $GLOBALS['TSFE']->id . '" />';
268
+        $sorting = '<form action="'.$this->cObj->typoLink_URL($linkConf).'" method="get"><div><input type="hidden" name="id" value="'.$GLOBALS['TSFE']->id.'" />';
269 269
         foreach ($this->piVars as $piVar => $value) {
270 270
             if ($piVar != 'order' && $piVar != 'DATA' && !empty($value)) {
271
-                $sorting .= '<input type="hidden" name="' . $this->prefixId . '[' . preg_replace('/[^A-Za-z0-9_-]/', '', $piVar) . ']" value="' . htmlspecialchars($value) . '" />';
271
+                $sorting .= '<input type="hidden" name="'.$this->prefixId.'['.preg_replace('/[^A-Za-z0-9_-]/', '', $piVar).']" value="'.htmlspecialchars($value).'" />';
272 272
             }
273 273
         }
274 274
         // Select sort field.
275
-        $uniqId = uniqid($prefix . '-');
276
-        $sorting .= '<label for="' . $uniqId . '">' . htmlspecialchars($this->pi_getLL('orderBy', '')) . '</label><select id="' . $uniqId . '" name="' . $this->prefixId . '[order]" onchange="javascript:this.form.submit();">';
275
+        $uniqId = uniqid($prefix.'-');
276
+        $sorting .= '<label for="'.$uniqId.'">'.htmlspecialchars($this->pi_getLL('orderBy', '')).'</label><select id="'.$uniqId.'" name="'.$this->prefixId.'[order]" onchange="javascript:this.form.submit();">';
277 277
         // Add relevance sorting if this is a search result list.
278 278
         if ($this->list->metadata['options']['source'] == 'search') {
279
-            $sorting .= '<option value="score"' . (($this->list->metadata['options']['order'] == 'score') ? ' selected="selected"' : '') . '>' . htmlspecialchars($this->pi_getLL('relevance', '')) . '</option>';
279
+            $sorting .= '<option value="score"'.(($this->list->metadata['options']['order'] == 'score') ? ' selected="selected"' : '').'>'.htmlspecialchars($this->pi_getLL('relevance', '')).'</option>';
280 280
         }
281 281
         foreach ($this->sortables as $index_name => $label) {
282
-            $sorting .= '<option value="' . htmlspecialchars($index_name) . '"' . (($this->list->metadata['options']['order'] == $index_name) ? ' selected="selected"' : '') . '>' . htmlspecialchars($label) . '</option>';
282
+            $sorting .= '<option value="'.htmlspecialchars($index_name).'"'.(($this->list->metadata['options']['order'] == $index_name) ? ' selected="selected"' : '').'>'.htmlspecialchars($label).'</option>';
283 283
         }
284 284
         $sorting .= '</select>';
285 285
         // Select sort direction.
286
-        $uniqId = uniqid($prefix . '-');
287
-        $sorting .= '<label for="' . $uniqId . '">' . htmlspecialchars($this->pi_getLL('direction', '')) . '</label><select id="' . $uniqId . '" name="' . $this->prefixId . '[asc]" onchange="javascript:this.form.submit();">';
288
-        $sorting .= '<option value="1" ' . ($this->list->metadata['options']['order.asc'] ? ' selected="selected"' : '') . '>' . htmlspecialchars($this->pi_getLL('direction.asc', '')) . '</option>';
289
-        $sorting .= '<option value="0" ' . (!$this->list->metadata['options']['order.asc'] ? ' selected="selected"' : '') . '>' . htmlspecialchars($this->pi_getLL('direction.desc', '')) . '</option>';
286
+        $uniqId = uniqid($prefix.'-');
287
+        $sorting .= '<label for="'.$uniqId.'">'.htmlspecialchars($this->pi_getLL('direction', '')).'</label><select id="'.$uniqId.'" name="'.$this->prefixId.'[asc]" onchange="javascript:this.form.submit();">';
288
+        $sorting .= '<option value="1" '.($this->list->metadata['options']['order.asc'] ? ' selected="selected"' : '').'>'.htmlspecialchars($this->pi_getLL('direction.asc', '')).'</option>';
289
+        $sorting .= '<option value="0" '.(!$this->list->metadata['options']['order.asc'] ? ' selected="selected"' : '').'>'.htmlspecialchars($this->pi_getLL('direction.desc', '')).'</option>';
290 290
         $sorting .= '</select></div></form>';
291 291
         return $sorting;
292 292
     }
@@ -322,7 +322,7 @@  discard block
 block discarded – undo
322 322
                         if (empty($value) && $this->conf['getTitle']) {
323 323
                             $superiorTitle = Document::getTitle($subpart['uid'], true);
324 324
                             if (!empty($superiorTitle)) {
325
-                                $value = '[' . $superiorTitle . ']';
325
+                                $value = '['.$superiorTitle.']';
326 326
                             }
327 327
                         }
328 328
                         // Set fake title if still not present.
@@ -356,7 +356,7 @@  discard block
 block discarded – undo
356 356
                         $value = htmlspecialchars(Helper::translate($value, 'tx_dlf_structures', $this->conf['pages']));
357 357
                         // Add page number for single pages.
358 358
                         if ($_value == 'page') {
359
-                            $value .= ' ' . intval($subpart['page']);
359
+                            $value .= ' '.intval($subpart['page']);
360 360
                         }
361 361
                     } elseif ($index_name == 'language' && !empty($value)) {
362 362
                         // Translate ISO 639 language code.
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
377 377
             }
378 378
             // Add thumbnail.
379 379
             if (!empty($subpart['thumbnail'])) {
380
-                $markerArray['###SUBTHUMBNAIL###'] = '<img alt="' . $imgAlt . '" src="' . $subpart['thumbnail'] . '" />';
380
+                $markerArray['###SUBTHUMBNAIL###'] = '<img alt="'.$imgAlt.'" src="'.$subpart['thumbnail'].'" />';
381 381
             }
382 382
             // Add preview.
383 383
             if (!empty($subpart['preview'])) {
@@ -491,7 +491,7 @@  discard block
 block discarded – undo
491 491
                 || (isset($this->piVars['asc']) && $this->piVars['asc'] != $listMetadata['options']['order.asc'])
492 492
             ) {
493 493
                 // Update list's metadata.
494
-                $listMetadata['options']['params']['sort'] = [$this->piVars['order'] . "_sorting" => (bool) $this->piVars['asc'] ? 'asc' : 'desc'];
494
+                $listMetadata['options']['params']['sort'] = [$this->piVars['order']."_sorting" => (bool) $this->piVars['asc'] ? 'asc' : 'desc'];
495 495
                 $listMetadata['options']['order'] = $this->piVars['order'];
496 496
                 $listMetadata['options']['order.asc'] = (bool) $this->piVars['asc'];
497 497
                 // Reset pointer.
@@ -515,7 +515,7 @@  discard block
 block discarded – undo
515 515
                 $this->list = $solr->search();
516 516
             }
517 517
             // Add list description
518
-            $listMetadata['description'] = '<p class="tx-dlf-search-numHits">' . htmlspecialchars(sprintf($this->pi_getLL('hits', ''), $this->list->metadata['options']['numberOfHits'], $this->list->metadata['options']['numberOfToplevelHits'])) . '</p>';
518
+            $listMetadata['description'] = '<p class="tx-dlf-search-numHits">'.htmlspecialchars(sprintf($this->pi_getLL('hits', ''), $this->list->metadata['options']['numberOfHits'], $this->list->metadata['options']['numberOfToplevelHits'])).'</p>';
519 519
             $this->list->metadata = $listMetadata;
520 520
             // Save updated list.
521 521
             $this->list->save();
@@ -544,7 +544,7 @@  discard block
 block discarded – undo
544 544
         $markerArray['###LISTTITLE###'] = $this->list->metadata['label'];
545 545
         $markerArray['###LISTDESCRIPTION###'] = $this->list->metadata['description'];
546 546
         if (!empty($this->list->metadata['thumbnail'])) {
547
-            $markerArray['###LISTTHUMBNAIL###'] = '<img alt="" src="' . $this->list->metadata['thumbnail'] . '" />';
547
+            $markerArray['###LISTTHUMBNAIL###'] = '<img alt="" src="'.$this->list->metadata['thumbnail'].'" />';
548 548
         } else {
549 549
             $markerArray['###LISTTHUMBNAIL###'] = '';
550 550
         }
Please login to merge, or discard this patch.
Upper-Lower-Casing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -84,30 +84,30 @@  discard block
 block discarded – undo
84 84
         $separator = '<span class="separator">' . htmlspecialchars($this->pi_getLL('separator', ' - ')) . '</span>';
85 85
         // Add link to previous page.
86 86
         if ($this->piVars['pointer'] > 0) {
87
-            $output = $this->pi_linkTP_keepPIvars(htmlspecialchars($this->pi_getLL('prevPage', '<')), ['pointer' => $this->piVars['pointer'] - 1], true) . $separator;
87
+            $output = $this->pi_linkTP_keepPIvars(htmlspecialchars($this->pi_getLL('prevPage', '<')), ['pointer' => $this->piVars['pointer'] - 1], TRUE) . $separator;
88 88
         } else {
89 89
             $output = '<span>' . htmlspecialchars($this->pi_getLL('prevPage', '<')) . '</span>' . $separator;
90 90
         }
91 91
         $i = 0;
92
-        $skip = null;
92
+        $skip = NULL;
93 93
         // Add links to pages.
94 94
         while ($i < $maxPages) {
95 95
             if ($i < 3 || ($i > $this->piVars['pointer'] - 3 && $i < $this->piVars['pointer'] + 3) || $i > $maxPages - 4) {
96 96
                 if ($this->piVars['pointer'] != $i) {
97
-                    $output .= $this->pi_linkTP_keepPIvars(htmlspecialchars(sprintf($this->pi_getLL('page', '%d'), $i + 1)), ['pointer' => $i], true) . $separator;
97
+                    $output .= $this->pi_linkTP_keepPIvars(htmlspecialchars(sprintf($this->pi_getLL('page', '%d'), $i + 1)), ['pointer' => $i], TRUE) . $separator;
98 98
                 } else {
99 99
                     $output .= '<span class="active">' . htmlspecialchars(sprintf($this->pi_getLL('page', '%d'), $i + 1)) . '</span>' . $separator;
100 100
                 }
101
-                $skip = true;
102
-            } elseif ($skip === true) {
101
+                $skip = TRUE;
102
+            } elseif ($skip === TRUE) {
103 103
                 $output .= '<span class="skip">' . htmlspecialchars($this->pi_getLL('skip', '...')) . '</span>' . $separator;
104
-                $skip = false;
104
+                $skip = FALSE;
105 105
             }
106 106
             $i++;
107 107
         }
108 108
         // Add link to next page.
109 109
         if ($this->piVars['pointer'] < $maxPages - 1) {
110
-            $output .= $this->pi_linkTP_keepPIvars(htmlspecialchars($this->pi_getLL('nextPage', '>')), ['pointer' => $this->piVars['pointer'] + 1], true);
110
+            $output .= $this->pi_linkTP_keepPIvars(htmlspecialchars($this->pi_getLL('nextPage', '>')), ['pointer' => $this->piVars['pointer'] + 1], TRUE);
111 111
         } else {
112 112
             $output .= '<span>' . htmlspecialchars($this->pi_getLL('nextPage', '>')) . '</span>';
113 113
         }
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
                     if ($index_name == 'title') {
145 145
                         // Get title of parent document if needed.
146 146
                         if (empty($value) && $this->conf['getTitle']) {
147
-                            $superiorTitle = Document::getTitle($this->list[$number]['uid'], true);
147
+                            $superiorTitle = Document::getTitle($this->list[$number]['uid'], TRUE);
148 148
                             if (!empty($superiorTitle)) {
149 149
                                 $value = '[' . $superiorTitle . ']';
150 150
                             }
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
                             'parameter' => $this->conf['targetPid'],
167 167
                             'forceAbsoluteUrl' => !empty($this->conf['forceAbsoluteUrl']) ? 1 : 0,
168 168
                             'forceAbsoluteUrl.' => ['scheme' => !empty($this->conf['forceAbsoluteUrl']) && !empty($this->conf['forceAbsoluteUrlHttps']) ? 'https' : 'http'],
169
-                            'additionalParams' => GeneralUtility::implodeArrayForUrl($this->prefixId, $additionalParams, '', true, false)
169
+                            'additionalParams' => GeneralUtility::implodeArrayForUrl($this->prefixId, $additionalParams, '', TRUE, FALSE)
170 170
                         ];
171 171
                         $value = $this->cObj->typoLink(htmlspecialchars($value), $conf);
172 172
                     } elseif ($index_name == 'owner' && !empty($value)) {
@@ -213,12 +213,12 @@  discard block
 block discarded – undo
213 213
                 'parameter' => $this->conf['targetBasket'],
214 214
                 'forceAbsoluteUrl' => !empty($this->conf['forceAbsoluteUrl']) ? 1 : 0,
215 215
                 'forceAbsoluteUrl.' => ['scheme' => !empty($this->conf['forceAbsoluteUrl']) && !empty($this->conf['forceAbsoluteUrlHttps']) ? 'https' : 'http'],
216
-                'additionalParams' => GeneralUtility::implodeArrayForUrl($this->prefixId, $additionalParams, '', true, false)
216
+                'additionalParams' => GeneralUtility::implodeArrayForUrl($this->prefixId, $additionalParams, '', TRUE, FALSE)
217 217
             ];
218 218
             $link = $this->cObj->typoLink(htmlspecialchars($this->pi_getLL('addBasket', '')), $conf);
219 219
             $markerArray['###BASKETBUTTON###'] = $link;
220 220
         }
221
-        return $this->templateService->substituteMarkerArray($this->templateService->substituteSubpart($template['entry'], '###SUBTEMPLATE###', $subpart, true), $markerArray);
221
+        return $this->templateService->substituteMarkerArray($this->templateService->substituteSubpart($template['entry'], '###SUBTEMPLATE###', $subpart, TRUE), $markerArray);
222 222
     }
223 223
 
224 224
     /**
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
             'forceAbsoluteUrl.' => ['scheme' => !empty($this->conf['forceAbsoluteUrl']) && !empty($this->conf['forceAbsoluteUrlHttps']) ? 'https' : 'http']
263 263
         ];
264 264
         if (!empty($this->piVars['logicalPage'])) {
265
-            $linkConf['additionalParams'] = GeneralUtility::implodeArrayForUrl($this->prefixId, ['logicalPage' => $this->piVars['logicalPage']], '', true, false);
265
+            $linkConf['additionalParams'] = GeneralUtility::implodeArrayForUrl($this->prefixId, ['logicalPage' => $this->piVars['logicalPage']], '', TRUE, FALSE);
266 266
         }
267 267
         // Build HTML form.
268 268
         $sorting = '<form action="' . $this->cObj->typoLink_URL($linkConf) . '" method="get"><div><input type="hidden" name="id" value="' . $GLOBALS['TSFE']->id . '" />';
@@ -320,7 +320,7 @@  discard block
 block discarded – undo
320 320
                     if ($index_name == 'title') {
321 321
                         // Get title of parent document if needed.
322 322
                         if (empty($value) && $this->conf['getTitle']) {
323
-                            $superiorTitle = Document::getTitle($subpart['uid'], true);
323
+                            $superiorTitle = Document::getTitle($subpart['uid'], TRUE);
324 324
                             if (!empty($superiorTitle)) {
325 325
                                 $value = '[' . $superiorTitle . ']';
326 326
                             }
@@ -344,7 +344,7 @@  discard block
 block discarded – undo
344 344
                             'parameter' => $this->conf['targetPid'],
345 345
                             'forceAbsoluteUrl' => !empty($this->conf['forceAbsoluteUrl']) ? 1 : 0,
346 346
                             'forceAbsoluteUrl.' => ['scheme' => !empty($this->conf['forceAbsoluteUrl']) && !empty($this->conf['forceAbsoluteUrlHttps']) ? 'https' : 'http'],
347
-                            'additionalParams' => GeneralUtility::implodeArrayForUrl($this->prefixId, $additionalParams, '', true, false)
347
+                            'additionalParams' => GeneralUtility::implodeArrayForUrl($this->prefixId, $additionalParams, '', TRUE, FALSE)
348 348
                         ];
349 349
                         $value = $this->cObj->typoLink(htmlspecialchars($value), $conf);
350 350
                     } elseif ($index_name == 'owner' && !empty($value)) {
@@ -392,14 +392,14 @@  discard block
 block discarded – undo
392 392
                     'parameter' => $this->conf['targetBasket'],
393 393
                     'forceAbsoluteUrl' => !empty($this->conf['forceAbsoluteUrl']) ? 1 : 0,
394 394
                     'forceAbsoluteUrl.' => ['scheme' => !empty($this->conf['forceAbsoluteUrl']) && !empty($this->conf['forceAbsoluteUrlHttps']) ? 'https' : 'http'],
395
-                    'additionalParams' => GeneralUtility::implodeArrayForUrl($this->prefixId, $additionalParams, '', true, false)
395
+                    'additionalParams' => GeneralUtility::implodeArrayForUrl($this->prefixId, $additionalParams, '', TRUE, FALSE)
396 396
                 ];
397 397
                 $link = $this->cObj->typoLink(htmlspecialchars($this->pi_getLL('addBasket', '')), $conf);
398 398
                 $markerArray['###SUBBASKETBUTTON###'] = $link;
399 399
             }
400 400
             $content .= $this->templateService->substituteMarkerArray($template['subentry'], $markerArray);
401 401
         }
402
-        return $this->templateService->substituteSubpart($this->templateService->getSubpart($this->template, '###SUBTEMPLATE###'), '###SUBENTRY###', $content, true);
402
+        return $this->templateService->substituteSubpart($this->templateService->getSubpart($this->template, '###SUBTEMPLATE###'), '###SUBENTRY###', $content, TRUE);
403 403
     }
404 404
 
405 405
     /**
@@ -460,7 +460,7 @@  discard block
 block discarded – undo
460 460
     {
461 461
         $this->init($conf);
462 462
         // Don't cache the output.
463
-        $this->setCache(false);
463
+        $this->setCache(FALSE);
464 464
         // Load the list.
465 465
         $this->list = GeneralUtility::makeInstance(DocumentList::class);
466 466
         $currentEntry = $this->piVars['pointer'] * $this->conf['limit'];
@@ -557,7 +557,7 @@  discard block
 block discarded – undo
557 557
         }
558 558
         $markerArray['###PAGEBROWSER###'] = $this->getPageBrowser();
559 559
         $markerArray['###SORTING###'] = $this->getSortingForm();
560
-        $content = $this->templateService->substituteMarkerArray($this->templateService->substituteSubpart($this->template, '###ENTRY###', $content, true), $markerArray);
560
+        $content = $this->templateService->substituteMarkerArray($this->templateService->substituteSubpart($this->template, '###ENTRY###', $content, TRUE), $markerArray);
561 561
         return $this->pi_wrapInBaseClass($content);
562 562
     }
563 563
 }
Please login to merge, or discard this patch.
Classes/Common/Document.php 1 patch
Braces   +30 added lines, -60 removed lines patch added patch discarded remove patch
@@ -47,8 +47,7 @@  discard block
 block discarded – undo
47 47
  * @property-read mixed $uid This holds the UID or the URL of the document
48 48
  * @abstract
49 49
  */
50
-abstract class Document
51
-{
50
+abstract class Document {
52 51
     /**
53 52
      * This holds the logger
54 53
      *
@@ -340,8 +339,7 @@  discard block
 block discarded – undo
340 339
      *
341 340
      * @return void
342 341
      */
343
-    public static function clearRegistry()
344
-    {
342
+    public static function clearRegistry() {
345 343
         // Reset registry array.
346 344
         self::$registry = [];
347 345
     }
@@ -616,8 +614,7 @@  discard block
 block discarded – undo
616 614
      *
617 615
      * @return int The physical page number
618 616
      */
619
-    public function getPhysicalPage($logicalPage)
620
-    {
617
+    public function getPhysicalPage($logicalPage) {
621 618
         if (
622 619
             !empty($this->lastSearchedPhysicalPage['logicalPage'])
623 620
             && $this->lastSearchedPhysicalPage['logicalPage'] == $logicalPage
@@ -664,8 +661,7 @@  discard block
 block discarded – undo
664 661
      *
665 662
      * @return string The physical structure node's / IIIF resource's raw text from XML
666 663
      */
667
-    protected function getRawTextFromXml($id)
668
-    {
664
+    protected function getRawTextFromXml($id) {
669 665
         $rawText = '';
670 666
         // Load available text formats, ...
671 667
         $this->loadFormats();
@@ -739,8 +735,7 @@  discard block
 block discarded – undo
739 735
      *
740 736
      * @return string The title of the document itself or a parent document
741 737
      */
742
-    public static function getTitle($uid, $recursive = false)
743
-    {
738
+    public static function getTitle($uid, $recursive = false) {
744 739
         $logger = GeneralUtility::makeInstance(LogManager::class)->getLogger(__CLASS__);
745 740
 
746 741
         $title = '';
@@ -794,8 +789,7 @@  discard block
 block discarded – undo
794 789
      *
795 790
      * @return array The logical structure node's / resource's parsed metadata array
796 791
      */
797
-    public function getTitledata($cPid = 0)
798
-    {
792
+    public function getTitledata($cPid = 0) {
799 793
         $titledata = $this->getMetadata($this->_getToplevelId(), $cPid);
800 794
         // Add information from METS structural map to titledata array.
801 795
         if ($this instanceof MetsDocument) {
@@ -828,8 +822,7 @@  discard block
 block discarded – undo
828 822
      * @return int|bool: false if structure with $logId is not a child of this substructure,
829 823
      * or the actual depth.
830 824
      */
831
-    protected function getTreeDepth($structure, $depth, $logId)
832
-    {
825
+    protected function getTreeDepth($structure, $depth, $logId) {
833 826
         foreach ($structure as $element) {
834 827
             if ($element['id'] == $logId) {
835 828
                 return $depth;
@@ -851,8 +844,7 @@  discard block
 block discarded – undo
851 844
      * @param string $logId: The id of the logical structure element whose depth is requested
852 845
      * @return int|bool tree depth as integer or false if no element with $logId exists within the TOC.
853 846
      */
854
-    public function getStructureDepth($logId)
855
-    {
847
+    public function getStructureDepth($logId) {
856 848
         return $this->getTreeDepth($this->_getTableOfContents(), 1, $logId);
857 849
     }
858 850
 
@@ -902,8 +894,7 @@  discard block
 block discarded – undo
902 894
      *
903 895
      * @return bool true on success or false on failure
904 896
      */
905
-    protected function load($location)
906
-    {
897
+    protected function load($location) {
907 898
         // Load XML / JSON-LD file.
908 899
         if (GeneralUtility::isValidUrl($location)) {
909 900
             // Load extension configuration
@@ -936,8 +927,7 @@  discard block
 block discarded – undo
936 927
      *
937 928
      * @return void
938 929
      */
939
-    protected function loadFormats()
940
-    {
930
+    protected function loadFormats() {
941 931
         if (!$this->formatsLoaded) {
942 932
             $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
943 933
                 ->getQueryBuilderForTable('tx_dlf_formats');
@@ -977,8 +967,7 @@  discard block
 block discarded – undo
977 967
      *
978 968
      * @return void
979 969
      */
980
-    public function registerNamespaces(&$obj)
981
-    {
970
+    public function registerNamespaces(&$obj) {
982 971
         // TODO Check usage. XML specific method does not seem to be used anywhere outside this class within the project, but it is public and may be used by extensions.
983 972
         $this->loadFormats();
984 973
         // Do we have a \SimpleXMLElement or \DOMXPath object?
@@ -1006,8 +995,7 @@  discard block
 block discarded – undo
1006 995
      *
1007 996
      * @return bool true on success or false on failure
1008 997
      */
1009
-    public function save($pid = 0, $core = 0)
1010
-    {
998
+    public function save($pid = 0, $core = 0) {
1011 999
         if (\TYPO3_MODE !== 'BE') {
1012 1000
             $this->logger->error('Saving a document is only allowed in the backend');
1013 1001
             return false;
@@ -1328,8 +1316,7 @@  discard block
 block discarded – undo
1328 1316
      *
1329 1317
      * @return bool Are there any fulltext files available?
1330 1318
      */
1331
-    protected function _getHasFulltext()
1332
-    {
1319
+    protected function _getHasFulltext() {
1333 1320
         $this->ensureHasFulltextIsSet();
1334 1321
         return $this->hasFulltext;
1335 1322
     }
@@ -1341,8 +1328,7 @@  discard block
 block discarded – undo
1341 1328
      *
1342 1329
      * @return string The location of the document
1343 1330
      */
1344
-    protected function _getLocation()
1345
-    {
1331
+    protected function _getLocation() {
1346 1332
         return $this->location;
1347 1333
     }
1348 1334
 
@@ -1364,8 +1350,7 @@  discard block
 block discarded – undo
1364 1350
      *
1365 1351
      * @return array Array of metadata with their corresponding logical structure node ID as key
1366 1352
      */
1367
-    protected function _getMetadataArray()
1368
-    {
1353
+    protected function _getMetadataArray() {
1369 1354
         // Set metadata definitions' PID.
1370 1355
         $cPid = ($this->cPid ? $this->cPid : $this->pid);
1371 1356
         if (!$cPid) {
@@ -1390,8 +1375,7 @@  discard block
 block discarded – undo
1390 1375
      *
1391 1376
      * @return int The total number of pages and/or tracks
1392 1377
      */
1393
-    protected function _getNumPages()
1394
-    {
1378
+    protected function _getNumPages() {
1395 1379
         $this->_getPhysicalStructure();
1396 1380
         return $this->numPages;
1397 1381
     }
@@ -1403,8 +1387,7 @@  discard block
 block discarded – undo
1403 1387
      *
1404 1388
      * @return int The UID of the parent document or zero if not applicable
1405 1389
      */
1406
-    protected function _getParentId()
1407
-    {
1390
+    protected function _getParentId() {
1408 1391
         return $this->parentId;
1409 1392
     }
1410 1393
 
@@ -1427,8 +1410,7 @@  discard block
 block discarded – undo
1427 1410
      *
1428 1411
      * @return array Array of elements' type, label and file representations ordered by @ID attribute / Canvas order
1429 1412
      */
1430
-    protected function _getPhysicalStructureInfo()
1431
-    {
1413
+    protected function _getPhysicalStructureInfo() {
1432 1414
         // Is there no physical structure array yet?
1433 1415
         if (!$this->physicalStructureLoaded) {
1434 1416
             // Build physical structure array.
@@ -1444,8 +1426,7 @@  discard block
 block discarded – undo
1444 1426
      *
1445 1427
      * @return int The PID of the document or zero if not in database
1446 1428
      */
1447
-    protected function _getPid()
1448
-    {
1429
+    protected function _getPid() {
1449 1430
         return $this->pid;
1450 1431
     }
1451 1432
 
@@ -1456,8 +1437,7 @@  discard block
 block discarded – undo
1456 1437
      *
1457 1438
      * @return bool Is the document instantiated successfully?
1458 1439
      */
1459
-    protected function _getReady()
1460
-    {
1440
+    protected function _getReady() {
1461 1441
         return $this->ready;
1462 1442
     }
1463 1443
 
@@ -1468,8 +1448,7 @@  discard block
 block discarded – undo
1468 1448
      *
1469 1449
      * @return mixed The METS file's / IIIF manifest's record identifier
1470 1450
      */
1471
-    protected function _getRecordId()
1472
-    {
1451
+    protected function _getRecordId() {
1473 1452
         return $this->recordId;
1474 1453
     }
1475 1454
 
@@ -1480,8 +1459,7 @@  discard block
 block discarded – undo
1480 1459
      *
1481 1460
      * @return int The UID of the root document or zero if not applicable
1482 1461
      */
1483
-    protected function _getRootId()
1484
-    {
1462
+    protected function _getRootId() {
1485 1463
         if (!$this->rootIdLoaded) {
1486 1464
             if ($this->parentId) {
1487 1465
                 $parent = self::getInstance($this->parentId, $this->pid);
@@ -1511,8 +1489,7 @@  discard block
 block discarded – undo
1511 1489
      *
1512 1490
      * @return array Array of structure nodes' id, label, type and physical page indexes/mptr / Canvas link with original hierarchy preserved
1513 1491
      */
1514
-    protected function _getTableOfContents()
1515
-    {
1492
+    protected function _getTableOfContents() {
1516 1493
         // Is there no logical structure array yet?
1517 1494
         if (!$this->tableOfContentsLoaded) {
1518 1495
             // Get all logical structures.
@@ -1553,8 +1530,7 @@  discard block
 block discarded – undo
1553 1530
      *
1554 1531
      * @return mixed The UID or the URL of the document
1555 1532
      */
1556
-    protected function _getUid()
1557
-    {
1533
+    protected function _getUid() {
1558 1534
         return $this->uid;
1559 1535
     }
1560 1536
 
@@ -1567,8 +1543,7 @@  discard block
 block discarded – undo
1567 1543
      *
1568 1544
      * @return void
1569 1545
      */
1570
-    protected function _setCPid($value)
1571
-    {
1546
+    protected function _setCPid($value) {
1572 1547
         $this->cPid = max(intval($value), 0);
1573 1548
     }
1574 1549
 
@@ -1579,8 +1554,7 @@  discard block
 block discarded – undo
1579 1554
      *
1580 1555
      * @return void
1581 1556
      */
1582
-    protected function __clone()
1583
-    {
1557
+    protected function __clone() {
1584 1558
         // This method is defined as protected because singleton objects should not be cloned.
1585 1559
     }
1586 1560
 
@@ -1597,8 +1571,7 @@  discard block
 block discarded – undo
1597 1571
      *
1598 1572
      * @return void
1599 1573
      */
1600
-    protected function __construct($uid, $pid, $preloadedDocument)
1601
-    {
1574
+    protected function __construct($uid, $pid, $preloadedDocument) {
1602 1575
         $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
1603 1576
             ->getQueryBuilderForTable('tx_dlf_documents');
1604 1577
         $location = '';
@@ -1710,8 +1683,7 @@  discard block
 block discarded – undo
1710 1683
      *
1711 1684
      * @return mixed Value of $this->$var
1712 1685
      */
1713
-    public function __get($var)
1714
-    {
1686
+    public function __get($var) {
1715 1687
         $method = '_get' . ucfirst($var);
1716 1688
         if (
1717 1689
             !property_exists($this, $var)
@@ -1733,8 +1705,7 @@  discard block
 block discarded – undo
1733 1705
      *
1734 1706
      * @return bool true if variable is set and not empty, false otherwise
1735 1707
      */
1736
-    public function __isset($var)
1737
-    {
1708
+    public function __isset($var) {
1738 1709
         return !empty($this->__get($var));
1739 1710
     }
1740 1711
 
@@ -1748,8 +1719,7 @@  discard block
 block discarded – undo
1748 1719
      *
1749 1720
      * @return void
1750 1721
      */
1751
-    public function __set($var, $value)
1752
-    {
1722
+    public function __set($var, $value) {
1753 1723
         $method = '_set' . ucfirst($var);
1754 1724
         if (
1755 1725
             !property_exists($this, $var)
Please login to merge, or discard this patch.