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 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; |
@@ -133,19 +133,19 @@ discard block |
||
| 133 | 133 | } |
| 134 | 134 | |
| 135 | 135 | // Link to years overview |
| 136 | - $linkConf = array ( |
|
| 136 | + $linkConf = array( |
|
| 137 | 137 | 'useCacheHash' => 1, |
| 138 | 138 | 'parameter' => $this->conf['targetPid'], |
| 139 | - 'additionalParams' => '&'.$this->prefixId.'[id]='.urlencode($this->doc->parentId), |
|
| 139 | + 'additionalParams' => '&' . $this->prefixId . '[id]=' . urlencode($this->doc->parentId), |
|
| 140 | 140 | ); |
| 141 | 141 | |
| 142 | - $allYearsLink = $this->cObj->typoLink($this->pi_getLL('allYears', '', TRUE).' '.$this->doc->getTitle($this->doc->parentId), $linkConf); |
|
| 142 | + $allYearsLink = $this->cObj->typoLink($this->pi_getLL('allYears', '', TRUE) . ' ' . $this->doc->getTitle($this->doc->parentId), $linkConf); |
|
| 143 | 143 | |
| 144 | 144 | // Link to current year. |
| 145 | - $linkConf = array ( |
|
| 145 | + $linkConf = array( |
|
| 146 | 146 | 'useCacheHash' => 1, |
| 147 | 147 | 'parameter' => $this->conf['targetPid'], |
| 148 | - 'additionalParams' => '&'.$this->prefixId.'[id]='.urlencode($this->doc->uid), |
|
| 148 | + 'additionalParams' => '&' . $this->prefixId . '[id]=' . urlencode($this->doc->uid), |
|
| 149 | 149 | ); |
| 150 | 150 | |
| 151 | 151 | $titleData = $this->doc->getTitledata(); |
@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | |
| 187 | 187 | } |
| 188 | 188 | |
| 189 | - $markerArray = array ( |
|
| 189 | + $markerArray = array( |
|
| 190 | 190 | '###CALENDARVIEWACTIVE###' => $listViewActive ? '' : 'active', |
| 191 | 191 | '###LISTVIEWACTIVE###' => $listViewActive ? 'active' : '', |
| 192 | 192 | '###CALYEAR###' => $yearLink, |
@@ -224,7 +224,7 @@ discard block |
||
| 224 | 224 | |
| 225 | 225 | for ($i = $firstMonth; $i <= $lastMonth; $i++) { |
| 226 | 226 | |
| 227 | - $markerArray = array ( |
|
| 227 | + $markerArray = array( |
|
| 228 | 228 | '###DAYMON_NAME###' => strftime('%a', strtotime('last Monday')), |
| 229 | 229 | '###DAYTUE_NAME###' => strftime('%a', strtotime('last Tuesday')), |
| 230 | 230 | '###DAYWED_NAME###' => strftime('%a', strtotime('last Wednesday')), |
@@ -232,23 +232,23 @@ discard block |
||
| 232 | 232 | '###DAYFRI_NAME###' => strftime('%a', strtotime('last Friday')), |
| 233 | 233 | '###DAYSAT_NAME###' => strftime('%a', strtotime('last Saturday')), |
| 234 | 234 | '###DAYSUN_NAME###' => strftime('%a', strtotime('last Sunday')), |
| 235 | - '###MONTHNAME###' => strftime('%B', strtotime($year.'-'.$i.'-1')) . ' ' . $year, |
|
| 235 | + '###MONTHNAME###' => strftime('%B', strtotime($year . '-' . $i . '-1')) . ' ' . $year, |
|
| 236 | 236 | '###CALYEAR###' => ($i == $firstMonth) ? '<div class="year">' . $year . '</div>' : '' |
| 237 | 237 | ); |
| 238 | 238 | |
| 239 | 239 | // Reset week content of new month. |
| 240 | 240 | $subWeekPartContent = ''; |
| 241 | 241 | |
| 242 | - $firstOfMonth = strtotime($year.'-'.$i.'-1'); |
|
| 242 | + $firstOfMonth = strtotime($year . '-' . $i . '-1'); |
|
| 243 | 243 | $lastOfMonth = strtotime('last day of', ($firstOfMonth)); |
| 244 | 244 | $firstOfMonthStart = strtotime('last Monday', $firstOfMonth); |
| 245 | 245 | |
| 246 | 246 | // There are never more than 6 weeks in a month. |
| 247 | 247 | for ($j = 0; $j <= 5; $j++) { |
| 248 | 248 | |
| 249 | - $firstDayOfWeek = strtotime('+ '.$j.' Week', $firstOfMonthStart); |
|
| 249 | + $firstDayOfWeek = strtotime('+ ' . $j . ' Week', $firstOfMonthStart); |
|
| 250 | 250 | |
| 251 | - $weekArray = array ( |
|
| 251 | + $weekArray = array( |
|
| 252 | 252 | '###DAYMON###' => ' ', |
| 253 | 253 | '###DAYTUE###' => ' ', |
| 254 | 254 | '###DAYWED###' => ' ', |
@@ -261,13 +261,13 @@ discard block |
||
| 261 | 261 | // Every week has seven days. ;-) |
| 262 | 262 | for ($k = 0; $k <= 6; $k++) { |
| 263 | 263 | |
| 264 | - $currentDayTime = strtotime('+ '.$k.' Day', $firstDayOfWeek); |
|
| 264 | + $currentDayTime = strtotime('+ ' . $k . ' Day', $firstDayOfWeek); |
|
| 265 | 265 | |
| 266 | 266 | if ($currentDayTime >= $firstOfMonth && $currentDayTime <= $lastOfMonth) { |
| 267 | 267 | |
| 268 | 268 | $dayLinks = ''; |
| 269 | 269 | |
| 270 | - $dayLinksText = array (); |
|
| 270 | + $dayLinksText = array(); |
|
| 271 | 271 | |
| 272 | 272 | $dayLinksList = ''; |
| 273 | 273 | |
@@ -285,10 +285,10 @@ discard block |
||
| 285 | 285 | |
| 286 | 286 | $dayLinkLabel = empty($issue['title']) ? strftime('%x', $currentDayTime) : $issue['title']; |
| 287 | 287 | |
| 288 | - $linkConf = array ( |
|
| 288 | + $linkConf = array( |
|
| 289 | 289 | 'useCacheHash' => 1, |
| 290 | 290 | 'parameter' => $this->conf['targetPid'], |
| 291 | - 'additionalParams' => '&'.$this->prefixId.'[id]='.urlencode($issue['uid']), |
|
| 291 | + 'additionalParams' => '&' . $this->prefixId . '[id]=' . urlencode($issue['uid']), |
|
| 292 | 292 | 'ATagParams' => ' class="title"', |
| 293 | 293 | ); |
| 294 | 294 | |
@@ -307,7 +307,7 @@ discard block |
||
| 307 | 307 | |
| 308 | 308 | foreach ($dayLinksText as $link) { |
| 309 | 309 | |
| 310 | - $dayLinksList .= '<li>'.$link.'</li>'; |
|
| 310 | + $dayLinksList .= '<li>' . $link . '</li>'; |
|
| 311 | 311 | |
| 312 | 312 | } |
| 313 | 313 | |
@@ -315,10 +315,10 @@ discard block |
||
| 315 | 315 | |
| 316 | 316 | } |
| 317 | 317 | |
| 318 | - $dayLinkDiv = '<div class="issues"><h4>'.strftime('%d', $currentDayTime).'</h4><div>'.$dayLinksList.'</div></div>'; |
|
| 318 | + $dayLinkDiv = '<div class="issues"><h4>' . strftime('%d', $currentDayTime) . '</h4><div>' . $dayLinksList . '</div></div>'; |
|
| 319 | 319 | } |
| 320 | 320 | |
| 321 | - switch (strftime('%w', strtotime('+ '.$k.' Day', $firstDayOfWeek))) { |
|
| 321 | + switch (strftime('%w', strtotime('+ ' . $k . ' Day', $firstDayOfWeek))) { |
|
| 322 | 322 | |
| 323 | 323 | case '0': $weekArray['###DAYSUN###'] = ((int) $dayLinks === (int) date('j', $currentDayTime)) ? $dayLinkDiv : strftime('%d', $currentDayTime); |
| 324 | 324 | break; |
@@ -406,7 +406,7 @@ discard block |
||
| 406 | 406 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
| 407 | 407 | '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', |
| 408 | 408 | 'tx_dlf_documents', |
| 409 | - '(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'), |
|
| 409 | + '(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'), |
|
| 410 | 410 | '', |
| 411 | 411 | 'tx_dlf_documents.volume_sorting ASC', |
| 412 | 412 | '' |
@@ -414,7 +414,7 @@ discard block |
||
| 414 | 414 | |
| 415 | 415 | // Process results. |
| 416 | 416 | while ($resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)) { |
| 417 | - $years[] = array ( |
|
| 417 | + $years[] = array( |
|
| 418 | 418 | 'title' => !empty($resArray['label']) ? $resArray['label'] : (!empty($resArray['orderlabel']) ? $resArray['orderlabel'] : $resArray['title']), |
| 419 | 419 | 'uid' => $resArray['uid'] |
| 420 | 420 | ); |
@@ -426,14 +426,14 @@ discard block |
||
| 426 | 426 | |
| 427 | 427 | foreach ($years as $year) { |
| 428 | 428 | |
| 429 | - $linkConf = array ( |
|
| 429 | + $linkConf = array( |
|
| 430 | 430 | 'useCacheHash' => 1, |
| 431 | 431 | 'parameter' => $this->conf['targetPid'], |
| 432 | - 'additionalParams' => '&'.$this->prefixId.'[id]='.urlencode($year['uid']), |
|
| 433 | - 'title' => $titleAnchor.': '.$year['title'] |
|
| 432 | + 'additionalParams' => '&' . $this->prefixId . '[id]=' . urlencode($year['uid']), |
|
| 433 | + 'title' => $titleAnchor . ': ' . $year['title'] |
|
| 434 | 434 | ); |
| 435 | 435 | |
| 436 | - $yearArray = array ( |
|
| 436 | + $yearArray = array( |
|
| 437 | 437 | '###YEARNAME###' => $this->cObj->typoLink($year['title'], $linkConf), |
| 438 | 438 | ); |
| 439 | 439 | |
@@ -443,15 +443,15 @@ discard block |
||
| 443 | 443 | } |
| 444 | 444 | |
| 445 | 445 | // link to years overview (should be itself here) |
| 446 | - $linkConf = array ( |
|
| 446 | + $linkConf = array( |
|
| 447 | 447 | 'useCacheHash' => 1, |
| 448 | 448 | 'parameter' => $this->conf['targetPid'], |
| 449 | - 'additionalParams' => '&'.$this->prefixId.'[id]='.$this->doc->uid, |
|
| 449 | + 'additionalParams' => '&' . $this->prefixId . '[id]=' . $this->doc->uid, |
|
| 450 | 450 | ); |
| 451 | - $allYearsLink = $this->cObj->typoLink($this->pi_getLL('allYears', '', TRUE).' '.$this->doc->getTitle($this->doc->uid), $linkConf); |
|
| 451 | + $allYearsLink = $this->cObj->typoLink($this->pi_getLL('allYears', '', TRUE) . ' ' . $this->doc->getTitle($this->doc->uid), $linkConf); |
|
| 452 | 452 | |
| 453 | 453 | // Fill markers. |
| 454 | - $markerArray = array ( |
|
| 454 | + $markerArray = array( |
|
| 455 | 455 | '###LABEL_CHOOSE_YEAR###' => $this->pi_getLL('label.please_choose_year'), |
| 456 | 456 | '###CALALLYEARS###' => $allYearsLink |
| 457 | 457 | ); |