We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | // Delete expired resumption tokens. |
| 84 | 84 | $GLOBALS['TYPO3_DB']->exec_DELETEquery( |
| 85 | 85 | 'tx_dlf_tokens', |
| 86 | - 'tx_dlf_tokens.ident="oai" AND tx_dlf_tokens.tstamp<' . intval($GLOBALS['EXEC_TIME'] - $this->conf['expired']) |
|
| 86 | + 'tx_dlf_tokens.ident="oai" AND tx_dlf_tokens.tstamp<'.intval($GLOBALS['EXEC_TIME'] - $this->conf['expired']) |
|
| 87 | 87 | ); |
| 88 | 88 | if ($GLOBALS['TYPO3_DB']->sql_affected_rows() === -1) { |
| 89 | 89 | // Deletion failed. |
@@ -151,13 +151,13 @@ discard block |
||
| 151 | 151 | $oai_dc = $this->oai->createElementNS($this->formats['oai_dc']['namespace'], 'oai_dc:dc'); |
| 152 | 152 | $oai_dc->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:dc', 'http://purl.org/dc/elements/1.1/'); |
| 153 | 153 | $oai_dc->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance'); |
| 154 | - $oai_dc->setAttributeNS('http://www.w3.org/2001/XMLSchema-instance', 'xsi:schemaLocation', $this->formats['oai_dc']['namespace'] . ' ' . $this->formats['oai_dc']['schema']); |
|
| 154 | + $oai_dc->setAttributeNS('http://www.w3.org/2001/XMLSchema-instance', 'xsi:schemaLocation', $this->formats['oai_dc']['namespace'].' '.$this->formats['oai_dc']['schema']); |
|
| 155 | 155 | $oai_dc->appendChild($this->oai->createElementNS('http://purl.org/dc/elements/1.1/', 'dc:identifier', htmlspecialchars($metadata['record_id'], ENT_NOQUOTES, 'UTF-8'))); |
| 156 | 156 | if (!empty($metadata['purl'])) { |
| 157 | 157 | $oai_dc->appendChild($this->oai->createElementNS('http://purl.org/dc/elements/1.1/', 'dc:identifier', htmlspecialchars($metadata['purl'], ENT_NOQUOTES, 'UTF-8'))); |
| 158 | 158 | } |
| 159 | 159 | if (!empty($metadata['prod_id'])) { |
| 160 | - $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 | + $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'))); |
|
| 161 | 161 | } |
| 162 | 162 | if (!empty($metadata['urn'])) { |
| 163 | 163 | $oai_dc->appendChild($this->oai->createElementNS('http://purl.org/dc/elements/1.1/', 'dc:identifier', htmlspecialchars($metadata['urn'], ENT_NOQUOTES, 'UTF-8'))); |
@@ -255,7 +255,7 @@ discard block |
||
| 255 | 255 | } |
| 256 | 256 | // Add attributes and build XML tree. |
| 257 | 257 | $epicur->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance'); |
| 258 | - $epicur->setAttributeNS('http://www.w3.org/2001/XMLSchema-instance', 'xsi:schemaLocation', $this->formats['epicur']['namespace'] . ' ' . $this->formats['epicur']['schema']); |
|
| 258 | + $epicur->setAttributeNS('http://www.w3.org/2001/XMLSchema-instance', 'xsi:schemaLocation', $this->formats['epicur']['namespace'].' '.$this->formats['epicur']['schema']); |
|
| 259 | 259 | // Do we update an URN or register a new one? |
| 260 | 260 | if ($metadata['tstamp'] == $metadata['crdate']) { |
| 261 | 261 | $update->setAttribute('type', 'urn_new'); |
@@ -302,10 +302,10 @@ discard block |
||
| 302 | 302 | // Import node into \DOMDocument. |
| 303 | 303 | $mets = $this->oai->importNode($root->item(0), TRUE); |
| 304 | 304 | } else { |
| 305 | - Helper::devLog('No METS part found in document with location "' . $metadata['location'] . '"', DEVLOG_SEVERITY_ERROR); |
|
| 305 | + Helper::devLog('No METS part found in document with location "'.$metadata['location'].'"', DEVLOG_SEVERITY_ERROR); |
|
| 306 | 306 | } |
| 307 | 307 | } else { |
| 308 | - Helper::devLog('Could not load XML file from "' . $metadata['location'] . '"', DEVLOG_SEVERITY_ERROR); |
|
| 308 | + Helper::devLog('Could not load XML file from "'.$metadata['location'].'"', DEVLOG_SEVERITY_ERROR); |
|
| 309 | 309 | } |
| 310 | 310 | if ($mets === NULL) { |
| 311 | 311 | $mets = $this->oai->createElementNS('http://kitodo.org/', 'kitodo:error', htmlspecialchars($this->pi_getLL('error', 'Error!', FALSE), ENT_NOQUOTES, 'UTF-8')); |
@@ -341,15 +341,15 @@ discard block |
||
| 341 | 341 | if (substr($this->conf['stylesheet'], 0, 4) == 'EXT:') { |
| 342 | 342 | list($extKey, $filePath) = explode('/', substr($this->conf['stylesheet'], 4), 2); |
| 343 | 343 | if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded($extKey)) { |
| 344 | - $this->conf['stylesheet'] = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($extKey) . $filePath; |
|
| 344 | + $this->conf['stylesheet'] = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($extKey).$filePath; |
|
| 345 | 345 | } |
| 346 | 346 | } |
| 347 | 347 | $stylesheet = \TYPO3\CMS\Core\Utility\GeneralUtility::locationHeaderUrl($this->conf['stylesheet']); |
| 348 | 348 | } else { |
| 349 | 349 | // Use default stylesheet if no custom stylesheet is given. |
| 350 | - $stylesheet = \TYPO3\CMS\Core\Utility\GeneralUtility::locationHeaderUrl(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey) . 'Resources/Public/Stylesheets/OaiPmh.xsl'); |
|
| 350 | + $stylesheet = \TYPO3\CMS\Core\Utility\GeneralUtility::locationHeaderUrl(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'Resources/Public/Stylesheets/OaiPmh.xsl'); |
|
| 351 | 351 | } |
| 352 | - $this->oai->appendChild($this->oai->createProcessingInstruction('xml-stylesheet', 'type="text/xsl" href="' . htmlspecialchars($stylesheet, ENT_NOQUOTES, 'UTF-8') . '"')); |
|
| 352 | + $this->oai->appendChild($this->oai->createProcessingInstruction('xml-stylesheet', 'type="text/xsl" href="'.htmlspecialchars($stylesheet, ENT_NOQUOTES, 'UTF-8').'"')); |
|
| 353 | 353 | // Create root element. |
| 354 | 354 | $root = $this->oai->createElementNS('http://www.openarchives.org/OAI/2.0/', 'OAI-PMH'); |
| 355 | 355 | $root->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance'); |
@@ -399,10 +399,10 @@ discard block |
||
| 399 | 399 | // Send headers. |
| 400 | 400 | header('HTTP/1.1 200 OK'); |
| 401 | 401 | header('Cache-Control: no-cache'); |
| 402 | - header('Content-Length: ' . strlen($content)); |
|
| 402 | + header('Content-Length: '.strlen($content)); |
|
| 403 | 403 | header('Content-Type: text/xml; charset=utf-8'); |
| 404 | - header('Date: ' . date('r', $GLOBALS['EXEC_TIME'])); |
|
| 405 | - header('Expires: ' . date('r', $GLOBALS['EXEC_TIME'] + $this->conf['expired'])); |
|
| 404 | + header('Date: '.date('r', $GLOBALS['EXEC_TIME'])); |
|
| 405 | + header('Expires: '.date('r', $GLOBALS['EXEC_TIME'] + $this->conf['expired'])); |
|
| 406 | 406 | echo $content; |
| 407 | 407 | exit; |
| 408 | 408 | } |
@@ -467,10 +467,10 @@ discard block |
||
| 467 | 467 | 'tx_dlf_documents', |
| 468 | 468 | 'tx_dlf_relations', |
| 469 | 469 | 'tx_dlf_collections', |
| 470 | - 'AND tx_dlf_documents.record_id=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($this->piVars['identifier'], 'tx_dlf_documents') |
|
| 471 | - . ' AND tx_dlf_documents.pid=' . intval($this->conf['pages']) |
|
| 472 | - . ' AND tx_dlf_collections.pid=' . intval($this->conf['pages']) |
|
| 473 | - . ' AND tx_dlf_relations.ident=' . $GLOBALS['TYPO3_DB']->fullQuoteStr('docs_colls', 'tx_dlf_relations') |
|
| 470 | + 'AND tx_dlf_documents.record_id='.$GLOBALS['TYPO3_DB']->fullQuoteStr($this->piVars['identifier'], 'tx_dlf_documents') |
|
| 471 | + . ' AND tx_dlf_documents.pid='.intval($this->conf['pages']) |
|
| 472 | + . ' AND tx_dlf_collections.pid='.intval($this->conf['pages']) |
|
| 473 | + . ' AND tx_dlf_relations.ident='.$GLOBALS['TYPO3_DB']->fullQuoteStr('docs_colls', 'tx_dlf_relations') |
|
| 474 | 474 | . $where |
| 475 | 475 | . Helper::whereClause('tx_dlf_collections'), |
| 476 | 476 | '', |
@@ -590,7 +590,7 @@ discard block |
||
| 590 | 590 | $timestamp = $resArray['tstamp']; |
| 591 | 591 | $earliestDatestamp = gmdate('Y-m-d\TH:i:s\Z', $timestamp); |
| 592 | 592 | } else { |
| 593 | - Helper::devLog('No records found with PID ' . $this->conf['pages'], DEVLOG_SEVERITY_NOTICE); |
|
| 593 | + Helper::devLog('No records found with PID '.$this->conf['pages'], DEVLOG_SEVERITY_NOTICE); |
|
| 594 | 594 | } |
| 595 | 595 | $linkConf = [ |
| 596 | 596 | 'parameter' => $GLOBALS['TSFE']->id, |
@@ -853,9 +853,9 @@ discard block |
||
| 853 | 853 | } |
| 854 | 854 | $resArray = $allResults[0]; |
| 855 | 855 | if ($resArray['index_query'] != "") { |
| 856 | - $solr_query .= '(' . $resArray['index_query'] . ')'; |
|
| 856 | + $solr_query .= '('.$resArray['index_query'].')'; |
|
| 857 | 857 | } else { |
| 858 | - $solr_query .= 'collection:' . '"' . $resArray['index_name'] . '"'; |
|
| 858 | + $solr_query .= 'collection:'.'"'.$resArray['index_name'].'"'; |
|
| 859 | 859 | } |
| 860 | 860 | } else { |
| 861 | 861 | // If no set is specified we have to query for all collections |
@@ -863,7 +863,7 @@ discard block |
||
| 863 | 863 | } |
| 864 | 864 | // Check for required fields. |
| 865 | 865 | foreach ($this->formats[$this->piVars['metadataPrefix']]['requiredFields'] as $required) { |
| 866 | - $solr_query .= ' NOT ' . $required . ':""'; |
|
| 866 | + $solr_query .= ' NOT '.$required.':""'; |
|
| 867 | 867 | } |
| 868 | 868 | // toplevel="true" is always required |
| 869 | 869 | $solr_query .= ' AND toplevel:true'; |
@@ -876,7 +876,7 @@ discard block |
||
| 876 | 876 | || is_array($date_array = strptime($this->piVars['from'], '%Y-%m-%d')) |
| 877 | 877 | ) { |
| 878 | 878 | $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); |
| 879 | - $from = date("Y-m-d", $timestamp) . 'T' . date("H:i:s", $timestamp) . '.000Z'; |
|
| 879 | + $from = date("Y-m-d", $timestamp).'T'.date("H:i:s", $timestamp).'.000Z'; |
|
| 880 | 880 | } else { |
| 881 | 881 | throw new \Exception('badArgument'); |
| 882 | 882 | } |
@@ -890,7 +890,7 @@ discard block |
||
| 890 | 890 | || is_array($date_array = strptime($this->piVars['until'], '%Y-%m-%d')) |
| 891 | 891 | ) { |
| 892 | 892 | $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); |
| 893 | - $until = date("Y-m-d", $timestamp) . 'T' . date("H:i:s", $timestamp) . '.999Z'; |
|
| 893 | + $until = date("Y-m-d", $timestamp).'T'.date("H:i:s", $timestamp).'.999Z'; |
|
| 894 | 894 | if ($from != "*" && $from > $until) { |
| 895 | 895 | throw new \Exception('badArgument'); |
| 896 | 896 | } |
@@ -907,7 +907,7 @@ discard block |
||
| 907 | 907 | throw new \Exception('badArgument'); |
| 908 | 908 | } |
| 909 | 909 | } |
| 910 | - $solr_query .= ' AND timestamp:[' . $from . ' TO ' . $until . ']'; |
|
| 910 | + $solr_query .= ' AND timestamp:['.$from.' TO '.$until.']'; |
|
| 911 | 911 | $documentSet = []; |
| 912 | 912 | $solr = Solr::getInstance($this->conf['solrcore']); |
| 913 | 913 | if (intval($this->conf['solr_limit']) > 0) { |
@@ -947,10 +947,10 @@ discard block |
||
| 947 | 947 | 'tx_dlf_documents', |
| 948 | 948 | 'tx_dlf_relations', |
| 949 | 949 | 'tx_dlf_collections', |
| 950 | - 'AND tx_dlf_documents.uid IN (' . implode(',', $GLOBALS['TYPO3_DB']->cleanIntArray($documentsToProcess)) . ')' |
|
| 951 | - . ' AND tx_dlf_documents.pid=' . intval($this->conf['pages']) |
|
| 952 | - . ' AND tx_dlf_collections.pid=' . intval($this->conf['pages']) |
|
| 953 | - . ' AND tx_dlf_relations.ident=' . $GLOBALS['TYPO3_DB']->fullQuoteStr('docs_colls', 'tx_dlf_relations') |
|
| 950 | + 'AND tx_dlf_documents.uid IN ('.implode(',', $GLOBALS['TYPO3_DB']->cleanIntArray($documentsToProcess)).')' |
|
| 951 | + . ' AND tx_dlf_documents.pid='.intval($this->conf['pages']) |
|
| 952 | + . ' AND tx_dlf_collections.pid='.intval($this->conf['pages']) |
|
| 953 | + . ' AND tx_dlf_relations.ident='.$GLOBALS['TYPO3_DB']->fullQuoteStr('docs_colls', 'tx_dlf_relations') |
|
| 954 | 954 | . Helper::whereClause('tx_dlf_collections'), |
| 955 | 955 | 'tx_dlf_documents.uid', |
| 956 | 956 | 'tx_dlf_documents.tstamp', |
@@ -55,9 +55,9 @@ discard block |
||
| 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 |
||
| 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', '<', 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', '<', 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', '<', TRUE) . '</span>' . $separator; |
|
| 98 | + $output = '<span class="prev-page not-active">'.$this->pi_getLL('prevPage', '<', 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 |
||
| 117 | 117 | if ($this->piVars['pointer'] < $maxPages - 1) { |
| 118 | 118 | $output .= $this->pi_linkTP_keepPIvars($this->pi_getLL('nextPage', '>', 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', '>', TRUE) . '</span>'; |
|
| 120 | + $output .= '<span class="next-page not-active">'.$this->pi_getLL('nextPage', '>', TRUE).'</span>'; |
|
| 121 | 121 | } |
| 122 | 122 | return $output; |
| 123 | 123 | } |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | $query = $GLOBALS['TYPO3_DB']->SELECTquery( |
| 57 | 57 | '*', |
| 58 | 58 | 'tx_dlf_basket', |
| 59 | - 'tx_dlf_basket.fe_user_id=' . intval($insertArray['fe_user_id']) |
|
| 59 | + 'tx_dlf_basket.fe_user_id='.intval($insertArray['fe_user_id']) |
|
| 60 | 60 | . Helper::whereClause('tx_dlf_basket'), |
| 61 | 61 | '', |
| 62 | 62 | '', |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | $query = $GLOBALS['TYPO3_DB']->SELECTquery( |
| 70 | 70 | '*', |
| 71 | 71 | 'tx_dlf_basket', |
| 72 | - 'tx_dlf_basket.session_id=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($sessionId, 'tx_dlf_basket') |
|
| 72 | + 'tx_dlf_basket.session_id='.$GLOBALS['TYPO3_DB']->fullQuoteStr($sessionId, 'tx_dlf_basket') |
|
| 73 | 73 | . Helper::whereClause('tx_dlf_basket'), |
| 74 | 74 | '', |
| 75 | 75 | '', |
@@ -159,9 +159,9 @@ discard block |
||
| 159 | 159 | |
| 160 | 160 | if ($resultMail->countRow() > 0) { |
| 161 | 161 | $mailForm = '<select name="tx_dlf[mail_action]">'; |
| 162 | - $mailForm .= '<option value="">' . $this->pi_getLL('chooseMail', '', TRUE) . '</option>'; |
|
| 162 | + $mailForm .= '<option value="">'.$this->pi_getLL('chooseMail', '', TRUE).'</option>'; |
|
| 163 | 163 | while ($row = $resultMail->fetch()) { |
| 164 | - $mailForm .= '<option value="' . $row['uid'] . '">' . $row['name'] . ' (' . $row['mail'] . ')</option>'; |
|
| 164 | + $mailForm .= '<option value="'.$row['uid'].'">'.$row['name'].' ('.$row['mail'].')</option>'; |
|
| 165 | 165 | } |
| 166 | 166 | $mailForm .= '</select><input type="submit">'; |
| 167 | 167 | } |
@@ -170,9 +170,9 @@ discard block |
||
| 170 | 170 | // remove action form |
| 171 | 171 | $markerArray['###REMOVEACTION###'] = ' |
| 172 | 172 | <select name="tx_dlf[basket_action]"> |
| 173 | - <option value="">' . $this->pi_getLL('chooseAction', '', TRUE) . '</option> |
|
| 174 | - <option value="open">' . $this->pi_getLL('download', '', TRUE) . '</option> |
|
| 175 | - <option value="remove">' . $this->pi_getLL('remove', '', TRUE) . '</option> |
|
| 173 | + <option value="">' . $this->pi_getLL('chooseAction', '', TRUE).'</option> |
|
| 174 | + <option value="open">' . $this->pi_getLL('download', '', TRUE).'</option> |
|
| 175 | + <option value="remove">' . $this->pi_getLL('remove', '', TRUE).'</option> |
|
| 176 | 176 | </select> |
| 177 | 177 | <input type="submit"> |
| 178 | 178 | '; |
@@ -193,9 +193,9 @@ discard block |
||
| 193 | 193 | $printForm = ''; |
| 194 | 194 | if ($resultPrinter->countRow() > 0) { |
| 195 | 195 | $printForm = '<select name="tx_dlf[print_action]">'; |
| 196 | - $printForm .= '<option value="">' . $this->pi_getLL('choosePrinter', '', TRUE) . '</option>'; |
|
| 196 | + $printForm .= '<option value="">'.$this->pi_getLL('choosePrinter', '', TRUE).'</option>'; |
|
| 197 | 197 | while ($row = $resultPrinter->fetch()) { |
| 198 | - $printForm .= '<option value="' . $row['uid'] . '">' . $row['label'] . '</option>'; |
|
| 198 | + $printForm .= '<option value="'.$row['uid'].'">'.$row['label'].'</option>'; |
|
| 199 | 199 | } |
| 200 | 200 | $printForm .= '</select><input type="submit" />'; |
| 201 | 201 | } |
@@ -250,23 +250,23 @@ discard block |
||
| 250 | 250 | $rotation = $data['rotation']; |
| 251 | 251 | $docData = $this->getDocumentData($id, $data); |
| 252 | 252 | $markerArray['###BASKETDATA###'] = $docData['downloadLink']; |
| 253 | - $arrayKey = $id . '_' . $startpage; |
|
| 253 | + $arrayKey = $id.'_'.$startpage; |
|
| 254 | 254 | if (isset($startX)) { |
| 255 | - $arrayKey .= '_' . $startX; |
|
| 255 | + $arrayKey .= '_'.$startX; |
|
| 256 | 256 | } |
| 257 | 257 | if (isset($endX)) { |
| 258 | - $arrayKey .= '_' . $endX; |
|
| 258 | + $arrayKey .= '_'.$endX; |
|
| 259 | 259 | } |
| 260 | - $controlMark = '<input value="' . $id . '" name="tx_dlf[selected][' . $arrayKey . '][id]" type="checkbox">'; |
|
| 261 | - $controlMark .= '<input value="' . $startpage . '" name="tx_dlf[selected][' . $arrayKey . '][startpage]" type="hidden">'; |
|
| 262 | - $controlMark .= '<input value="' . $endpage . '" name="tx_dlf[selected][' . $arrayKey . '][endpage]" type="hidden">'; |
|
| 260 | + $controlMark = '<input value="'.$id.'" name="tx_dlf[selected]['.$arrayKey.'][id]" type="checkbox">'; |
|
| 261 | + $controlMark .= '<input value="'.$startpage.'" name="tx_dlf[selected]['.$arrayKey.'][startpage]" type="hidden">'; |
|
| 262 | + $controlMark .= '<input value="'.$endpage.'" name="tx_dlf[selected]['.$arrayKey.'][endpage]" type="hidden">'; |
|
| 263 | 263 | // add hidden fields for detail information |
| 264 | 264 | if ($startX) { |
| 265 | - $controlMark .= '<input type="hidden" name="tx_dlf[selected][' . $arrayKey . '][startX]" value="' . $startX . '">'; |
|
| 266 | - $controlMark .= '<input type="hidden" name="tx_dlf[selected][' . $arrayKey . '][startY]" value="' . $startY . '">'; |
|
| 267 | - $controlMark .= '<input type="hidden" name="tx_dlf[selected][' . $arrayKey . '][endX]" value="' . $endX . '">'; |
|
| 268 | - $controlMark .= '<input type="hidden" name="tx_dlf[selected][' . $arrayKey . '][endY]" value="' . $endY . '">'; |
|
| 269 | - $controlMark .= '<input type="hidden" name="tx_dlf[selected][' . $arrayKey . '][rotation]" value="' . $rotation . '">'; |
|
| 265 | + $controlMark .= '<input type="hidden" name="tx_dlf[selected]['.$arrayKey.'][startX]" value="'.$startX.'">'; |
|
| 266 | + $controlMark .= '<input type="hidden" name="tx_dlf[selected]['.$arrayKey.'][startY]" value="'.$startY.'">'; |
|
| 267 | + $controlMark .= '<input type="hidden" name="tx_dlf[selected]['.$arrayKey.'][endX]" value="'.$endX.'">'; |
|
| 268 | + $controlMark .= '<input type="hidden" name="tx_dlf[selected]['.$arrayKey.'][endY]" value="'.$endY.'">'; |
|
| 269 | + $controlMark .= '<input type="hidden" name="tx_dlf[selected]['.$arrayKey.'][rotation]" value="'.$rotation.'">'; |
|
| 270 | 270 | } |
| 271 | 271 | // return one entry |
| 272 | 272 | $markerArray['###CONTROLS###'] = $controlMark; |
@@ -322,12 +322,12 @@ discard block |
||
| 322 | 322 | if ($_piVars['addToBasket'] == 'list') { |
| 323 | 323 | $documentItem['endpage'] = $document->numPages; |
| 324 | 324 | } |
| 325 | - $arrayKey = $documentItem['id'] . '_' . $page; |
|
| 325 | + $arrayKey = $documentItem['id'].'_'.$page; |
|
| 326 | 326 | if (!empty($documentItem['startX'])) { |
| 327 | - $arrayKey .= '_' . $documentItem['startX']; |
|
| 327 | + $arrayKey .= '_'.$documentItem['startX']; |
|
| 328 | 328 | } |
| 329 | 329 | if (!empty($documentItem['endX'])) { |
| 330 | - $arrayKey .= '_' . $documentItem['endX']; |
|
| 330 | + $arrayKey .= '_'.$documentItem['endX']; |
|
| 331 | 331 | } |
| 332 | 332 | // do not add more than one identical object |
| 333 | 333 | if (!in_array($arrayKey, $items)) { |
@@ -346,14 +346,14 @@ discard block |
||
| 346 | 346 | // remove parameter endpage |
| 347 | 347 | $pdfParams = str_replace(",##endpage##", '', $pdfParams); |
| 348 | 348 | } |
| 349 | - $pdfGenerateUrl = $this->conf['pdfgenerate'] . $pdfParams; |
|
| 349 | + $pdfGenerateUrl = $this->conf['pdfgenerate'].$pdfParams; |
|
| 350 | 350 | if ($this->conf['pregeneration']) { |
| 351 | 351 | // send ajax request to webapp |
| 352 | 352 | $output .= ' |
| 353 | 353 | <script> |
| 354 | 354 | $(document).ready(function(){ |
| 355 | 355 | $.ajax({ |
| 356 | - url: "' . $pdfGenerateUrl . '", |
|
| 356 | + url: "' . $pdfGenerateUrl.'", |
|
| 357 | 357 | }).done(function() { |
| 358 | 358 | }); |
| 359 | 359 | }); |
@@ -361,7 +361,7 @@ discard block |
||
| 361 | 361 | } |
| 362 | 362 | } |
| 363 | 363 | $update = ['doc_ids' => json_encode($items)]; |
| 364 | - $GLOBALS['TYPO3_DB']->exec_UPDATEquery('tx_dlf_basket', 'uid=' . intval($basketData['uid']), $update); |
|
| 364 | + $GLOBALS['TYPO3_DB']->exec_UPDATEquery('tx_dlf_basket', 'uid='.intval($basketData['uid']), $update); |
|
| 365 | 365 | $basketData['doc_ids'] = $items; |
| 366 | 366 | } |
| 367 | 367 | return ['basketData' => $basketData, 'jsOutput' => $output]; |
@@ -385,12 +385,12 @@ discard block |
||
| 385 | 385 | } |
| 386 | 386 | foreach ($_piVars['selected'] as $value) { |
| 387 | 387 | if (isset($value['id'])) { |
| 388 | - $arrayKey = $value['id'] . '_' . $value['startpage']; |
|
| 388 | + $arrayKey = $value['id'].'_'.$value['startpage']; |
|
| 389 | 389 | if (isset($value['startX'])) { |
| 390 | - $arrayKey .= '_' . $value['startX']; |
|
| 390 | + $arrayKey .= '_'.$value['startX']; |
|
| 391 | 391 | } |
| 392 | 392 | if (isset($value['endX'])) { |
| 393 | - $arrayKey .= '_' . $value['endX']; |
|
| 393 | + $arrayKey .= '_'.$value['endX']; |
|
| 394 | 394 | } |
| 395 | 395 | if (isset($items[$arrayKey])) { |
| 396 | 396 | unset($items[$arrayKey]); |
@@ -402,7 +402,7 @@ discard block |
||
| 402 | 402 | } else { |
| 403 | 403 | $update = ['doc_ids' => json_encode($items)]; |
| 404 | 404 | } |
| 405 | - $GLOBALS['TYPO3_DB']->exec_UPDATEquery('tx_dlf_basket', 'uid=' . intval($basketData['uid']), $update); |
|
| 405 | + $GLOBALS['TYPO3_DB']->exec_UPDATEquery('tx_dlf_basket', 'uid='.intval($basketData['uid']), $update); |
|
| 406 | 406 | $basketData['doc_ids'] = $items; |
| 407 | 407 | return $basketData; |
| 408 | 408 | } |
@@ -423,10 +423,10 @@ discard block |
||
| 423 | 423 | foreach ($this->piVars['selected'] as $docValue) { |
| 424 | 424 | if ($docValue['id']) { |
| 425 | 425 | $docData = $this->getDocumentData($docValue['id'], $docValue); |
| 426 | - $pdfUrl .= $docData['urlParams'] . $this->conf['pdfparamseparator']; |
|
| 426 | + $pdfUrl .= $docData['urlParams'].$this->conf['pdfparamseparator']; |
|
| 427 | 427 | } |
| 428 | 428 | } |
| 429 | - header('Location: ' . $pdfUrl); |
|
| 429 | + header('Location: '.$pdfUrl); |
|
| 430 | 430 | ob_end_flush(); |
| 431 | 431 | exit; |
| 432 | 432 | } |
@@ -460,7 +460,7 @@ discard block |
||
| 460 | 460 | $urlParams = str_replace("##endx##", $data['endX'] === "" ? "" : intval($data['endX']), $urlParams); |
| 461 | 461 | $urlParams = str_replace("##endy##", $data['endY'] === "" ? "" : intval($data['endY']), $urlParams); |
| 462 | 462 | $urlParams = str_replace("##rotation##", $data['rotation'] === "" ? "" : intval($data['rotation']), $urlParams); |
| 463 | - $downloadUrl = $this->conf['pdfgenerate'] . $urlParams; |
|
| 463 | + $downloadUrl = $this->conf['pdfgenerate'].$urlParams; |
|
| 464 | 464 | $title = $document->getTitle($id, TRUE); |
| 465 | 465 | if (empty($title)) { |
| 466 | 466 | $title = $this->pi_getLL('noTitle', '', TRUE); |
@@ -469,15 +469,15 @@ discard block |
||
| 469 | 469 | $info = ''; |
| 470 | 470 | if ($data['startX'] != '' && $data['endX'] != '') { |
| 471 | 471 | // cutout |
| 472 | - $info .= $this->pi_getLL('cutout', '', TRUE) . ' '; |
|
| 472 | + $info .= $this->pi_getLL('cutout', '', TRUE).' '; |
|
| 473 | 473 | } |
| 474 | 474 | if ($data['startpage'] == $data['endpage']) { |
| 475 | 475 | // One page |
| 476 | - $info .= $this->pi_getLL('page', '', TRUE) . ' ' . $data['startpage']; |
|
| 476 | + $info .= $this->pi_getLL('page', '', TRUE).' '.$data['startpage']; |
|
| 477 | 477 | } else { |
| 478 | - $info .= $this->pi_getLL('page', '', TRUE) . ' ' . $data['startpage'] . '-' . $data['endpage']; |
|
| 478 | + $info .= $this->pi_getLL('page', '', TRUE).' '.$data['startpage'].'-'.$data['endpage']; |
|
| 479 | 479 | } |
| 480 | - $downloadLink = '<a href="' . $downloadUrl . '" target="_blank">' . $title . '</a> (' . $info . ')'; |
|
| 480 | + $downloadLink = '<a href="'.$downloadUrl.'" target="_blank">'.$title.'</a> ('.$info.')'; |
|
| 481 | 481 | if ($data['startpage'] == $data['endpage']) { |
| 482 | 482 | $pageNums = 1; |
| 483 | 483 | } else { |
@@ -523,7 +523,7 @@ discard block |
||
| 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 |
@@ -531,7 +531,7 @@ discard block |
||
| 531 | 531 | if ($docValue['id']) { |
| 532 | 532 | $explodeId = explode("_", $docValue['id']); |
| 533 | 533 | $docData = $this->getDocumentData($explodeId[0], $docValue); |
| 534 | - $pdfUrl .= $docData['urlParams'] . $this->conf['pdfparamseparator']; |
|
| 534 | + $pdfUrl .= $docData['urlParams'].$this->conf['pdfparamseparator']; |
|
| 535 | 535 | $pages = (abs(intval($docValue['startpage']) - intval($docValue['endpage']))); |
| 536 | 536 | if ($pages === 0) { |
| 537 | 537 | $numberOfPages = $numberOfPages + 1; |
@@ -542,7 +542,7 @@ discard block |
||
| 542 | 542 | } |
| 543 | 543 | // Remove leading/tailing pdfparamseperator |
| 544 | 544 | $pdfUrl = trim($pdfUrl, $this->conf['pdfparamseparator']); |
| 545 | - $mailBody = $mailText . $pdfUrl; |
|
| 545 | + $mailBody = $mailText.$pdfUrl; |
|
| 546 | 546 | // Get hook objects. |
| 547 | 547 | $hookObjects = Helper::getHookObjects($this->scriptRelPath); |
| 548 | 548 | // Hook for getting a customized mail body. |
@@ -575,12 +575,12 @@ discard block |
||
| 575 | 575 | // internal user |
| 576 | 576 | $insertArray['user_id'] = $GLOBALS["TSFE"]->fe_user->user['uid']; |
| 577 | 577 | $insertArray['name'] = $GLOBALS["TSFE"]->fe_user->user['username']; |
| 578 | - $insertArray['label'] = 'Mail: ' . $mailData['mail']; |
|
| 578 | + $insertArray['label'] = 'Mail: '.$mailData['mail']; |
|
| 579 | 579 | } else { |
| 580 | 580 | // external user |
| 581 | 581 | $insertArray['user_id'] = 0; |
| 582 | 582 | $insertArray['name'] = 'n/a'; |
| 583 | - $insertArray['label'] = 'Mail: ' . $mailData['mail']; |
|
| 583 | + $insertArray['label'] = 'Mail: '.$mailData['mail']; |
|
| 584 | 584 | } |
| 585 | 585 | // add action to protocol |
| 586 | 586 | $GLOBALS['TYPO3_DB']->exec_INSERTquery('tx_dlf_actionlog', $insertArray); |
@@ -600,7 +600,7 @@ discard block |
||
| 600 | 600 | foreach ($this->piVars['selected'] as $docId => $docValue) { |
| 601 | 601 | if ($docValue['id']) { |
| 602 | 602 | $docData = $this->getDocumentData($docValue['id'], $docValue); |
| 603 | - $pdfUrl .= $docData['urlParams'] . $this->conf['pdfparamseparator']; |
|
| 603 | + $pdfUrl .= $docData['urlParams'].$this->conf['pdfparamseparator']; |
|
| 604 | 604 | $numberOfPages += $docData['pageNums']; |
| 605 | 605 | } |
| 606 | 606 | } |
@@ -632,7 +632,7 @@ discard block |
||
| 632 | 632 | if ($docValue['id']) { |
| 633 | 633 | $explodeId = explode("_", $docId); |
| 634 | 634 | $docData = $this->getDocumentData($explodeId[0], $docValue); |
| 635 | - $pdfUrl .= $docData['urlParams'] . $this->conf['pdfparamseparator']; |
|
| 635 | + $pdfUrl .= $docData['urlParams'].$this->conf['pdfparamseparator']; |
|
| 636 | 636 | $numberOfPages += $docData['pageNums']; |
| 637 | 637 | } |
| 638 | 638 | } |
@@ -649,16 +649,16 @@ discard block |
||
| 649 | 649 | // internal user |
| 650 | 650 | $insertArray['user_id'] = $GLOBALS["TSFE"]->fe_user->user['uid']; |
| 651 | 651 | $insertArray['name'] = $GLOBALS["TSFE"]->fe_user->user['username']; |
| 652 | - $insertArray['label'] = 'Print: ' . $printerData['label']; |
|
| 652 | + $insertArray['label'] = 'Print: '.$printerData['label']; |
|
| 653 | 653 | } else { |
| 654 | 654 | // external user |
| 655 | 655 | $insertArray['user_id'] = 0; |
| 656 | 656 | $insertArray['name'] = 'n/a'; |
| 657 | - $insertArray['label'] = 'Print: ' . $printerData['label']; |
|
| 657 | + $insertArray['label'] = 'Print: '.$printerData['label']; |
|
| 658 | 658 | } |
| 659 | 659 | // add action to protocol |
| 660 | 660 | $GLOBALS['TYPO3_DB']->exec_INSERTquery('tx_dlf_actionlog', $insertArray); |
| 661 | - header('Location: ' . $pdfUrl); |
|
| 661 | + header('Location: '.$pdfUrl); |
|
| 662 | 662 | ob_end_flush(); |
| 663 | 663 | exit; |
| 664 | 664 | } |
@@ -120,16 +120,16 @@ discard block |
||
| 120 | 120 | '###DAYFRI_NAME###' => strftime('%a', strtotime('last Friday')), |
| 121 | 121 | '###DAYSAT_NAME###' => strftime('%a', strtotime('last Saturday')), |
| 122 | 122 | '###DAYSUN_NAME###' => strftime('%a', strtotime('last Sunday')), |
| 123 | - '###MONTHNAME###' => strftime('%B', strtotime($year . '-' . ($i + 1) . '-1')) |
|
| 123 | + '###MONTHNAME###' => strftime('%B', strtotime($year.'-'.($i + 1).'-1')) |
|
| 124 | 124 | ]; |
| 125 | 125 | // Reset week content of new month. |
| 126 | 126 | $subWeekPartContent = ''; |
| 127 | - $firstOfMonth = strtotime($year . '-' . ($i + 1) . '-1'); |
|
| 127 | + $firstOfMonth = strtotime($year.'-'.($i + 1).'-1'); |
|
| 128 | 128 | $lastOfMonth = strtotime('last day of', ($firstOfMonth)); |
| 129 | 129 | $firstOfMonthStart = strtotime('last Monday', $firstOfMonth); |
| 130 | 130 | // There are never more than 6 weeks in a month. |
| 131 | 131 | for ($j = 0; $j <= 5; $j++) { |
| 132 | - $firstDayOfWeek = strtotime('+ ' . $j . ' Week', $firstOfMonthStart); |
|
| 132 | + $firstDayOfWeek = strtotime('+ '.$j.' Week', $firstOfMonthStart); |
|
| 133 | 133 | $weekArray = [ |
| 134 | 134 | '###DAYMON###' => ' ', |
| 135 | 135 | '###DAYTUE###' => ' ', |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | ]; |
| 142 | 142 | // Every week has seven days. ;-) |
| 143 | 143 | for ($k = 0; $k <= 6; $k++) { |
| 144 | - $currentDayTime = strtotime('+ ' . $k . ' Day', $firstDayOfWeek); |
|
| 144 | + $currentDayTime = strtotime('+ '.$k.' Day', $firstDayOfWeek); |
|
| 145 | 145 | if ( |
| 146 | 146 | $currentDayTime >= $firstOfMonth |
| 147 | 147 | && $currentDayTime <= $lastOfMonth |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | $linkConf = [ |
| 160 | 160 | 'useCacheHash' => 1, |
| 161 | 161 | 'parameter' => $this->conf['targetPid'], |
| 162 | - 'additionalParams' => '&' . $this->prefixId . '[id]=' . urlencode($issue['uid']), |
|
| 162 | + 'additionalParams' => '&'.$this->prefixId.'[id]='.urlencode($issue['uid']), |
|
| 163 | 163 | 'ATagParams' => ' class="title"', |
| 164 | 164 | ]; |
| 165 | 165 | $dayLinksText[] = $this->cObj->typoLink($dayLinkLabel, $linkConf); |
@@ -171,13 +171,13 @@ discard block |
||
| 171 | 171 | if (!empty($dayLinksText)) { |
| 172 | 172 | $dayLinksList = '<ul>'; |
| 173 | 173 | foreach ($dayLinksText as $link) { |
| 174 | - $dayLinksList .= '<li>' . $link . '</li>'; |
|
| 174 | + $dayLinksList .= '<li>'.$link.'</li>'; |
|
| 175 | 175 | } |
| 176 | 176 | $dayLinksList .= '</ul>'; |
| 177 | 177 | } |
| 178 | - $dayLinkDiv = '<div class="issues"><h4>' . strftime('%d', $currentDayTime) . '</h4><div>' . $dayLinksList . '</div></div>'; |
|
| 178 | + $dayLinkDiv = '<div class="issues"><h4>'.strftime('%d', $currentDayTime).'</h4><div>'.$dayLinksList.'</div></div>'; |
|
| 179 | 179 | } |
| 180 | - switch (strftime('%w', strtotime('+ ' . $k . ' Day', $firstDayOfWeek))) { |
|
| 180 | + switch (strftime('%w', strtotime('+ '.$k.' Day', $firstDayOfWeek))) { |
|
| 181 | 181 | case '0': |
| 182 | 182 | $weekArray['###DAYSUN###'] = ((int) $dayLinks === (int) date('j', $currentDayTime)) ? $dayLinkDiv : strftime('%d', $currentDayTime); |
| 183 | 183 | break; |
@@ -214,14 +214,14 @@ discard block |
||
| 214 | 214 | $linkConf = [ |
| 215 | 215 | 'useCacheHash' => 1, |
| 216 | 216 | 'parameter' => $this->conf['targetPid'], |
| 217 | - 'additionalParams' => '&' . $this->prefixId . '[id]=' . urlencode($this->doc->parentId), |
|
| 217 | + 'additionalParams' => '&'.$this->prefixId.'[id]='.urlencode($this->doc->parentId), |
|
| 218 | 218 | ]; |
| 219 | - $allYearsLink = $this->cObj->typoLink($this->pi_getLL('allYears', '', TRUE) . ' ' . $this->doc->getTitle($this->doc->parentId), $linkConf); |
|
| 219 | + $allYearsLink = $this->cObj->typoLink($this->pi_getLL('allYears', '', TRUE).' '.$this->doc->getTitle($this->doc->parentId), $linkConf); |
|
| 220 | 220 | // Link to current year. |
| 221 | 221 | $linkConf = [ |
| 222 | 222 | 'useCacheHash' => 1, |
| 223 | 223 | 'parameter' => $this->conf['targetPid'], |
| 224 | - 'additionalParams' => '&' . $this->prefixId . '[id]=' . urlencode($this->doc->uid), |
|
| 224 | + 'additionalParams' => '&'.$this->prefixId.'[id]='.urlencode($this->doc->uid), |
|
| 225 | 225 | ]; |
| 226 | 226 | $yearLink = $this->cObj->typoLink($year, $linkConf); |
| 227 | 227 | $subPartContentList = ''; |
@@ -310,8 +310,8 @@ discard block |
||
| 310 | 310 | $linkConf = [ |
| 311 | 311 | 'useCacheHash' => 1, |
| 312 | 312 | 'parameter' => $this->conf['targetPid'], |
| 313 | - 'additionalParams' => '&' . $this->prefixId . '[id]=' . urlencode($year['uid']), |
|
| 314 | - 'title' => $titleAnchor . ': ' . $year['title'] |
|
| 313 | + 'additionalParams' => '&'.$this->prefixId.'[id]='.urlencode($year['uid']), |
|
| 314 | + 'title' => $titleAnchor.': '.$year['title'] |
|
| 315 | 315 | ]; |
| 316 | 316 | $yearArray = [ |
| 317 | 317 | '###YEARNAME###' => $this->cObj->typoLink($year['title'], $linkConf), |
@@ -323,9 +323,9 @@ discard block |
||
| 323 | 323 | $linkConf = [ |
| 324 | 324 | 'useCacheHash' => 1, |
| 325 | 325 | 'parameter' => $this->conf['targetPid'], |
| 326 | - 'additionalParams' => '&' . $this->prefixId . '[id]=' . $this->doc->uid, |
|
| 326 | + 'additionalParams' => '&'.$this->prefixId.'[id]='.$this->doc->uid, |
|
| 327 | 327 | ]; |
| 328 | - $allYearsLink = $this->cObj->typoLink($this->pi_getLL('allYears', '', TRUE) . ' ' . $this->doc->getTitle($this->doc->uid), $linkConf); |
|
| 328 | + $allYearsLink = $this->cObj->typoLink($this->pi_getLL('allYears', '', TRUE).' '.$this->doc->getTitle($this->doc->uid), $linkConf); |
|
| 329 | 329 | // Fill markers. |
| 330 | 330 | $markerArray = [ |
| 331 | 331 | '###LABEL_CHOOSE_YEAR###' => $this->pi_getLL('label.please_choose_year'), |
@@ -59,11 +59,11 @@ discard block |
||
| 59 | 59 | 'tx_dlf_documents', |
| 60 | 60 | 'tx_dlf_relations', |
| 61 | 61 | 'tx_dlf_collections', |
| 62 | - 'AND tx_dlf_documents.pid=' . intval($this->conf['pages']) |
|
| 63 | - . ' AND tx_dlf_collections.pid=' . intval($this->conf['pages']) |
|
| 62 | + 'AND tx_dlf_documents.pid='.intval($this->conf['pages']) |
|
| 63 | + . ' AND tx_dlf_collections.pid='.intval($this->conf['pages']) |
|
| 64 | 64 | . ' AND tx_dlf_documents.partof=0' |
| 65 | - . ' AND tx_dlf_collections.uid IN (' . $GLOBALS['TYPO3_DB']->cleanIntList($this->conf['collections']) . ')' |
|
| 66 | - . ' AND tx_dlf_relations.ident=' . $GLOBALS['TYPO3_DB']->fullQuoteStr('docs_colls', 'tx_dlf_relations') |
|
| 65 | + . ' AND tx_dlf_collections.uid IN ('.$GLOBALS['TYPO3_DB']->cleanIntList($this->conf['collections']).')' |
|
| 66 | + . ' AND tx_dlf_relations.ident='.$GLOBALS['TYPO3_DB']->fullQuoteStr('docs_colls', 'tx_dlf_relations') |
|
| 67 | 67 | . Helper::whereClause('tx_dlf_documents') |
| 68 | 68 | . Helper::whereClause('tx_dlf_collections'), |
| 69 | 69 | 'tx_dlf_documents.uid' |
@@ -73,11 +73,11 @@ discard block |
||
| 73 | 73 | 'tx_dlf_documents', |
| 74 | 74 | 'tx_dlf_relations', |
| 75 | 75 | 'tx_dlf_collections', |
| 76 | - 'AND tx_dlf_documents.pid=' . intval($this->conf['pages']) |
|
| 77 | - . ' AND tx_dlf_collections.pid=' . intval($this->conf['pages']) |
|
| 78 | - . ' AND NOT tx_dlf_documents.uid IN (SELECT DISTINCT tx_dlf_documents.partof FROM tx_dlf_documents WHERE NOT tx_dlf_documents.partof=0' . Helper::whereClause('tx_dlf_documents') . ')' |
|
| 79 | - . ' AND tx_dlf_collections.uid IN (' . $GLOBALS['TYPO3_DB']->cleanIntList($this->conf['collections']) . ')' |
|
| 80 | - . ' AND tx_dlf_relations.ident=' . $GLOBALS['TYPO3_DB']->fullQuoteStr('docs_colls', 'tx_dlf_relations') |
|
| 76 | + 'AND tx_dlf_documents.pid='.intval($this->conf['pages']) |
|
| 77 | + . ' AND tx_dlf_collections.pid='.intval($this->conf['pages']) |
|
| 78 | + . ' AND NOT tx_dlf_documents.uid IN (SELECT DISTINCT tx_dlf_documents.partof FROM tx_dlf_documents WHERE NOT tx_dlf_documents.partof=0'.Helper::whereClause('tx_dlf_documents').')' |
|
| 79 | + . ' AND tx_dlf_collections.uid IN ('.$GLOBALS['TYPO3_DB']->cleanIntList($this->conf['collections']).')' |
|
| 80 | + . ' AND tx_dlf_relations.ident='.$GLOBALS['TYPO3_DB']->fullQuoteStr('docs_colls', 'tx_dlf_relations') |
|
| 81 | 81 | . Helper::whereClause('tx_dlf_documents') |
| 82 | 82 | . Helper::whereClause('tx_dlf_collections'), |
| 83 | 83 | 'tx_dlf_documents.uid' |
@@ -101,8 +101,8 @@ discard block |
||
| 101 | 101 | $resultVolumes = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
| 102 | 102 | 'tx_dlf_documents.uid AS uid', |
| 103 | 103 | 'tx_dlf_documents', |
| 104 | - 'tx_dlf_documents.pid=' . intval($this->conf['pages']) |
|
| 105 | - . ' AND NOT tx_dlf_documents.uid IN (SELECT DISTINCT tx_dlf_documents.partof FROM tx_dlf_documents WHERE NOT tx_dlf_documents.partof=0' . Helper::whereClause('tx_dlf_documents') . ')' |
|
| 104 | + 'tx_dlf_documents.pid='.intval($this->conf['pages']) |
|
| 105 | + . ' AND NOT tx_dlf_documents.uid IN (SELECT DISTINCT tx_dlf_documents.partof FROM tx_dlf_documents WHERE NOT tx_dlf_documents.partof=0'.Helper::whereClause('tx_dlf_documents').')' |
|
| 106 | 106 | . Helper::whereClause('tx_dlf_documents') |
| 107 | 107 | ); |
| 108 | 108 | } |
@@ -115,8 +115,8 @@ discard block |
||
| 115 | 115 | '###VOLUMES###' |
| 116 | 116 | ], |
| 117 | 117 | 'value' => [ |
| 118 | - $countTitles . ($countTitles > 1 ? $this->pi_getLL('titles', '', TRUE) : $this->pi_getLL('title', '', TRUE)), |
|
| 119 | - $countVolumes . ($countVolumes > 1 ? $this->pi_getLL('volumes', '', TRUE) : $this->pi_getLL('volume', '', TRUE)) |
|
| 118 | + $countTitles.($countTitles > 1 ? $this->pi_getLL('titles', '', TRUE) : $this->pi_getLL('title', '', TRUE)), |
|
| 119 | + $countVolumes.($countVolumes > 1 ? $this->pi_getLL('volumes', '', TRUE) : $this->pi_getLL('volume', '', TRUE)) |
|
| 120 | 120 | ] |
| 121 | 121 | ]; |
| 122 | 122 | // Apply replacements. |
@@ -90,18 +90,18 @@ discard block |
||
| 90 | 90 | $additionalWhere = ''; |
| 91 | 91 | // Check for pre-selected collections. |
| 92 | 92 | if (!empty($this->piVars['collection'])) { |
| 93 | - $additionalWhere = ' AND tx_dlf_collections.uid=' . intval($this->piVars['collection']); |
|
| 93 | + $additionalWhere = ' AND tx_dlf_collections.uid='.intval($this->piVars['collection']); |
|
| 94 | 94 | } elseif (!empty($this->conf['collections'])) { |
| 95 | - $additionalWhere = ' AND tx_dlf_collections.uid IN (' . $GLOBALS['TYPO3_DB']->cleanIntList($this->conf['collections']) . ')'; |
|
| 95 | + $additionalWhere = ' AND tx_dlf_collections.uid IN ('.$GLOBALS['TYPO3_DB']->cleanIntList($this->conf['collections']).')'; |
|
| 96 | 96 | } |
| 97 | 97 | $result = $GLOBALS['TYPO3_DB']->exec_SELECT_mm_query( |
| 98 | 98 | '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', |
| 99 | 99 | 'tx_dlf_documents', |
| 100 | 100 | 'tx_dlf_relations', |
| 101 | 101 | 'tx_dlf_collections', |
| 102 | - 'AND tx_dlf_documents.pid=' . intval($this->conf['pages']) |
|
| 103 | - . ' AND tx_dlf_relations.ident=' . $GLOBALS['TYPO3_DB']->fullQuoteStr('docs_colls', 'tx_dlf_relations') |
|
| 104 | - . ' AND tx_dlf_collections.pid=' . intval($this->conf['pages']) |
|
| 102 | + 'AND tx_dlf_documents.pid='.intval($this->conf['pages']) |
|
| 103 | + . ' AND tx_dlf_relations.ident='.$GLOBALS['TYPO3_DB']->fullQuoteStr('docs_colls', 'tx_dlf_relations') |
|
| 104 | + . ' AND tx_dlf_collections.pid='.intval($this->conf['pages']) |
|
| 105 | 105 | . $additionalWhere |
| 106 | 106 | . Helper::whereClause('tx_dlf_documents') |
| 107 | 107 | . Helper::whereClause('tx_dlf_collections'), |
@@ -120,12 +120,12 @@ discard block |
||
| 120 | 120 | ) { |
| 121 | 121 | $superiorTitle = Document::getTitle($resArray['partof'], TRUE); |
| 122 | 122 | if (!empty($superiorTitle)) { |
| 123 | - $title .= '[' . $superiorTitle . ']'; |
|
| 123 | + $title .= '['.$superiorTitle.']'; |
|
| 124 | 124 | } |
| 125 | 125 | } |
| 126 | 126 | // Get title of document. |
| 127 | 127 | if (!empty($resArray['title'])) { |
| 128 | - $title .= ' ' . $resArray['title']; |
|
| 128 | + $title .= ' '.$resArray['title']; |
|
| 129 | 129 | } |
| 130 | 130 | // Set default title if empty. |
| 131 | 131 | if (empty($title)) { |
@@ -133,13 +133,13 @@ discard block |
||
| 133 | 133 | } |
| 134 | 134 | // Append volume information. |
| 135 | 135 | if (!empty($resArray['volume'])) { |
| 136 | - $title .= ', ' . $this->pi_getLL('volume') . ' ' . $resArray['volume']; |
|
| 136 | + $title .= ', '.$this->pi_getLL('volume').' '.$resArray['volume']; |
|
| 137 | 137 | } |
| 138 | 138 | // Is this document new or updated? |
| 139 | 139 | if ($resArray['crdate'] == $resArray['tstamp']) { |
| 140 | - $title = $this->pi_getLL('new') . ' ' . trim($title); |
|
| 140 | + $title = $this->pi_getLL('new').' '.trim($title); |
|
| 141 | 141 | } else { |
| 142 | - $title = $this->pi_getLL('update') . ' ' . trim($title); |
|
| 142 | + $title = $this->pi_getLL('update').' '.trim($title); |
|
| 143 | 143 | } |
| 144 | 144 | $item->appendChild($rss->createElement('title', htmlspecialchars($title, ENT_NOQUOTES, 'UTF-8'))); |
| 145 | 145 | // Add link. |
@@ -170,10 +170,10 @@ discard block |
||
| 170 | 170 | // Send headers. |
| 171 | 171 | header('HTTP/1.1 200 OK'); |
| 172 | 172 | header('Cache-Control: no-cache'); |
| 173 | - header('Content-Length: ' . strlen($content)); |
|
| 173 | + header('Content-Length: '.strlen($content)); |
|
| 174 | 174 | header('Content-Type: application/rss+xml; charset=utf-8'); |
| 175 | - header('Date: ' . date('r', $GLOBALS['EXEC_TIME'])); |
|
| 176 | - header('Expires: ' . date('r', $GLOBALS['EXEC_TIME'])); |
|
| 175 | + header('Date: '.date('r', $GLOBALS['EXEC_TIME'])); |
|
| 176 | + header('Expires: '.date('r', $GLOBALS['EXEC_TIME'])); |
|
| 177 | 177 | echo $content; |
| 178 | 178 | exit; |
| 179 | 179 | } |
@@ -73,33 +73,33 @@ discard block |
||
| 73 | 73 | |
| 74 | 74 | $pageRenderer = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Page\PageRenderer::class); |
| 75 | 75 | // Add OpenLayers library. |
| 76 | - $pageRenderer->addCssFile(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey) . 'Resources/Public/Javascript/OpenLayers/ol3.css'); |
|
| 77 | - $pageRenderer->addJsFooterFile(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey) . 'Resources/Public/Javascript/OpenLayers/glif.min.js'); |
|
| 78 | - $pageRenderer->addJsFooterFile(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey) . 'Resources/Public/Javascript/OpenLayers/ol3-dlf.js'); |
|
| 76 | + $pageRenderer->addCssFile(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'Resources/Public/Javascript/OpenLayers/ol3.css'); |
|
| 77 | + $pageRenderer->addJsFooterFile(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'Resources/Public/Javascript/OpenLayers/glif.min.js'); |
|
| 78 | + $pageRenderer->addJsFooterFile(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'Resources/Public/Javascript/OpenLayers/ol3-dlf.js'); |
|
| 79 | 79 | // Add viewer library. |
| 80 | - $pageRenderer->addJsFooterFile(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey) . 'Resources/Public/Javascript/PageView/Utility.js'); |
|
| 81 | - $pageRenderer->addJsFooterFile(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey) . 'Resources/Public/Javascript/PageView/OL3.js'); |
|
| 82 | - $pageRenderer->addJsFooterFile(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey) . 'Resources/Public/Javascript/PageView/OL3Styles.js'); |
|
| 83 | - $pageRenderer->addJsFooterFile(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey) . 'Resources/Public/Javascript/PageView/OL3Sources.js'); |
|
| 84 | - $pageRenderer->addJsFooterFile(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey) . 'Resources/Public/Javascript/PageView/AltoParser.js'); |
|
| 85 | - $pageRenderer->addJsFooterFile(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey) . 'Resources/Public/Javascript/PageView/ImageManipulationControl.js'); |
|
| 86 | - $pageRenderer->addJsFooterFile(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey) . 'Resources/Public/Javascript/PageView/FulltextControl.js'); |
|
| 80 | + $pageRenderer->addJsFooterFile(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'Resources/Public/Javascript/PageView/Utility.js'); |
|
| 81 | + $pageRenderer->addJsFooterFile(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'Resources/Public/Javascript/PageView/OL3.js'); |
|
| 82 | + $pageRenderer->addJsFooterFile(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'Resources/Public/Javascript/PageView/OL3Styles.js'); |
|
| 83 | + $pageRenderer->addJsFooterFile(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'Resources/Public/Javascript/PageView/OL3Sources.js'); |
|
| 84 | + $pageRenderer->addJsFooterFile(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'Resources/Public/Javascript/PageView/AltoParser.js'); |
|
| 85 | + $pageRenderer->addJsFooterFile(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'Resources/Public/Javascript/PageView/ImageManipulationControl.js'); |
|
| 86 | + $pageRenderer->addJsFooterFile(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'Resources/Public/Javascript/PageView/FulltextControl.js'); |
|
| 87 | 87 | if ($this->doc instanceof IiifManifest) { |
| 88 | - $pageRenderer->addJsFooterFile(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey) . 'Resources/Public/Javascript/PageView/AnnotationParser.js'); |
|
| 89 | - $pageRenderer->addJsFooterFile(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey) . 'Resources/Public/Javascript/PageView/AnnotationControl.js'); |
|
| 88 | + $pageRenderer->addJsFooterFile(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'Resources/Public/Javascript/PageView/AnnotationParser.js'); |
|
| 89 | + $pageRenderer->addJsFooterFile(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'Resources/Public/Javascript/PageView/AnnotationControl.js'); |
|
| 90 | 90 | } |
| 91 | - $pageRenderer->addJsFooterFile(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey) . 'Resources/Public/Javascript/PageView/PageView.js'); |
|
| 91 | + $pageRenderer->addJsFooterFile(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'Resources/Public/Javascript/PageView/PageView.js'); |
|
| 92 | 92 | // Add viewer configuration. |
| 93 | 93 | $viewerConfiguration = ' |
| 94 | 94 | $(document).ready(function() { |
| 95 | 95 | if (dlfUtils.exists(dlfViewer)) { |
| 96 | 96 | tx_dlf_viewer = new dlfViewer({ |
| 97 | - controls: ["' . implode('", "', $this->controls) . '"], |
|
| 98 | - div: "' . $this->conf['elementId'] . '", |
|
| 99 | - images: ' . json_encode($this->images) . ', |
|
| 100 | - fulltexts: ' . json_encode($this->fulltexts) . ', |
|
| 101 | - annotationContainers: ' . json_encode($this->annotationContainers) . ', |
|
| 102 | - useInternalProxy: ' . ($this->conf['useInternalProxy'] ? 1 : 0) . ' |
|
| 97 | + controls: ["' . implode('", "', $this->controls).'"], |
|
| 98 | + div: "' . $this->conf['elementId'].'", |
|
| 99 | + images: ' . json_encode($this->images).', |
|
| 100 | + fulltexts: ' . json_encode($this->fulltexts).', |
|
| 101 | + annotationContainers: ' . json_encode($this->annotationContainers).', |
|
| 102 | + useInternalProxy: ' . ($this->conf['useInternalProxy'] ? 1 : 0).' |
|
| 103 | 103 | }); |
| 104 | 104 | } |
| 105 | 105 | }); |
@@ -119,14 +119,14 @@ discard block |
||
| 119 | 119 | $markerArray = []; |
| 120 | 120 | if ($this->piVars['id']) { |
| 121 | 121 | if ($this->conf['crop']) { |
| 122 | - $markerArray['###EDITBUTTON###'] = '<a href="javascript: tx_dlf_viewer.activateSelection();">' . $this->pi_getLL('editMode', '', TRUE) . '</a>'; |
|
| 123 | - $markerArray['###EDITREMOVE###'] = '<a href="javascript: tx_dlf_viewer.resetCropSelection();">' . $this->pi_getLL('editRemove', '', TRUE) . '</a>'; |
|
| 122 | + $markerArray['###EDITBUTTON###'] = '<a href="javascript: tx_dlf_viewer.activateSelection();">'.$this->pi_getLL('editMode', '', TRUE).'</a>'; |
|
| 123 | + $markerArray['###EDITREMOVE###'] = '<a href="javascript: tx_dlf_viewer.resetCropSelection();">'.$this->pi_getLL('editRemove', '', TRUE).'</a>'; |
|
| 124 | 124 | } else { |
| 125 | 125 | $markerArray['###EDITBUTTON###'] = ''; |
| 126 | 126 | $markerArray['###EDITREMOVE###'] = ''; |
| 127 | 127 | } |
| 128 | 128 | if ($this->conf['magnifier']) { |
| 129 | - $markerArray['###MAGNIFIER###'] = '<a href="javascript: tx_dlf_viewer.activateMagnifier();">' . $this->pi_getLL('magnifier', '', TRUE) . '</a>'; |
|
| 129 | + $markerArray['###MAGNIFIER###'] = '<a href="javascript: tx_dlf_viewer.activateMagnifier();">'.$this->pi_getLL('magnifier', '', TRUE).'</a>'; |
|
| 130 | 130 | } else { |
| 131 | 131 | $markerArray['###MAGNIFIER###'] = ''; |
| 132 | 132 | } |
@@ -159,15 +159,15 @@ discard block |
||
| 159 | 159 | 'additionalParams' => \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, $params, '', TRUE, FALSE), |
| 160 | 160 | 'title' => $label |
| 161 | 161 | ]; |
| 162 | - $output = '<form id="addToBasketForm" action="' . $this->cObj->typoLink_URL($basketConf) . '" method="post">'; |
|
| 163 | - $output .= '<input type="hidden" name="tx_dlf[startpage]" id="startpage" value="' . $this->piVars['page'] . '">'; |
|
| 164 | - $output .= '<input type="hidden" name="tx_dlf[endpage]" id="endpage" value="' . $this->piVars['page'] . '">'; |
|
| 162 | + $output = '<form id="addToBasketForm" action="'.$this->cObj->typoLink_URL($basketConf).'" method="post">'; |
|
| 163 | + $output .= '<input type="hidden" name="tx_dlf[startpage]" id="startpage" value="'.$this->piVars['page'].'">'; |
|
| 164 | + $output .= '<input type="hidden" name="tx_dlf[endpage]" id="endpage" value="'.$this->piVars['page'].'">'; |
|
| 165 | 165 | $output .= '<input type="hidden" name="tx_dlf[startX]" id="startX">'; |
| 166 | 166 | $output .= '<input type="hidden" name="tx_dlf[startY]" id="startY">'; |
| 167 | 167 | $output .= '<input type="hidden" name="tx_dlf[endX]" id="endX">'; |
| 168 | 168 | $output .= '<input type="hidden" name="tx_dlf[endY]" id="endY">'; |
| 169 | 169 | $output .= '<input type="hidden" name="tx_dlf[rotation]" id="rotation">'; |
| 170 | - $output .= '<button id="submitBasketForm" onclick="this.form.submit()">' . $label . '</button>'; |
|
| 170 | + $output .= '<button id="submitBasketForm" onclick="this.form.submit()">'.$label.'</button>'; |
|
| 171 | 171 | $output .= '</form>'; |
| 172 | 172 | $output .= '<script>'; |
| 173 | 173 | $output .= '$(document).ready(function() { $("#submitBasketForm").click(function() { $("#addToBasketForm").submit(); }); });'; |
@@ -201,14 +201,14 @@ discard block |
||
| 201 | 201 | // Configure @action URL for form. |
| 202 | 202 | $linkConf = [ |
| 203 | 203 | 'parameter' => $GLOBALS['TSFE']->id, |
| 204 | - 'additionalParams' => '&eID=tx_dlf_pageview_proxy&url=' . urlencode($image['url']), |
|
| 204 | + 'additionalParams' => '&eID=tx_dlf_pageview_proxy&url='.urlencode($image['url']), |
|
| 205 | 205 | ]; |
| 206 | 206 | $image['url'] = $this->cObj->typoLink_URL($linkConf); |
| 207 | 207 | } |
| 208 | 208 | $image['mimetype'] = $this->doc->getFileMimeType($this->doc->physicalStructureInfo[$this->doc->physicalStructure[$page]]['files'][$fileGrp]); |
| 209 | 209 | break; |
| 210 | 210 | } else { |
| 211 | - Helper::devLog('File not found in fileGrp "' . $fileGrp . '"', DEVLOG_SEVERITY_WARNING); |
|
| 211 | + Helper::devLog('File not found in fileGrp "'.$fileGrp.'"', DEVLOG_SEVERITY_WARNING); |
|
| 212 | 212 | } |
| 213 | 213 | } |
| 214 | 214 | return $image; |
@@ -232,12 +232,12 @@ discard block |
||
| 232 | 232 | // Configure @action URL for form. |
| 233 | 233 | $linkConf = [ |
| 234 | 234 | 'parameter' => $GLOBALS['TSFE']->id, |
| 235 | - 'additionalParams' => '&eID=tx_dlf_pageview_proxy&url=' . urlencode($fulltext['url']), |
|
| 235 | + 'additionalParams' => '&eID=tx_dlf_pageview_proxy&url='.urlencode($fulltext['url']), |
|
| 236 | 236 | ]; |
| 237 | 237 | $fulltext['url'] = $this->cObj->typoLink_URL($linkConf); |
| 238 | 238 | $fulltext['mimetype'] = $this->doc->getFileMimeType($this->doc->physicalStructureInfo[$this->doc->physicalStructure[$page]]['files'][$this->conf['fileGrpFulltext']]); |
| 239 | 239 | } else { |
| 240 | - Helper::devLog('File not found in fileGrp "' . $this->conf['fileGrpFulltext'] . '"', DEVLOG_SEVERITY_WARNING); |
|
| 240 | + Helper::devLog('File not found in fileGrp "'.$this->conf['fileGrpFulltext'].'"', DEVLOG_SEVERITY_WARNING); |
|
| 241 | 241 | } |
| 242 | 242 | return $fulltext; |
| 243 | 243 | } |
@@ -43,21 +43,21 @@ |
||
| 43 | 43 | { |
| 44 | 44 | $pageRenderer = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Page\PageRenderer::class); |
| 45 | 45 | // Add AudioPlayer library. |
| 46 | - $pageRenderer->addCssFile(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey) . 'Resources/Public/Javascript/jPlayer/blue.monday/css/jplayer.blue.monday.min.css'); |
|
| 46 | + $pageRenderer->addCssFile(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'Resources/Public/Javascript/jPlayer/blue.monday/css/jplayer.blue.monday.min.css'); |
|
| 47 | 47 | $pageRenderer->addCssInlineBlock('kitodo-audioplayer-configuration', '#tx-dlf-audio { width: 100px; height: 100px; }'); |
| 48 | - $pageRenderer->addJsFooterFile(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey) . 'Resources/Public/Javascript/jPlayer/jquery.jplayer.min.js'); |
|
| 49 | - $pageRenderer->addJsFooterFile(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey) . 'Resources/Public/Javascript/AudioPlayer/AudioPlayer.js'); |
|
| 48 | + $pageRenderer->addJsFooterFile(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'Resources/Public/Javascript/jPlayer/jquery.jplayer.min.js'); |
|
| 49 | + $pageRenderer->addJsFooterFile(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'Resources/Public/Javascript/AudioPlayer/AudioPlayer.js'); |
|
| 50 | 50 | // Add AudioPlayer configuration. |
| 51 | 51 | $audioplayerConfiguration = ' |
| 52 | 52 | $(document).ready(function() { |
| 53 | 53 | AudioPlayer = new dlfAudioPlayer({ |
| 54 | 54 | audio: { |
| 55 | - mimeType: "' . $this->audio['mimetype'] . '", |
|
| 56 | - title: "' . $this->audio['label'] . '", |
|
| 57 | - url: "' . $this->audio['url'] . '" |
|
| 55 | + mimeType: "' . $this->audio['mimetype'].'", |
|
| 56 | + title: "' . $this->audio['label'].'", |
|
| 57 | + url: "' . $this->audio['url'].'" |
|
| 58 | 58 | }, |
| 59 | 59 | parentElId: "tx-dlf-audio", |
| 60 | - swfPath: "' . \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey) . 'Resources/Public/Javascript/jPlayer/jquery.jplayer.swf" |
|
| 60 | + swfPath: "' . \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'Resources/Public/Javascript/jPlayer/jquery.jplayer.swf" |
|
| 61 | 61 | }); |
| 62 | 62 | }); |
| 63 | 63 | '; |
@@ -65,18 +65,18 @@ discard block |
||
| 65 | 65 | $linkConf = [ |
| 66 | 66 | 'parameter' => $GLOBALS['TSFE']->id |
| 67 | 67 | ]; |
| 68 | - $output = '<form action="' . $this->cObj->typoLink_URL($linkConf) . '" method="get"><div><input type="hidden" name="id" value="' . $GLOBALS['TSFE']->id . '" />'; |
|
| 68 | + $output = '<form action="'.$this->cObj->typoLink_URL($linkConf).'" method="get"><div><input type="hidden" name="id" value="'.$GLOBALS['TSFE']->id.'" />'; |
|
| 69 | 69 | // Add plugin variables. |
| 70 | 70 | foreach ($this->piVars as $piVar => $value) { |
| 71 | 71 | if ($piVar != 'page' && $piVar != 'DATA' && !empty($value)) { |
| 72 | - $output .= '<input type="hidden" name="' . $this->prefixId . '[' . $piVar . ']" value="' . $value . '" />'; |
|
| 72 | + $output .= '<input type="hidden" name="'.$this->prefixId.'['.$piVar.']" value="'.$value.'" />'; |
|
| 73 | 73 | } |
| 74 | 74 | } |
| 75 | 75 | // Add page selector. |
| 76 | - $uniqId = uniqid(Helper::getUnqualifiedClassName(get_class($this)) . '-'); |
|
| 77 | - $output .= '<label for="' . $uniqId . '">' . $this->pi_getLL('selectPage', '', TRUE) . '</label><select id="' . $uniqId . '" name="' . $this->prefixId . '[page]" onchange="javascript:this.form.submit();"' . ($this->doc->numPages < 1 ? ' disabled="disabled"' : '') . '>'; |
|
| 76 | + $uniqId = uniqid(Helper::getUnqualifiedClassName(get_class($this)).'-'); |
|
| 77 | + $output .= '<label for="'.$uniqId.'">'.$this->pi_getLL('selectPage', '', TRUE).'</label><select id="'.$uniqId.'" name="'.$this->prefixId.'[page]" onchange="javascript:this.form.submit();"'.($this->doc->numPages < 1 ? ' disabled="disabled"' : '').'>'; |
|
| 78 | 78 | for ($i = 1; $i <= $this->doc->numPages; $i++) { |
| 79 | - $output .= '<option value="' . $i . '"' . ($this->piVars['page'] == $i ? ' selected="selected"' : '') . '>[' . $i . ']' . ($this->doc->physicalStructureInfo[$this->doc->physicalStructure[$i]]['orderlabel'] ? ' - ' . htmlspecialchars($this->doc->physicalStructureInfo[$this->doc->physicalStructure[$i]]['orderlabel']) : '') . '</option>'; |
|
| 79 | + $output .= '<option value="'.$i.'"'.($this->piVars['page'] == $i ? ' selected="selected"' : '').'>['.$i.']'.($this->doc->physicalStructureInfo[$this->doc->physicalStructure[$i]]['orderlabel'] ? ' - '.htmlspecialchars($this->doc->physicalStructureInfo[$this->doc->physicalStructure[$i]]['orderlabel']) : '').'</option>'; |
|
| 80 | 80 | } |
| 81 | 81 | $output .= '</select></div></form>'; |
| 82 | 82 | return $output; |
@@ -134,37 +134,37 @@ discard block |
||
| 134 | 134 | if ($this->piVars['page'] > 1) { |
| 135 | 135 | $markerArray['###FIRST###'] = $this->makeLink($this->pi_getLL('firstPage', '', TRUE), ['page' => 1]); |
| 136 | 136 | } else { |
| 137 | - $markerArray['###FIRST###'] = '<span>' . $this->pi_getLL('firstPage', '', TRUE) . '</span>'; |
|
| 137 | + $markerArray['###FIRST###'] = '<span>'.$this->pi_getLL('firstPage', '', TRUE).'</span>'; |
|
| 138 | 138 | } |
| 139 | 139 | // Link back X pages. |
| 140 | 140 | if ($this->piVars['page'] > $pageSteps) { |
| 141 | 141 | $markerArray['###BACK###'] = $this->makeLink(sprintf($this->pi_getLL('backXPages', '', TRUE), $pageSteps), ['page' => $this->piVars['page'] - $pageSteps]); |
| 142 | 142 | } else { |
| 143 | - $markerArray['###BACK###'] = '<span>' . sprintf($this->pi_getLL('backXPages', '', TRUE), $pageSteps) . '</span>'; |
|
| 143 | + $markerArray['###BACK###'] = '<span>'.sprintf($this->pi_getLL('backXPages', '', TRUE), $pageSteps).'</span>'; |
|
| 144 | 144 | } |
| 145 | 145 | // Link to previous page. |
| 146 | 146 | if ($this->piVars['page'] > (1 + $this->piVars['double'])) { |
| 147 | 147 | $markerArray['###PREVIOUS###'] = $this->makeLink($this->pi_getLL('prevPage', '', TRUE), ['page' => $this->piVars['page'] - (1 + $this->piVars['double'])]); |
| 148 | 148 | } else { |
| 149 | - $markerArray['###PREVIOUS###'] = '<span>' . $this->pi_getLL('prevPage', '', TRUE) . '</span>'; |
|
| 149 | + $markerArray['###PREVIOUS###'] = '<span>'.$this->pi_getLL('prevPage', '', TRUE).'</span>'; |
|
| 150 | 150 | } |
| 151 | 151 | // Link to next page. |
| 152 | 152 | if ($this->piVars['page'] < ($this->doc->numPages - $this->piVars['double'])) { |
| 153 | 153 | $markerArray['###NEXT###'] = $this->makeLink($this->pi_getLL('nextPage', '', TRUE), ['page' => $this->piVars['page'] + (1 + $this->piVars['double'])]); |
| 154 | 154 | } else { |
| 155 | - $markerArray['###NEXT###'] = '<span>' . $this->pi_getLL('nextPage', '', TRUE) . '</span>'; |
|
| 155 | + $markerArray['###NEXT###'] = '<span>'.$this->pi_getLL('nextPage', '', TRUE).'</span>'; |
|
| 156 | 156 | } |
| 157 | 157 | // Link forward X pages. |
| 158 | 158 | if ($this->piVars['page'] <= ($this->doc->numPages - $pageSteps)) { |
| 159 | 159 | $markerArray['###FORWARD###'] = $this->makeLink(sprintf($this->pi_getLL('forwardXPages', '', TRUE), $pageSteps), ['page' => $this->piVars['page'] + $pageSteps]); |
| 160 | 160 | } else { |
| 161 | - $markerArray['###FORWARD###'] = '<span>' . sprintf($this->pi_getLL('forwardXPages', '', TRUE), $pageSteps) . '</span>'; |
|
| 161 | + $markerArray['###FORWARD###'] = '<span>'.sprintf($this->pi_getLL('forwardXPages', '', TRUE), $pageSteps).'</span>'; |
|
| 162 | 162 | } |
| 163 | 163 | // Link to last page. |
| 164 | 164 | if ($this->piVars['page'] < $this->doc->numPages) { |
| 165 | 165 | $markerArray['###LAST###'] = $this->makeLink($this->pi_getLL('lastPage', '', TRUE), ['page' => $this->doc->numPages]); |
| 166 | 166 | } else { |
| 167 | - $markerArray['###LAST###'] = '<span>' . $this->pi_getLL('lastPage', '', TRUE) . '</span>'; |
|
| 167 | + $markerArray['###LAST###'] = '<span>'.$this->pi_getLL('lastPage', '', TRUE).'</span>'; |
|
| 168 | 168 | } |
| 169 | 169 | // Add double page switcher. |
| 170 | 170 | if ($this->doc->numPages > 0) { |
@@ -176,11 +176,11 @@ discard block |
||
| 176 | 176 | if ($this->piVars['double'] && $this->piVars['page'] < $this->doc->numPages) { |
| 177 | 177 | $markerArray['###DOUBLEPAGE+1###'] = $this->makeLink($this->pi_getLL('doublePage+1', '', TRUE), ['page' => $this->piVars['page'] + 1]); |
| 178 | 178 | } else { |
| 179 | - $markerArray['###DOUBLEPAGE+1###'] = '<span>' . $this->pi_getLL('doublePage+1', '', TRUE) . '</span>'; |
|
| 179 | + $markerArray['###DOUBLEPAGE+1###'] = '<span>'.$this->pi_getLL('doublePage+1', '', TRUE).'</span>'; |
|
| 180 | 180 | } |
| 181 | 181 | } else { |
| 182 | - $markerArray['###DOUBLEPAGE###'] = '<span>' . $this->pi_getLL('doublePageOn', '', TRUE) . '</span>'; |
|
| 183 | - $markerArray['###DOUBLEPAGE+1###'] = '<span>' . $this->pi_getLL('doublePage+1', '', TRUE) . '</span>'; |
|
| 182 | + $markerArray['###DOUBLEPAGE###'] = '<span>'.$this->pi_getLL('doublePageOn', '', TRUE).'</span>'; |
|
| 183 | + $markerArray['###DOUBLEPAGE+1###'] = '<span>'.$this->pi_getLL('doublePage+1', '', TRUE).'</span>'; |
|
| 184 | 184 | } |
| 185 | 185 | // Add page selector. |
| 186 | 186 | $markerArray['###PAGESELECT###'] = $this->getPageSelector(); |