We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | |
| 25 | 25 | public $scriptRelPath = 'plugins/newspaper/class.tx_dlf_newspaper.php'; |
| 26 | 26 | |
| 27 | - private $allIssues = array (); |
|
| 27 | + private $allIssues = array(); |
|
| 28 | 28 | |
| 29 | 29 | /** |
| 30 | 30 | * The main method of the PlugIn |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
| 83 | 83 | 'tx_dlf_documents.uid AS uid, tx_dlf_documents.mets_label AS label, tx_dlf_documents.mets_orderlabel AS orderlabel, tx_dlf_documents.title AS title, tx_dlf_documents.year AS year', |
| 84 | 84 | 'tx_dlf_documents', |
| 85 | - '(tx_dlf_documents.structure='.tx_dlf_helper::getIdFromIndexName('issue', 'tx_dlf_structures', $this->doc->pid).' AND tx_dlf_documents.partof='.intval($this->doc->uid).')'.tx_dlf_helper::whereClause('tx_dlf_documents'), |
|
| 85 | + '(tx_dlf_documents.structure=' . tx_dlf_helper::getIdFromIndexName('issue', 'tx_dlf_structures', $this->doc->pid) . ' AND tx_dlf_documents.partof=' . intval($this->doc->uid) . ')' . tx_dlf_helper::whereClause('tx_dlf_documents'), |
|
| 86 | 86 | '', |
| 87 | 87 | 'tx_dlf_documents.mets_orderlabel, tx_dlf_documents.mets_label ASC', |
| 88 | 88 | '' |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | } |
| 101 | 101 | } |
| 102 | 102 | |
| 103 | - $issues[] = array ( |
|
| 103 | + $issues[] = array( |
|
| 104 | 104 | 'uid' => $resArray['uid'], |
| 105 | 105 | 'title' => $title, |
| 106 | 106 | 'year' => $resArray['year'] |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | } |
| 110 | 110 | |
| 111 | 111 | // We need an array of issues with month number as key. |
| 112 | - $calendarIssuesByYear = array (); |
|
| 112 | + $calendarIssuesByYear = array(); |
|
| 113 | 113 | foreach ($issues as $issue) { |
| 114 | 114 | $dateTs = strtotime($issue['year']); |
| 115 | 115 | $calendarIssuesByYear[date('Y', $dateTs)][date('n', $dateTs)][date('j', $dateTs)][] = $issue; |
@@ -139,19 +139,19 @@ discard block |
||
| 139 | 139 | } |
| 140 | 140 | |
| 141 | 141 | // Link to years overview |
| 142 | - $linkConf = array ( |
|
| 142 | + $linkConf = array( |
|
| 143 | 143 | 'useCacheHash' => 1, |
| 144 | 144 | 'parameter' => $this->conf['targetPid'], |
| 145 | - 'additionalParams' => '&'.$this->prefixId.'[id]='.urlencode($this->doc->parentId), |
|
| 145 | + 'additionalParams' => '&' . $this->prefixId . '[id]=' . urlencode($this->doc->parentId), |
|
| 146 | 146 | ); |
| 147 | 147 | |
| 148 | - $allYearsLink = $this->cObj->typoLink($this->pi_getLL('allYears', '', TRUE).' '.$this->doc->getTitle($this->doc->parentId), $linkConf); |
|
| 148 | + $allYearsLink = $this->cObj->typoLink($this->pi_getLL('allYears', '', TRUE) . ' ' . $this->doc->getTitle($this->doc->parentId), $linkConf); |
|
| 149 | 149 | |
| 150 | 150 | // Link to current year. |
| 151 | - $linkConf = array ( |
|
| 151 | + $linkConf = array( |
|
| 152 | 152 | 'useCacheHash' => 1, |
| 153 | 153 | 'parameter' => $this->conf['targetPid'], |
| 154 | - 'additionalParams' => '&'.$this->prefixId.'[id]='.urlencode($this->doc->uid), |
|
| 154 | + 'additionalParams' => '&' . $this->prefixId . '[id]=' . urlencode($this->doc->uid), |
|
| 155 | 155 | ); |
| 156 | 156 | |
| 157 | 157 | $titleData = $this->doc->getTitledata(); |
@@ -192,7 +192,7 @@ discard block |
||
| 192 | 192 | |
| 193 | 193 | } |
| 194 | 194 | |
| 195 | - $markerArray = array ( |
|
| 195 | + $markerArray = array( |
|
| 196 | 196 | '###CALENDARVIEWACTIVE###' => $listViewActive ? '' : 'active', |
| 197 | 197 | '###LISTVIEWACTIVE###' => $listViewActive ? 'active' : '', |
| 198 | 198 | '###CALYEAR###' => $yearLink, |
@@ -230,7 +230,7 @@ discard block |
||
| 230 | 230 | |
| 231 | 231 | for ($i = $firstMonth; $i <= $lastMonth; $i++) { |
| 232 | 232 | |
| 233 | - $markerArray = array ( |
|
| 233 | + $markerArray = array( |
|
| 234 | 234 | '###DAYMON_NAME###' => strftime('%a', strtotime('last Monday')), |
| 235 | 235 | '###DAYTUE_NAME###' => strftime('%a', strtotime('last Tuesday')), |
| 236 | 236 | '###DAYWED_NAME###' => strftime('%a', strtotime('last Wednesday')), |
@@ -238,23 +238,23 @@ discard block |
||
| 238 | 238 | '###DAYFRI_NAME###' => strftime('%a', strtotime('last Friday')), |
| 239 | 239 | '###DAYSAT_NAME###' => strftime('%a', strtotime('last Saturday')), |
| 240 | 240 | '###DAYSUN_NAME###' => strftime('%a', strtotime('last Sunday')), |
| 241 | - '###MONTHNAME###' => strftime('%B', strtotime($year.'-'.$i.'-1')) . ' ' . $year, |
|
| 241 | + '###MONTHNAME###' => strftime('%B', strtotime($year . '-' . $i . '-1')) . ' ' . $year, |
|
| 242 | 242 | '###CALYEAR###' => ($i == $firstMonth) ? '<div class="year">' . $year . '</div>' : '' |
| 243 | 243 | ); |
| 244 | 244 | |
| 245 | 245 | // Reset week content of new month. |
| 246 | 246 | $subWeekPartContent = ''; |
| 247 | 247 | |
| 248 | - $firstOfMonth = strtotime($year.'-'.$i.'-1'); |
|
| 248 | + $firstOfMonth = strtotime($year . '-' . $i . '-1'); |
|
| 249 | 249 | $lastOfMonth = strtotime('last day of', ($firstOfMonth)); |
| 250 | 250 | $firstOfMonthStart = strtotime('last Monday', $firstOfMonth); |
| 251 | 251 | |
| 252 | 252 | // There are never more than 6 weeks in a month. |
| 253 | 253 | for ($j = 0; $j <= 5; $j++) { |
| 254 | 254 | |
| 255 | - $firstDayOfWeek = strtotime('+ '.$j.' Week', $firstOfMonthStart); |
|
| 255 | + $firstDayOfWeek = strtotime('+ ' . $j . ' Week', $firstOfMonthStart); |
|
| 256 | 256 | |
| 257 | - $weekArray = array ( |
|
| 257 | + $weekArray = array( |
|
| 258 | 258 | '###DAYMON###' => ' ', |
| 259 | 259 | '###DAYTUE###' => ' ', |
| 260 | 260 | '###DAYWED###' => ' ', |
@@ -267,13 +267,13 @@ discard block |
||
| 267 | 267 | // Every week has seven days. ;-) |
| 268 | 268 | for ($k = 0; $k <= 6; $k++) { |
| 269 | 269 | |
| 270 | - $currentDayTime = strtotime('+ '.$k.' Day', $firstDayOfWeek); |
|
| 270 | + $currentDayTime = strtotime('+ ' . $k . ' Day', $firstDayOfWeek); |
|
| 271 | 271 | |
| 272 | 272 | if ($currentDayTime >= $firstOfMonth && $currentDayTime <= $lastOfMonth) { |
| 273 | 273 | |
| 274 | 274 | $dayLinks = ''; |
| 275 | 275 | |
| 276 | - $dayLinksText = array (); |
|
| 276 | + $dayLinksText = array(); |
|
| 277 | 277 | |
| 278 | 278 | $dayLinksList = ''; |
| 279 | 279 | |
@@ -291,10 +291,10 @@ discard block |
||
| 291 | 291 | |
| 292 | 292 | $dayLinkLabel = empty($issue['title']) ? strftime('%x', $currentDayTime) : $issue['title']; |
| 293 | 293 | |
| 294 | - $linkConf = array ( |
|
| 294 | + $linkConf = array( |
|
| 295 | 295 | 'useCacheHash' => 1, |
| 296 | 296 | 'parameter' => $this->conf['targetPid'], |
| 297 | - 'additionalParams' => '&'.$this->prefixId.'[id]='.urlencode($issue['uid']), |
|
| 297 | + 'additionalParams' => '&' . $this->prefixId . '[id]=' . urlencode($issue['uid']), |
|
| 298 | 298 | 'ATagParams' => ' class="title"', |
| 299 | 299 | ); |
| 300 | 300 | |
@@ -313,7 +313,7 @@ discard block |
||
| 313 | 313 | |
| 314 | 314 | foreach ($dayLinksText as $link) { |
| 315 | 315 | |
| 316 | - $dayLinksList .= '<li>'.$link.'</li>'; |
|
| 316 | + $dayLinksList .= '<li>' . $link . '</li>'; |
|
| 317 | 317 | |
| 318 | 318 | } |
| 319 | 319 | |
@@ -321,10 +321,10 @@ discard block |
||
| 321 | 321 | |
| 322 | 322 | } |
| 323 | 323 | |
| 324 | - $dayLinkDiv = '<div class="issues"><h4>'.strftime('%d', $currentDayTime).'</h4><div>'.$dayLinksList.'</div></div>'; |
|
| 324 | + $dayLinkDiv = '<div class="issues"><h4>' . strftime('%d', $currentDayTime) . '</h4><div>' . $dayLinksList . '</div></div>'; |
|
| 325 | 325 | } |
| 326 | 326 | |
| 327 | - switch (strftime('%w', strtotime('+ '.$k.' Day', $firstDayOfWeek))) { |
|
| 327 | + switch (strftime('%w', strtotime('+ ' . $k . ' Day', $firstDayOfWeek))) { |
|
| 328 | 328 | |
| 329 | 329 | case '0': $weekArray['###DAYSUN###'] = ((int) $dayLinks === (int) date('j', $currentDayTime)) ? $dayLinkDiv : strftime('%d', $currentDayTime); |
| 330 | 330 | break; |
@@ -412,7 +412,7 @@ discard block |
||
| 412 | 412 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
| 413 | 413 | 'tx_dlf_documents.uid AS uid, tx_dlf_documents.mets_label AS label, tx_dlf_documents.mets_orderlabel AS orderlabel, tx_dlf_documents.title AS title', |
| 414 | 414 | 'tx_dlf_documents', |
| 415 | - '(tx_dlf_documents.structure='.tx_dlf_helper::getIdFromIndexName('year', 'tx_dlf_structures', $this->doc->pid).' AND tx_dlf_documents.partof='.intval($this->doc->uid).')'.tx_dlf_helper::whereClause('tx_dlf_documents'), |
|
| 415 | + '(tx_dlf_documents.structure=' . tx_dlf_helper::getIdFromIndexName('year', 'tx_dlf_structures', $this->doc->pid) . ' AND tx_dlf_documents.partof=' . intval($this->doc->uid) . ')' . tx_dlf_helper::whereClause('tx_dlf_documents'), |
|
| 416 | 416 | '', |
| 417 | 417 | 'tx_dlf_documents.volume_sorting ASC', |
| 418 | 418 | '' |
@@ -420,7 +420,7 @@ discard block |
||
| 420 | 420 | |
| 421 | 421 | // Process results. |
| 422 | 422 | while ($resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)) { |
| 423 | - $years[] = array ( |
|
| 423 | + $years[] = array( |
|
| 424 | 424 | 'title' => !empty($resArray['label']) ? $resArray['label'] : (!empty($resArray['orderlabel']) ? $resArray['orderlabel'] : $resArray['title']), |
| 425 | 425 | 'uid' => $resArray['uid'] |
| 426 | 426 | ); |
@@ -432,14 +432,14 @@ discard block |
||
| 432 | 432 | |
| 433 | 433 | foreach ($years as $year) { |
| 434 | 434 | |
| 435 | - $linkConf = array ( |
|
| 435 | + $linkConf = array( |
|
| 436 | 436 | 'useCacheHash' => 1, |
| 437 | 437 | 'parameter' => $this->conf['targetPid'], |
| 438 | - 'additionalParams' => '&'.$this->prefixId.'[id]='.urlencode($year['uid']), |
|
| 439 | - 'title' => $titleAnchor.': '.$year['title'] |
|
| 438 | + 'additionalParams' => '&' . $this->prefixId . '[id]=' . urlencode($year['uid']), |
|
| 439 | + 'title' => $titleAnchor . ': ' . $year['title'] |
|
| 440 | 440 | ); |
| 441 | 441 | |
| 442 | - $yearArray = array ( |
|
| 442 | + $yearArray = array( |
|
| 443 | 443 | '###YEARNAME###' => $this->cObj->typoLink($year['title'], $linkConf), |
| 444 | 444 | ); |
| 445 | 445 | |
@@ -449,15 +449,15 @@ discard block |
||
| 449 | 449 | } |
| 450 | 450 | |
| 451 | 451 | // link to years overview (should be itself here) |
| 452 | - $linkConf = array ( |
|
| 452 | + $linkConf = array( |
|
| 453 | 453 | 'useCacheHash' => 1, |
| 454 | 454 | 'parameter' => $this->conf['targetPid'], |
| 455 | - 'additionalParams' => '&'.$this->prefixId.'[id]='.$this->doc->uid, |
|
| 455 | + 'additionalParams' => '&' . $this->prefixId . '[id]=' . $this->doc->uid, |
|
| 456 | 456 | ); |
| 457 | - $allYearsLink = $this->cObj->typoLink($this->pi_getLL('allYears', '', TRUE).' '.$this->doc->getTitle($this->doc->uid), $linkConf); |
|
| 457 | + $allYearsLink = $this->cObj->typoLink($this->pi_getLL('allYears', '', TRUE) . ' ' . $this->doc->getTitle($this->doc->uid), $linkConf); |
|
| 458 | 458 | |
| 459 | 459 | // Fill markers. |
| 460 | - $markerArray = array ( |
|
| 460 | + $markerArray = array( |
|
| 461 | 461 | '###LABEL_CHOOSE_YEAR###' => $this->pi_getLL('label.please_choose_year'), |
| 462 | 462 | '###CALALLYEARS###' => $allYearsLink |
| 463 | 463 | ); |