Passed
Pull Request — master (#17)
by
unknown
02:43
created
Classes/Plugin/OaiPmh.php 3 patches
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
         // Delete expired resumption tokens.
83 83
         $GLOBALS['TYPO3_DB']->exec_DELETEquery(
84 84
             'tx_dlf_tokens',
85
-            'tx_dlf_tokens.ident="oai" AND tx_dlf_tokens.tstamp<' . intval($GLOBALS['EXEC_TIME'] - $this->conf['expired'])
85
+            'tx_dlf_tokens.ident="oai" AND tx_dlf_tokens.tstamp<'.intval($GLOBALS['EXEC_TIME'] - $this->conf['expired'])
86 86
         );
87 87
         if ($GLOBALS['TYPO3_DB']->sql_affected_rows() === -1) {
88 88
             // Deletion failed.
@@ -150,13 +150,13 @@  discard block
 block discarded – undo
150 150
         $oai_dc = $this->oai->createElementNS($this->formats['oai_dc']['namespace'], 'oai_dc:dc');
151 151
         $oai_dc->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:dc', 'http://purl.org/dc/elements/1.1/');
152 152
         $oai_dc->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance');
153
-        $oai_dc->setAttributeNS('http://www.w3.org/2001/XMLSchema-instance', 'xsi:schemaLocation', $this->formats['oai_dc']['namespace'] . ' ' . $this->formats['oai_dc']['schema']);
153
+        $oai_dc->setAttributeNS('http://www.w3.org/2001/XMLSchema-instance', 'xsi:schemaLocation', $this->formats['oai_dc']['namespace'].' '.$this->formats['oai_dc']['schema']);
154 154
         $oai_dc->appendChild($this->oai->createElementNS('http://purl.org/dc/elements/1.1/', 'dc:identifier', htmlspecialchars($metadata['record_id'], ENT_NOQUOTES, 'UTF-8')));
155 155
         if (!empty($metadata['purl'])) {
156 156
             $oai_dc->appendChild($this->oai->createElementNS('http://purl.org/dc/elements/1.1/', 'dc:identifier', htmlspecialchars($metadata['purl'], ENT_NOQUOTES, 'UTF-8')));
157 157
         }
158 158
         if (!empty($metadata['prod_id'])) {
159
-            $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')));
159
+            $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')));
160 160
         }
161 161
         if (!empty($metadata['urn'])) {
162 162
             $oai_dc->appendChild($this->oai->createElementNS('http://purl.org/dc/elements/1.1/', 'dc:identifier', htmlspecialchars($metadata['urn'], ENT_NOQUOTES, 'UTF-8')));
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
         }
254 254
         // Add attributes and build XML tree.
255 255
         $epicur->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance');
256
-        $epicur->setAttributeNS('http://www.w3.org/2001/XMLSchema-instance', 'xsi:schemaLocation', $this->formats['epicur']['namespace'] . ' ' . $this->formats['epicur']['schema']);
256
+        $epicur->setAttributeNS('http://www.w3.org/2001/XMLSchema-instance', 'xsi:schemaLocation', $this->formats['epicur']['namespace'].' '.$this->formats['epicur']['schema']);
257 257
         // Do we update an URN or register a new one?
258 258
         if ($metadata['tstamp'] == $metadata['crdate']) {
259 259
             $update->setAttribute('type', 'urn_new');
@@ -300,10 +300,10 @@  discard block
 block discarded – undo
300 300
                 // Import node into \DOMDocument.
301 301
                 $mets = $this->oai->importNode($root->item(0), true);
302 302
             } else {
303
-                Helper::devLog('No METS part found in document with location "' . $metadata['location'] . '"', DEVLOG_SEVERITY_ERROR);
303
+                Helper::devLog('No METS part found in document with location "'.$metadata['location'].'"', DEVLOG_SEVERITY_ERROR);
304 304
             }
305 305
         } else {
306
-            Helper::devLog('Could not load XML file from "' . $metadata['location'] . '"', DEVLOG_SEVERITY_ERROR);
306
+            Helper::devLog('Could not load XML file from "'.$metadata['location'].'"', DEVLOG_SEVERITY_ERROR);
307 307
         }
308 308
         if ($mets === null) {
309 309
             $mets = $this->oai->createElementNS('http://kitodo.org/', 'kitodo:error', htmlspecialchars($this->pi_getLL('error', 'Error!', false), ENT_NOQUOTES, 'UTF-8'));
@@ -339,15 +339,15 @@  discard block
 block discarded – undo
339 339
             if (substr($this->conf['stylesheet'], 0, 4) == 'EXT:') {
340 340
                 list($extKey, $filePath) = explode('/', substr($this->conf['stylesheet'], 4), 2);
341 341
                 if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded($extKey)) {
342
-                    $this->conf['stylesheet'] = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($extKey) . $filePath;
342
+                    $this->conf['stylesheet'] = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($extKey).$filePath;
343 343
                 }
344 344
             }
345 345
             $stylesheet = \TYPO3\CMS\Core\Utility\GeneralUtility::locationHeaderUrl($this->conf['stylesheet']);
346 346
         } else {
347 347
             // Use default stylesheet if no custom stylesheet is given.
348
-            $stylesheet = \TYPO3\CMS\Core\Utility\GeneralUtility::locationHeaderUrl(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey) . 'Resources/Public/Stylesheets/OaiPmh.xsl');
348
+            $stylesheet = \TYPO3\CMS\Core\Utility\GeneralUtility::locationHeaderUrl(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'Resources/Public/Stylesheets/OaiPmh.xsl');
349 349
         }
350
-        $this->oai->appendChild($this->oai->createProcessingInstruction('xml-stylesheet', 'type="text/xsl" href="' . htmlspecialchars($stylesheet, ENT_NOQUOTES, 'UTF-8') . '"'));
350
+        $this->oai->appendChild($this->oai->createProcessingInstruction('xml-stylesheet', 'type="text/xsl" href="'.htmlspecialchars($stylesheet, ENT_NOQUOTES, 'UTF-8').'"'));
351 351
         // Create root element.
352 352
         $root = $this->oai->createElementNS('http://www.openarchives.org/OAI/2.0/', 'OAI-PMH');
353 353
         $root->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance');
@@ -397,10 +397,10 @@  discard block
 block discarded – undo
397 397
         // Send headers.
398 398
         header('HTTP/1.1 200 OK');
399 399
         header('Cache-Control: no-cache');
400
-        header('Content-Length: ' . strlen($content));
400
+        header('Content-Length: '.strlen($content));
401 401
         header('Content-Type: text/xml; charset=utf-8');
402
-        header('Date: ' . date('r', $GLOBALS['EXEC_TIME']));
403
-        header('Expires: ' . date('r', $GLOBALS['EXEC_TIME'] + $this->conf['expired']));
402
+        header('Date: '.date('r', $GLOBALS['EXEC_TIME']));
403
+        header('Expires: '.date('r', $GLOBALS['EXEC_TIME'] + $this->conf['expired']));
404 404
         echo $content;
405 405
         exit;
406 406
     }
@@ -464,10 +464,10 @@  discard block
 block discarded – undo
464 464
             'tx_dlf_documents',
465 465
             'tx_dlf_relations',
466 466
             'tx_dlf_collections',
467
-            'AND tx_dlf_documents.record_id=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($this->piVars['identifier'], 'tx_dlf_documents')
468
-                . ' AND tx_dlf_documents.pid=' . intval($this->conf['pages'])
469
-                . ' AND tx_dlf_collections.pid=' . intval($this->conf['pages'])
470
-                . ' AND tx_dlf_relations.ident=' . $GLOBALS['TYPO3_DB']->fullQuoteStr('docs_colls', 'tx_dlf_relations')
467
+            'AND tx_dlf_documents.record_id='.$GLOBALS['TYPO3_DB']->fullQuoteStr($this->piVars['identifier'], 'tx_dlf_documents')
468
+                . ' AND tx_dlf_documents.pid='.intval($this->conf['pages'])
469
+                . ' AND tx_dlf_collections.pid='.intval($this->conf['pages'])
470
+                . ' AND tx_dlf_relations.ident='.$GLOBALS['TYPO3_DB']->fullQuoteStr('docs_colls', 'tx_dlf_relations')
471 471
                 . $where
472 472
                 . Helper::whereClause('tx_dlf_collections'),
473 473
             '',
@@ -584,7 +584,7 @@  discard block
 block discarded – undo
584 584
             $timestamp = $resArray['tstamp'];
585 585
             $earliestDatestamp = gmdate('Y-m-d\TH:i:s\Z', $timestamp);
586 586
         } else {
587
-            Helper::devLog('No records found with PID ' . $this->conf['pages'], DEVLOG_SEVERITY_NOTICE);
587
+            Helper::devLog('No records found with PID '.$this->conf['pages'], DEVLOG_SEVERITY_NOTICE);
588 588
         }
589 589
         $linkConf = [
590 590
             'parameter' => $GLOBALS['TSFE']->id,
@@ -844,9 +844,9 @@  discard block
 block discarded – undo
844 844
             }
845 845
             $resArray = $allResults[0];
846 846
             if ($resArray['index_query'] != "") {
847
-                $solr_query .= '(' . $resArray['index_query'] . ')';
847
+                $solr_query .= '('.$resArray['index_query'].')';
848 848
             } else {
849
-                $solr_query .= 'collection:' . '"' . $resArray['index_name'] . '"';
849
+                $solr_query .= 'collection:'.'"'.$resArray['index_name'].'"';
850 850
             }
851 851
         } else {
852 852
             // If no set is specified we have to query for all collections
@@ -854,7 +854,7 @@  discard block
 block discarded – undo
854 854
         }
855 855
         // Check for required fields.
856 856
         foreach ($this->formats[$this->piVars['metadataPrefix']]['requiredFields'] as $required) {
857
-            $solr_query .= ' NOT ' . $required . ':""';
857
+            $solr_query .= ' NOT '.$required.':""';
858 858
         }
859 859
         // toplevel="true" is always required
860 860
         $solr_query .= ' AND toplevel:true';
@@ -867,7 +867,7 @@  discard block
 block discarded – undo
867 867
                 || is_array($date_array = strptime($this->piVars['from'], '%Y-%m-%d'))
868 868
             ) {
869 869
                 $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);
870
-                $from = date("Y-m-d", $timestamp) . 'T' . date("H:i:s", $timestamp) . '.000Z';
870
+                $from = date("Y-m-d", $timestamp).'T'.date("H:i:s", $timestamp).'.000Z';
871 871
             } else {
872 872
                 throw new \Exception('badArgument');
873 873
             }
@@ -881,7 +881,7 @@  discard block
 block discarded – undo
881 881
                 || is_array($date_array = strptime($this->piVars['until'], '%Y-%m-%d'))
882 882
             ) {
883 883
                 $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);
884
-                $until = date("Y-m-d", $timestamp) . 'T' . date("H:i:s", $timestamp) . '.999Z';
884
+                $until = date("Y-m-d", $timestamp).'T'.date("H:i:s", $timestamp).'.999Z';
885 885
                 if ($from != "*" && $from > $until) {
886 886
                     throw new \Exception('badArgument');
887 887
                 }
@@ -898,7 +898,7 @@  discard block
 block discarded – undo
898 898
                 throw new \Exception('badArgument');
899 899
             }
900 900
         }
901
-        $solr_query .= ' AND timestamp:[' . $from . ' TO ' . $until . ']';
901
+        $solr_query .= ' AND timestamp:['.$from.' TO '.$until.']';
902 902
         $documentSet = [];
903 903
         $solr = Solr::getInstance($this->conf['solrcore']);
904 904
         if (intval($this->conf['solr_limit']) > 0) {
@@ -938,10 +938,10 @@  discard block
 block discarded – undo
938 938
             'tx_dlf_documents',
939 939
             'tx_dlf_relations',
940 940
             'tx_dlf_collections',
941
-            'AND tx_dlf_documents.uid IN (' . implode(',', $GLOBALS['TYPO3_DB']->cleanIntArray($documentsToProcess)) . ')'
942
-                . ' AND tx_dlf_documents.pid=' . intval($this->conf['pages'])
943
-                . ' AND tx_dlf_collections.pid=' . intval($this->conf['pages'])
944
-                . ' AND tx_dlf_relations.ident=' . $GLOBALS['TYPO3_DB']->fullQuoteStr('docs_colls', 'tx_dlf_relations')
941
+            'AND tx_dlf_documents.uid IN ('.implode(',', $GLOBALS['TYPO3_DB']->cleanIntArray($documentsToProcess)).')'
942
+                . ' AND tx_dlf_documents.pid='.intval($this->conf['pages'])
943
+                . ' AND tx_dlf_collections.pid='.intval($this->conf['pages'])
944
+                . ' AND tx_dlf_relations.ident='.$GLOBALS['TYPO3_DB']->fullQuoteStr('docs_colls', 'tx_dlf_relations')
945 945
                 . Helper::whereClause('tx_dlf_collections'),
946 946
             'tx_dlf_documents.uid',
947 947
             'tx_dlf_documents.tstamp',
Please login to merge, or discard this patch.
Braces   +18 added lines, -36 removed lines patch added patch discarded remove patch
@@ -26,8 +26,7 @@  discard block
 block discarded – undo
26 26
  * @subpackage dlf
27 27
  * @access public
28 28
  */
29
-class OaiPmh extends \Kitodo\Dlf\Common\AbstractPlugin
30
-{
29
+class OaiPmh extends \Kitodo\Dlf\Common\AbstractPlugin {
31 30
     public $scriptRelPath = 'Classes/Plugin/OaiPmh.php';
32 31
 
33 32
     /**
@@ -77,8 +76,7 @@  discard block
 block discarded – undo
77 76
      *
78 77
      * @return void
79 78
      */
80
-    protected function deleteExpiredTokens()
81
-    {
79
+    protected function deleteExpiredTokens() {
82 80
         // Delete expired resumption tokens.
83 81
         $GLOBALS['TYPO3_DB']->exec_DELETEquery(
84 82
             'tx_dlf_tokens',
@@ -99,8 +97,7 @@  discard block
 block discarded – undo
99 97
      *
100 98
      * @return \DOMElement XML node to add to the OAI response
101 99
      */
102
-    protected function error($type)
103
-    {
100
+    protected function error($type) {
104 101
         $this->error = true;
105 102
         $error = $this->oai->createElementNS('http://www.openarchives.org/OAI/2.0/', 'error', htmlspecialchars($this->pi_getLL($type, $type, false), ENT_NOQUOTES, 'UTF-8'));
106 103
         $error->setAttribute('code', $type);
@@ -114,8 +111,7 @@  discard block
 block discarded – undo
114 111
      *
115 112
      * @return void
116 113
      */
117
-    protected function getUrlParams()
118
-    {
114
+    protected function getUrlParams() {
119 115
         $allowedParams = [
120 116
             'verb',
121 117
             'identifier',
@@ -145,8 +141,7 @@  discard block
 block discarded – undo
145 141
      *
146 142
      * @return \DOMElement XML node to add to the OAI response
147 143
      */
148
-    protected function getDcData(array $metadata)
149
-    {
144
+    protected function getDcData(array $metadata) {
150 145
         $oai_dc = $this->oai->createElementNS($this->formats['oai_dc']['namespace'], 'oai_dc:dc');
151 146
         $oai_dc->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:dc', 'http://purl.org/dc/elements/1.1/');
152 147
         $oai_dc->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance');
@@ -224,8 +219,7 @@  discard block
 block discarded – undo
224 219
      *
225 220
      * @return \DOMElement XML node to add to the OAI response
226 221
      */
227
-    protected function getEpicurData(array $metadata)
228
-    {
222
+    protected function getEpicurData(array $metadata) {
229 223
         // Define all XML elements with or without qualified namespace.
230 224
         if (empty($this->conf['unqualified_epicur'])) {
231 225
             $epicur = $this->oai->createElementNS($this->formats['epicur']['namespace'], 'epicur:epicur');
@@ -288,8 +282,7 @@  discard block
 block discarded – undo
288 282
      *
289 283
      * @return \DOMElement XML node to add to the OAI response
290 284
      */
291
-    protected function getMetsData(array $metadata)
292
-    {
285
+    protected function getMetsData(array $metadata) {
293 286
         $mets = null;
294 287
         // Load METS file.
295 288
         $xml = new \DOMDocument();
@@ -321,8 +314,7 @@  discard block
 block discarded – undo
321 314
      *
322 315
      * @return void
323 316
      */
324
-    public function main($content, $conf)
325
-    {
317
+    public function main($content, $conf) {
326 318
         // Initialize plugin.
327 319
         $this->init($conf);
328 320
         // Turn cache off.
@@ -412,8 +404,7 @@  discard block
 block discarded – undo
412 404
      *
413 405
      * @return \DOMElement XML node to add to the OAI response
414 406
      */
415
-    protected function resume()
416
-    {
407
+    protected function resume() {
417 408
         $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
418 409
             ->getQueryBuilderForTable('tx_dlf_tokens');
419 410
 
@@ -447,8 +438,7 @@  discard block
 block discarded – undo
447 438
      *
448 439
      * @return \DOMElement XML node to add to the OAI response
449 440
      */
450
-    protected function verbGetRecord()
451
-    {
441
+    protected function verbGetRecord() {
452 442
         if (count($this->piVars) != 3 || empty($this->piVars['metadataPrefix']) || empty($this->piVars['identifier'])) {
453 443
             return $this->error('badArgument');
454 444
         }
@@ -527,8 +517,7 @@  discard block
 block discarded – undo
527 517
      *
528 518
      * @return \DOMElement XML node to add to the OAI response
529 519
      */
530
-    protected function verbIdentify()
531
-    {
520
+    protected function verbIdentify() {
532 521
         // Check for invalid arguments.
533 522
         if (count($this->piVars) > 1) {
534 523
             return $this->error('badArgument');
@@ -610,8 +599,7 @@  discard block
 block discarded – undo
610 599
      *
611 600
      * @return \DOMElement XML node to add to the OAI response
612 601
      */
613
-    protected function verbListIdentifiers()
614
-    {
602
+    protected function verbListIdentifiers() {
615 603
         // If we have a resumption token we can continue our work
616 604
         if (!empty($this->piVars['resumptionToken'])) {
617 605
             // "resumptionToken" is an exclusive argument.
@@ -650,8 +638,7 @@  discard block
 block discarded – undo
650 638
      *
651 639
      * @return \DOMElement XML node to add to the OAI response
652 640
      */
653
-    protected function verbListMetadataFormats()
654
-    {
641
+    protected function verbListMetadataFormats() {
655 642
         $resArray = [];
656 643
         // Check for invalid arguments.
657 644
         if (count($this->piVars) > 1) {
@@ -709,8 +696,7 @@  discard block
 block discarded – undo
709 696
      *
710 697
      * @return \DOMElement XML node to add to the OAI response
711 698
      */
712
-    protected function verbListRecords()
713
-    {
699
+    protected function verbListRecords() {
714 700
         // Check for invalid arguments.
715 701
         if (!empty($this->piVars['resumptionToken'])) {
716 702
             // "resumptionToken" is an exclusive argument.
@@ -750,8 +736,7 @@  discard block
 block discarded – undo
750 736
      *
751 737
      * @return \DOMElement XML node to add to the OAI response
752 738
      */
753
-    protected function verbListSets()
754
-    {
739
+    protected function verbListSets() {
755 740
         $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
756 741
             ->getQueryBuilderForTable('tx_dlf_collections');
757 742
 
@@ -807,8 +792,7 @@  discard block
 block discarded – undo
807 792
      * @return array Array of matching records
808 793
      * @throws \Exception
809 794
      */
810
-    protected function fetchDocumentUIDs()
811
-    {
795
+    protected function fetchDocumentUIDs() {
812 796
         $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
813 797
             ->getQueryBuilderForTable('tx_dlf_collections');
814 798
 
@@ -929,8 +913,7 @@  discard block
 block discarded – undo
929 913
      *
930 914
      * @return \DOMElement XML of enriched records
931 915
      */
932
-    protected function generateOutputForDocumentList(DocumentList $documentListSet)
933
-    {
916
+    protected function generateOutputForDocumentList(DocumentList $documentListSet) {
934 917
         $documentsToProcess = $documentListSet->removeRange(0, intval($this->conf['limit']));
935 918
         $verb = $this->piVars['verb'];
936 919
         $documents = $GLOBALS['TYPO3_DB']->exec_SELECT_mm_query(
@@ -1016,8 +999,7 @@  discard block
 block discarded – undo
1016 999
      *
1017 1000
      * @return \DOMElement XML for resumption token
1018 1001
      */
1019
-    protected function generateResumptionTokenForDocumentListSet(DocumentList $documentListSet)
1020
-    {
1002
+    protected function generateResumptionTokenForDocumentListSet(DocumentList $documentListSet) {
1021 1003
         if ($documentListSet->count() != 0) {
1022 1004
             $token = uniqid();
1023 1005
             $GLOBALS['TYPO3_DB']->exec_INSERTquery(
Please login to merge, or discard this patch.
Upper-Lower-Casing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
      * @var bool
37 37
      * @access protected
38 38
      */
39
-    protected $error = false;
39
+    protected $error = FALSE;
40 40
 
41 41
     /**
42 42
      * This holds the OAI DOM object
@@ -101,8 +101,8 @@  discard block
 block discarded – undo
101 101
      */
102 102
     protected function error($type)
103 103
     {
104
-        $this->error = true;
105
-        $error = $this->oai->createElementNS('http://www.openarchives.org/OAI/2.0/', 'error', htmlspecialchars($this->pi_getLL($type, $type, false), ENT_NOQUOTES, 'UTF-8'));
104
+        $this->error = TRUE;
105
+        $error = $this->oai->createElementNS('http://www.openarchives.org/OAI/2.0/', 'error', htmlspecialchars($this->pi_getLL($type, $type, FALSE), ENT_NOQUOTES, 'UTF-8'));
106 106
         $error->setAttribute('code', $type);
107 107
         return $error;
108 108
     }
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
      */
291 291
     protected function getMetsData(array $metadata)
292 292
     {
293
-        $mets = null;
293
+        $mets = NULL;
294 294
         // Load METS file.
295 295
         $xml = new \DOMDocument();
296 296
         if ($xml->load($metadata['location'])) {
@@ -298,15 +298,15 @@  discard block
 block discarded – undo
298 298
             $root = $xml->getElementsByTagNameNS($this->formats['mets']['namespace'], 'mets');
299 299
             if ($root->item(0) instanceof \DOMNode) {
300 300
                 // Import node into \DOMDocument.
301
-                $mets = $this->oai->importNode($root->item(0), true);
301
+                $mets = $this->oai->importNode($root->item(0), TRUE);
302 302
             } else {
303 303
                 Helper::devLog('No METS part found in document with location "' . $metadata['location'] . '"', DEVLOG_SEVERITY_ERROR);
304 304
             }
305 305
         } else {
306 306
             Helper::devLog('Could not load XML file from "' . $metadata['location'] . '"', DEVLOG_SEVERITY_ERROR);
307 307
         }
308
-        if ($mets === null) {
309
-            $mets = $this->oai->createElementNS('http://kitodo.org/', 'kitodo:error', htmlspecialchars($this->pi_getLL('error', 'Error!', false), ENT_NOQUOTES, 'UTF-8'));
308
+        if ($mets === NULL) {
309
+            $mets = $this->oai->createElementNS('http://kitodo.org/', 'kitodo:error', htmlspecialchars($this->pi_getLL('error', 'Error!', FALSE), ENT_NOQUOTES, 'UTF-8'));
310 310
         }
311 311
         return $mets;
312 312
     }
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
         // Initialize plugin.
327 327
         $this->init($conf);
328 328
         // Turn cache off.
329
-        $this->setCache(false);
329
+        $this->setCache(FALSE);
330 330
         // Get GET and POST variables.
331 331
         $this->getUrlParams();
332 332
         // Delete expired resumption tokens.
Please login to merge, or discard this patch.
Classes/Plugin/Metadata.php 3 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
             array_unshift($metadata, $data);
131 131
         }
132 132
         if (empty($metadata)) {
133
-            Helper::devLog('No metadata found for document with UID ' . $this->doc->uid, DEVLOG_SEVERITY_WARNING);
133
+            Helper::devLog('No metadata found for document with UID '.$this->doc->uid, DEVLOG_SEVERITY_WARNING);
134 134
             return $content;
135 135
         }
136 136
         ksort($metadata);
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
             $iiifLink['value.']['wrap'] = '<dd>|</dd>';
183 183
             foreach ($metadataArray as $metadata) {
184 184
                 foreach ($metadata as $key => $group) {
185
-                    $markerArray['###METADATA###'] = '<span class="tx-dlf-metadata-group">' . $this->pi_getLL($key) . '</span>';
185
+                    $markerArray['###METADATA###'] = '<span class="tx-dlf-metadata-group">'.$this->pi_getLL($key).'</span>';
186 186
                     // Reset content object's data array.
187 187
                     $this->cObj->data = $cObjData;
188 188
                     if (!is_array($group)) {
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
                             if (empty($value) && $this->conf['getTitle'] && $this->doc->parentId) {
301 301
                                 $superiorTitle = Document::getTitle($this->doc->parentId, true);
302 302
                                 if (!empty($superiorTitle)) {
303
-                                    $value = '[' . $superiorTitle . ']';
303
+                                    $value = '['.$superiorTitle.']';
304 304
                                 }
305 305
                             }
306 306
                             if (!empty($value)) {
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -28,8 +28,7 @@  discard block
 block discarded – undo
28 28
  * @subpackage dlf
29 29
  * @access public
30 30
  */
31
-class Metadata extends \Kitodo\Dlf\Common\AbstractPlugin
32
-{
31
+class Metadata extends \Kitodo\Dlf\Common\AbstractPlugin {
33 32
     public $scriptRelPath = 'Classes/Plugin/Metadata.php';
34 33
 
35 34
     /**
@@ -50,8 +49,7 @@  discard block
 block discarded – undo
50 49
      *
51 50
      * @return string The content that is displayed on the website
52 51
      */
53
-    public function main($content, $conf)
54
-    {
52
+    public function main($content, $conf) {
55 53
         $this->init($conf);
56 54
         // Turn cache on.
57 55
         $this->setCache(true);
@@ -156,8 +154,7 @@  discard block
 block discarded – undo
156 154
      *
157 155
      * @return string The metadata array ready for output
158 156
      */
159
-    protected function printMetadata(array $metadataArray, $useOriginalIiifManifestMetadata = false)
160
-    {
157
+    protected function printMetadata(array $metadataArray, $useOriginalIiifManifestMetadata = false) {
161 158
         // Load template file.
162 159
         $this->getTemplate();
163 160
         $output = '';
Please login to merge, or discard this patch.
Upper-Lower-Casing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -54,10 +54,10 @@  discard block
 block discarded – undo
54 54
     {
55 55
         $this->init($conf);
56 56
         // Turn cache on.
57
-        $this->setCache(true);
57
+        $this->setCache(TRUE);
58 58
         // Load current document.
59 59
         $this->loadDocument();
60
-        if ($this->doc === null) {
60
+        if ($this->doc === NULL) {
61 61
             // Quit without doing anything if required variables are not set.
62 62
             return $content;
63 63
         } else {
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
      *
157 157
      * @return string The metadata array ready for output
158 158
      */
159
-    protected function printMetadata(array $metadataArray, $useOriginalIiifManifestMetadata = false)
159
+    protected function printMetadata(array $metadataArray, $useOriginalIiifManifestMetadata = FALSE)
160 160
     {
161 161
         // Load template file.
162 162
         $this->getTemplate();
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
                         if ($index_name == 'title') {
299 299
                             // Get title of parent document if needed.
300 300
                             if (empty($value) && $this->conf['getTitle'] && $this->doc->parentId) {
301
-                                $superiorTitle = Document::getTitle($this->doc->parentId, true);
301
+                                $superiorTitle = Document::getTitle($this->doc->parentId, TRUE);
302 302
                                 if (!empty($superiorTitle)) {
303 303
                                     $value = '[' . $superiorTitle . ']';
304 304
                                 }
@@ -308,7 +308,7 @@  discard block
 block discarded – undo
308 308
                                 // Link title to pageview.
309 309
                                 if ($this->conf['linkTitle'] && $metadata['_id']) {
310 310
                                     $details = $this->doc->getLogicalStructure($metadata['_id']);
311
-                                    $value = $this->pi_linkTP($value, [$this->prefixId => ['id' => $this->doc->uid, 'page' => (!empty($details['points']) ? intval($details['points']) : 1)]], true, $this->conf['targetPid']);
311
+                                    $value = $this->pi_linkTP($value, [$this->prefixId => ['id' => $this->doc->uid, 'page' => (!empty($details['points']) ? intval($details['points']) : 1)]], TRUE, $this->conf['targetPid']);
312 312
                                 }
313 313
                             }
314 314
                         } elseif ($index_name == 'owner' && !empty($value)) {
@@ -354,6 +354,6 @@  discard block
 block discarded – undo
354 354
                 $output .= $this->templateService->substituteMarkerArray($subpart['block'], $markerArray);
355 355
             }
356 356
         }
357
-        return $this->templateService->substituteSubpart($this->template, '###BLOCK###', $output, true);
357
+        return $this->templateService->substituteSubpart($this->template, '###BLOCK###', $output, TRUE);
358 358
     }
359 359
 }
Please login to merge, or discard this patch.
Classes/Plugin/Calendar.php 3 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 Calendar extends \Kitodo\Dlf\Common\AbstractPlugin
29
-{
28
+class Calendar extends \Kitodo\Dlf\Common\AbstractPlugin {
30 29
     public $scriptRelPath = 'Classes/Plugin/Calendar.php';
31 30
 
32 31
     /**
@@ -47,8 +46,7 @@  discard block
 block discarded – undo
47 46
      *
48 47
      * @return string The content that is displayed on the website
49 48
      */
50
-    public function main($content, $conf)
51
-    {
49
+    public function main($content, $conf) {
52 50
         $this->init($conf);
53 51
 
54 52
         // Set initial document (anchor or year file) if configured.
@@ -95,8 +93,7 @@  discard block
 block discarded – undo
95 93
      *
96 94
      * @return string The content that is displayed on the website
97 95
      */
98
-    public function calendar($content, $conf)
99
-    {
96
+    public function calendar($content, $conf) {
100 97
         $this->init($conf);
101 98
         // Load current document.
102 99
         $this->loadDocument();
@@ -241,8 +238,7 @@  discard block
 block discarded – undo
241 238
      *
242 239
      * @return string Content for template subpart
243 240
      */
244
-    protected function getCalendarYear($calendarIssuesByMonth, $year, $firstMonth = 1, $lastMonth = 12)
245
-    {
241
+    protected function getCalendarYear($calendarIssuesByMonth, $year, $firstMonth = 1, $lastMonth = 12) {
246 242
         // Get subpart templates.
247 243
         $subPartContent = '';
248 244
         $subParts['month'] = $this->templateService->getSubpart($this->template, '###CALMONTH###');
@@ -360,8 +356,7 @@  discard block
 block discarded – undo
360 356
      *
361 357
      * @return string The content that is displayed on the website
362 358
      */
363
-    public function years($content, $conf)
364
-    {
359
+    public function years($content, $conf) {
365 360
         $this->init($conf);
366 361
         // Load current document.
367 362
         $this->loadDocument();
Please login to merge, or discard this patch.
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
                 $_day = date('j', $dateTimestamp);
158 158
                 $calendarIssuesByYear[$_year][$_month][$_day][] = $issue;
159 159
             } else {
160
-                Helper::devLog('Document with UID ' . $issue['uid'] . 'has no valid date of publication', DEVLOG_SEVERITY_WARNING);
160
+                Helper::devLog('Document with UID '.$issue['uid'].'has no valid date of publication', DEVLOG_SEVERITY_WARNING);
161 161
             }
162 162
         }
163 163
         // Sort by years.
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
             'parameter' => $GLOBALS['TSFE']->id,
207 207
             'forceAbsoluteUrl' => !empty($this->conf['forceAbsoluteUrl']) ? 1 : 0,
208 208
             'forceAbsoluteUrl.' => ['scheme' => !empty($this->conf['forceAbsoluteUrl']) && !empty($this->conf['forceAbsoluteUrlHttps']) ? 'https' : 'http'],
209
-            'additionalParams' => '&' . $this->prefixId . '[id]=' . urlencode($this->doc->uid),
209
+            'additionalParams' => '&'.$this->prefixId.'[id]='.urlencode($this->doc->uid),
210 210
         ];
211 211
         $linkTitleData = $this->doc->getTitledata();
212 212
         $linkTitle = !empty($linkTitleData['mets_orderlabel'][0]) ? $linkTitleData['mets_orderlabel'][0] : $linkTitleData['mets_label'][0];
@@ -217,9 +217,9 @@  discard block
 block discarded – undo
217 217
             'parameter' => $GLOBALS['TSFE']->id,
218 218
             'forceAbsoluteUrl' => !empty($this->conf['forceAbsoluteUrl']) ? 1 : 0,
219 219
             'forceAbsoluteUrl.' => ['scheme' => !empty($this->conf['forceAbsoluteUrl']) && !empty($this->conf['forceAbsoluteUrlHttps']) ? 'https' : 'http'],
220
-            'additionalParams' => '&' . $this->prefixId . '[id]=' . urlencode($this->doc->parentId),
220
+            'additionalParams' => '&'.$this->prefixId.'[id]='.urlencode($this->doc->parentId),
221 221
         ];
222
-        $allYearsLink = $this->cObj->typoLink($this->pi_getLL('allYears', '', true) . ' ' . $this->doc->getTitle($this->doc->parentId), $linkConf);
222
+        $allYearsLink = $this->cObj->typoLink($this->pi_getLL('allYears', '', true).' '.$this->doc->getTitle($this->doc->parentId), $linkConf);
223 223
         // Fill marker array.
224 224
         $markerArray = [
225 225
             '###CALENDARVIEWACTIVE###' => count($this->allIssues) > 5 ? 'active' : '',
@@ -260,19 +260,19 @@  discard block
 block discarded – undo
260 260
                 '###DAYFRI_NAME###' => strftime('%a', strtotime('last Friday')),
261 261
                 '###DAYSAT_NAME###' => strftime('%a', strtotime('last Saturday')),
262 262
                 '###DAYSUN_NAME###' => strftime('%a', strtotime('last Sunday')),
263
-                '###MONTHNAME###'  => strftime('%B', strtotime($year . '-' . $i . '-1')) . ' ' . $year,
264
-                '###CALYEAR###' => ($i == $firstMonth) ? '<div class="year">' . $year . '</div>' : ''
263
+                '###MONTHNAME###'  => strftime('%B', strtotime($year.'-'.$i.'-1')).' '.$year,
264
+                '###CALYEAR###' => ($i == $firstMonth) ? '<div class="year">'.$year.'</div>' : ''
265 265
             ];
266 266
             // Fill the month markers.
267 267
             $subPartContentMonth = $this->templateService->substituteMarkerArray($subParts['month'], $markerArray);
268 268
             // Reset week content of new month.
269 269
             $subPartContentWeek = '';
270
-            $firstOfMonth = strtotime($year . '-' . $i . '-1');
270
+            $firstOfMonth = strtotime($year.'-'.$i.'-1');
271 271
             $lastOfMonth = strtotime('last day of', ($firstOfMonth));
272 272
             $firstOfMonthStart = strtotime('last Monday', $firstOfMonth);
273 273
             // There are never more than 6 weeks in a month.
274 274
             for ($j = 0; $j <= 5; $j++) {
275
-                $firstDayOfWeek = strtotime('+ ' . $j . ' Week', $firstOfMonthStart);
275
+                $firstDayOfWeek = strtotime('+ '.$j.' Week', $firstOfMonthStart);
276 276
                 $weekArray = [
277 277
                     '###DAYMON###' => '&nbsp;',
278 278
                     '###DAYTUE###' => '&nbsp;',
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
                 ];
285 285
                 // Every week has seven days. ;-)
286 286
                 for ($k = 0; $k <= 6; $k++) {
287
-                    $currentDayTime = strtotime('+ ' . $k . ' Day', $firstDayOfWeek);
287
+                    $currentDayTime = strtotime('+ '.$k.' Day', $firstDayOfWeek);
288 288
                     if (
289 289
                         $currentDayTime >= $firstOfMonth
290 290
                         && $currentDayTime <= $lastOfMonth
@@ -304,7 +304,7 @@  discard block
 block discarded – undo
304 304
                                             'parameter' => $this->conf['targetPid'],
305 305
                                             'forceAbsoluteUrl' => !empty($this->conf['forceAbsoluteUrl']) ? 1 : 0,
306 306
                                             'forceAbsoluteUrl.' => ['scheme' => !empty($this->conf['forceAbsoluteUrl']) && !empty($this->conf['forceAbsoluteUrlHttps']) ? 'https' : 'http'],
307
-                                            'additionalParams' => '&' . $this->prefixId . '[id]=' . urlencode($issue['uid']),
307
+                                            'additionalParams' => '&'.$this->prefixId.'[id]='.urlencode($issue['uid']),
308 308
                                             'ATagParams' => ' class="title"',
309 309
                                         ];
310 310
                                         $dayLinksText[] = $this->cObj->typoLink($dayLinkLabel, $linkConf);
@@ -316,13 +316,13 @@  discard block
 block discarded – undo
316 316
                             if (!empty($dayLinksText)) {
317 317
                                 $dayLinksList = '<ul>';
318 318
                                 foreach ($dayLinksText as $link) {
319
-                                    $dayLinksList .= '<li>' . $link . '</li>';
319
+                                    $dayLinksList .= '<li>'.$link.'</li>';
320 320
                                 }
321 321
                                 $dayLinksList .= '</ul>';
322 322
                             }
323
-                            $dayLinkDiv = '<div class="issues"><h4>' . strftime('%d', $currentDayTime) . '</h4><div>' . $dayLinksList . '</div></div>';
323
+                            $dayLinkDiv = '<div class="issues"><h4>'.strftime('%d', $currentDayTime).'</h4><div>'.$dayLinksList.'</div></div>';
324 324
                         }
325
-                        switch (strftime('%w', strtotime('+ ' . $k . ' Day', $firstDayOfWeek))) {
325
+                        switch (strftime('%w', strtotime('+ '.$k.' Day', $firstDayOfWeek))) {
326 326
                             case '0':
327 327
                                 $weekArray['###DAYSUN###'] = ((int) $dayLinks === (int) date('j', $currentDayTime)) ? $dayLinkDiv : strftime('%d', $currentDayTime);
328 328
                                 break;
@@ -418,8 +418,8 @@  discard block
 block discarded – undo
418 418
                     'parameter' => $GLOBALS['TSFE']->id,
419 419
                     'forceAbsoluteUrl' => !empty($this->conf['forceAbsoluteUrl']) ? 1 : 0,
420 420
                     'forceAbsoluteUrl.' => ['scheme' => !empty($this->conf['forceAbsoluteUrl']) && !empty($this->conf['forceAbsoluteUrlHttps']) ? 'https' : 'http'],
421
-                    'additionalParams' => '&' . $this->prefixId . '[id]=' . urlencode($year['uid']),
422
-                    'title' => $titleAnchor . ': ' . $year['title']
421
+                    'additionalParams' => '&'.$this->prefixId.'[id]='.urlencode($year['uid']),
422
+                    'title' => $titleAnchor.': '.$year['title']
423 423
                 ];
424 424
                 $yearArray = [
425 425
                     '###YEARNAME###' => $this->cObj->typoLink($year['title'], $linkConf),
@@ -433,9 +433,9 @@  discard block
 block discarded – undo
433 433
             'parameter' => $GLOBALS['TSFE']->id,
434 434
             'forceAbsoluteUrl' => !empty($this->conf['forceAbsoluteUrl']) ? 1 : 0,
435 435
             'forceAbsoluteUrl.' => ['scheme' => !empty($this->conf['forceAbsoluteUrl']) && !empty($this->conf['forceAbsoluteUrlHttps']) ? 'https' : 'http'],
436
-            'additionalParams' => '&' . $this->prefixId . '[id]=' . $this->doc->uid,
436
+            'additionalParams' => '&'.$this->prefixId.'[id]='.$this->doc->uid,
437 437
         ];
438
-        $allYearsLink = $this->cObj->typoLink($this->pi_getLL('allYears', '', true) . ' ' . $this->doc->getTitle($this->doc->uid), $linkConf);
438
+        $allYearsLink = $this->cObj->typoLink($this->pi_getLL('allYears', '', true).' '.$this->doc->getTitle($this->doc->uid), $linkConf);
439 439
         // Fill markers.
440 440
         $markerArray = [
441 441
             '###LABEL_CHOOSE_YEAR###' => $this->pi_getLL('label.please_choose_year'),
Please login to merge, or discard this patch.
Upper-Lower-Casing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 
59 59
         // Load current document.
60 60
         $this->loadDocument();
61
-        if ($this->doc === null) {
61
+        if ($this->doc === NULL) {
62 62
             // Quit without doing anything if required variables are not set.
63 63
             return $content;
64 64
         }
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
         $this->init($conf);
101 101
         // Load current document.
102 102
         $this->loadDocument();
103
-        if ($this->doc === null) {
103
+        if ($this->doc === NULL) {
104 104
             // Quit without doing anything if required variables are not set.
105 105
             return $content;
106 106
         }
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
                 $title = $resArray['title'];
138 138
             } else {
139 139
                 $title = !empty($resArray['label']) ? $resArray['label'] : $resArray['orderlabel'];
140
-                if (strtotime($title) !== false) {
140
+                if (strtotime($title) !== FALSE) {
141 141
                     $title = strftime('%x', strtotime($title));
142 142
                 }
143 143
             }
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
         $calendarIssuesByYear = [];
152 152
         foreach ($issues as $issue) {
153 153
             $dateTimestamp = strtotime($issue['year']);
154
-            if ($dateTimestamp !== false) {
154
+            if ($dateTimestamp !== FALSE) {
155 155
                 $_year = date('Y', $dateTimestamp);
156 156
                 $_month = date('n', $dateTimestamp);
157 157
                 $_day = date('j', $dateTimestamp);
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
             'forceAbsoluteUrl.' => ['scheme' => !empty($this->conf['forceAbsoluteUrl']) && !empty($this->conf['forceAbsoluteUrlHttps']) ? 'https' : 'http'],
220 220
             'additionalParams' => '&' . $this->prefixId . '[id]=' . urlencode($this->doc->parentId),
221 221
         ];
222
-        $allYearsLink = $this->cObj->typoLink($this->pi_getLL('allYears', '', true) . ' ' . $this->doc->getTitle($this->doc->parentId), $linkConf);
222
+        $allYearsLink = $this->cObj->typoLink($this->pi_getLL('allYears', '', TRUE) . ' ' . $this->doc->getTitle($this->doc->parentId), $linkConf);
223 223
         // Fill marker array.
224 224
         $markerArray = [
225 225
             '###CALENDARVIEWACTIVE###' => count($this->allIssues) > 5 ? 'active' : '',
@@ -371,7 +371,7 @@  discard block
 block discarded – undo
371 371
         $this->init($conf);
372 372
         // Load current document.
373 373
         $this->loadDocument();
374
-        if ($this->doc === null) {
374
+        if ($this->doc === NULL) {
375 375
             // Quit without doing anything if required variables are not set.
376 376
             return $content;
377 377
         }
@@ -435,7 +435,7 @@  discard block
 block discarded – undo
435 435
             'forceAbsoluteUrl.' => ['scheme' => !empty($this->conf['forceAbsoluteUrl']) && !empty($this->conf['forceAbsoluteUrlHttps']) ? 'https' : 'http'],
436 436
             'additionalParams' => '&' . $this->prefixId . '[id]=' . $this->doc->uid,
437 437
         ];
438
-        $allYearsLink = $this->cObj->typoLink($this->pi_getLL('allYears', '', true) . ' ' . $this->doc->getTitle($this->doc->uid), $linkConf);
438
+        $allYearsLink = $this->cObj->typoLink($this->pi_getLL('allYears', '', TRUE) . ' ' . $this->doc->getTitle($this->doc->uid), $linkConf);
439 439
         // Fill markers.
440 440
         $markerArray = [
441 441
             '###LABEL_CHOOSE_YEAR###' => $this->pi_getLL('label.please_choose_year'),
Please login to merge, or discard this patch.
Classes/Plugin/Basket.php 3 patches
Spacing   +47 added lines, -47 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
             $query = $GLOBALS['TYPO3_DB']->SELECTquery(
56 56
                 '*',
57 57
                 'tx_dlf_basket',
58
-                'tx_dlf_basket.fe_user_id=' . intval($insertArray['fe_user_id'])
58
+                'tx_dlf_basket.fe_user_id='.intval($insertArray['fe_user_id'])
59 59
                     . Helper::whereClause('tx_dlf_basket'),
60 60
                 '',
61 61
                 '',
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
             $query = $GLOBALS['TYPO3_DB']->SELECTquery(
69 69
                 '*',
70 70
                 'tx_dlf_basket',
71
-                'tx_dlf_basket.session_id=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($sessionId, 'tx_dlf_basket')
71
+                'tx_dlf_basket.session_id='.$GLOBALS['TYPO3_DB']->fullQuoteStr($sessionId, 'tx_dlf_basket')
72 72
                     . Helper::whereClause('tx_dlf_basket'),
73 73
                 '',
74 74
                 '',
@@ -157,9 +157,9 @@  discard block
 block discarded – undo
157 157
 
158 158
         if ($resultMail->rowCount() > 0) {
159 159
             $mailForm = '<select name="tx_dlf[mail_action]">';
160
-            $mailForm .= '<option value="">' . $this->pi_getLL('chooseMail', '', true) . '</option>';
160
+            $mailForm .= '<option value="">'.$this->pi_getLL('chooseMail', '', true).'</option>';
161 161
             while ($row = $resultMail->fetch()) {
162
-                $mailForm .= '<option value="' . $row['uid'] . '">' . $row['name'] . ' (' . $row['mail'] . ')</option>';
162
+                $mailForm .= '<option value="'.$row['uid'].'">'.$row['name'].' ('.$row['mail'].')</option>';
163 163
             }
164 164
             $mailForm .= '</select><input type="submit">';
165 165
         }
@@ -168,9 +168,9 @@  discard block
 block discarded – undo
168 168
         // remove action form
169 169
         $markerArray['###REMOVEACTION###'] = '
170 170
    <select name="tx_dlf[basket_action]">
171
-    <option value="">' . $this->pi_getLL('chooseAction', '', true) . '</option>
172
-    <option value="open">' . $this->pi_getLL('download', '', true) . '</option>
173
-    <option value="remove">' . $this->pi_getLL('remove', '', true) . '</option>
171
+    <option value="">' . $this->pi_getLL('chooseAction', '', true).'</option>
172
+    <option value="open">' . $this->pi_getLL('download', '', true).'</option>
173
+    <option value="remove">' . $this->pi_getLL('remove', '', true).'</option>
174 174
    </select>
175 175
    <input type="submit">
176 176
   ';
@@ -191,9 +191,9 @@  discard block
 block discarded – undo
191 191
         $printForm = '';
192 192
         if ($resultPrinter->rowCount() > 0) {
193 193
             $printForm = '<select name="tx_dlf[print_action]">';
194
-            $printForm .= '<option value="">' . $this->pi_getLL('choosePrinter', '', true) . '</option>';
194
+            $printForm .= '<option value="">'.$this->pi_getLL('choosePrinter', '', true).'</option>';
195 195
             while ($row = $resultPrinter->fetch()) {
196
-                $printForm .= '<option value="' . $row['uid'] . '">' . $row['label'] . '</option>';
196
+                $printForm .= '<option value="'.$row['uid'].'">'.$row['label'].'</option>';
197 197
             }
198 198
             $printForm .= '</select><input type="submit" />';
199 199
         }
@@ -248,23 +248,23 @@  discard block
 block discarded – undo
248 248
         $rotation = $data['rotation'];
249 249
         $docData = $this->getDocumentData($id, $data);
250 250
         $markerArray['###BASKETDATA###'] = $docData['downloadLink'];
251
-        $arrayKey = $id . '_' . $startpage;
251
+        $arrayKey = $id.'_'.$startpage;
252 252
         if (isset($startX)) {
253
-            $arrayKey .= '_' . $startX;
253
+            $arrayKey .= '_'.$startX;
254 254
         }
255 255
         if (isset($endX)) {
256
-            $arrayKey .= '_' . $endX;
256
+            $arrayKey .= '_'.$endX;
257 257
         }
258
-        $controlMark = '<input value="' . $id . '" name="tx_dlf[selected][' . $arrayKey . '][id]" type="checkbox">';
259
-        $controlMark .= '<input value="' . $startpage . '" name="tx_dlf[selected][' . $arrayKey . '][startpage]" type="hidden">';
260
-        $controlMark .= '<input value="' . $endpage . '" name="tx_dlf[selected][' . $arrayKey . '][endpage]" type="hidden">';
258
+        $controlMark = '<input value="'.$id.'" name="tx_dlf[selected]['.$arrayKey.'][id]" type="checkbox">';
259
+        $controlMark .= '<input value="'.$startpage.'" name="tx_dlf[selected]['.$arrayKey.'][startpage]" type="hidden">';
260
+        $controlMark .= '<input value="'.$endpage.'" name="tx_dlf[selected]['.$arrayKey.'][endpage]" type="hidden">';
261 261
         // add hidden fields for detail information
262 262
         if ($startX) {
263
-            $controlMark .= '<input type="hidden" name="tx_dlf[selected][' . $arrayKey . '][startX]" value="' . $startX . '">';
264
-            $controlMark .= '<input type="hidden" name="tx_dlf[selected][' . $arrayKey . '][startY]"  value="' . $startY . '">';
265
-            $controlMark .= '<input type="hidden" name="tx_dlf[selected][' . $arrayKey . '][endX]"  value="' . $endX . '">';
266
-            $controlMark .= '<input type="hidden" name="tx_dlf[selected][' . $arrayKey . '][endY]"  value="' . $endY . '">';
267
-            $controlMark .= '<input type="hidden" name="tx_dlf[selected][' . $arrayKey . '][rotation]"  value="' . $rotation . '">';
263
+            $controlMark .= '<input type="hidden" name="tx_dlf[selected]['.$arrayKey.'][startX]" value="'.$startX.'">';
264
+            $controlMark .= '<input type="hidden" name="tx_dlf[selected]['.$arrayKey.'][startY]"  value="'.$startY.'">';
265
+            $controlMark .= '<input type="hidden" name="tx_dlf[selected]['.$arrayKey.'][endX]"  value="'.$endX.'">';
266
+            $controlMark .= '<input type="hidden" name="tx_dlf[selected]['.$arrayKey.'][endY]"  value="'.$endY.'">';
267
+            $controlMark .= '<input type="hidden" name="tx_dlf[selected]['.$arrayKey.'][rotation]"  value="'.$rotation.'">';
268 268
         }
269 269
         // return one entry
270 270
         $markerArray['###CONTROLS###'] = $controlMark;
@@ -320,12 +320,12 @@  discard block
 block discarded – undo
320 320
             if ($_piVars['addToBasket'] == 'list') {
321 321
                 $documentItem['endpage'] = $document->numPages;
322 322
             }
323
-            $arrayKey = $documentItem['id'] . '_' . $page;
323
+            $arrayKey = $documentItem['id'].'_'.$page;
324 324
             if (!empty($documentItem['startX'])) {
325
-                $arrayKey .= '_' . $documentItem['startX'];
325
+                $arrayKey .= '_'.$documentItem['startX'];
326 326
             }
327 327
             if (!empty($documentItem['endX'])) {
328
-                $arrayKey .= '_' . $documentItem['endX'];
328
+                $arrayKey .= '_'.$documentItem['endX'];
329 329
             }
330 330
             // do not add more than one identical object
331 331
             if (!in_array($arrayKey, $items)) {
@@ -344,14 +344,14 @@  discard block
 block discarded – undo
344 344
                     // remove parameter endpage
345 345
                     $pdfParams = str_replace(",##endpage##", '', $pdfParams);
346 346
                 }
347
-                $pdfGenerateUrl = $this->conf['pdfgenerate'] . $pdfParams;
347
+                $pdfGenerateUrl = $this->conf['pdfgenerate'].$pdfParams;
348 348
                 if ($this->conf['pregeneration']) {
349 349
                     // send ajax request to webapp
350 350
                     $output .= '
351 351
      <script>
352 352
       $(document).ready(function(){
353 353
        $.ajax({
354
-         url: "' . $pdfGenerateUrl . '",
354
+         url: "' . $pdfGenerateUrl.'",
355 355
        }).done(function() {
356 356
        });
357 357
       });
@@ -359,7 +359,7 @@  discard block
 block discarded – undo
359 359
                 }
360 360
             }
361 361
             $update = ['doc_ids' => json_encode($items)];
362
-            $GLOBALS['TYPO3_DB']->exec_UPDATEquery('tx_dlf_basket', 'uid=' . intval($basketData['uid']), $update);
362
+            $GLOBALS['TYPO3_DB']->exec_UPDATEquery('tx_dlf_basket', 'uid='.intval($basketData['uid']), $update);
363 363
             $basketData['doc_ids'] = $items;
364 364
         }
365 365
         return ['basketData' => $basketData, 'jsOutput' => $output];
@@ -383,12 +383,12 @@  discard block
 block discarded – undo
383 383
         }
384 384
         foreach ($_piVars['selected'] as $value) {
385 385
             if (isset($value['id'])) {
386
-                $arrayKey = $value['id'] . '_' . $value['startpage'];
386
+                $arrayKey = $value['id'].'_'.$value['startpage'];
387 387
                 if (isset($value['startX'])) {
388
-                    $arrayKey .= '_' . $value['startX'];
388
+                    $arrayKey .= '_'.$value['startX'];
389 389
                 }
390 390
                 if (isset($value['endX'])) {
391
-                    $arrayKey .= '_' . $value['endX'];
391
+                    $arrayKey .= '_'.$value['endX'];
392 392
                 }
393 393
                 if (isset($items[$arrayKey])) {
394 394
                     unset($items[$arrayKey]);
@@ -400,7 +400,7 @@  discard block
 block discarded – undo
400 400
         } else {
401 401
             $update = ['doc_ids' => json_encode($items)];
402 402
         }
403
-        $GLOBALS['TYPO3_DB']->exec_UPDATEquery('tx_dlf_basket', 'uid=' . intval($basketData['uid']), $update);
403
+        $GLOBALS['TYPO3_DB']->exec_UPDATEquery('tx_dlf_basket', 'uid='.intval($basketData['uid']), $update);
404 404
         $basketData['doc_ids'] = $items;
405 405
         return $basketData;
406 406
     }
@@ -421,10 +421,10 @@  discard block
 block discarded – undo
421 421
         foreach ($this->piVars['selected'] as $docValue) {
422 422
             if ($docValue['id']) {
423 423
                 $docData = $this->getDocumentData($docValue['id'], $docValue);
424
-                $pdfUrl .= $docData['urlParams'] . $this->conf['pdfparamseparator'];
424
+                $pdfUrl .= $docData['urlParams'].$this->conf['pdfparamseparator'];
425 425
             }
426 426
         }
427
-        header('Location: ' . $pdfUrl);
427
+        header('Location: '.$pdfUrl);
428 428
         ob_end_flush();
429 429
         exit;
430 430
     }
@@ -458,7 +458,7 @@  discard block
 block discarded – undo
458 458
             $urlParams = str_replace("##endx##", $data['endX'] === "" ? "" : intval($data['endX']), $urlParams);
459 459
             $urlParams = str_replace("##endy##", $data['endY'] === "" ? "" : intval($data['endY']), $urlParams);
460 460
             $urlParams = str_replace("##rotation##", $data['rotation'] === "" ? "" : intval($data['rotation']), $urlParams);
461
-            $downloadUrl = $this->conf['pdfgenerate'] . $urlParams;
461
+            $downloadUrl = $this->conf['pdfgenerate'].$urlParams;
462 462
             $title = $document->getTitle($id, true);
463 463
             if (empty($title)) {
464 464
                 $title = $this->pi_getLL('noTitle', '', true);
@@ -467,15 +467,15 @@  discard block
 block discarded – undo
467 467
             $info = '';
468 468
             if ($data['startX'] != '' && $data['endX'] != '') {
469 469
                 // cutout
470
-                $info .= $this->pi_getLL('cutout', '', true) . ' ';
470
+                $info .= $this->pi_getLL('cutout', '', true).' ';
471 471
             }
472 472
             if ($data['startpage'] == $data['endpage']) {
473 473
                 // One page
474
-                $info .= $this->pi_getLL('page', '', true) . ' ' . $data['startpage'];
474
+                $info .= $this->pi_getLL('page', '', true).' '.$data['startpage'];
475 475
             } else {
476
-                $info .= $this->pi_getLL('page', '', true) . ' ' . $data['startpage'] . '-' . $data['endpage'];
476
+                $info .= $this->pi_getLL('page', '', true).' '.$data['startpage'].'-'.$data['endpage'];
477 477
             }
478
-            $downloadLink = '<a href="' . $downloadUrl . '" target="_blank">' . $title . '</a> (' . $info . ')';
478
+            $downloadLink = '<a href="'.$downloadUrl.'" target="_blank">'.$title.'</a> ('.$info.')';
479 479
             if ($data['startpage'] == $data['endpage']) {
480 480
                 $pageNums = 1;
481 481
             } else {
@@ -520,7 +520,7 @@  discard block
 block discarded – undo
520 520
 
521 521
         $allResults = $resultMail->fetchAll();
522 522
         $mailData = $allResults[0];
523
-        $mailText = $this->pi_getLL('mailBody', '', true) . "\n";
523
+        $mailText = $this->pi_getLL('mailBody', '', true)."\n";
524 524
         $numberOfPages = 0;
525 525
         $pdfUrl = $this->conf['pdfdownload'];
526 526
         // prepare links
@@ -528,7 +528,7 @@  discard block
 block discarded – undo
528 528
             if ($docValue['id']) {
529 529
                 $explodeId = explode("_", $docValue['id']);
530 530
                 $docData = $this->getDocumentData($explodeId[0], $docValue);
531
-                $pdfUrl .= $docData['urlParams'] . $this->conf['pdfparamseparator'];
531
+                $pdfUrl .= $docData['urlParams'].$this->conf['pdfparamseparator'];
532 532
                 $pages = (abs(intval($docValue['startpage']) - intval($docValue['endpage'])));
533 533
                 if ($pages === 0) {
534 534
                     $numberOfPages = $numberOfPages + 1;
@@ -539,7 +539,7 @@  discard block
 block discarded – undo
539 539
         }
540 540
         // Remove leading/tailing pdfparamseperator
541 541
         $pdfUrl = trim($pdfUrl, $this->conf['pdfparamseparator']);
542
-        $mailBody = $mailText . $pdfUrl;
542
+        $mailBody = $mailText.$pdfUrl;
543 543
         // Get hook objects.
544 544
         $hookObjects = Helper::getHookObjects($this->scriptRelPath);
545 545
         // Hook for getting a customized mail body.
@@ -572,12 +572,12 @@  discard block
 block discarded – undo
572 572
             // internal user
573 573
             $insertArray['user_id'] = $GLOBALS["TSFE"]->fe_user->user['uid'];
574 574
             $insertArray['name'] = $GLOBALS["TSFE"]->fe_user->user['username'];
575
-            $insertArray['label'] = 'Mail: ' . $mailData['mail'];
575
+            $insertArray['label'] = 'Mail: '.$mailData['mail'];
576 576
         } else {
577 577
             // external user
578 578
             $insertArray['user_id'] = 0;
579 579
             $insertArray['name'] = 'n/a';
580
-            $insertArray['label'] = 'Mail: ' . $mailData['mail'];
580
+            $insertArray['label'] = 'Mail: '.$mailData['mail'];
581 581
         }
582 582
         // add action to protocol
583 583
         $GLOBALS['TYPO3_DB']->exec_INSERTquery('tx_dlf_actionlog', $insertArray);
@@ -597,7 +597,7 @@  discard block
 block discarded – undo
597 597
         foreach ($this->piVars['selected'] as $docId => $docValue) {
598 598
             if ($docValue['id']) {
599 599
                 $docData = $this->getDocumentData($docValue['id'], $docValue);
600
-                $pdfUrl .= $docData['urlParams'] . $this->conf['pdfparamseparator'];
600
+                $pdfUrl .= $docData['urlParams'].$this->conf['pdfparamseparator'];
601 601
                 $numberOfPages += $docData['pageNums'];
602 602
             }
603 603
         }
@@ -628,7 +628,7 @@  discard block
 block discarded – undo
628 628
                 if ($docValue['id']) {
629 629
                     $explodeId = explode("_", $docId);
630 630
                     $docData = $this->getDocumentData($explodeId[0], $docValue);
631
-                    $pdfUrl .= $docData['urlParams'] . $this->conf['pdfparamseparator'];
631
+                    $pdfUrl .= $docData['urlParams'].$this->conf['pdfparamseparator'];
632 632
                     $numberOfPages += $docData['pageNums'];
633 633
                 }
634 634
             }
@@ -645,16 +645,16 @@  discard block
 block discarded – undo
645 645
             // internal user
646 646
             $insertArray['user_id'] = $GLOBALS["TSFE"]->fe_user->user['uid'];
647 647
             $insertArray['name'] = $GLOBALS["TSFE"]->fe_user->user['username'];
648
-            $insertArray['label'] = 'Print: ' . $printerData['label'];
648
+            $insertArray['label'] = 'Print: '.$printerData['label'];
649 649
         } else {
650 650
             // external user
651 651
             $insertArray['user_id'] = 0;
652 652
             $insertArray['name'] = 'n/a';
653
-            $insertArray['label'] = 'Print: ' . $printerData['label'];
653
+            $insertArray['label'] = 'Print: '.$printerData['label'];
654 654
         }
655 655
         // add action to protocol
656 656
         $GLOBALS['TYPO3_DB']->exec_INSERTquery('tx_dlf_actionlog', $insertArray);
657
-        header('Location: ' . $pdfUrl);
657
+        header('Location: '.$pdfUrl);
658 658
         ob_end_flush();
659 659
         exit;
660 660
     }
Please login to merge, or discard this patch.
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.
Upper-Lower-Casing   +20 added lines, -20 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###');
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
             );
64 64
         } else {
65 65
             $GLOBALS['TSFE']->fe_user->setKey('ses', 'tx_dlf_basket', '');
66
-            $GLOBALS['TSFE']->fe_user->sesData_change = true;
66
+            $GLOBALS['TSFE']->fe_user->sesData_change = TRUE;
67 67
             $GLOBALS['TSFE']->fe_user->storeSessionData();
68 68
             $query = $GLOBALS['TYPO3_DB']->SELECTquery(
69 69
                 '*',
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
         // set marker
133 133
         $linkToCurrentPage = $this->pi_linkTP('|');
134 134
         $markerArray['###ACTION###'] = !empty($linkToCurrentPage) ? $this->cObj->lastTypoLinkUrl : '';
135
-        $markerArray['###LISTTITLE###'] = $this->pi_getLL('basket', '', true);
135
+        $markerArray['###LISTTITLE###'] = $this->pi_getLL('basket', '', TRUE);
136 136
         if ($basketData['doc_ids']) {
137 137
             if (is_object($basketData['doc_ids'])) {
138 138
                 $basketData['doc_ids'] = get_object_vars($basketData['doc_ids']);
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
 
159 159
         if ($resultMail->rowCount() > 0) {
160 160
             $mailForm = '<select name="tx_dlf[mail_action]">';
161
-            $mailForm .= '<option value="">' . $this->pi_getLL('chooseMail', '', true) . '</option>';
161
+            $mailForm .= '<option value="">' . $this->pi_getLL('chooseMail', '', TRUE) . '</option>';
162 162
             while ($row = $resultMail->fetch()) {
163 163
                 $mailForm .= '<option value="' . $row['uid'] . '">' . $row['name'] . ' (' . $row['mail'] . ')</option>';
164 164
             }
@@ -169,9 +169,9 @@  discard block
 block discarded – undo
169 169
         // remove action form
170 170
         $markerArray['###REMOVEACTION###'] = '
171 171
    <select name="tx_dlf[basket_action]">
172
-    <option value="">' . $this->pi_getLL('chooseAction', '', true) . '</option>
173
-    <option value="open">' . $this->pi_getLL('download', '', true) . '</option>
174
-    <option value="remove">' . $this->pi_getLL('remove', '', true) . '</option>
172
+    <option value="">' . $this->pi_getLL('chooseAction', '', TRUE) . '</option>
173
+    <option value="open">' . $this->pi_getLL('download', '', TRUE) . '</option>
174
+    <option value="remove">' . $this->pi_getLL('remove', '', TRUE) . '</option>
175 175
    </select>
176 176
    <input type="submit">
177 177
   ';
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
         $printForm = '';
193 193
         if ($resultPrinter->rowCount() > 0) {
194 194
             $printForm = '<select name="tx_dlf[print_action]">';
195
-            $printForm .= '<option value="">' . $this->pi_getLL('choosePrinter', '', true) . '</option>';
195
+            $printForm .= '<option value="">' . $this->pi_getLL('choosePrinter', '', TRUE) . '</option>';
196 196
             while ($row = $resultPrinter->fetch()) {
197 197
                 $printForm .= '<option value="' . $row['uid'] . '">' . $row['label'] . '</option>';
198 198
             }
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
         }
212 212
         // basket go to
213 213
         if ($this->conf['targetBasket'] && $this->conf['basketGoToButton'] && $this->piVars['id']) {
214
-            $label = $this->pi_getLL('goBasket', '', true);
214
+            $label = $this->pi_getLL('goBasket', '', TRUE);
215 215
             $basketConf = [
216 216
                 'parameter' => $this->conf['targetBasket'],
217 217
                 'forceAbsoluteUrl' => !empty($this->conf['forceAbsoluteUrl']) ? 1 : 0,
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
         } else {
223 223
             $markerArray['###BASKET###'] = '';
224 224
         }
225
-        $content = $this->templateService->substituteMarkerArray($this->templateService->substituteSubpart($this->template, '###ENTRY###', $entries, true), $markerArray);
225
+        $content = $this->templateService->substituteMarkerArray($this->templateService->substituteSubpart($this->template, '###ENTRY###', $entries, TRUE), $markerArray);
226 226
         return $this->pi_wrapInBaseClass($content);
227 227
     }
228 228
 
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
         // return one entry
273 273
         $markerArray['###CONTROLS###'] = $controlMark;
274 274
         $markerArray['###NUMBER###'] = $docData['record_id'];
275
-        return $this->templateService->substituteMarkerArray($this->templateService->substituteSubpart($template['entry'], '###ENTRY###', '', true), $markerArray);
275
+        return $this->templateService->substituteMarkerArray($this->templateService->substituteSubpart($template['entry'], '###ENTRY###', '', TRUE), $markerArray);
276 276
     }
277 277
 
278 278
     /**
@@ -293,7 +293,7 @@  discard block
 block discarded – undo
293 293
         } else {
294 294
             $page = intval($_piVars['startpage']);
295 295
         }
296
-        if ($page != null || $_piVars['addToBasket'] == 'list') {
296
+        if ($page != NULL || $_piVars['addToBasket'] == 'list') {
297 297
             $documentItem = [
298 298
                 'id' => intval($_piVars['id']),
299 299
                 'startpage' => intval($_piVars['startpage']),
@@ -462,21 +462,21 @@  discard block
 block discarded – undo
462 462
             $urlParams = str_replace("##endy##", $data['endY'] === "" ? "" : intval($data['endY']), $urlParams);
463 463
             $urlParams = str_replace("##rotation##", $data['rotation'] === "" ? "" : intval($data['rotation']), $urlParams);
464 464
             $downloadUrl = $this->conf['pdfgenerate'] . $urlParams;
465
-            $title = $document->getTitle($id, true);
465
+            $title = $document->getTitle($id, TRUE);
466 466
             if (empty($title)) {
467
-                $title = $this->pi_getLL('noTitle', '', true);
467
+                $title = $this->pi_getLL('noTitle', '', TRUE);
468 468
             }
469 469
             // Set page and cutout information
470 470
             $info = '';
471 471
             if ($data['startX'] != '' && $data['endX'] != '') {
472 472
                 // cutout
473
-                $info .= $this->pi_getLL('cutout', '', true) . ' ';
473
+                $info .= $this->pi_getLL('cutout', '', TRUE) . ' ';
474 474
             }
475 475
             if ($data['startpage'] == $data['endpage']) {
476 476
                 // One page
477
-                $info .= $this->pi_getLL('page', '', true) . ' ' . $data['startpage'];
477
+                $info .= $this->pi_getLL('page', '', TRUE) . ' ' . $data['startpage'];
478 478
             } else {
479
-                $info .= $this->pi_getLL('page', '', true) . ' ' . $data['startpage'] . '-' . $data['endpage'];
479
+                $info .= $this->pi_getLL('page', '', TRUE) . ' ' . $data['startpage'] . '-' . $data['endpage'];
480 480
             }
481 481
             $downloadLink = '<a href="' . $downloadUrl . '" target="_blank">' . $title . '</a> (' . $info . ')';
482 482
             if ($data['startpage'] == $data['endpage']) {
@@ -492,7 +492,7 @@  discard block
 block discarded – undo
492 492
                 'record_id' => $document->recordId,
493 493
             ];
494 494
         }
495
-        return false;
495
+        return FALSE;
496 496
     }
497 497
 
498 498
     /**
@@ -523,7 +523,7 @@  discard block
 block discarded – undo
523 523
 
524 524
         $allResults = $resultMail->fetchAll();
525 525
         $mailData = $allResults[0];
526
-        $mailText = $this->pi_getLL('mailBody', '', true) . "\n";
526
+        $mailText = $this->pi_getLL('mailBody', '', TRUE) . "\n";
527 527
         $numberOfPages = 0;
528 528
         $pdfUrl = $this->conf['pdfdownload'];
529 529
         // prepare links
@@ -557,7 +557,7 @@  discard block
 block discarded – undo
557 557
         // Prepare and send the message
558 558
         $mail
559 559
             // subject
560
-            ->setSubject($this->pi_getLL('mailSubject', '', true))
560
+            ->setSubject($this->pi_getLL('mailSubject', '', TRUE))
561 561
             // Set the From address with an associative array
562 562
             ->setFrom($from)
563 563
             // Set the To addresses with an associative array
Please login to merge, or discard this patch.
Classes/Plugin/Tools/SearchInDocumentTool.php 3 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -124,7 +124,7 @@
 block discarded – undo
124 124
     protected function addSearchInDocumentJS()
125 125
     {
126 126
         $pageRenderer = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Page\PageRenderer::class);
127
-        $pageRenderer->addJsFooterFile(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey) . 'Resources/Public/Javascript/Search/SearchInDocument.js');
127
+        $pageRenderer->addJsFooterFile(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'Resources/Public/Javascript/Search/SearchInDocument.js');
128 128
     }
129 129
 
130 130
     /**
Please login to merge, or discard this patch.
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -24,8 +24,7 @@  discard block
 block discarded – undo
24 24
  * @subpackage dlf
25 25
  * @access public
26 26
  */
27
-class SearchInDocumentTool extends \Kitodo\Dlf\Common\AbstractPlugin
28
-{
27
+class SearchInDocumentTool extends \Kitodo\Dlf\Common\AbstractPlugin {
29 28
     public $scriptRelPath = 'Classes/Plugin/Tools/SearchInDocumentTool.php';
30 29
 
31 30
     /**
@@ -38,8 +37,7 @@  discard block
 block discarded – undo
38 37
      *
39 38
      * @return string The content that is displayed on the website
40 39
      */
41
-    public function main($content, $conf)
42
-    {
40
+    public function main($content, $conf) {
43 41
 
44 42
         $this->init($conf);
45 43
 
@@ -121,8 +119,7 @@  discard block
 block discarded – undo
121 119
      *
122 120
      * @return void
123 121
      */
124
-    protected function addSearchInDocumentJS()
125
-    {
122
+    protected function addSearchInDocumentJS() {
126 123
         $pageRenderer = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Page\PageRenderer::class);
127 124
         $pageRenderer->addJsFooterFile(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey) . 'Resources/Public/Javascript/Search/SearchInDocument.js');
128 125
     }
@@ -134,8 +131,7 @@  discard block
 block discarded – undo
134 131
      *
135 132
      * @return array with encrypted core name and hash
136 133
      */
137
-    protected function getEncryptedCoreName()
138
-    {
134
+    protected function getEncryptedCoreName() {
139 135
         // Get core name.
140 136
         $name = Helper::getIndexNameFromUid($this->conf['solrcore'], 'tx_dlf_solrcores');
141 137
         // Encrypt core name.
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
         // Load current document.
54 54
         $this->loadDocument();
55 55
         if (
56
-            $this->doc === null
56
+            $this->doc === NULL
57 57
             || $this->doc->numPages < 1
58 58
             || empty($this->conf['fileGrpFulltext'])
59 59
             || empty($this->conf['solrcore'])
Please login to merge, or discard this patch.
Classes/Plugin/Tools/PdfDownloadTool.php 3 patches
Braces   +4 added lines, -8 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 PdfDownloadTool extends \Kitodo\Dlf\Common\AbstractPlugin
27
-{
26
+class PdfDownloadTool extends \Kitodo\Dlf\Common\AbstractPlugin {
28 27
     public $scriptRelPath = 'Classes/Plugin/Tools/PdfDownloadTool.php';
29 28
 
30 29
     /**
@@ -37,8 +36,7 @@  discard block
 block discarded – undo
37 36
      *
38 37
      * @return string The content that is displayed on the website
39 38
      */
40
-    public function main($content, $conf)
41
-    {
39
+    public function main($content, $conf) {
42 40
         $this->init($conf);
43 41
         // Merge configuration with conf array of toolbox.
44 42
         if (!empty($this->cObj->data['conf'])) {
@@ -88,8 +86,7 @@  discard block
 block discarded – undo
88 86
      *
89 87
      * @return string Link to downloadable page
90 88
      */
91
-    protected function getPageLink()
92
-    {
89
+    protected function getPageLink() {
93 90
         $page1Link = '';
94 91
         $page2Link = '';
95 92
         $pageNumber = $this->piVars['page'];
@@ -137,8 +134,7 @@  discard block
 block discarded – undo
137 134
      *
138 135
      * @return string Link to downloadable work
139 136
      */
140
-    protected function getWorkLink()
141
-    {
137
+    protected function getWorkLink() {
142 138
         $workLink = '';
143 139
         // Get work link.
144 140
         if (!empty($this->doc->physicalStructureInfo[$this->doc->physicalStructure[0]]['files'][$this->conf['fileGrpDownload']])) {
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
         // Load current document.
48 48
         $this->loadDocument();
49 49
         if (
50
-            $this->doc === null
50
+            $this->doc === NULL
51 51
             || $this->doc->numPages < 1
52 52
             || empty($this->conf['fileGrpDownload'])
53 53
         ) {
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
             empty($page1Link)
115 115
             && empty($page2Link)
116 116
         ) {
117
-            Helper::devLog('File not found in fileGrp "' . $this->conf['fileGrpDownload'] . '"', DEVLOG_SEVERITY_WARNING);
117
+            Helper::devLog('File not found in fileGrp "'.$this->conf['fileGrpDownload'].'"', DEVLOG_SEVERITY_WARNING);
118 118
         }
119 119
         // Wrap URLs with HTML.
120 120
         $linkConf = [
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
             $linkConf['title'] = $this->pi_getLL('rightPage', '');
137 137
             $page2Link = $this->cObj->typoLink($this->pi_getLL('rightPage', ''), $linkConf);
138 138
         }
139
-        return $page1Link . $page2Link;
139
+        return $page1Link.$page2Link;
140 140
     }
141 141
 
142 142
     /**
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
             ];
169 169
             $workLink = $this->cObj->typoLink($this->pi_getLL('work', ''), $linkConf);
170 170
         } else {
171
-            Helper::devLog('File not found in fileGrp "' . $this->conf['fileGrpDownload'] . '"', DEVLOG_SEVERITY_WARNING);
171
+            Helper::devLog('File not found in fileGrp "'.$this->conf['fileGrpDownload'].'"', DEVLOG_SEVERITY_WARNING);
172 172
         }
173 173
         return $workLink;
174 174
     }
Please login to merge, or discard this patch.
Classes/Plugin/Tools/ImageDownloadTool.php 3 patches
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -22,8 +22,7 @@  discard block
 block discarded – undo
22 22
  * @subpackage dlf
23 23
  * @access public
24 24
  */
25
-class ImageDownloadTool extends \Kitodo\Dlf\Common\AbstractPlugin
26
-{
25
+class ImageDownloadTool extends \Kitodo\Dlf\Common\AbstractPlugin {
27 26
     public $scriptRelPath = 'Classes/Plugin/Tools/ImageDownloadTool.php';
28 27
 
29 28
     /**
@@ -36,8 +35,7 @@  discard block
 block discarded – undo
36 35
      *
37 36
      * @return string The content that is displayed on the website
38 37
      */
39
-    public function main($content, $conf)
40
-    {
38
+    public function main($content, $conf) {
41 39
         $this->init($conf);
42 40
         // Merge configuration with conf array of toolbox.
43 41
         if (!empty($this->cObj->data['conf'])) {
@@ -90,8 +88,7 @@  discard block
 block discarded – undo
90 88
      *
91 89
      * @return string Link to image file with given label
92 90
      */
93
-    protected function getImage($page, $label)
94
-    {
91
+    protected function getImage($page, $label) {
95 92
         $image = [];
96 93
         // Get @USE value of METS fileGrp.
97 94
         $fileGrps = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->conf['fileGrpsImageDownload']);
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
         // Load current document.
47 47
         $this->loadDocument();
48 48
         if (
49
-            $this->doc === null
49
+            $this->doc === NULL
50 50
             || $this->doc->numPages < 1
51 51
             || empty($this->conf['fileGrpsImageDownload'])
52 52
         ) {
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -114,13 +114,13 @@
 block discarded – undo
114 114
                     'parameter' => $image['url'],
115 115
                     'forceAbsoluteUrl' => !empty($this->conf['forceAbsoluteUrl']) ? 1 : 0,
116 116
                     'forceAbsoluteUrl.' => ['scheme' => !empty($this->conf['forceAbsoluteUrl']) && !empty($this->conf['forceAbsoluteUrlHttps']) ? 'https' : 'http'],
117
-                    'title' => $label . ' ' . $mimetypeLabel,
117
+                    'title' => $label.' '.$mimetypeLabel,
118 118
                     'additionalParams' => '',
119 119
                 ];
120
-                $imageLink = $this->cObj->typoLink($label . ' ' . $mimetypeLabel, $linkConf);
120
+                $imageLink = $this->cObj->typoLink($label.' '.$mimetypeLabel, $linkConf);
121 121
                 break;
122 122
             } else {
123
-                Helper::devLog('File not found in fileGrp "' . $fileGrp . '"', DEVLOG_SEVERITY_WARNING);
123
+                Helper::devLog('File not found in fileGrp "'.$fileGrp.'"', DEVLOG_SEVERITY_WARNING);
124 124
             }
125 125
         }
126 126
         return $imageLink;
Please login to merge, or discard this patch.
Classes/Plugin/PageGrid.php 3 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -55,9 +55,9 @@  discard block
 block discarded – undo
55 55
         } elseif (!empty($this->conf['placeholder'])) {
56 56
             $thumbnailFile = $GLOBALS['TSFE']->tmpl->getFileName($this->conf['placeholder']);
57 57
         } else {
58
-            $thumbnailFile = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey) . 'Resources/Public/Images/PageGridPlaceholder.jpg';
58
+            $thumbnailFile = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'Resources/Public/Images/PageGridPlaceholder.jpg';
59 59
         }
60
-        $thumbnail = '<img alt="' . $markerArray['###PAGINATION###'] . '" src="' . $thumbnailFile . '" />';
60
+        $thumbnail = '<img alt="'.$markerArray['###PAGINATION###'].'" src="'.$thumbnailFile.'" />';
61 61
         // Get new plugin variables for typolink.
62 62
         $piVars = $this->piVars;
63 63
         // Unset no longer needed plugin variables.
@@ -93,22 +93,22 @@  discard block
 block discarded – undo
93 93
         $separator = $this->pi_getLL('separator', ' - ', true);
94 94
         // Add link to previous page.
95 95
         if ($this->piVars['pointer'] > 0) {
96
-            $output = $this->pi_linkTP_keepPIvars($this->pi_getLL('prevPage', '&lt;', true), ['pointer' => $this->piVars['pointer'] - 1, 'page' => (($this->piVars['pointer'] - 1) * $this->conf['limit']) + 1], true) . $separator;
96
+            $output = $this->pi_linkTP_keepPIvars($this->pi_getLL('prevPage', '&lt;', true), ['pointer' => $this->piVars['pointer'] - 1, 'page' => (($this->piVars['pointer'] - 1) * $this->conf['limit']) + 1], true).$separator;
97 97
         } else {
98
-            $output = '<span class="prev-page not-active">' . $this->pi_getLL('prevPage', '&lt;', true) . '</span>' . $separator;
98
+            $output = '<span class="prev-page not-active">'.$this->pi_getLL('prevPage', '&lt;', true).'</span>'.$separator;
99 99
         }
100 100
         $i = 0;
101 101
         // Add links to pages.
102 102
         while ($i < $maxPages) {
103 103
             if ($i < 3 || ($i > $this->piVars['pointer'] - 3 && $i < $this->piVars['pointer'] + 3) || $i > $maxPages - 4) {
104 104
                 if ($this->piVars['pointer'] != $i) {
105
-                    $output .= $this->pi_linkTP_keepPIvars(sprintf($this->pi_getLL('page', '%d', true), $i + 1), ['pointer' => $i, 'page' => ($i * $this->conf['limit']) + 1], true) . $separator;
105
+                    $output .= $this->pi_linkTP_keepPIvars(sprintf($this->pi_getLL('page', '%d', true), $i + 1), ['pointer' => $i, 'page' => ($i * $this->conf['limit']) + 1], true).$separator;
106 106
                 } else {
107
-                    $output .= '<span class="active">' . sprintf($this->pi_getLL('page', '%d', true), $i + 1) . '</span>' . $separator;
107
+                    $output .= '<span class="active">'.sprintf($this->pi_getLL('page', '%d', true), $i + 1).'</span>'.$separator;
108 108
                 }
109 109
                 $skip = true;
110 110
             } elseif ($skip == true) {
111
-                $output .= '<span class="skipped">' . $this->pi_getLL('skip', '...', true) . '</span>' . $separator;
111
+                $output .= '<span class="skipped">'.$this->pi_getLL('skip', '...', true).'</span>'.$separator;
112 112
                 $skip = false;
113 113
             }
114 114
             $i++;
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
         if ($this->piVars['pointer'] < $maxPages - 1) {
118 118
             $output .= $this->pi_linkTP_keepPIvars($this->pi_getLL('nextPage', '&gt;', true), ['pointer' => $this->piVars['pointer'] + 1, 'page' => ($this->piVars['pointer'] + 1) * $this->conf['limit'] + 1], true);
119 119
         } else {
120
-            $output .= '<span class="next-page not-active">' . $this->pi_getLL('nextPage', '&gt;', true) . '</span>';
120
+            $output .= '<span class="next-page not-active">'.$this->pi_getLL('nextPage', '&gt;', true).'</span>';
121 121
         }
122 122
         return $output;
123 123
     }
Please login to merge, or discard this patch.
Braces   +4 added lines, -8 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 PageGrid extends \Kitodo\Dlf\Common\AbstractPlugin
27
-{
26
+class PageGrid extends \Kitodo\Dlf\Common\AbstractPlugin {
28 27
     public $scriptRelPath = 'Classes/Plugin/PageGrid.php';
29 28
 
30 29
     /**
@@ -37,8 +36,7 @@  discard block
 block discarded – undo
37 36
      *
38 37
      * @return string The rendered entry ready for output
39 38
      */
40
-    protected function getEntry($number, $template)
41
-    {
39
+    protected function getEntry($number, $template) {
42 40
         // Set current page if applicable.
43 41
         if (!empty($this->piVars['page']) && $this->piVars['page'] == $number) {
44 42
             $markerArray['###STATE###'] = 'cur';
@@ -81,8 +79,7 @@  discard block
 block discarded – undo
81 79
      *
82 80
      * @return string The rendered page browser ready for output
83 81
      */
84
-    protected function getPageBrowser()
85
-    {
82
+    protected function getPageBrowser() {
86 83
         // Get overall number of pages.
87 84
         $maxPages = intval(ceil($this->doc->numPages / $this->conf['limit']));
88 85
         // Return empty pagebrowser if there is just one page.
@@ -132,8 +129,7 @@  discard block
 block discarded – undo
132 129
      *
133 130
      * @return string The content that is displayed on the website
134 131
      */
135
-    public function main($content, $conf)
136
-    {
132
+    public function main($content, $conf) {
137 133
         $this->init($conf);
138 134
         $this->loadDocument();
139 135
         if (
Please login to merge, or discard this patch.
Upper-Lower-Casing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
             'parameter' => $this->conf['targetPid'],
70 70
             'forceAbsoluteUrl' => !empty($this->conf['forceAbsoluteUrl']) ? 1 : 0,
71 71
             'forceAbsoluteUrl.' => ['scheme' => !empty($this->conf['forceAbsoluteUrl']) && !empty($this->conf['forceAbsoluteUrlHttps']) ? 'https' : 'http'],
72
-            'additionalParams' => \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, $piVars, '', true, false),
72
+            'additionalParams' => \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, $piVars, '', TRUE, FALSE),
73 73
             'title' => $markerArray['###PAGINATION###']
74 74
         ];
75 75
         $markerArray['###THUMBNAIL###'] = $this->cObj->typoLink($thumbnail, $linkConf);
@@ -92,34 +92,34 @@  discard block
 block discarded – undo
92 92
             return '';
93 93
         }
94 94
         // Get separator.
95
-        $separator = $this->pi_getLL('separator', ' - ', true);
95
+        $separator = $this->pi_getLL('separator', ' - ', TRUE);
96 96
         // Add link to previous page.
97 97
         if ($this->piVars['pointer'] > 0) {
98
-            $output = $this->pi_linkTP_keepPIvars($this->pi_getLL('prevPage', '&lt;', true), ['pointer' => $this->piVars['pointer'] - 1, 'page' => (($this->piVars['pointer'] - 1) * $this->conf['limit']) + 1], true) . $separator;
98
+            $output = $this->pi_linkTP_keepPIvars($this->pi_getLL('prevPage', '&lt;', TRUE), ['pointer' => $this->piVars['pointer'] - 1, 'page' => (($this->piVars['pointer'] - 1) * $this->conf['limit']) + 1], TRUE) . $separator;
99 99
         } else {
100
-            $output = '<span class="prev-page not-active">' . $this->pi_getLL('prevPage', '&lt;', true) . '</span>' . $separator;
100
+            $output = '<span class="prev-page not-active">' . $this->pi_getLL('prevPage', '&lt;', TRUE) . '</span>' . $separator;
101 101
         }
102 102
         $i = 0;
103 103
         // Add links to pages.
104 104
         while ($i < $maxPages) {
105 105
             if ($i < 3 || ($i > $this->piVars['pointer'] - 3 && $i < $this->piVars['pointer'] + 3) || $i > $maxPages - 4) {
106 106
                 if ($this->piVars['pointer'] != $i) {
107
-                    $output .= $this->pi_linkTP_keepPIvars(sprintf($this->pi_getLL('page', '%d', true), $i + 1), ['pointer' => $i, 'page' => ($i * $this->conf['limit']) + 1], true) . $separator;
107
+                    $output .= $this->pi_linkTP_keepPIvars(sprintf($this->pi_getLL('page', '%d', TRUE), $i + 1), ['pointer' => $i, 'page' => ($i * $this->conf['limit']) + 1], TRUE) . $separator;
108 108
                 } else {
109
-                    $output .= '<span class="active">' . sprintf($this->pi_getLL('page', '%d', true), $i + 1) . '</span>' . $separator;
109
+                    $output .= '<span class="active">' . sprintf($this->pi_getLL('page', '%d', TRUE), $i + 1) . '</span>' . $separator;
110 110
                 }
111
-                $skip = true;
112
-            } elseif ($skip == true) {
113
-                $output .= '<span class="skipped">' . $this->pi_getLL('skip', '...', true) . '</span>' . $separator;
114
-                $skip = false;
111
+                $skip = TRUE;
112
+            } elseif ($skip == TRUE) {
113
+                $output .= '<span class="skipped">' . $this->pi_getLL('skip', '...', TRUE) . '</span>' . $separator;
114
+                $skip = FALSE;
115 115
             }
116 116
             $i++;
117 117
         }
118 118
         // Add link to next page.
119 119
         if ($this->piVars['pointer'] < $maxPages - 1) {
120
-            $output .= $this->pi_linkTP_keepPIvars($this->pi_getLL('nextPage', '&gt;', true), ['pointer' => $this->piVars['pointer'] + 1, 'page' => ($this->piVars['pointer'] + 1) * $this->conf['limit'] + 1], true);
120
+            $output .= $this->pi_linkTP_keepPIvars($this->pi_getLL('nextPage', '&gt;', TRUE), ['pointer' => $this->piVars['pointer'] + 1, 'page' => ($this->piVars['pointer'] + 1) * $this->conf['limit'] + 1], TRUE);
121 121
         } else {
122
-            $output .= '<span class="next-page not-active">' . $this->pi_getLL('nextPage', '&gt;', true) . '</span>';
122
+            $output .= '<span class="next-page not-active">' . $this->pi_getLL('nextPage', '&gt;', TRUE) . '</span>';
123 123
         }
124 124
         return $output;
125 125
     }
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
         $this->init($conf);
140 140
         $this->loadDocument();
141 141
         if (
142
-            $this->doc === null
142
+            $this->doc === NULL
143 143
             || $this->doc->numPages < 1
144 144
             || empty($this->conf['fileGrpThumbs'])
145 145
         ) {
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
         // Render page browser.
197 197
         $markerArray['###PAGEBROWSER###'] = $this->getPageBrowser();
198 198
         // Merge everything with template.
199
-        $content = $this->templateService->substituteMarkerArray($this->templateService->substituteSubpart($this->template, '###ENTRY###', $content, true), $markerArray);
199
+        $content = $this->templateService->substituteMarkerArray($this->templateService->substituteSubpart($this->template, '###ENTRY###', $content, TRUE), $markerArray);
200 200
         return $this->pi_wrapInBaseClass($content);
201 201
     }
202 202
 }
Please login to merge, or discard this patch.
Classes/Plugin/Feeds.php 3 patches
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -88,18 +88,18 @@  discard block
 block discarded – undo
88 88
             $additionalWhere = '';
89 89
             // Check for pre-selected collections.
90 90
             if (!empty($this->piVars['collection'])) {
91
-                $additionalWhere = ' AND tx_dlf_collections.uid=' . intval($this->piVars['collection']);
91
+                $additionalWhere = ' AND tx_dlf_collections.uid='.intval($this->piVars['collection']);
92 92
             } elseif (!empty($this->conf['collections'])) {
93
-                $additionalWhere = ' AND tx_dlf_collections.uid IN (' . $GLOBALS['TYPO3_DB']->cleanIntList($this->conf['collections']) . ')';
93
+                $additionalWhere = ' AND tx_dlf_collections.uid IN ('.$GLOBALS['TYPO3_DB']->cleanIntList($this->conf['collections']).')';
94 94
             }
95 95
             $result = $GLOBALS['TYPO3_DB']->exec_SELECT_mm_query(
96 96
                 'tx_dlf_documents.uid AS uid,tx_dlf_documents.partof AS partof,tx_dlf_documents.title AS title,tx_dlf_documents.volume AS volume,tx_dlf_documents.author AS author,tx_dlf_documents.record_id AS guid,tx_dlf_documents.tstamp AS tstamp,tx_dlf_documents.crdate AS crdate',
97 97
                 'tx_dlf_documents',
98 98
                 'tx_dlf_relations',
99 99
                 'tx_dlf_collections',
100
-                'AND tx_dlf_documents.pid=' . intval($this->conf['pages'])
101
-                    . ' AND tx_dlf_relations.ident=' . $GLOBALS['TYPO3_DB']->fullQuoteStr('docs_colls', 'tx_dlf_relations')
102
-                    . ' AND tx_dlf_collections.pid=' . intval($this->conf['pages'])
100
+                'AND tx_dlf_documents.pid='.intval($this->conf['pages'])
101
+                    . ' AND tx_dlf_relations.ident='.$GLOBALS['TYPO3_DB']->fullQuoteStr('docs_colls', 'tx_dlf_relations')
102
+                    . ' AND tx_dlf_collections.pid='.intval($this->conf['pages'])
103 103
                     . $additionalWhere
104 104
                     . Helper::whereClause('tx_dlf_documents')
105 105
                     . Helper::whereClause('tx_dlf_collections'),
@@ -118,12 +118,12 @@  discard block
 block discarded – undo
118 118
                     ) {
119 119
                         $superiorTitle = Document::getTitle($resArray['partof'], true);
120 120
                         if (!empty($superiorTitle)) {
121
-                            $title .= '[' . $superiorTitle . ']';
121
+                            $title .= '['.$superiorTitle.']';
122 122
                         }
123 123
                     }
124 124
                     // Get title of document.
125 125
                     if (!empty($resArray['title'])) {
126
-                        $title .= ' ' . $resArray['title'];
126
+                        $title .= ' '.$resArray['title'];
127 127
                     }
128 128
                     // Set default title if empty.
129 129
                     if (empty($title)) {
@@ -131,13 +131,13 @@  discard block
 block discarded – undo
131 131
                     }
132 132
                     // Append volume information.
133 133
                     if (!empty($resArray['volume'])) {
134
-                        $title .= ', ' . $this->pi_getLL('volume') . ' ' . $resArray['volume'];
134
+                        $title .= ', '.$this->pi_getLL('volume').' '.$resArray['volume'];
135 135
                     }
136 136
                     // Is this document new or updated?
137 137
                     if ($resArray['crdate'] == $resArray['tstamp']) {
138
-                        $title = $this->pi_getLL('new') . ' ' . trim($title);
138
+                        $title = $this->pi_getLL('new').' '.trim($title);
139 139
                     } else {
140
-                        $title = $this->pi_getLL('update') . ' ' . trim($title);
140
+                        $title = $this->pi_getLL('update').' '.trim($title);
141 141
                     }
142 142
                     $item->appendChild($rss->createElement('title', htmlspecialchars($title, ENT_NOQUOTES, 'UTF-8')));
143 143
                     // Add link.
@@ -168,10 +168,10 @@  discard block
 block discarded – undo
168 168
         // Send headers.
169 169
         header('HTTP/1.1 200 OK');
170 170
         header('Cache-Control: no-cache');
171
-        header('Content-Length: ' . strlen($content));
171
+        header('Content-Length: '.strlen($content));
172 172
         header('Content-Type: application/rss+xml; charset=utf-8');
173
-        header('Date: ' . date('r', $GLOBALS['EXEC_TIME']));
174
-        header('Expires: ' . date('r', $GLOBALS['EXEC_TIME']));
173
+        header('Date: '.date('r', $GLOBALS['EXEC_TIME']));
174
+        header('Expires: '.date('r', $GLOBALS['EXEC_TIME']));
175 175
         echo $content;
176 176
         exit;
177 177
     }
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 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 Feeds extends \Kitodo\Dlf\Common\AbstractPlugin
29
-{
28
+class Feeds extends \Kitodo\Dlf\Common\AbstractPlugin {
30 29
     public $scriptRelPath = 'Classes/Plugin/Feeds.php';
31 30
 
32 31
     /**
@@ -39,8 +38,7 @@  discard block
 block discarded – undo
39 38
      *
40 39
      * @return void
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);
Please login to merge, or discard this 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.
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
                     if ((empty($resArray['title']) || !empty($this->conf['prependSuperiorTitle']))
117 117
                         && !empty($resArray['partof'])
118 118
                     ) {
119
-                        $superiorTitle = Document::getTitle($resArray['partof'], true);
119
+                        $superiorTitle = Document::getTitle($resArray['partof'], TRUE);
120 120
                         if (!empty($superiorTitle)) {
121 121
                             $title .= '[' . $superiorTitle . ']';
122 122
                         }
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
                         'parameter' => $this->conf['targetPid'],
146 146
                         'forceAbsoluteUrl' => 1,
147 147
                         'forceAbsoluteUrl.' => ['scheme' => !empty($this->conf['forceAbsoluteUrlHttps']) ? 'https' : 'http'],
148
-                        'additionalParams' => \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, ['id' => $resArray['uid']], '', true, false)
148
+                        'additionalParams' => \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, ['id' => $resArray['uid']], '', TRUE, FALSE)
149 149
                     ];
150 150
                     $item->appendChild($rss->createElement('link', htmlspecialchars($this->cObj->typoLink_URL($linkConf), ENT_NOQUOTES, 'UTF-8')));
151 151
                     // Add author if applicable.
Please login to merge, or discard this patch.