Passed
Pull Request — master (#32)
by
unknown
08:38
created
Classes/Plugin/Basket.php 3 patches
Braces   +9 added lines, -18 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 Basket extends \Kitodo\Dlf\Common\AbstractPlugin
29
-{
28
+class Basket extends \Kitodo\Dlf\Common\AbstractPlugin {
30 29
     public $scriptRelPath = 'Classes/Plugin/Basket.php';
31 30
 
32 31
     /**
@@ -39,8 +38,7 @@  discard block
 block discarded – undo
39 38
      *
40 39
      * @return string The content that is displayed on the website
41 40
      */
42
-    public function main($content, $conf)
43
-    {
41
+    public function main($content, $conf) {
44 42
         $this->init($conf);
45 43
         // Don't cache the output.
46 44
         $this->setCache(false);
@@ -233,8 +231,7 @@  discard block
 block discarded – undo
233 231
      *
234 232
      * @return string One basket entry
235 233
      */
236
-    protected function getEntry($data, $template)
237
-    {
234
+    protected function getEntry($data, $template) {
238 235
         if (is_object($data)) {
239 236
             $data = get_object_vars($data);
240 237
         }
@@ -282,8 +279,7 @@  discard block
 block discarded – undo
282 279
      *
283 280
      * @return array Basket data and Javascript output
284 281
      */
285
-    protected function addToBasket($_piVars, $basketData)
286
-    {
282
+    protected function addToBasket($_piVars, $basketData) {
287 283
         $output = '';
288 284
         if (!$_piVars['startpage']) {
289 285
             $page = 0;
@@ -375,8 +371,7 @@  discard block
 block discarded – undo
375 371
      *
376 372
      * @return array basket data
377 373
      */
378
-    protected function removeFromBasket($_piVars, $basketData)
379
-    {
374
+    protected function removeFromBasket($_piVars, $basketData) {
380 375
         if (!empty($basketData['doc_ids'])) {
381 376
             $items = $basketData['doc_ids'];
382 377
             $items = get_object_vars($items);
@@ -415,8 +410,7 @@  discard block
 block discarded – undo
415 410
      *
416 411
      * @return array basket data
417 412
      */
418
-    protected function openFromBasket($_piVars, $basketData)
419
-    {
413
+    protected function openFromBasket($_piVars, $basketData) {
420 414
         $pdfUrl = $this->conf['pdfgenerate'];
421 415
         foreach ($this->piVars['selected'] as $docValue) {
422 416
             if ($docValue['id']) {
@@ -438,8 +432,7 @@  discard block
 block discarded – undo
438 432
      *
439 433
      * @return mixed download url or false
440 434
      */
441
-    protected function getDocumentData($id, $data)
442
-    {
435
+    protected function getDocumentData($id, $data) {
443 436
         // get document instance to load further information
444 437
         $document = Document::getInstance($id, 0);
445 438
         if ($document) {
@@ -499,8 +492,7 @@  discard block
 block discarded – undo
499 492
      *
500 493
      * @return void
501 494
      */
502
-    protected function sendMail()
503
-    {
495
+    protected function sendMail() {
504 496
         // send mail
505 497
         $mailId = $this->piVars['mail_action'];
506 498
 
@@ -590,8 +582,7 @@  discard block
 block discarded – undo
590 582
      *
591 583
      * @return void
592 584
      */
593
-    protected function printDocument()
594
-    {
585
+    protected function printDocument() {
595 586
         $pdfUrl = $this->conf['pdfprint'];
596 587
         $numberOfPages = 0;
597 588
         foreach ($this->piVars['selected'] as $docId => $docValue) {
Please login to merge, or discard this patch.
Spacing   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -164,9 +164,9 @@  discard block
 block discarded – undo
164 164
 
165 165
         if ($resultMail->rowCount() > 0) {
166 166
             $mailForm = '<select name="tx_dlf[mail_action]">';
167
-            $mailForm .= '<option value="">' . htmlspecialchars($this->pi_getLL('chooseMail', '')) . '</option>';
167
+            $mailForm .= '<option value="">'.htmlspecialchars($this->pi_getLL('chooseMail', '')).'</option>';
168 168
             while ($row = $resultMail->fetch()) {
169
-                $mailForm .= '<option value="' . $row['uid'] . '">' . htmlspecialchars($row['name']) . ' (' . htmlspecialchars($row['mail']) . ')</option>';
169
+                $mailForm .= '<option value="'.$row['uid'].'">'.htmlspecialchars($row['name']).' ('.htmlspecialchars($row['mail']).')</option>';
170 170
             }
171 171
             $mailForm .= '</select><input type="submit">';
172 172
         }
@@ -175,9 +175,9 @@  discard block
 block discarded – undo
175 175
         // remove action form
176 176
         $markerArray['###REMOVEACTION###'] = '
177 177
    <select name="tx_dlf[basket_action]">
178
-    <option value="">' . htmlspecialchars($this->pi_getLL('chooseAction', '')) . '</option>
179
-    <option value="open">' . htmlspecialchars($this->pi_getLL('download', '')) . '</option>
180
-    <option value="remove">' . htmlspecialchars($this->pi_getLL('remove', '')) . '</option>
178
+    <option value="">' . htmlspecialchars($this->pi_getLL('chooseAction', '')).'</option>
179
+    <option value="open">' . htmlspecialchars($this->pi_getLL('download', '')).'</option>
180
+    <option value="remove">' . htmlspecialchars($this->pi_getLL('remove', '')).'</option>
181 181
    </select>
182 182
    <input type="submit">
183 183
   ';
@@ -198,9 +198,9 @@  discard block
 block discarded – undo
198 198
         $printForm = '';
199 199
         if ($resultPrinter->rowCount() > 0) {
200 200
             $printForm = '<select name="tx_dlf[print_action]">';
201
-            $printForm .= '<option value="">' . htmlspecialchars($this->pi_getLL('choosePrinter', '')) . '</option>';
201
+            $printForm .= '<option value="">'.htmlspecialchars($this->pi_getLL('choosePrinter', '')).'</option>';
202 202
             while ($row = $resultPrinter->fetch()) {
203
-                $printForm .= '<option value="' . $row['uid'] . '">' . htmlspecialchars($row['label']) . '</option>';
203
+                $printForm .= '<option value="'.$row['uid'].'">'.htmlspecialchars($row['label']).'</option>';
204 204
             }
205 205
             $printForm .= '</select><input type="submit" />';
206 206
         }
@@ -257,23 +257,23 @@  discard block
 block discarded – undo
257 257
         $rotation = $data['rotation'];
258 258
         $docData = $this->getDocumentData($id, $data);
259 259
         $markerArray['###BASKETDATA###'] = $docData['downloadLink'];
260
-        $arrayKey = $id . '_' . $startpage;
260
+        $arrayKey = $id.'_'.$startpage;
261 261
         if (isset($startX)) {
262
-            $arrayKey .= '_' . $startX;
262
+            $arrayKey .= '_'.$startX;
263 263
         }
264 264
         if (isset($endX)) {
265
-            $arrayKey .= '_' . $endX;
265
+            $arrayKey .= '_'.$endX;
266 266
         }
267
-        $controlMark = '<input value="' . $id . '" name="tx_dlf[selected][' . $arrayKey . '][id]" type="checkbox">';
268
-        $controlMark .= '<input value="' . $startpage . '" name="tx_dlf[selected][' . $arrayKey . '][startpage]" type="hidden">';
269
-        $controlMark .= '<input value="' . $endpage . '" name="tx_dlf[selected][' . $arrayKey . '][endpage]" type="hidden">';
267
+        $controlMark = '<input value="'.$id.'" name="tx_dlf[selected]['.$arrayKey.'][id]" type="checkbox">';
268
+        $controlMark .= '<input value="'.$startpage.'" name="tx_dlf[selected]['.$arrayKey.'][startpage]" type="hidden">';
269
+        $controlMark .= '<input value="'.$endpage.'" name="tx_dlf[selected]['.$arrayKey.'][endpage]" type="hidden">';
270 270
         // add hidden fields for detail information
271 271
         if ($startX) {
272
-            $controlMark .= '<input type="hidden" name="tx_dlf[selected][' . $arrayKey . '][startX]" value="' . $startX . '">';
273
-            $controlMark .= '<input type="hidden" name="tx_dlf[selected][' . $arrayKey . '][startY]"  value="' . $startY . '">';
274
-            $controlMark .= '<input type="hidden" name="tx_dlf[selected][' . $arrayKey . '][endX]"  value="' . $endX . '">';
275
-            $controlMark .= '<input type="hidden" name="tx_dlf[selected][' . $arrayKey . '][endY]"  value="' . $endY . '">';
276
-            $controlMark .= '<input type="hidden" name="tx_dlf[selected][' . $arrayKey . '][rotation]"  value="' . $rotation . '">';
272
+            $controlMark .= '<input type="hidden" name="tx_dlf[selected]['.$arrayKey.'][startX]" value="'.$startX.'">';
273
+            $controlMark .= '<input type="hidden" name="tx_dlf[selected]['.$arrayKey.'][startY]"  value="'.$startY.'">';
274
+            $controlMark .= '<input type="hidden" name="tx_dlf[selected]['.$arrayKey.'][endX]"  value="'.$endX.'">';
275
+            $controlMark .= '<input type="hidden" name="tx_dlf[selected]['.$arrayKey.'][endY]"  value="'.$endY.'">';
276
+            $controlMark .= '<input type="hidden" name="tx_dlf[selected]['.$arrayKey.'][rotation]"  value="'.$rotation.'">';
277 277
         }
278 278
         // return one entry
279 279
         $markerArray['###CONTROLS###'] = $controlMark;
@@ -329,12 +329,12 @@  discard block
 block discarded – undo
329 329
             if ($_piVars['addToBasket'] == 'list') {
330 330
                 $documentItem['endpage'] = $document->numPages;
331 331
             }
332
-            $arrayKey = $documentItem['id'] . '_' . $page;
332
+            $arrayKey = $documentItem['id'].'_'.$page;
333 333
             if (!empty($documentItem['startX'])) {
334
-                $arrayKey .= '_' . $documentItem['startX'];
334
+                $arrayKey .= '_'.$documentItem['startX'];
335 335
             }
336 336
             if (!empty($documentItem['endX'])) {
337
-                $arrayKey .= '_' . $documentItem['endX'];
337
+                $arrayKey .= '_'.$documentItem['endX'];
338 338
             }
339 339
             // do not add more than one identical object
340 340
             if (!in_array($arrayKey, $items)) {
@@ -353,14 +353,14 @@  discard block
 block discarded – undo
353 353
                     // remove parameter endpage
354 354
                     $pdfParams = str_replace(",##endpage##", '', $pdfParams);
355 355
                 }
356
-                $pdfGenerateUrl = $this->conf['pdfgenerate'] . $pdfParams;
356
+                $pdfGenerateUrl = $this->conf['pdfgenerate'].$pdfParams;
357 357
                 if ($this->conf['pregeneration']) {
358 358
                     // send ajax request to webapp
359 359
                     $output .= '
360 360
      <script>
361 361
       $(document).ready(function(){
362 362
        $.ajax({
363
-         url: "' . $pdfGenerateUrl . '",
363
+         url: "' . $pdfGenerateUrl.'",
364 364
        }).done(function() {
365 365
        });
366 366
       });
@@ -398,12 +398,12 @@  discard block
 block discarded – undo
398 398
         }
399 399
         foreach ($_piVars['selected'] as $value) {
400 400
             if (isset($value['id'])) {
401
-                $arrayKey = $value['id'] . '_' . $value['startpage'];
401
+                $arrayKey = $value['id'].'_'.$value['startpage'];
402 402
                 if (isset($value['startX'])) {
403
-                    $arrayKey .= '_' . $value['startX'];
403
+                    $arrayKey .= '_'.$value['startX'];
404 404
                 }
405 405
                 if (isset($value['endX'])) {
406
-                    $arrayKey .= '_' . $value['endX'];
406
+                    $arrayKey .= '_'.$value['endX'];
407 407
                 }
408 408
                 if (isset($items[$arrayKey])) {
409 409
                     unset($items[$arrayKey]);
@@ -442,10 +442,10 @@  discard block
 block discarded – undo
442 442
         foreach ($this->piVars['selected'] as $docValue) {
443 443
             if ($docValue['id']) {
444 444
                 $docData = $this->getDocumentData($docValue['id'], $docValue);
445
-                $pdfUrl .= $docData['urlParams'] . $this->conf['pdfparamseparator'];
445
+                $pdfUrl .= $docData['urlParams'].$this->conf['pdfparamseparator'];
446 446
             }
447 447
         }
448
-        header('Location: ' . $pdfUrl);
448
+        header('Location: '.$pdfUrl);
449 449
         ob_end_flush();
450 450
         exit;
451 451
     }
@@ -479,7 +479,7 @@  discard block
 block discarded – undo
479 479
             $urlParams = str_replace("##endx##", $data['endX'] === "" ? "" : intval($data['endX']), $urlParams);
480 480
             $urlParams = str_replace("##endy##", $data['endY'] === "" ? "" : intval($data['endY']), $urlParams);
481 481
             $urlParams = str_replace("##rotation##", $data['rotation'] === "" ? "" : intval($data['rotation']), $urlParams);
482
-            $downloadUrl = $this->conf['pdfgenerate'] . $urlParams;
482
+            $downloadUrl = $this->conf['pdfgenerate'].$urlParams;
483 483
             $title = $document->getTitle($id, true);
484 484
             if (empty($title)) {
485 485
                 $title = $this->pi_getLL('noTitle', '');
@@ -488,15 +488,15 @@  discard block
 block discarded – undo
488 488
             $info = '';
489 489
             if ($data['startX'] != '' && $data['endX'] != '') {
490 490
                 // cutout
491
-                $info .= htmlspecialchars($this->pi_getLL('cutout', '')) . ' ';
491
+                $info .= htmlspecialchars($this->pi_getLL('cutout', '')).' ';
492 492
             }
493 493
             if ($data['startpage'] == $data['endpage']) {
494 494
                 // One page
495
-                $info .= htmlspecialchars($this->pi_getLL('page', '')) . ' ' . $data['startpage'];
495
+                $info .= htmlspecialchars($this->pi_getLL('page', '')).' '.$data['startpage'];
496 496
             } else {
497
-                $info .= htmlspecialchars($this->pi_getLL('page', '')) . ' ' . $data['startpage'] . '-' . $data['endpage'];
497
+                $info .= htmlspecialchars($this->pi_getLL('page', '')).' '.$data['startpage'].'-'.$data['endpage'];
498 498
             }
499
-            $downloadLink = '<a href="' . $downloadUrl . '" target="_blank">' . htmlspecialchars($title) . '</a> (' . $info . ')';
499
+            $downloadLink = '<a href="'.$downloadUrl.'" target="_blank">'.htmlspecialchars($title).'</a> ('.$info.')';
500 500
             if ($data['startpage'] == $data['endpage']) {
501 501
                 $pageNums = 1;
502 502
             } else {
@@ -541,7 +541,7 @@  discard block
 block discarded – undo
541 541
 
542 542
         $allResults = $resultMail->fetchAll();
543 543
         $mailData = $allResults[0];
544
-        $mailText = htmlspecialchars($this->pi_getLL('mailBody', '')) . "\n";
544
+        $mailText = htmlspecialchars($this->pi_getLL('mailBody', ''))."\n";
545 545
         $numberOfPages = 0;
546 546
         $pdfUrl = $this->conf['pdfdownload'];
547 547
         // prepare links
@@ -549,7 +549,7 @@  discard block
 block discarded – undo
549 549
             if ($docValue['id']) {
550 550
                 $explodeId = explode("_", $docValue['id']);
551 551
                 $docData = $this->getDocumentData($explodeId[0], $docValue);
552
-                $pdfUrl .= $docData['urlParams'] . $this->conf['pdfparamseparator'];
552
+                $pdfUrl .= $docData['urlParams'].$this->conf['pdfparamseparator'];
553 553
                 $pages = (abs(intval($docValue['startpage']) - intval($docValue['endpage'])));
554 554
                 if ($pages === 0) {
555 555
                     $numberOfPages = $numberOfPages + 1;
@@ -560,7 +560,7 @@  discard block
 block discarded – undo
560 560
         }
561 561
         // Remove leading/tailing pdfparamseperator
562 562
         $pdfUrl = trim($pdfUrl, $this->conf['pdfparamseparator']);
563
-        $mailBody = $mailText . $pdfUrl;
563
+        $mailBody = $mailText.$pdfUrl;
564 564
         // Get hook objects.
565 565
         $hookObjects = Helper::getHookObjects($this->scriptRelPath);
566 566
         // Hook for getting a customized mail body.
@@ -593,12 +593,12 @@  discard block
 block discarded – undo
593 593
             // internal user
594 594
             $insertArray['user_id'] = $GLOBALS["TSFE"]->fe_user->user['uid'];
595 595
             $insertArray['name'] = $GLOBALS["TSFE"]->fe_user->user['username'];
596
-            $insertArray['label'] = 'Mail: ' . $mailData['mail'];
596
+            $insertArray['label'] = 'Mail: '.$mailData['mail'];
597 597
         } else {
598 598
             // external user
599 599
             $insertArray['user_id'] = 0;
600 600
             $insertArray['name'] = 'n/a';
601
-            $insertArray['label'] = 'Mail: ' . $mailData['mail'];
601
+            $insertArray['label'] = 'Mail: '.$mailData['mail'];
602 602
         }
603 603
         // add action to protocol
604 604
         GeneralUtility::makeInstance(ConnectionPool::class)
@@ -623,7 +623,7 @@  discard block
 block discarded – undo
623 623
         foreach ($this->piVars['selected'] as $docId => $docValue) {
624 624
             if ($docValue['id']) {
625 625
                 $docData = $this->getDocumentData($docValue['id'], $docValue);
626
-                $pdfUrl .= $docData['urlParams'] . $this->conf['pdfparamseparator'];
626
+                $pdfUrl .= $docData['urlParams'].$this->conf['pdfparamseparator'];
627 627
                 $numberOfPages += $docData['pageNums'];
628 628
             }
629 629
         }
@@ -654,7 +654,7 @@  discard block
 block discarded – undo
654 654
                 if ($docValue['id']) {
655 655
                     $explodeId = explode("_", $docId);
656 656
                     $docData = $this->getDocumentData($explodeId[0], $docValue);
657
-                    $pdfUrl .= $docData['urlParams'] . $this->conf['pdfparamseparator'];
657
+                    $pdfUrl .= $docData['urlParams'].$this->conf['pdfparamseparator'];
658 658
                     $numberOfPages += $docData['pageNums'];
659 659
                 }
660 660
             }
@@ -671,12 +671,12 @@  discard block
 block discarded – undo
671 671
             // internal user
672 672
             $insertArray['user_id'] = $GLOBALS["TSFE"]->fe_user->user['uid'];
673 673
             $insertArray['name'] = $GLOBALS["TSFE"]->fe_user->user['username'];
674
-            $insertArray['label'] = 'Print: ' . $printerData['label'];
674
+            $insertArray['label'] = 'Print: '.$printerData['label'];
675 675
         } else {
676 676
             // external user
677 677
             $insertArray['user_id'] = 0;
678 678
             $insertArray['name'] = 'n/a';
679
-            $insertArray['label'] = 'Print: ' . $printerData['label'];
679
+            $insertArray['label'] = 'Print: '.$printerData['label'];
680 680
         }
681 681
         // add action to protocol
682 682
         GeneralUtility::makeInstance(ConnectionPool::class)
@@ -685,7 +685,7 @@  discard block
 block discarded – undo
685 685
                 'tx_dlf_actionlog',
686 686
                 $insertArray
687 687
             );
688
-        header('Location: ' . $pdfUrl);
688
+        header('Location: '.$pdfUrl);
689 689
         ob_end_flush();
690 690
         exit;
691 691
     }
Please login to merge, or discard this patch.
Upper-Lower-Casing   +7 added lines, -7 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
         // Load template file.
48 48
         $this->getTemplate();
49 49
         $subpartArray['entry'] = $this->templateService->getSubpart($this->template, '###ENTRY###');
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
                 ->execute();
66 66
         } else {
67 67
             $GLOBALS['TSFE']->fe_user->setKey('ses', 'tx_dlf_basket', '');
68
-            $GLOBALS['TSFE']->fe_user->sesData_change = true;
68
+            $GLOBALS['TSFE']->fe_user->sesData_change = TRUE;
69 69
             $GLOBALS['TSFE']->fe_user->storeSessionData();
70 70
             $result = $queryBuilder
71 71
                 ->select('*')
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
         } else {
229 229
             $markerArray['###BASKET###'] = '';
230 230
         }
231
-        $content = $this->templateService->substituteMarkerArray($this->templateService->substituteSubpart($this->template, '###ENTRY###', $entries, true), $markerArray);
231
+        $content = $this->templateService->substituteMarkerArray($this->templateService->substituteSubpart($this->template, '###ENTRY###', $entries, TRUE), $markerArray);
232 232
         return $this->pi_wrapInBaseClass($content);
233 233
     }
234 234
 
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
         // return one entry
279 279
         $markerArray['###CONTROLS###'] = $controlMark;
280 280
         $markerArray['###NUMBER###'] = $docData['record_id'];
281
-        return $this->templateService->substituteMarkerArray($this->templateService->substituteSubpart($template['entry'], '###ENTRY###', '', true), $markerArray);
281
+        return $this->templateService->substituteMarkerArray($this->templateService->substituteSubpart($template['entry'], '###ENTRY###', '', TRUE), $markerArray);
282 282
     }
283 283
 
284 284
     /**
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
         } else {
300 300
             $page = intval($_piVars['startpage']);
301 301
         }
302
-        if ($page != null || $_piVars['addToBasket'] == 'list') {
302
+        if ($page != NULL || $_piVars['addToBasket'] == 'list') {
303 303
             $documentItem = [
304 304
                 'id' => intval($_piVars['id']),
305 305
                 'startpage' => intval($_piVars['startpage']),
@@ -480,7 +480,7 @@  discard block
 block discarded – undo
480 480
             $urlParams = str_replace("##endy##", $data['endY'] === "" ? "" : intval($data['endY']), $urlParams);
481 481
             $urlParams = str_replace("##rotation##", $data['rotation'] === "" ? "" : intval($data['rotation']), $urlParams);
482 482
             $downloadUrl = $this->conf['pdfgenerate'] . $urlParams;
483
-            $title = $document->getTitle($id, true);
483
+            $title = $document->getTitle($id, TRUE);
484 484
             if (empty($title)) {
485 485
                 $title = $this->pi_getLL('noTitle', '');
486 486
             }
@@ -510,7 +510,7 @@  discard block
 block discarded – undo
510 510
                 'record_id' => $document->recordId,
511 511
             ];
512 512
         }
513
-        return false;
513
+        return FALSE;
514 514
     }
515 515
 
516 516
     /**
Please login to merge, or discard this patch.
Classes/Plugin/ListView.php 3 patches
Braces   +8 added lines, -16 removed lines patch added patch discarded remove patch
@@ -29,8 +29,7 @@  discard block
 block discarded – undo
29 29
  * @subpackage dlf
30 30
  * @access public
31 31
  */
32
-class ListView extends \Kitodo\Dlf\Common\AbstractPlugin
33
-{
32
+class ListView extends \Kitodo\Dlf\Common\AbstractPlugin {
34 33
     public $scriptRelPath = 'Classes/Plugin/ListView.php';
35 34
 
36 35
     /**
@@ -72,8 +71,7 @@  discard block
 block discarded – undo
72 71
      *
73 72
      * @return string The rendered page browser ready for output
74 73
      */
75
-    protected function getPageBrowser()
76
-    {
74
+    protected function getPageBrowser() {
77 75
         // Get overall number of pages.
78 76
         $maxPages = intval(ceil($this->list->metadata['options']['numberOfToplevelHits'] / $this->conf['limit']));
79 77
         // Return empty pagebrowser if there is just one page.
@@ -124,8 +122,7 @@  discard block
 block discarded – undo
124 122
      *
125 123
      * @return string The rendered entry ready for output
126 124
      */
127
-    protected function getEntry($number, $template)
128
-    {
125
+    protected function getEntry($number, $template) {
129 126
         $markerArray['###NUMBER###'] = ($this->piVars['pointer'] * $this->conf['limit']) + $number + 1;
130 127
         $markerArray['###METADATA###'] = '';
131 128
         $markerArray['###THUMBNAIL###'] = '';
@@ -227,8 +224,7 @@  discard block
 block discarded – undo
227 224
      *
228 225
      * @return array The parsed fieldwrap
229 226
      */
230
-    private function getFieldWrap($index_name, $wrap)
231
-    {
227
+    private function getFieldWrap($index_name, $wrap) {
232 228
         if (isset($this->fieldwrap[$index_name])) {
233 229
             return $this->fieldwrap[$index_name];
234 230
         } else {
@@ -243,8 +239,7 @@  discard block
 block discarded – undo
243 239
      *
244 240
      * @return string The rendered sorting dialog ready for output
245 241
      */
246
-    protected function getSortingForm()
247
-    {
242
+    protected function getSortingForm() {
248 243
         // Return nothing if there are no sortable metadata fields.
249 244
         if (!count($this->sortables)) {
250 245
             return '';
@@ -295,8 +290,7 @@  discard block
 block discarded – undo
295 290
      *
296 291
      * @return string The rendered entries ready for output
297 292
      */
298
-    protected function getSubEntries($number, $template)
299
-    {
293
+    protected function getSubEntries($number, $template) {
300 294
         $content = '';
301 295
         $noTitle = $this->pi_getLL('noTitle');
302 296
         $highlight_word = preg_replace('/\s\s+/', ';', $this->list->metadata['searchString']);
@@ -399,8 +393,7 @@  discard block
 block discarded – undo
399 393
      *
400 394
      * @return void
401 395
      */
402
-    protected function loadConfig()
403
-    {
396
+    protected function loadConfig() {
404 397
         $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
405 398
             ->getQueryBuilderForTable('tx_dlf_metadata');
406 399
 
@@ -446,8 +439,7 @@  discard block
 block discarded – undo
446 439
      *
447 440
      * @return string The content that is displayed on the website
448 441
      */
449
-    public function main($content, $conf)
450
-    {
442
+    public function main($content, $conf) {
451 443
         $this->init($conf);
452 444
         // Don't cache the output.
453 445
         $this->setCache(false);
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' => \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, $additionalParams, '', true, false)
169
+                            'additionalParams' => \TYPO3\CMS\Core\Utility\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' => \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, $additionalParams, '', true, false)
216
+                'additionalParams' => \TYPO3\CMS\Core\Utility\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'] = \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, ['logicalPage' => $this->piVars['logicalPage']], '', true, false);
265
+            $linkConf['additionalParams'] = \TYPO3\CMS\Core\Utility\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' => \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, $additionalParams, '', true, false)
347
+                            'additionalParams' => \TYPO3\CMS\Core\Utility\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' => \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, $additionalParams, '', true, false)
395
+                    'additionalParams' => \TYPO3\CMS\Core\Utility\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 = \TYPO3\CMS\Core\Utility\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.
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'] = \TYPO3\CMS\Core\Utility\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.
Classes/Plugin/Navigation.php 3 patches
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -23,8 +23,7 @@  discard block
 block discarded – undo
23 23
  * @subpackage dlf
24 24
  * @access public
25 25
  */
26
-class Navigation extends \Kitodo\Dlf\Common\AbstractPlugin
27
-{
26
+class Navigation extends \Kitodo\Dlf\Common\AbstractPlugin {
28 27
     public $scriptRelPath = 'Classes/Plugin/Navigation.php';
29 28
 
30 29
     /**
@@ -34,8 +33,7 @@  discard block
 block discarded – undo
34 33
      *
35 34
      * @return string Link to the list view ready to output
36 35
      */
37
-    protected function getLinkToListview()
38
-    {
36
+    protected function getLinkToListview() {
39 37
         if (!empty($this->conf['targetPid'])) {
40 38
             // Load the list.
41 39
             $list = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(DocumentList::class);
@@ -61,8 +59,7 @@  discard block
 block discarded – undo
61 59
      *
62 60
      * @return string Page selector ready to output
63 61
      */
64
-    protected function getPageSelector()
65
-    {
62
+    protected function getPageSelector() {
66 63
         // Configure @action URL for form.
67 64
         $linkConf = [
68 65
             'parameter' => $GLOBALS['TSFE']->id,
@@ -96,8 +93,7 @@  discard block
 block discarded – undo
96 93
      *
97 94
      * @return string The content that is displayed on the website
98 95
      */
99
-    public function main($content, $conf)
100
-    {
96
+    public function main($content, $conf) {
101 97
         $this->init($conf);
102 98
         // Turn cache on.
103 99
         $this->setCache(true);
@@ -212,8 +208,7 @@  discard block
 block discarded – undo
212 208
      *
213 209
      * @return string Typolink ready to output
214 210
      */
215
-    protected function makeLink($label, array $overrulePIvars = [], $aTagParams = '')
216
-    {
211
+    protected function makeLink($label, array $overrulePIvars = [], $aTagParams = '') {
217 212
         // Merge plugin variables with new set of values.
218 213
         if (is_array($this->piVars)) {
219 214
             $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
@@ -100,10 +100,10 @@  discard block
 block discarded – undo
100 100
     {
101 101
         $this->init($conf);
102 102
         // Turn cache on.
103
-        $this->setCache(true);
103
+        $this->setCache(TRUE);
104 104
         // Load current document.
105 105
         $this->loadDocument();
106
-        if ($this->doc === null) {
106
+        if ($this->doc === NULL) {
107 107
             // Quit without doing anything if required variables are not set.
108 108
             return $content;
109 109
         } else {
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
             'forceAbsoluteUrl' => !empty($this->conf['forceAbsoluteUrl']) ? 1 : 0,
228 228
             'forceAbsoluteUrl.' => ['scheme' => !empty($this->conf['forceAbsoluteUrl']) && !empty($this->conf['forceAbsoluteUrlHttps']) ? 'https' : 'http'],
229 229
             'ATagParams' => $aTagParams,
230
-            'additionalParams' => \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, $overrulePIvars, '', true, false),
230
+            'additionalParams' => \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, $overrulePIvars, '', TRUE, FALSE),
231 231
             'title' => $label
232 232
         ];
233 233
         return $this->cObj->typoLink($label, $conf);
Please login to merge, or discard this patch.
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -69,18 +69,18 @@  discard block
 block discarded – undo
69 69
             'forceAbsoluteUrl' => !empty($this->conf['forceAbsoluteUrl']) ? 1 : 0,
70 70
             'forceAbsoluteUrl.' => ['scheme' => !empty($this->conf['forceAbsoluteUrl']) && !empty($this->conf['forceAbsoluteUrlHttps']) ? 'https' : 'http']
71 71
         ];
72
-        $output = '<form action="' . $this->cObj->typoLink_URL($linkConf) . '" method="get"><div><input type="hidden" name="id" value="' . $GLOBALS['TSFE']->id . '" />';
72
+        $output = '<form action="'.$this->cObj->typoLink_URL($linkConf).'" method="get"><div><input type="hidden" name="id" value="'.$GLOBALS['TSFE']->id.'" />';
73 73
         // Add plugin variables.
74 74
         foreach ($this->piVars as $piVar => $value) {
75 75
             if ($piVar != 'page' && $piVar != 'DATA' && !empty($value)) {
76
-                $output .= '<input type="hidden" name="' . $this->prefixId . '[' . preg_replace('/[^A-Za-z0-9_-]/', '', $piVar) . ']" value="' . htmlspecialchars($value) . '" />';
76
+                $output .= '<input type="hidden" name="'.$this->prefixId.'['.preg_replace('/[^A-Za-z0-9_-]/', '', $piVar).']" value="'.htmlspecialchars($value).'" />';
77 77
             }
78 78
         }
79 79
         // Add page selector.
80
-        $uniqId = uniqid(Helper::getUnqualifiedClassName(get_class($this)) . '-');
81
-        $output .= '<label for="' . $uniqId . '">' . htmlspecialchars($this->pi_getLL('selectPage', '')) . '</label><select id="' . $uniqId . '" name="' . $this->prefixId . '[page]" onchange="javascript:this.form.submit();"' . ($this->doc->numPages < 1 ? ' disabled="disabled"' : '') . '>';
80
+        $uniqId = uniqid(Helper::getUnqualifiedClassName(get_class($this)).'-');
81
+        $output .= '<label for="'.$uniqId.'">'.htmlspecialchars($this->pi_getLL('selectPage', '')).'</label><select id="'.$uniqId.'" name="'.$this->prefixId.'[page]" onchange="javascript:this.form.submit();"'.($this->doc->numPages < 1 ? ' disabled="disabled"' : '').'>';
82 82
         for ($i = 1; $i <= $this->doc->numPages; $i++) {
83
-            $output .= '<option value="' . $i . '"' . ($this->piVars['page'] == $i ? ' selected="selected"' : '') . '>[' . $i . ']' . ($this->doc->physicalStructureInfo[$this->doc->physicalStructure[$i]]['orderlabel'] ? ' - ' . htmlspecialchars($this->doc->physicalStructureInfo[$this->doc->physicalStructure[$i]]['orderlabel']) : '') . '</option>';
83
+            $output .= '<option value="'.$i.'"'.($this->piVars['page'] == $i ? ' selected="selected"' : '').'>['.$i.']'.($this->doc->physicalStructureInfo[$this->doc->physicalStructure[$i]]['orderlabel'] ? ' - '.htmlspecialchars($this->doc->physicalStructureInfo[$this->doc->physicalStructure[$i]]['orderlabel']) : '').'</option>';
84 84
         }
85 85
         $output .= '</select></div></form>';
86 86
         return $output;
@@ -138,53 +138,53 @@  discard block
 block discarded – undo
138 138
         if ($this->piVars['page'] > 1) {
139 139
             $markerArray['###FIRST###'] = $this->makeLink(htmlspecialchars($this->pi_getLL('firstPage', '')), ['page' => 1]);
140 140
         } else {
141
-            $markerArray['###FIRST###'] = '<span title="' . htmlspecialchars($this->pi_getLL('firstPage', '')) . '">' . htmlspecialchars($this->pi_getLL('firstPage', '')) . '</span>';
141
+            $markerArray['###FIRST###'] = '<span title="'.htmlspecialchars($this->pi_getLL('firstPage', '')).'">'.htmlspecialchars($this->pi_getLL('firstPage', '')).'</span>';
142 142
         }
143 143
         // Link back X pages.
144 144
         if ($this->piVars['page'] > $pageSteps) {
145 145
             $markerArray['###BACK###'] = $this->makeLink(htmlspecialchars(sprintf($this->pi_getLL('backXPages', ''), $pageSteps)), ['page' => $this->piVars['page'] - $pageSteps]);
146 146
         } else {
147
-            $markerArray['###BACK###'] = '<span title="' . htmlspecialchars(sprintf($this->pi_getLL('backXPages', ''), $pageSteps)) . '">' . htmlspecialchars(sprintf($this->pi_getLL('backXPages', ''), $pageSteps)) . '</span>';
147
+            $markerArray['###BACK###'] = '<span title="'.htmlspecialchars(sprintf($this->pi_getLL('backXPages', ''), $pageSteps)).'">'.htmlspecialchars(sprintf($this->pi_getLL('backXPages', ''), $pageSteps)).'</span>';
148 148
         }
149 149
         // Link to previous page.
150 150
         if ($this->piVars['page'] > (1 + $this->piVars['double'])) {
151 151
             $markerArray['###PREVIOUS###'] = $this->makeLink(htmlspecialchars($this->pi_getLL('prevPage', '')), ['page' => $this->piVars['page'] - (1 + $this->piVars['double'])]);
152 152
         } else {
153
-            $markerArray['###PREVIOUS###'] = '<span title="' . htmlspecialchars($this->pi_getLL('prevPage', '')) . '">' . htmlspecialchars($this->pi_getLL('prevPage', '')) . '</span>';
153
+            $markerArray['###PREVIOUS###'] = '<span title="'.htmlspecialchars($this->pi_getLL('prevPage', '')).'">'.htmlspecialchars($this->pi_getLL('prevPage', '')).'</span>';
154 154
         }
155 155
         // Link to next page.
156 156
         if ($this->piVars['page'] < ($this->doc->numPages - $this->piVars['double'])) {
157 157
             $markerArray['###NEXT###'] = $this->makeLink(htmlspecialchars($this->pi_getLL('nextPage', '')), ['page' => $this->piVars['page'] + (1 + $this->piVars['double'])]);
158 158
         } else {
159
-            $markerArray['###NEXT###'] = '<span title="' . htmlspecialchars($this->pi_getLL('nextPage', '')) . '">' . htmlspecialchars($this->pi_getLL('nextPage', '')) . '</span>';
159
+            $markerArray['###NEXT###'] = '<span title="'.htmlspecialchars($this->pi_getLL('nextPage', '')).'">'.htmlspecialchars($this->pi_getLL('nextPage', '')).'</span>';
160 160
         }
161 161
         // Link forward X pages.
162 162
         if ($this->piVars['page'] <= ($this->doc->numPages - $pageSteps)) {
163 163
             $markerArray['###FORWARD###'] = $this->makeLink(htmlspecialchars(sprintf($this->pi_getLL('forwardXPages', ''), $pageSteps)), ['page' => $this->piVars['page'] + $pageSteps]);
164 164
         } else {
165
-            $markerArray['###FORWARD###'] = '<span title="' . htmlspecialchars(sprintf($this->pi_getLL('forwardXPages', ''), $pageSteps)) . '">' . htmlspecialchars(sprintf($this->pi_getLL('forwardXPages', ''), $pageSteps)) . '</span>';
165
+            $markerArray['###FORWARD###'] = '<span title="'.htmlspecialchars(sprintf($this->pi_getLL('forwardXPages', ''), $pageSteps)).'">'.htmlspecialchars(sprintf($this->pi_getLL('forwardXPages', ''), $pageSteps)).'</span>';
166 166
         }
167 167
         // Link to last page.
168 168
         if ($this->piVars['page'] < $this->doc->numPages) {
169 169
             $markerArray['###LAST###'] = $this->makeLink(htmlspecialchars($this->pi_getLL('lastPage', '')), ['page' => $this->doc->numPages]);
170 170
         } else {
171
-            $markerArray['###LAST###'] = '<span title="' . htmlspecialchars($this->pi_getLL('lastPage', '')) . '">' . htmlspecialchars($this->pi_getLL('lastPage', '')) . '</span>';
171
+            $markerArray['###LAST###'] = '<span title="'.htmlspecialchars($this->pi_getLL('lastPage', '')).'">'.htmlspecialchars($this->pi_getLL('lastPage', '')).'</span>';
172 172
         }
173 173
         // Add double page switcher.
174 174
         if ($this->doc->numPages > 0) {
175 175
             if (!$this->piVars['double']) {
176
-                $markerArray['###DOUBLEPAGE###'] = $this->makeLink(htmlspecialchars($this->pi_getLL('doublePageOn', '')), ['double' => 1], 'class="tx-dlf-navigation-doubleOn" title="' . htmlspecialchars($this->pi_getLL('doublePageOn', '')) . '"');
176
+                $markerArray['###DOUBLEPAGE###'] = $this->makeLink(htmlspecialchars($this->pi_getLL('doublePageOn', '')), ['double' => 1], 'class="tx-dlf-navigation-doubleOn" title="'.htmlspecialchars($this->pi_getLL('doublePageOn', '')).'"');
177 177
             } else {
178
-                $markerArray['###DOUBLEPAGE###'] = $this->makeLink(htmlspecialchars($this->pi_getLL('doublePageOff', '')), ['double' => 0], 'class="tx-dlf-navigation-doubleOff" title="' . htmlspecialchars($this->pi_getLL('doublePageOff', '')) . '"');
178
+                $markerArray['###DOUBLEPAGE###'] = $this->makeLink(htmlspecialchars($this->pi_getLL('doublePageOff', '')), ['double' => 0], 'class="tx-dlf-navigation-doubleOff" title="'.htmlspecialchars($this->pi_getLL('doublePageOff', '')).'"');
179 179
             }
180 180
             if ($this->piVars['double'] && $this->piVars['page'] < $this->doc->numPages) {
181
-                $markerArray['###DOUBLEPAGE+1###'] = $this->makeLink(htmlspecialchars($this->pi_getLL('doublePage+1', '')), ['page' => $this->piVars['page'] + 1], 'title="' . htmlspecialchars($this->pi_getLL('doublePage+1', '')) . '"');
181
+                $markerArray['###DOUBLEPAGE+1###'] = $this->makeLink(htmlspecialchars($this->pi_getLL('doublePage+1', '')), ['page' => $this->piVars['page'] + 1], 'title="'.htmlspecialchars($this->pi_getLL('doublePage+1', '')).'"');
182 182
             } else {
183
-                $markerArray['###DOUBLEPAGE+1###'] = '<span title="' . htmlspecialchars($this->pi_getLL('doublePage+1', '')) . '">' . htmlspecialchars($this->pi_getLL('doublePage+1', '')) . '</span>';
183
+                $markerArray['###DOUBLEPAGE+1###'] = '<span title="'.htmlspecialchars($this->pi_getLL('doublePage+1', '')).'">'.htmlspecialchars($this->pi_getLL('doublePage+1', '')).'</span>';
184 184
             }
185 185
         } else {
186
-            $markerArray['###DOUBLEPAGE###'] = '<span title="' . htmlspecialchars($this->pi_getLL('doublePageOn', '')) . '">' . htmlspecialchars($this->pi_getLL('doublePageOn', '')) . '</span>';
187
-            $markerArray['###DOUBLEPAGE+1###'] = '<span title="' . htmlspecialchars($this->pi_getLL('doublePage+1', '')) . '">' . htmlspecialchars($this->pi_getLL('doublePage+1', '')) . '</span>';
186
+            $markerArray['###DOUBLEPAGE###'] = '<span title="'.htmlspecialchars($this->pi_getLL('doublePageOn', '')).'">'.htmlspecialchars($this->pi_getLL('doublePageOn', '')).'</span>';
187
+            $markerArray['###DOUBLEPAGE+1###'] = '<span title="'.htmlspecialchars($this->pi_getLL('doublePage+1', '')).'">'.htmlspecialchars($this->pi_getLL('doublePage+1', '')).'</span>';
188 188
         }
189 189
         // Add page selector.
190 190
         $markerArray['###PAGESELECT###'] = $this->getPageSelector();
Please login to merge, or discard this patch.
ext_emconf.php 1 patch
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,8 +24,8 @@
 block discarded – undo
24 24
         'suggests' => []
25 25
     ],
26 26
     'state' => 'stable',
27
-    'uploadfolder' => false,
28
-    'clearCacheOnLoad' => false,
27
+    'uploadfolder' => FALSE,
28
+    'clearCacheOnLoad' => FALSE,
29 29
     'author' => 'Sebastian Meyer (Maintainer)',
30 30
     'author_email' => '[email protected]',
31 31
     'author_company' => 'Kitodo. Key to digital objects e. V.',
Please login to merge, or discard this patch.