@@ -39,8 +39,8 @@ discard block |
||
| 39 | 39 | public function main(ServerRequestInterface $request) |
| 40 | 40 | { |
| 41 | 41 | $parameters = $request->getParsedBody(); |
| 42 | - $encrypted = (string)$parameters['encrypted']; |
|
| 43 | - $hashed = (string)$parameters['hashed']; |
|
| 42 | + $encrypted = (string) $parameters['encrypted']; |
|
| 43 | + $hashed = (string) $parameters['hashed']; |
|
| 44 | 44 | if (empty($encrypted) || empty($hashed)) { |
| 45 | 45 | throw new \InvalidArgumentException('No valid parameter passed!', 1580585079); |
| 46 | 46 | } |
@@ -48,12 +48,12 @@ discard block |
||
| 48 | 48 | |
| 49 | 49 | $output = ''; |
| 50 | 50 | if (!empty($core)) { |
| 51 | - $query = (string)$parameters['q']; |
|
| 52 | - $uid = (string)$parameters['uid']; |
|
| 53 | - $start = (string)$parameters['start']; |
|
| 54 | - $url = trim(Solr::getSolrUrl($core), '/') . '/select?wt=json&q=fulltext:(' . Solr::escapeQuery($query) . ')%20AND%20uid:' . $uid |
|
| 51 | + $query = (string) $parameters['q']; |
|
| 52 | + $uid = (string) $parameters['uid']; |
|
| 53 | + $start = (string) $parameters['start']; |
|
| 54 | + $url = trim(Solr::getSolrUrl($core), '/').'/select?wt=json&q=fulltext:('.Solr::escapeQuery($query).')%20AND%20uid:'.$uid |
|
| 55 | 55 | . '&hl=on&hl.fl=fulltext&fl=uid,id,page&hl.method=fastVector' |
| 56 | - . '&start=' . $start . '&rows=20'; |
|
| 56 | + . '&start='.$start.'&rows=20'; |
|
| 57 | 57 | $output = GeneralUtility::getUrl($url); |
| 58 | 58 | } |
| 59 | 59 | |
@@ -28,16 +28,14 @@ |
||
| 28 | 28 | * @subpackage dlf |
| 29 | 29 | * @access public |
| 30 | 30 | */ |
| 31 | -class SearchInDocument |
|
| 32 | -{ |
|
| 31 | +class SearchInDocument { |
|
| 33 | 32 | /** |
| 34 | 33 | * The main method of the eID script |
| 35 | 34 | * |
| 36 | 35 | * @param ServerRequestInterface $request |
| 37 | 36 | * @return ResponseInterface JSON response of search suggestions |
| 38 | 37 | */ |
| 39 | - public function main(ServerRequestInterface $request) |
|
| 40 | - { |
|
| 38 | + public function main(ServerRequestInterface $request) { |
|
| 41 | 39 | $parameters = $request->getParsedBody(); |
| 42 | 40 | $encrypted = (string)$parameters['encrypted']; |
| 43 | 41 | $hashed = (string)$parameters['hashed']; |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | /** |
| 35 | 35 | * The main method of the eID script |
| 36 | 36 | * |
| 37 | - * @param ServerRequestInterface $request |
|
| 37 | + * @param ServerRequestInterface $request |
|
| 38 | 38 | * @return ResponseInterface XML response of search suggestions |
| 39 | 39 | */ |
| 40 | 40 | public function main(ServerRequestInterface $request) |
@@ -40,8 +40,8 @@ discard block |
||
| 40 | 40 | public function main(ServerRequestInterface $request) |
| 41 | 41 | { |
| 42 | 42 | $parameters = $request->getParsedBody(); |
| 43 | - $encrypted = (string)$parameters['encrypted']; |
|
| 44 | - $hashed = (string)$parameters['hashed']; |
|
| 43 | + $encrypted = (string) $parameters['encrypted']; |
|
| 44 | + $hashed = (string) $parameters['hashed']; |
|
| 45 | 45 | if (empty($encrypted) || empty($hashed)) { |
| 46 | 46 | throw new \InvalidArgumentException('No valid parameter passed!', 1580585079); |
| 47 | 47 | } |
@@ -49,8 +49,8 @@ discard block |
||
| 49 | 49 | |
| 50 | 50 | $output = ''; |
| 51 | 51 | if (!empty($core)) { |
| 52 | - $query = (string)$parameters['q']; |
|
| 53 | - $url = trim(Solr::getSolrUrl($core), '/') . '/suggest/?wt=xml&q=' . Solr::escapeQuery($query); |
|
| 52 | + $query = (string) $parameters['q']; |
|
| 53 | + $url = trim(Solr::getSolrUrl($core), '/').'/suggest/?wt=xml&q='.Solr::escapeQuery($query); |
|
| 54 | 54 | $output = GeneralUtility::getUrl($url); |
| 55 | 55 | } |
| 56 | 56 | |
@@ -29,16 +29,14 @@ |
||
| 29 | 29 | * @subpackage dlf |
| 30 | 30 | * @access public |
| 31 | 31 | */ |
| 32 | -class SearchSuggest |
|
| 33 | -{ |
|
| 32 | +class SearchSuggest { |
|
| 34 | 33 | /** |
| 35 | 34 | * The main method of the eID script |
| 36 | 35 | * |
| 37 | 36 | * @param ServerRequestInterface $request |
| 38 | 37 | * @return ResponseInterface XML response of search suggestions |
| 39 | 38 | */ |
| 40 | - public function main(ServerRequestInterface $request) |
|
| 41 | - { |
|
| 39 | + public function main(ServerRequestInterface $request) { |
|
| 42 | 40 | $parameters = $request->getParsedBody(); |
| 43 | 41 | $encrypted = (string)$parameters['encrypted']; |
| 44 | 42 | $hashed = (string)$parameters['hashed']; |
@@ -38,11 +38,11 @@ |
||
| 38 | 38 | public function main(ServerRequestInterface $request) |
| 39 | 39 | { |
| 40 | 40 | // header parameter for getUrl(); allowed values 0,1,2; default 0 |
| 41 | - $header = (int)$request->getQueryParams()['header']; |
|
| 41 | + $header = (int) $request->getQueryParams()['header']; |
|
| 42 | 42 | $header = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange($header, 0, 2, 0); |
| 43 | 43 | |
| 44 | 44 | // the URI to fetch data or header from |
| 45 | - $url = (string)$request->getQueryParams()['url']; |
|
| 45 | + $url = (string) $request->getQueryParams()['url']; |
|
| 46 | 46 | if (!GeneralUtility::isValidUrl($url)) { |
| 47 | 47 | throw new \InvalidArgumentException('No valid url passed!', 1580482805); |
| 48 | 48 | } |
@@ -24,8 +24,7 @@ discard block |
||
| 24 | 24 | * @subpackage dlf |
| 25 | 25 | * @access public |
| 26 | 26 | */ |
| 27 | -class PageViewProxy |
|
| 28 | -{ |
|
| 27 | +class PageViewProxy { |
|
| 29 | 28 | |
| 30 | 29 | /** |
| 31 | 30 | * The main method of the eID script |
@@ -35,8 +34,7 @@ discard block |
||
| 35 | 34 | * @param ServerRequestInterface $request |
| 36 | 35 | * @return ResponseInterface |
| 37 | 36 | */ |
| 38 | - public function main(ServerRequestInterface $request) |
|
| 39 | - { |
|
| 37 | + public function main(ServerRequestInterface $request) { |
|
| 40 | 38 | // header parameter for getUrl(); allowed values 0,1,2; default 0 |
| 41 | 39 | $header = (int)$request->getQueryParams()['header']; |
| 42 | 40 | $header = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange($header, 0, 2, 0); |
@@ -56,7 +56,7 @@ |
||
| 56 | 56 | if (!empty($fetchedHeaderString)) { |
| 57 | 57 | $fetchedHeader = explode("\n", $fetchedHeaderString); |
| 58 | 58 | foreach ($fetchedHeader as $headerline) { |
| 59 | - if (stripos($headerline, 'Last-Modified:') !== false) { |
|
| 59 | + if (stripos($headerline, 'Last-Modified:') !== FALSE) { |
|
| 60 | 60 | $lastModified = trim(substr($headerline, strpos($headerline, ':') + 1)); |
| 61 | 61 | break; |
| 62 | 62 | } |
@@ -25,8 +25,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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(); |
@@ -157,7 +157,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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###' => ' ', |
| 278 | 278 | '###DAYTUE###' => ' ', |
@@ -284,7 +284,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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'), |
@@ -58,7 +58,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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'), |
@@ -20,8 +20,7 @@ discard block |
||
| 20 | 20 | * @subpackage dlf |
| 21 | 21 | * @access public |
| 22 | 22 | */ |
| 23 | -class Validator extends \Kitodo\Dlf\Common\AbstractPlugin |
|
| 24 | -{ |
|
| 23 | +class Validator extends \Kitodo\Dlf\Common\AbstractPlugin { |
|
| 25 | 24 | public $scriptRelPath = 'Classes/Plugin/Validator.php'; |
| 26 | 25 | |
| 27 | 26 | /** |
@@ -34,8 +33,7 @@ discard block |
||
| 34 | 33 | * |
| 35 | 34 | * @return string The content that is displayed on the website |
| 36 | 35 | */ |
| 37 | - public function main($content, $conf) |
|
| 38 | - { |
|
| 36 | + public function main($content, $conf) { |
|
| 39 | 37 | $this->init($conf); |
| 40 | 38 | // Disable caching for this plugin. |
| 41 | 39 | $this->setCache(false); |
@@ -38,12 +38,12 @@ |
||
| 38 | 38 | { |
| 39 | 39 | $this->init($conf); |
| 40 | 40 | // Disable caching for this plugin. |
| 41 | - $this->setCache(false); |
|
| 41 | + $this->setCache(FALSE); |
|
| 42 | 42 | // Load template file. |
| 43 | 43 | $this->getTemplate(); |
| 44 | 44 | // Load current document. |
| 45 | 45 | $this->loadDocument(); |
| 46 | - if ($this->doc === null) { |
|
| 46 | + if ($this->doc === NULL) { |
|
| 47 | 47 | // Document could not be loaded. |
| 48 | 48 | // Check: |
| 49 | 49 | // - if document location is valid URL |
@@ -55,7 +55,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 | } |
@@ -25,8 +25,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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) { |
@@ -43,7 +43,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 557 | 557 | // Prepare and send the message |
| 558 | 558 | |
| 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 |
@@ -76,11 +76,11 @@ |
||
| 76 | 76 | $annotationContainers = $this->doc->physicalStructureInfo[$this->doc->physicalStructure[$this->piVars['page']]]['annotationContainers']; |
| 77 | 77 | if ($annotationContainers != null && sizeof($annotationContainers) > 0) { |
| 78 | 78 | $markerArray['###ANNOTATION_SELECT###'] = '<a class="select switchoff" id="tx-dlf-tools-annotations" title="" data-dic="annotations-on:' |
| 79 | - . $this->pi_getLL('annotations-on', '', true) . ';annotations-off:' |
|
| 80 | - . $this->pi_getLL('annotations-off', '', true) . '"> </a>'; |
|
| 79 | + . $this->pi_getLL('annotations-on', '', true).';annotations-off:' |
|
| 80 | + . $this->pi_getLL('annotations-off', '', true).'"> </a>'; |
|
| 81 | 81 | // TODO selector for different motivations |
| 82 | 82 | } else { |
| 83 | - $markerArray['###ANNOTATION_SELECT###'] = '<span class="no-annotations">' . $this->pi_getLL('annotations-not-available', '', true) . '</span>'; |
|
| 83 | + $markerArray['###ANNOTATION_SELECT###'] = '<span class="no-annotations">'.$this->pi_getLL('annotations-not-available', '', true).'</span>'; |
|
| 84 | 84 | } |
| 85 | 85 | $content .= $this->templateService->substituteMarkerArray($this->template, $markerArray); |
| 86 | 86 | return $this->pi_wrapInBaseClass($content); |
@@ -26,8 +26,7 @@ discard block |
||
| 26 | 26 | * @subpackage dlf |
| 27 | 27 | * @access public |
| 28 | 28 | */ |
| 29 | -class AnnotationTool extends AbstractPlugin |
|
| 30 | -{ |
|
| 29 | +class AnnotationTool extends AbstractPlugin { |
|
| 31 | 30 | /** |
| 32 | 31 | * @access public |
| 33 | 32 | * @var string |
@@ -44,8 +43,7 @@ discard block |
||
| 44 | 43 | * |
| 45 | 44 | * @return string The content that is displayed on the website |
| 46 | 45 | */ |
| 47 | - public function main($content, $conf) |
|
| 48 | - { |
|
| 46 | + public function main($content, $conf) { |
|
| 49 | 47 | $this->init($conf); |
| 50 | 48 | // Merge configuration with conf array of toolbox. |
| 51 | 49 | if (!empty($this->cObj->data['conf'])) { |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | } |
| 54 | 54 | // Load current document. |
| 55 | 55 | $this->loadDocument(); |
| 56 | - if ($this->doc === null || $this->doc->numPages < 1) { |
|
| 56 | + if ($this->doc === NULL || $this->doc->numPages < 1) { |
|
| 57 | 57 | // Quit without doing anything if required variables are not set. |
| 58 | 58 | return $content; |
| 59 | 59 | } else { |
@@ -74,13 +74,13 @@ discard block |
||
| 74 | 74 | // Load template file. |
| 75 | 75 | $this->getTemplate(); |
| 76 | 76 | $annotationContainers = $this->doc->physicalStructureInfo[$this->doc->physicalStructure[$this->piVars['page']]]['annotationContainers']; |
| 77 | - if ($annotationContainers != null && sizeof($annotationContainers) > 0) { |
|
| 77 | + if ($annotationContainers != NULL && sizeof($annotationContainers) > 0) { |
|
| 78 | 78 | $markerArray['###ANNOTATION_SELECT###'] = '<a class="select switchoff" id="tx-dlf-tools-annotations" title="" data-dic="annotations-on:' |
| 79 | - . $this->pi_getLL('annotations-on', '', true) . ';annotations-off:' |
|
| 80 | - . $this->pi_getLL('annotations-off', '', true) . '"> </a>'; |
|
| 79 | + . $this->pi_getLL('annotations-on', '', TRUE) . ';annotations-off:' |
|
| 80 | + . $this->pi_getLL('annotations-off', '', TRUE) . '"> </a>'; |
|
| 81 | 81 | // TODO selector for different motivations |
| 82 | 82 | } else { |
| 83 | - $markerArray['###ANNOTATION_SELECT###'] = '<span class="no-annotations">' . $this->pi_getLL('annotations-not-available', '', true) . '</span>'; |
|
| 83 | + $markerArray['###ANNOTATION_SELECT###'] = '<span class="no-annotations">' . $this->pi_getLL('annotations-not-available', '', TRUE) . '</span>'; |
|
| 84 | 84 | } |
| 85 | 85 | $content .= $this->templateService->substituteMarkerArray($this->template, $markerArray); |
| 86 | 86 | return $this->pi_wrapInBaseClass($content); |
@@ -124,7 +124,7 @@ |
||
| 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 | /** |
@@ -24,8 +24,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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. |
@@ -53,7 +53,7 @@ |
||
| 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']) |
@@ -45,7 +45,7 @@ |
||
| 45 | 45 | } |
| 46 | 46 | // Load template file. |
| 47 | 47 | $this->getTemplate(); |
| 48 | - $markerArray['###IMAGEMANIPULATION_SELECT###'] = '<span class="tx-dlf-tools-imagetools" id="tx-dlf-tools-imagetools" data-dic="imagemanipulation-on:' . $this->pi_getLL('imagemanipulation-on', '', true) . ';imagemanipulation-off:' . $this->pi_getLL('imagemanipulation-off', '', true) . ';reset:' . $this->pi_getLL('reset', '', true) . ';saturation:' . $this->pi_getLL('saturation', '', true) . ';hue:' . $this->pi_getLL('hue', '', true) . ';contrast:' . $this->pi_getLL('contrast', '', true) . ';brightness:' . $this->pi_getLL('brightness', '', true) . ';invert:' . $this->pi_getLL('invert', '', true) . '" title="' . $this->pi_getLL('no-support', '', true) . '"></span>'; |
|
| 48 | + $markerArray['###IMAGEMANIPULATION_SELECT###'] = '<span class="tx-dlf-tools-imagetools" id="tx-dlf-tools-imagetools" data-dic="imagemanipulation-on:'.$this->pi_getLL('imagemanipulation-on', '', true).';imagemanipulation-off:'.$this->pi_getLL('imagemanipulation-off', '', true).';reset:'.$this->pi_getLL('reset', '', true).';saturation:'.$this->pi_getLL('saturation', '', true).';hue:'.$this->pi_getLL('hue', '', true).';contrast:'.$this->pi_getLL('contrast', '', true).';brightness:'.$this->pi_getLL('brightness', '', true).';invert:'.$this->pi_getLL('invert', '', true).'" title="'.$this->pi_getLL('no-support', '', true).'"></span>'; |
|
| 49 | 49 | $content .= $this->templateService->substituteMarkerArray($this->template, $markerArray); |
| 50 | 50 | return $this->pi_wrapInBaseClass($content); |
| 51 | 51 | } |
@@ -22,8 +22,7 @@ discard block |
||
| 22 | 22 | * @subpackage dlf |
| 23 | 23 | * @access public |
| 24 | 24 | */ |
| 25 | -class ImageManipulationTool extends \Kitodo\Dlf\Common\AbstractPlugin |
|
| 26 | -{ |
|
| 25 | +class ImageManipulationTool extends \Kitodo\Dlf\Common\AbstractPlugin { |
|
| 27 | 26 | public $scriptRelPath = 'Classes/Plugin/Tools/ImageManipulationTool.php'; |
| 28 | 27 | |
| 29 | 28 | /** |
@@ -36,8 +35,7 @@ discard block |
||
| 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'])) { |
@@ -45,7 +45,7 @@ |
||
| 45 | 45 | } |
| 46 | 46 | // Load template file. |
| 47 | 47 | $this->getTemplate(); |
| 48 | - $markerArray['###IMAGEMANIPULATION_SELECT###'] = '<span class="tx-dlf-tools-imagetools" id="tx-dlf-tools-imagetools" data-dic="imagemanipulation-on:' . $this->pi_getLL('imagemanipulation-on', '', true) . ';imagemanipulation-off:' . $this->pi_getLL('imagemanipulation-off', '', true) . ';reset:' . $this->pi_getLL('reset', '', true) . ';saturation:' . $this->pi_getLL('saturation', '', true) . ';hue:' . $this->pi_getLL('hue', '', true) . ';contrast:' . $this->pi_getLL('contrast', '', true) . ';brightness:' . $this->pi_getLL('brightness', '', true) . ';invert:' . $this->pi_getLL('invert', '', true) . '" title="' . $this->pi_getLL('no-support', '', true) . '"></span>'; |
|
| 48 | + $markerArray['###IMAGEMANIPULATION_SELECT###'] = '<span class="tx-dlf-tools-imagetools" id="tx-dlf-tools-imagetools" data-dic="imagemanipulation-on:' . $this->pi_getLL('imagemanipulation-on', '', TRUE) . ';imagemanipulation-off:' . $this->pi_getLL('imagemanipulation-off', '', TRUE) . ';reset:' . $this->pi_getLL('reset', '', TRUE) . ';saturation:' . $this->pi_getLL('saturation', '', TRUE) . ';hue:' . $this->pi_getLL('hue', '', TRUE) . ';contrast:' . $this->pi_getLL('contrast', '', TRUE) . ';brightness:' . $this->pi_getLL('brightness', '', TRUE) . ';invert:' . $this->pi_getLL('invert', '', TRUE) . '" title="' . $this->pi_getLL('no-support', '', TRUE) . '"></span>'; |
|
| 49 | 49 | $content .= $this->templateService->substituteMarkerArray($this->template, $markerArray); |
| 50 | 50 | return $this->pi_wrapInBaseClass($content); |
| 51 | 51 | } |