Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Branch master (1ffd1c)
by Sebastian
03:57
created
dlf/plugins/toolbox/class.tx_dlf_toolbox.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 		}
55 55
 
56 56
 		// Build data array.
57
-		$data = array (
57
+		$data = array(
58 58
 			'conf' => $this->conf,
59 59
 			'piVars' => $this->piVars,
60 60
 		);
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 
74 74
 			$cObj->data = $data;
75 75
 
76
-			$content .= $this->cObj->substituteMarkerArray($subpart, array ('###TOOL###' => $cObj->cObjGetSingle($GLOBALS['TSFE']->tmpl->setup['plugin.'][$tool], $GLOBALS['TSFE']->tmpl->setup['plugin.'][$tool.'.'])));
76
+			$content .= $this->cObj->substituteMarkerArray($subpart, array('###TOOL###' => $cObj->cObjGetSingle($GLOBALS['TSFE']->tmpl->setup['plugin.'][$tool], $GLOBALS['TSFE']->tmpl->setup['plugin.'][$tool.'.'])));
77 77
 
78 78
 		}
79 79
 
Please login to merge, or discard this patch.
dlf/plugins/toc/class.tx_dlf_toc.php 2 patches
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -67,37 +67,37 @@
 block discarded – undo
67 67
 
68 68
 			$entryArray['doNotLinkIt'] = 0;
69 69
 
70
-            if ($this->conf['basketButton']) {
70
+			if ($this->conf['basketButton']) {
71 71
 
72
-                $entryArray['basketButtonHref'] = '<a href="'.$this->pi_linkTP_keepPIvars_url(array ('addToBasket' => 'toc', 'logId' => $entry['id'], 'startpage' => $entry['points']), TRUE, FALSE, $this->conf['targetBasket']).'">'.$this->pi_getLL('basketButton', '', TRUE).'</a>';
72
+				$entryArray['basketButtonHref'] = '<a href="'.$this->pi_linkTP_keepPIvars_url(array ('addToBasket' => 'toc', 'logId' => $entry['id'], 'startpage' => $entry['points']), TRUE, FALSE, $this->conf['targetBasket']).'">'.$this->pi_getLL('basketButton', '', TRUE).'</a>';
73 73
 
74
-            }
74
+			}
75 75
 
76
-        } elseif (!empty($entry['points']) && is_string($entry['points'])) {
76
+		} elseif (!empty($entry['points']) && is_string($entry['points'])) {
77 77
 
78 78
 			$entryArray['_OVERRIDE_HREF'] = $this->pi_linkTP_keepPIvars_url(array ('id' => $entry['points'], 'page' => 1), TRUE, FALSE, $this->conf['targetPid']);
79 79
 
80 80
 			$entryArray['doNotLinkIt'] = 0;
81 81
 
82
-            if ($this->conf['basketButton']) {
82
+			if ($this->conf['basketButton']) {
83 83
 
84
-                $entryArray['basketButtonHref'] = '<a href="'.$this->pi_linkTP_keepPIvars_url(array ('addToBasket' => 'toc', 'logId' => $entry['id'], 'startpage' => $entry['points']), TRUE, FALSE, $this->conf['targetBasket']).'">'.$this->pi_getLL('basketButton', '', TRUE).'</a>';
84
+				$entryArray['basketButtonHref'] = '<a href="'.$this->pi_linkTP_keepPIvars_url(array ('addToBasket' => 'toc', 'logId' => $entry['id'], 'startpage' => $entry['points']), TRUE, FALSE, $this->conf['targetBasket']).'">'.$this->pi_getLL('basketButton', '', TRUE).'</a>';
85 85
 
86
-            }
86
+			}
87 87
 
88
-        } elseif (!empty($entry['targetUid'])) {
88
+		} elseif (!empty($entry['targetUid'])) {
89 89
 
90 90
 			$entryArray['_OVERRIDE_HREF'] = $this->pi_linkTP_keepPIvars_url(array ('id' => $entry['targetUid'], 'page' => 1), TRUE, FALSE, $this->conf['targetPid']);
91 91
 
92 92
 			$entryArray['doNotLinkIt'] = 0;
93 93
 
94
-            if ($this->conf['basketButton']) {
94
+			if ($this->conf['basketButton']) {
95 95
 
96
-                $entryArray['basketButtonHref'] = '<a href="'.$this->pi_linkTP_keepPIvars_url(array ('addToBasket' => 'toc', 'logId' => $entry['id'], 'startpage' => $entry['targetUid']), TRUE, FALSE, $this->conf['targetBasket']).'">'.$this->pi_getLL('basketButton', '', TRUE).'</a>';
96
+				$entryArray['basketButtonHref'] = '<a href="'.$this->pi_linkTP_keepPIvars_url(array ('addToBasket' => 'toc', 'logId' => $entry['id'], 'startpage' => $entry['targetUid']), TRUE, FALSE, $this->conf['targetBasket']).'">'.$this->pi_getLL('basketButton', '', TRUE).'</a>';
97 97
 
98
-            }
98
+			}
99 99
 
100
-        }
100
+		}
101 101
 
102 102
 		// Set "ITEM_STATE" to "CUR" if this entry points to current page.
103 103
 		if (in_array($entry['id'], $this->activeEntries)) {
Please login to merge, or discard this patch.
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 	 * @var	array
28 28
 	 * @access protected
29 29
 	 */
30
-	protected $activeEntries = array ();
30
+	protected $activeEntries = array();
31 31
 
32 32
 	/**
33 33
 	 * This builds an array for one menu entry
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 	 */
42 42
 	protected function getMenuEntry(array $entry, $recursive = FALSE) {
43 43
 
44
-		$entryArray = array ();
44
+		$entryArray = array();
45 45
 
46 46
 		// Set "title", "volume", "type" and "pagination" from $entry array.
47 47
 		$entryArray['title'] = $entry['label'];
@@ -63,37 +63,37 @@  discard block
 block discarded – undo
63 63
 		// Build menu links based on the $entry['points'] array.
64 64
 		if (!empty($entry['points']) && \TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($entry['points'])) {
65 65
 
66
-			$entryArray['_OVERRIDE_HREF'] = $this->pi_linkTP_keepPIvars_url(array ('page' => $entry['points']), TRUE, FALSE, $this->conf['targetPid']);
66
+			$entryArray['_OVERRIDE_HREF'] = $this->pi_linkTP_keepPIvars_url(array('page' => $entry['points']), TRUE, FALSE, $this->conf['targetPid']);
67 67
 
68 68
 			$entryArray['doNotLinkIt'] = 0;
69 69
 
70 70
             if ($this->conf['basketButton']) {
71 71
 
72
-                $entryArray['basketButtonHref'] = '<a href="'.$this->pi_linkTP_keepPIvars_url(array ('addToBasket' => 'toc', 'logId' => $entry['id'], 'startpage' => $entry['points']), TRUE, FALSE, $this->conf['targetBasket']).'">'.$this->pi_getLL('basketButton', '', TRUE).'</a>';
72
+                $entryArray['basketButtonHref'] = '<a href="'.$this->pi_linkTP_keepPIvars_url(array('addToBasket' => 'toc', 'logId' => $entry['id'], 'startpage' => $entry['points']), TRUE, FALSE, $this->conf['targetBasket']).'">'.$this->pi_getLL('basketButton', '', TRUE).'</a>';
73 73
 
74 74
             }
75 75
 
76 76
         } elseif (!empty($entry['points']) && is_string($entry['points'])) {
77 77
 
78
-			$entryArray['_OVERRIDE_HREF'] = $this->pi_linkTP_keepPIvars_url(array ('id' => $entry['points'], 'page' => 1), TRUE, FALSE, $this->conf['targetPid']);
78
+			$entryArray['_OVERRIDE_HREF'] = $this->pi_linkTP_keepPIvars_url(array('id' => $entry['points'], 'page' => 1), TRUE, FALSE, $this->conf['targetPid']);
79 79
 
80 80
 			$entryArray['doNotLinkIt'] = 0;
81 81
 
82 82
             if ($this->conf['basketButton']) {
83 83
 
84
-                $entryArray['basketButtonHref'] = '<a href="'.$this->pi_linkTP_keepPIvars_url(array ('addToBasket' => 'toc', 'logId' => $entry['id'], 'startpage' => $entry['points']), TRUE, FALSE, $this->conf['targetBasket']).'">'.$this->pi_getLL('basketButton', '', TRUE).'</a>';
84
+                $entryArray['basketButtonHref'] = '<a href="'.$this->pi_linkTP_keepPIvars_url(array('addToBasket' => 'toc', 'logId' => $entry['id'], 'startpage' => $entry['points']), TRUE, FALSE, $this->conf['targetBasket']).'">'.$this->pi_getLL('basketButton', '', TRUE).'</a>';
85 85
 
86 86
             }
87 87
 
88 88
         } elseif (!empty($entry['targetUid'])) {
89 89
 
90
-			$entryArray['_OVERRIDE_HREF'] = $this->pi_linkTP_keepPIvars_url(array ('id' => $entry['targetUid'], 'page' => 1), TRUE, FALSE, $this->conf['targetPid']);
90
+			$entryArray['_OVERRIDE_HREF'] = $this->pi_linkTP_keepPIvars_url(array('id' => $entry['targetUid'], 'page' => 1), TRUE, FALSE, $this->conf['targetPid']);
91 91
 
92 92
 			$entryArray['doNotLinkIt'] = 0;
93 93
 
94 94
             if ($this->conf['basketButton']) {
95 95
 
96
-                $entryArray['basketButtonHref'] = '<a href="'.$this->pi_linkTP_keepPIvars_url(array ('addToBasket' => 'toc', 'logId' => $entry['id'], 'startpage' => $entry['targetUid']), TRUE, FALSE, $this->conf['targetBasket']).'">'.$this->pi_getLL('basketButton', '', TRUE).'</a>';
96
+                $entryArray['basketButtonHref'] = '<a href="'.$this->pi_linkTP_keepPIvars_url(array('addToBasket' => 'toc', 'logId' => $entry['id'], 'startpage' => $entry['targetUid']), TRUE, FALSE, $this->conf['targetBasket']).'">'.$this->pi_getLL('basketButton', '', TRUE).'</a>';
97 97
 
98 98
             }
99 99
 
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
 			// 4. Current menu node has no corresponding images
117 117
 			if (!empty($this->conf['menuConf.']['expAll']) || $entryArray['ITEM_STATE'] == 'CUR' || is_string($entry['points']) || empty($this->doc->smLinks['l2p'][$entry['id']])) {
118 118
 
119
-				$entryArray['_SUB_MENU'] = array ();
119
+				$entryArray['_SUB_MENU'] = array();
120 120
 
121 121
 				foreach ($entry['children'] as $child) {
122 122
 
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
 
181 181
 		}
182 182
 
183
-		$TSconfig = array ();
183
+		$TSconfig = array();
184 184
 
185 185
 		$TSconfig['special'] = 'userfunction';
186 186
 
@@ -216,15 +216,15 @@  discard block
 block discarded – undo
216 216
 		if ($this->doc === NULL) {
217 217
 
218 218
 			// Quit without doing anything if required variables are not set.
219
-			return array ();
219
+			return array();
220 220
 
221 221
 		} else {
222 222
 
223 223
 			// Set default values for page if not set.
224 224
 			// $this->piVars['page'] may be integer or string (physical structure @ID)
225
-			if ( (int)$this->piVars['page'] > 0 || empty($this->piVars['page'])) {
225
+			if ((int) $this->piVars['page'] > 0 || empty($this->piVars['page'])) {
226 226
 
227
-				$this->piVars['page'] = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange((int)$this->piVars['page'], 1, $this->doc->numPages, 1);
227
+				$this->piVars['page'] = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange((int) $this->piVars['page'], 1, $this->doc->numPages, 1);
228 228
 
229 229
 			} else {
230 230
 
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
 
237 237
 		}
238 238
 
239
-		$menuArray = array ();
239
+		$menuArray = array();
240 240
 
241 241
 		// Does the document have physical elements or is it an external file?
242 242
 		if ($this->doc->physicalStructure || !\TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($this->doc->uid)) {
@@ -293,11 +293,11 @@  discard block
 block discarded – undo
293 293
 
294 294
 				$menuArray[0]['ITEM_STATE'] = 'CURIFSUB';
295 295
 
296
-				$menuArray[0]['_SUB_MENU'] = array ();
296
+				$menuArray[0]['_SUB_MENU'] = array();
297 297
 
298 298
 				while ($resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)) {
299 299
 
300
-					$entry = array (
300
+					$entry = array(
301 301
 						'label' => $resArray['title'],
302 302
 						'type' => $resArray['type'],
303 303
 						'volume' => $resArray['volume'],
Please login to merge, or discard this patch.
dlf/plugins/collection/class.tx_dlf_collection.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 	 * @var	array
28 28
 	 * @access protected
29 29
 	 */
30
-	protected $hookObjects = array ();
30
+	protected $hookObjects = array();
31 31
 
32 32
 	/**
33 33
 	 * The main method of the PlugIn
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 				''
171 171
 			);
172 172
 
173
-			$volumes = array ();
173
+			$volumes = array();
174 174
 
175 175
 			while ($resArrayVolumes = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($resultVolumes)) {
176 176
 
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
 				} while (!empty($markerArray[$_key]));
190 190
 
191 191
 				// Merge plugin variables with new set of values.
192
-				$additionalParams = array ('collection' => $resArray['uid']);
192
+				$additionalParams = array('collection' => $resArray['uid']);
193 193
 
194 194
 				if (is_array($this->piVars)) {
195 195
 
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
 				}
203 203
 
204 204
 				// Build typolink configuration array.
205
-				$conf = array (
205
+				$conf = array(
206 206
 					'useCacheHash' => 1,
207 207
 					'parameter' => $GLOBALS['TSFE']->id,
208 208
 					'additionalParams' => \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, $additionalParams, '', TRUE, FALSE)
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
 
217 217
 					$img = '<img src="'.\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'res/icons/txdlffeeds.png" alt="'.$this->pi_getLL('feedAlt', '', TRUE).'" title="'.$this->pi_getLL('feedTitle', '', TRUE).'" />';
218 218
 
219
-					$markerArray[$_key]['###FEED###'] = $this->pi_linkTP($img, array ($this->prefixId => array ('collection' => $resArray['uid'])), FALSE, $this->conf['targetFeed']);
219
+					$markerArray[$_key]['###FEED###'] = $this->pi_linkTP($img, array($this->prefixId => array('collection' => $resArray['uid'])), FALSE, $this->conf['targetFeed']);
220 220
 
221 221
 				} else {
222 222
 
@@ -320,26 +320,26 @@  discard block
 block discarded – undo
320 320
 			''
321 321
 		);
322 322
 
323
-		$toplevel = array ();
323
+		$toplevel = array();
324 324
 
325
-		$subparts = array ();
325
+		$subparts = array();
326 326
 
327
-		$listMetadata = array ();
327
+		$listMetadata = array();
328 328
 
329 329
 		// Process results.
330 330
 		while ($resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)) {
331 331
 
332 332
 			if (empty($listMetadata)) {
333 333
 
334
-				$listMetadata = array (
334
+				$listMetadata = array(
335 335
 					'label' => htmlspecialchars($resArray['collLabel']),
336 336
 					'description' => $this->pi_RTEcssText($resArray['collDesc']),
337 337
 					'thumbnail' => htmlspecialchars($resArray['collThumb']),
338
-					'options' => array (
338
+					'options' => array(
339 339
 						'source' => 'collection',
340 340
 						'select' => $id,
341 341
 						'userid' => $resArray['userid'],
342
-						'params' => array ('fq' => array ('collection_faceting:("'.$resArray['index_name'].'")')),
342
+						'params' => array('fq' => array('collection_faceting:("'.$resArray['index_name'].'")')),
343 343
 						'core' => '',
344 344
 						'pid' => $this->conf['pages'],
345 345
 						'order' => 'title',
@@ -373,11 +373,11 @@  discard block
 block discarded – undo
373 373
 
374 374
 				}
375 375
 
376
-				$toplevel[$resArray['uid']] = array (
376
+				$toplevel[$resArray['uid']] = array(
377 377
 					'u' => $resArray['uid'],
378 378
 					'h' => '',
379 379
 					's' => $sorting,
380
-					'p' => array ()
380
+					'p' => array()
381 381
 				);
382 382
 
383 383
 			} else {
@@ -397,7 +397,7 @@  discard block
 block discarded – undo
397 397
 
398 398
 				foreach ($parts as $part) {
399 399
 
400
-					$toplevel[$partof]['p'][] = array ('u' => $part);
400
+					$toplevel[$partof]['p'][] = array('u' => $part);
401 401
 
402 402
 				}
403 403
 
@@ -420,7 +420,7 @@  discard block
 block discarded – undo
420 420
 		\TYPO3\CMS\Core\Utility\GeneralUtility::cleanOutputBuffers();
421 421
 
422 422
 		// Send headers.
423
-		header('Location: '.\TYPO3\CMS\Core\Utility\GeneralUtility::locationHeaderUrl($this->cObj->typoLink_URL(array ('parameter' => $this->conf['targetPid']))));
423
+		header('Location: '.\TYPO3\CMS\Core\Utility\GeneralUtility::locationHeaderUrl($this->cObj->typoLink_URL(array('parameter' => $this->conf['targetPid']))));
424 424
 
425 425
 		// Flush output buffer and end script processing.
426 426
 		ob_end_flush();
Please login to merge, or discard this patch.
dlf/plugins/search/class.tx_dlf_search.php 1 patch
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
 		// Get operator options.
199 199
 		$operatorOptions = '';
200 200
 
201
-		foreach (array ('AND', 'OR', 'NOT') as $operator) {
201
+		foreach (array('AND', 'OR', 'NOT') as $operator) {
202 202
 
203 203
 			$operatorOptions .= '<option class="tx-dlf-search-operator-option tx-dlf-search-operator-'.$operator.'" value="'.$operator.'">'.$this->pi_getLL($operator, '', TRUE).'</option>';
204 204
 
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
 
218 218
 		for ($i = 0; $i < $this->conf['extendedSlotCount']; $i++) {
219 219
 
220
-			$markerArray = array (
220
+			$markerArray = array(
221 221
 				'###EXT_SEARCH_OPERATOR###' => '<select class="tx-dlf-search-operator tx-dlf-search-operator-'.$i.'" name="'.$this->prefixId.'[extOperator]['.$i.']">'.$operatorOptions.'</select>',
222 222
 				'###EXT_SEARCH_FIELDSELECTOR###' => '<select class="tx-dlf-search-field tx-dlf-search-field-'.$i.'" name="'.$this->prefixId.'[extField]['.$i.']">'.$fieldSelectorOptions.'</select>',
223 223
 				'###EXT_SEARCH_FIELDQUERY###' => '<input class="tx-dlf-search-query tx-dlf-search-query-'.$i.'" type="text" name="'.$this->prefixId.'[extQuery]['.$i.']" />'
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
 		}
262 262
 
263 263
 		// Get facets from plugin configuration.
264
-		$facets = array ();
264
+		$facets = array();
265 265
 
266 266
 		foreach (\TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->conf['facets'], TRUE) as $facet) {
267 267
 
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
 		}
271 271
 
272 272
 		// Render facets menu.
273
-		$TSconfig = array ();
273
+		$TSconfig = array();
274 274
 
275 275
 		$TSconfig['special'] = 'userfunction';
276 276
 
@@ -302,13 +302,13 @@  discard block
 block discarded – undo
302 302
 		// Check for plugin configuration.
303 303
 		if (!empty($this->conf['fulltext'])) {
304 304
 
305
-			$output .= ' <input class="tx-dlf-search-fulltext" id="tx-dlf-search-fulltext-no" type="radio" name="' . $this->prefixId . '[fulltext]" value="0" ' . ($isFulltextSearch == 0 ? 'checked="checked"' : '') .' />';
305
+			$output .= ' <input class="tx-dlf-search-fulltext" id="tx-dlf-search-fulltext-no" type="radio" name="'.$this->prefixId.'[fulltext]" value="0" '.($isFulltextSearch == 0 ? 'checked="checked"' : '').' />';
306 306
 
307
-			$output .= ' <label for="tx-dlf-search-fulltext-no">' . $this->pi_getLL('label.inMetadata', '') . '</label>';
307
+			$output .= ' <label for="tx-dlf-search-fulltext-no">'.$this->pi_getLL('label.inMetadata', '').'</label>';
308 308
 
309
-			$output .= ' <input class="tx-dlf-search-fulltext" id="tx-dlf-search-fulltext-yes" type="radio" name="' . $this->prefixId . '[fulltext]" value="1" ' . ($isFulltextSearch == 1 ? 'checked="checked"' : '') .'/>';
309
+			$output .= ' <input class="tx-dlf-search-fulltext" id="tx-dlf-search-fulltext-yes" type="radio" name="'.$this->prefixId.'[fulltext]" value="1" '.($isFulltextSearch == 1 ? 'checked="checked"' : '').'/>';
310 310
 
311
-			$output .= ' <label for="tx-dlf-search-fulltext-yes">' . $this->pi_getLL('label.inFulltext', '') . '</label>';
311
+			$output .= ' <label for="tx-dlf-search-fulltext-yes">'.$this->pi_getLL('label.inFulltext', '').'</label>';
312 312
 
313 313
 		}
314 314
 
@@ -381,7 +381,7 @@  discard block
 block discarded – undo
381 381
 				//remove ($count) for selected facet in template
382 382
 				$entryArray['count'] = FALSE;
383 383
 				//build link to delete selected facet
384
-				$entryArray['_OVERRIDE_HREF'] = $this->pi_linkTP_keepPIvars_url(array ('query' => $search['query'], 'fq' => $search['params']['fq']));
384
+				$entryArray['_OVERRIDE_HREF'] = $this->pi_linkTP_keepPIvars_url(array('query' => $search['query'], 'fq' => $search['params']['fq']));
385 385
 				$entryArray['title'] = sprintf($this->pi_getLL('resetFacet', ''), $entryArray['title']);
386 386
 			}
387 387
 
@@ -394,7 +394,7 @@  discard block
 block discarded – undo
394 394
 
395 395
 		}
396 396
 
397
-		$entryArray['_OVERRIDE_HREF'] = $this->pi_linkTP_keepPIvars_url(array ('query' => $search['query'], 'fq' => $search['params']['fq']));
397
+		$entryArray['_OVERRIDE_HREF'] = $this->pi_linkTP_keepPIvars_url(array('query' => $search['query'], 'fq' => $search['params']['fq']));
398 398
 
399 399
 		return $entryArray;
400 400
 
@@ -466,13 +466,13 @@  discard block
 block discarded – undo
466 466
 			}
467 467
 
468 468
 			// Configure @action URL for form.
469
-			$linkConf = array (
469
+			$linkConf = array(
470 470
 				'parameter' => $GLOBALS['TSFE']->id,
471 471
 				'forceAbsoluteUrl' => 1
472 472
 			);
473 473
 
474 474
 			// Fill markers.
475
-			$markerArray = array (
475
+			$markerArray = array(
476 476
 				'###ACTION_URL###' => $this->cObj->typoLink_URL($linkConf),
477 477
 				'###LABEL_QUERY###' => (!empty($search['query']) ? $search['query'] : $this->pi_getLL('label.query')),
478 478
 				'###LABEL_SUBMIT###' => $this->pi_getLL('label.submit'),
@@ -520,15 +520,15 @@  discard block
 block discarded – undo
520 520
 			}
521 521
 
522 522
 			// Prepare query parameters.
523
-			$params = array ();
523
+			$params = array();
524 524
 
525
-			$matches = array ();
525
+			$matches = array();
526 526
 
527 527
 			// Set search query.
528 528
 			if ((!empty($this->conf['fulltext']) && !empty($this->piVars['fulltext'])) || preg_match('/fulltext:\((.*)\)/', $this->piVars['query'], $matches)) {
529 529
 
530 530
 				// If the query already is a fulltext query e.g using the facets
531
-				$this->piVars['query'] = empty($matches[1])?$this->piVars['query']:$matches[1];
531
+				$this->piVars['query'] = empty($matches[1]) ? $this->piVars['query'] : $matches[1];
532 532
 
533 533
 				// Search in fulltext field if applicable. query must not be empty!
534 534
 				if (!empty($this->piVars['query'])) {
@@ -617,7 +617,7 @@  discard block
 block discarded – undo
617 617
 
618 618
 				$collIds = explode(',', $this->conf['collections']);
619 619
 
620
-				$collIndexNames = array ();
620
+				$collIndexNames = array();
621 621
 
622 622
 				foreach ($collIds as $collId) {
623 623
 
@@ -640,7 +640,7 @@  discard block
 block discarded – undo
640 640
 			// Perform search.
641 641
 			$results = $solr->search($query);
642 642
 
643
-			$results->metadata = array (
643
+			$results->metadata = array(
644 644
 				'label' => $label,
645 645
 				'description' => '<p class="tx-dlf-search-numHits">'.htmlspecialchars(sprintf($this->pi_getLL('hits', ''), $solr->numberOfHits, count($results))).'</p>',
646 646
 				'thumbnail' => '',
@@ -655,15 +655,15 @@  discard block
 block discarded – undo
655 655
 			\TYPO3\CMS\Core\Utility\GeneralUtility::cleanOutputBuffers();
656 656
 
657 657
 			// Jump directly to the page view, if there is only one result and it is configured
658
-			if($results->count() == 1 && !empty($this->conf['showSingleResult'])) {
658
+			if ($results->count() == 1 && !empty($this->conf['showSingleResult'])) {
659 659
 
660 660
 				$linkConf['parameter'] = $this->conf['targetPidPageView'];
661 661
 
662 662
 				$linkConf['additionalParams'] = \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId,
663
-					array (
663
+					array(
664 664
 						'id' => $results->current()['uid'],
665 665
 						'highlight_word' => preg_replace('/\s\s+/', ';', $results->metadata['searchString']),
666
-						'page' => count($results[0]['subparts']) == 1?$results[0]['subparts'][0]['page']:1
666
+						'page' => count($results[0]['subparts']) == 1 ? $results[0]['subparts'][0]['page'] : 1
667 667
 					), '', TRUE, FALSE);
668 668
 
669 669
 			} else {
@@ -674,7 +674,7 @@  discard block
 block discarded – undo
674 674
 				if (!empty($this->piVars['order'])) {
675 675
 
676 676
 					$linkConf['additionalParams'] = \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId,
677
-							array (
677
+							array(
678 678
 								'order' => $this->piVars['order'],
679 679
 								'asc' => (!empty($this->piVars['asc']) ? '1' : '0')
680 680
 							), '', TRUE, FALSE);
@@ -709,12 +709,12 @@  discard block
 block discarded – undo
709 709
 
710 710
 		$this->init($conf);
711 711
 
712
-		$menuArray = array ();
712
+		$menuArray = array();
713 713
 
714 714
 		// Set default value for facet search.
715
-		$search = array (
715
+		$search = array(
716 716
 			'query' => '*',
717
-			'params' => array ()
717
+			'params' => array()
718 718
 		);
719 719
 
720 720
 		// Extract query and filter from last search.
@@ -743,14 +743,14 @@  discard block
 block discarded – undo
743 743
 
744 744
 			}
745 745
 
746
-			return array ();
746
+			return array();
747 747
 
748 748
 		}
749 749
 
750 750
 		// Set needed parameters for facet search.
751 751
 		if (empty($search['params']['fq'])) {
752 752
 
753
-			$search['params']['fq'] = array ();
753
+			$search['params']['fq'] = array();
754 754
 
755 755
 		}
756 756
 
@@ -767,7 +767,7 @@  discard block
 block discarded – undo
767 767
 		// Process results.
768 768
 		foreach ($results->facet_counts->facet_fields as $field => $values) {
769 769
 
770
-			$entryArray = array ();
770
+			$entryArray = array();
771 771
 
772 772
 			$entryArray['title'] = htmlspecialchars($this->conf['facets'][$field]);
773 773
 
Please login to merge, or discard this patch.
dlf/plugins/search/class.tx_dlf_search_suggest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
 	 *
33 33
 	 * @return	void
34 34
 	 */
35
-	public function main($content = '', $conf = array ()) {
35
+	public function main($content = '', $conf = array()) {
36 36
 
37 37
 		if (\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('encrypted') != '' && \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('hashed') != '') {
38 38
 
Please login to merge, or discard this patch.
dlf/plugins/basket/class.tx_dlf_basket.php 2 patches
Indentation   +544 added lines, -544 removed lines patch added patch discarded remove patch
@@ -19,220 +19,220 @@  discard block
 block discarded – undo
19 19
  */
20 20
 class tx_dlf_basket extends tx_dlf_plugin {
21 21
 
22
-    public $scriptRelPath = 'plugins/basket/class.tx_dlf_basket.php';
22
+	public $scriptRelPath = 'plugins/basket/class.tx_dlf_basket.php';
23 23
 
24
-    /**
25
-     * The main method of the PlugIn
26
-     *
27
-     * @access	public
28
-     *
29
-     * @param	string		$content: The PlugIn content
30
-     * @param	array		$conf: The PlugIn configuration
31
-     *
32
-     * @return	string		The content that is displayed on the website
33
-     */
34
-    public function main($content, $conf) {
24
+	/**
25
+	 * The main method of the PlugIn
26
+	 *
27
+	 * @access	public
28
+	 *
29
+	 * @param	string		$content: The PlugIn content
30
+	 * @param	array		$conf: The PlugIn configuration
31
+	 *
32
+	 * @return	string		The content that is displayed on the website
33
+	 */
34
+	public function main($content, $conf) {
35 35
 
36
-        $this->init($conf);
36
+		$this->init($conf);
37 37
 
38
-        // Don't cache the output.
39
-        $this->setCache(FALSE);
38
+		// Don't cache the output.
39
+		$this->setCache(FALSE);
40 40
 
41
-        // Load template file.
42
-        if (!empty($this->conf['templateFile'])) {
41
+		// Load template file.
42
+		if (!empty($this->conf['templateFile'])) {
43 43
 
44
-            $this->template = $this->cObj->getSubpart($this->cObj->fileResource($this->conf['templateFile']), '###TEMPLATE###');
44
+			$this->template = $this->cObj->getSubpart($this->cObj->fileResource($this->conf['templateFile']), '###TEMPLATE###');
45 45
 
46
-        } else {
46
+		} else {
47 47
 
48
-            $this->template = $this->cObj->getSubpart($this->cObj->fileResource('EXT:dlf/plugins/basket/template.tmpl'), '###TEMPLATE###');
48
+			$this->template = $this->cObj->getSubpart($this->cObj->fileResource('EXT:dlf/plugins/basket/template.tmpl'), '###TEMPLATE###');
49 49
 
50
-        }
50
+		}
51 51
 
52
-        $subpartArray['entry'] = $this->cObj->getSubpart($this->template, '###ENTRY###');
52
+		$subpartArray['entry'] = $this->cObj->getSubpart($this->template, '###ENTRY###');
53 53
 
54
-        $markerArray['###JS###'] = '';
54
+		$markerArray['###JS###'] = '';
55 55
 
56
-        // get user session
57
-        $sessionId = $GLOBALS['TSFE']->fe_user->id;
56
+		// get user session
57
+		$sessionId = $GLOBALS['TSFE']->fe_user->id;
58 58
 
59
-        if ($GLOBALS['TSFE']->loginUser) {
59
+		if ($GLOBALS['TSFE']->loginUser) {
60 60
 
61
-            $insertArray['fe_user_id'] = $GLOBALS['TSFE']->fe_user->user['uid'];
61
+			$insertArray['fe_user_id'] = $GLOBALS['TSFE']->fe_user->user['uid'];
62 62
 
63
-            $query = $GLOBALS['TYPO3_DB']->SELECTquery(
64
-                '*',
65
-                'tx_dlf_basket',
66
-                'tx_dlf_basket.fe_user_id='.intval($insertArray['fe_user_id']).tx_dlf_helper::whereClause('tx_dlf_basket'),
67
-                '',
68
-                '',
69
-                '1'
70
-            );
63
+			$query = $GLOBALS['TYPO3_DB']->SELECTquery(
64
+				'*',
65
+				'tx_dlf_basket',
66
+				'tx_dlf_basket.fe_user_id='.intval($insertArray['fe_user_id']).tx_dlf_helper::whereClause('tx_dlf_basket'),
67
+				'',
68
+				'',
69
+				'1'
70
+			);
71 71
 
72
-        } else {
72
+		} else {
73 73
 
74
-            $GLOBALS['TSFE']->fe_user->setKey('ses', 'tx_dlf_basket', '');
74
+			$GLOBALS['TSFE']->fe_user->setKey('ses', 'tx_dlf_basket', '');
75 75
 
76
-            $GLOBALS['TSFE']->fe_user->sesData_change = true;
76
+			$GLOBALS['TSFE']->fe_user->sesData_change = true;
77 77
 
78
-            $GLOBALS['TSFE']->fe_user->storeSessionData();
78
+			$GLOBALS['TSFE']->fe_user->storeSessionData();
79 79
 
80
-            $query = $GLOBALS['TYPO3_DB']->SELECTquery(
81
-                '*',
82
-                'tx_dlf_basket',
83
-                'tx_dlf_basket.session_id='.$GLOBALS['TYPO3_DB']->fullQuoteStr($sessionId, 'tx_dlf_basket').tx_dlf_helper::whereClause('tx_dlf_basket'),
84
-                '',
85
-                '',
86
-                '1'
87
-            );
80
+			$query = $GLOBALS['TYPO3_DB']->SELECTquery(
81
+				'*',
82
+				'tx_dlf_basket',
83
+				'tx_dlf_basket.session_id='.$GLOBALS['TYPO3_DB']->fullQuoteStr($sessionId, 'tx_dlf_basket').tx_dlf_helper::whereClause('tx_dlf_basket'),
84
+				'',
85
+				'',
86
+				'1'
87
+			);
88 88
 
89
-        }
89
+		}
90 90
 
91
-        $result = $GLOBALS['TYPO3_DB']->sql_query($query);
91
+		$result = $GLOBALS['TYPO3_DB']->sql_query($query);
92 92
 
93
-        // session already exists
94
-        if ($GLOBALS['TYPO3_DB']->sql_num_rows($result) == 0) {
93
+		// session already exists
94
+		if ($GLOBALS['TYPO3_DB']->sql_num_rows($result) == 0) {
95 95
 
96
-            // create new basket in db
97
-            $insertArray['session_id'] = $sessionId;
98
-            $insertArray['doc_ids'] = '';
99
-            $insertArray['label'] = '';
100
-            $insertArray['l18n_diffsource'] = '';
96
+			// create new basket in db
97
+			$insertArray['session_id'] = $sessionId;
98
+			$insertArray['doc_ids'] = '';
99
+			$insertArray['label'] = '';
100
+			$insertArray['l18n_diffsource'] = '';
101 101
 
102
-            $GLOBALS['TYPO3_DB']->exec_INSERTquery('tx_dlf_basket', $insertArray);
102
+			$GLOBALS['TYPO3_DB']->exec_INSERTquery('tx_dlf_basket', $insertArray);
103 103
 
104
-            $result = $GLOBALS['TYPO3_DB']->sql_query($query);
104
+			$result = $GLOBALS['TYPO3_DB']->sql_query($query);
105 105
 
106
-        }
106
+		}
107 107
 
108
-        $basketData = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result);
108
+		$basketData = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result);
109 109
 
110
-        $piVars = $this->piVars;
110
+		$piVars = $this->piVars;
111 111
 
112
-        // action add to basket
113
-        if (!empty($this->piVars['id']) && $this->piVars['addToBasket']) {
112
+		// action add to basket
113
+		if (!empty($this->piVars['id']) && $this->piVars['addToBasket']) {
114 114
 
115
-            $returnData = $this->addToBasket($this->piVars, $basketData);
115
+			$returnData = $this->addToBasket($this->piVars, $basketData);
116 116
 
117
-            $basketData = $returnData['basketData'];
117
+			$basketData = $returnData['basketData'];
118 118
 
119
-            $markerArray['###JS###'] = $returnData['jsOutput'];
119
+			$markerArray['###JS###'] = $returnData['jsOutput'];
120 120
 
121
-        } else {
121
+		} else {
122 122
 
123
-            $basketData['doc_ids'] = json_decode($basketData['doc_ids']);
123
+			$basketData['doc_ids'] = json_decode($basketData['doc_ids']);
124 124
 
125
-        }
125
+		}
126 126
 
127
-        // action remove from basket
128
-        if ($this->piVars['basket_action'] == 'remove') {
127
+		// action remove from basket
128
+		if ($this->piVars['basket_action'] == 'remove') {
129 129
 
130
-            // remove entry from list
131
-            unset($piVars['basket_action']);
130
+			// remove entry from list
131
+			unset($piVars['basket_action']);
132 132
 
133
-            if (isset($this->piVars['selected'])) {
133
+			if (isset($this->piVars['selected'])) {
134 134
 
135
-                $basketData = $this->removeFromBasket($piVars, $basketData);
135
+				$basketData = $this->removeFromBasket($piVars, $basketData);
136 136
 
137
-            }
137
+			}
138 138
 
139
-        }
139
+		}
140 140
 
141
-        // action remove from basket
142
-        if ($this->piVars['basket_action'] == 'open') {
141
+		// action remove from basket
142
+		if ($this->piVars['basket_action'] == 'open') {
143 143
 
144
-            // open selected documents
145
-            unset($piVars['basket_action']);
144
+			// open selected documents
145
+			unset($piVars['basket_action']);
146 146
 
147
-            if (isset($this->piVars['selected'])) {
147
+			if (isset($this->piVars['selected'])) {
148 148
 
149
-                $basketData = $this->openFromBasket($piVars, $basketData);
149
+				$basketData = $this->openFromBasket($piVars, $basketData);
150 150
 
151
-            }
151
+			}
152 152
 
153
-        }
153
+		}
154 154
 
155
-        // action print from basket
156
-        if ($this->piVars['print_action']) {
155
+		// action print from basket
156
+		if ($this->piVars['print_action']) {
157 157
 
158
-            // open selected documents
159
-            unset($piVars['print_action']);
158
+			// open selected documents
159
+			unset($piVars['print_action']);
160 160
 
161
-            if (isset($this->piVars['selected'])) {
161
+			if (isset($this->piVars['selected'])) {
162 162
 
163
-                $basketData = $this->printDocument($piVars, $basketData);
163
+				$basketData = $this->printDocument($piVars, $basketData);
164 164
 
165
-            }
165
+			}
166 166
 
167
-        }
167
+		}
168 168
 
169
-        // action send mail
170
-        if ($this->piVars['mail_action']) {
169
+		// action send mail
170
+		if ($this->piVars['mail_action']) {
171 171
 
172
-            if (isset($this->piVars['selected'])) {
172
+			if (isset($this->piVars['selected'])) {
173 173
 
174
-                $this->sendMail($this->piVars);
174
+				$this->sendMail($this->piVars);
175 175
 
176
-            }
176
+			}
177 177
 
178
-        }
178
+		}
179 179
 
180
-        // set marker
181
-        $markerArray['###ACTION###'] = $this->pi_getPageLink($GLOBALS['TSFE']->id);
180
+		// set marker
181
+		$markerArray['###ACTION###'] = $this->pi_getPageLink($GLOBALS['TSFE']->id);
182 182
 
183
-        $markerArray['###LISTTITLE###'] = $this->pi_getLL('basket', '', TRUE);
183
+		$markerArray['###LISTTITLE###'] = $this->pi_getLL('basket', '', TRUE);
184 184
 
185
-        if ($basketData['doc_ids']) {
185
+		if ($basketData['doc_ids']) {
186 186
 
187
-            if (is_object($basketData['doc_ids'])) {
187
+			if (is_object($basketData['doc_ids'])) {
188 188
 
189
-                $basketData['doc_ids'] = get_object_vars($basketData['doc_ids']);
189
+				$basketData['doc_ids'] = get_object_vars($basketData['doc_ids']);
190 190
 
191
-            }
191
+			}
192 192
 
193
-            $markerArray['###COUNT###'] = sprintf($this->pi_getLL('count'), count($basketData['doc_ids']));
193
+			$markerArray['###COUNT###'] = sprintf($this->pi_getLL('count'), count($basketData['doc_ids']));
194 194
 
195
-        } else {
195
+		} else {
196 196
 
197
-            $markerArray['###COUNT###'] = sprintf($this->pi_getLL('count'), 0);
197
+			$markerArray['###COUNT###'] = sprintf($this->pi_getLL('count'), 0);
198 198
 
199
-        }
199
+		}
200 200
 
201
-        // get mail addresses
202
-        $resultMail = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
203
-            '*',
204
-            'tx_dlf_mail',
205
-            '1'.tx_dlf_helper::whereClause('tx_dlf_mail'),
206
-            '',
207
-            'tx_dlf_mail.sorting',
208
-            ''
209
-        );
201
+		// get mail addresses
202
+		$resultMail = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
203
+			'*',
204
+			'tx_dlf_mail',
205
+			'1'.tx_dlf_helper::whereClause('tx_dlf_mail'),
206
+			'',
207
+			'tx_dlf_mail.sorting',
208
+			''
209
+		);
210 210
 
211
-        if ($GLOBALS['TYPO3_DB']->sql_num_rows($resultMail) > 0) {
211
+		if ($GLOBALS['TYPO3_DB']->sql_num_rows($resultMail) > 0) {
212 212
 
213
-            $mails = array();
213
+			$mails = array();
214 214
 
215
-            $mailForm = '<select name="tx_dlf[mail_action]">';
215
+			$mailForm = '<select name="tx_dlf[mail_action]">';
216 216
 
217
-            $mailForm .= '<option value="">'.$this->pi_getLL('chooseMail', '', TRUE).'</option>';
217
+			$mailForm .= '<option value="">'.$this->pi_getLL('chooseMail', '', TRUE).'</option>';
218 218
 
219
-            while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($resultMail)){
219
+			while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($resultMail)){
220 220
 
221
-                $mails[] = $row;
221
+				$mails[] = $row;
222 222
 
223
-                $mailForm .= '<option value="'.$row['uid'].'">'.$row['name'].' ('.$row['mail'].')</option>';
223
+				$mailForm .= '<option value="'.$row['uid'].'">'.$row['name'].' ('.$row['mail'].')</option>';
224 224
 
225
-            }
225
+			}
226 226
 
227
-            $mailForm .= '</select><input type="submit">';
227
+			$mailForm .= '</select><input type="submit">';
228 228
 
229
-        }
229
+		}
230 230
 
231
-        // mail action form
232
-        $markerArray['###MAILACTION###'] = $mailForm;
231
+		// mail action form
232
+		$markerArray['###MAILACTION###'] = $mailForm;
233 233
 
234
-        // remove action form
235
-        $markerArray['###REMOVEACTION###'] = '
234
+		// remove action form
235
+		$markerArray['###REMOVEACTION###'] = '
236 236
 			<select name="tx_dlf[basket_action]">
237 237
 				<option value="">'.$this->pi_getLL('chooseAction', '', TRUE).'</option>
238 238
 				<option value="open">'.$this->pi_getLL('download', '', TRUE).'</option>
@@ -241,275 +241,275 @@  discard block
 block discarded – undo
241 241
 			<input type="submit">
242 242
 		';
243 243
 
244
-        // get mail addresses
245
-        $resultPrinter = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
246
-            '*',
247
-            'tx_dlf_printer',
248
-            '1'.tx_dlf_helper::whereClause('tx_dlf_printer'),
249
-            '',
250
-            '',
251
-            ''
252
-        );
244
+		// get mail addresses
245
+		$resultPrinter = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
246
+			'*',
247
+			'tx_dlf_printer',
248
+			'1'.tx_dlf_helper::whereClause('tx_dlf_printer'),
249
+			'',
250
+			'',
251
+			''
252
+		);
253 253
 
254
-        $printForm = '';
254
+		$printForm = '';
255 255
 
256
-        if ($GLOBALS['TYPO3_DB']->sql_num_rows($resultPrinter) > 0) {
256
+		if ($GLOBALS['TYPO3_DB']->sql_num_rows($resultPrinter) > 0) {
257 257
 
258
-            $printers = array();
258
+			$printers = array();
259 259
 
260
-            $printForm = '<select name="tx_dlf[print_action]">';
260
+			$printForm = '<select name="tx_dlf[print_action]">';
261 261
 
262
-            $printForm .= '<option value="">'.$this->pi_getLL('choosePrinter', '', TRUE).'</option>';
262
+			$printForm .= '<option value="">'.$this->pi_getLL('choosePrinter', '', TRUE).'</option>';
263 263
 
264
-            while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($resultPrinter)){
264
+			while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($resultPrinter)){
265 265
 
266
-                $printers[] = $row;
266
+				$printers[] = $row;
267 267
 
268
-                $printForm .= '<option value="'.$row['uid'].'">'.$row['label'].'</option>';
268
+				$printForm .= '<option value="'.$row['uid'].'">'.$row['label'].'</option>';
269 269
 
270
-            }
270
+			}
271 271
 
272
-            $printForm .= '</select><input type="submit" />';
272
+			$printForm .= '</select><input type="submit" />';
273 273
 
274
-        }
274
+		}
275 275
 
276
-        // print action form
277
-        $markerArray['###PRINTACTION###'] = $printForm;
276
+		// print action form
277
+		$markerArray['###PRINTACTION###'] = $printForm;
278 278
 
279
-        $entries = '';
279
+		$entries = '';
280 280
 
281
-        if (isset($basketData['doc_ids'])) {
281
+		if (isset($basketData['doc_ids'])) {
282 282
 
283
-            // get each entry
284
-            foreach ($basketData['doc_ids'] as $key => $value) {
283
+			// get each entry
284
+			foreach ($basketData['doc_ids'] as $key => $value) {
285 285
 
286
-                $entries .= $this->getEntry($value, $subpartArray);
286
+				$entries .= $this->getEntry($value, $subpartArray);
287 287
 
288
-            }
288
+			}
289 289
 
290
-        } else {
290
+		} else {
291 291
 
292
-            $entries = '';
292
+			$entries = '';
293 293
 
294
-        }
294
+		}
295 295
 
296
-        // basket go to
297
-        if ($this->conf['targetBasket'] && $this->conf['basketGoToButton'] && $this->piVars['id']) {
296
+		// basket go to
297
+		if ($this->conf['targetBasket'] && $this->conf['basketGoToButton'] && $this->piVars['id']) {
298 298
 
299
-            $label = $this->pi_getLL('goBasket', '', TRUE);
299
+			$label = $this->pi_getLL('goBasket', '', TRUE);
300 300
 
301
-            $basketConf = array (
302
-                'parameter' => $this->conf['targetBasket'],
303
-                'title' => $label
304
-            );
301
+			$basketConf = array (
302
+				'parameter' => $this->conf['targetBasket'],
303
+				'title' => $label
304
+			);
305 305
 
306
-            $markerArray['###BASKET###'] = $this->cObj->typoLink($label, $basketConf);
306
+			$markerArray['###BASKET###'] = $this->cObj->typoLink($label, $basketConf);
307 307
 
308
-        } else {
308
+		} else {
309 309
 
310
-            $markerArray['###BASKET###'] = '';
310
+			$markerArray['###BASKET###'] = '';
311 311
 
312
-        }
312
+		}
313 313
 
314
-        $content = $this->cObj->substituteMarkerArray($this->cObj->substituteSubpart($this->template, '###ENTRY###', $entries, TRUE), $markerArray);
314
+		$content = $this->cObj->substituteMarkerArray($this->cObj->substituteSubpart($this->template, '###ENTRY###', $entries, TRUE), $markerArray);
315 315
 
316
-        return $this->pi_wrapInBaseClass($content);
316
+		return $this->pi_wrapInBaseClass($content);
317 317
 
318
-    }
318
+	}
319 319
 
320
-    /**
321
-     * Return one basket entry
322
-     * @param  array $data     DocumentData
323
-     * @param  array $template Template information
324
-     * @return Template
325
-     */
326
-    public function getEntry($data, $template) {
320
+	/**
321
+	 * Return one basket entry
322
+	 * @param  array $data     DocumentData
323
+	 * @param  array $template Template information
324
+	 * @return Template
325
+	 */
326
+	public function getEntry($data, $template) {
327 327
 
328
-        if (is_object($data)) {
328
+		if (is_object($data)) {
329 329
 
330
-            $data = get_object_vars($data);
330
+			$data = get_object_vars($data);
331 331
 
332
-        }
332
+		}
333 333
 
334
-        $id = $data['id'];
334
+		$id = $data['id'];
335 335
 
336
-        $startpage = $data['startpage'];
336
+		$startpage = $data['startpage'];
337 337
 
338
-        $endpage = $data['endpage'];
338
+		$endpage = $data['endpage'];
339 339
 
340
-        $startX = $data['startX'];
340
+		$startX = $data['startX'];
341 341
 
342
-        $startY = $data['startY'];
342
+		$startY = $data['startY'];
343 343
 
344
-        $endX = $data['endX'];
344
+		$endX = $data['endX'];
345 345
 
346
-        $endY = $data['endY'];
346
+		$endY = $data['endY'];
347 347
 
348
-        $rotation = $data['rotation'];
348
+		$rotation = $data['rotation'];
349 349
 
350
-        $docData = $this->getDocumentData($id, $data);
350
+		$docData = $this->getDocumentData($id, $data);
351 351
 
352
-        $markerArray['###BASKETDATA###'] = $docData['downloadLink'];
352
+		$markerArray['###BASKETDATA###'] = $docData['downloadLink'];
353 353
 
354
-        $arrayKey = $id.'_'.$startpage;
354
+		$arrayKey = $id.'_'.$startpage;
355 355
 
356
-        if (isset($startX)) {
356
+		if (isset($startX)) {
357 357
 
358
-            $arrayKey .= '_'.$startX;
358
+			$arrayKey .= '_'.$startX;
359 359
 
360
-        }
360
+		}
361 361
 
362
-        if (isset($endX)) {
362
+		if (isset($endX)) {
363 363
 
364
-            $arrayKey .= '_'.$endX;
364
+			$arrayKey .= '_'.$endX;
365 365
 
366
-        }
366
+		}
367 367
 
368
-        $controlMark = '<input value="'.$id.'" name="tx_dlf[selected]['.$arrayKey.'][id]" type="checkbox">';
368
+		$controlMark = '<input value="'.$id.'" name="tx_dlf[selected]['.$arrayKey.'][id]" type="checkbox">';
369 369
 
370
-        $controlMark .= '<input value="'.$startpage.'" name="tx_dlf[selected]['.$arrayKey.'][startpage]" type="hidden">';
370
+		$controlMark .= '<input value="'.$startpage.'" name="tx_dlf[selected]['.$arrayKey.'][startpage]" type="hidden">';
371 371
 
372
-        $controlMark .= '<input value="'.$endpage.'" name="tx_dlf[selected]['.$arrayKey.'][endpage]" type="hidden">';
372
+		$controlMark .= '<input value="'.$endpage.'" name="tx_dlf[selected]['.$arrayKey.'][endpage]" type="hidden">';
373 373
 
374
-        // add hidden fields for detail information
375
-        if ($startX) {
374
+		// add hidden fields for detail information
375
+		if ($startX) {
376 376
 
377
-            $controlMark .= '<input type="hidden" name="tx_dlf[selected]['.$arrayKey.'][startX]" value="'.$startX.'">';
377
+			$controlMark .= '<input type="hidden" name="tx_dlf[selected]['.$arrayKey.'][startX]" value="'.$startX.'">';
378 378
 
379
-            $controlMark .= '<input type="hidden" name="tx_dlf[selected]['.$arrayKey.'][startY]"  value="'.$startY.'">';
379
+			$controlMark .= '<input type="hidden" name="tx_dlf[selected]['.$arrayKey.'][startY]"  value="'.$startY.'">';
380 380
 
381
-            $controlMark .= '<input type="hidden" name="tx_dlf[selected]['.$arrayKey.'][endX]"  value="'.$endX.'">';
381
+			$controlMark .= '<input type="hidden" name="tx_dlf[selected]['.$arrayKey.'][endX]"  value="'.$endX.'">';
382 382
 
383
-            $controlMark .= '<input type="hidden" name="tx_dlf[selected]['.$arrayKey.'][endY]"  value="'.$endY.'">';
383
+			$controlMark .= '<input type="hidden" name="tx_dlf[selected]['.$arrayKey.'][endY]"  value="'.$endY.'">';
384 384
 
385
-            $controlMark .= '<input type="hidden" name="tx_dlf[selected]['.$arrayKey.'][rotation]"  value="'.$rotation.'">';
385
+			$controlMark .= '<input type="hidden" name="tx_dlf[selected]['.$arrayKey.'][rotation]"  value="'.$rotation.'">';
386 386
 
387
-        }
387
+		}
388 388
 
389
-        // return one entry
390
-        $markerArray['###CONTROLS###'] = $controlMark;
389
+		// return one entry
390
+		$markerArray['###CONTROLS###'] = $controlMark;
391 391
 
392
-        $markerArray['###NUMBER###'] = $docData['record_id'];
392
+		$markerArray['###NUMBER###'] = $docData['record_id'];
393 393
 
394
-        return $this->cObj->substituteMarkerArray($this->cObj->substituteSubpart($template['entry'], '###ENTRY###', $subpart, TRUE), $markerArray);
394
+		return $this->cObj->substituteMarkerArray($this->cObj->substituteSubpart($template['entry'], '###ENTRY###', $subpart, TRUE), $markerArray);
395 395
 
396
-    }
396
+	}
397 397
 
398
-    /**
399
-     * Adds documents to the basket
400
-     * @param array $_piVars    piVars
401
-     * @param array $basketData basket data
402
-     */
403
-    public function addToBasket($_piVars, $basketData) {
398
+	/**
399
+	 * Adds documents to the basket
400
+	 * @param array $_piVars    piVars
401
+	 * @param array $basketData basket data
402
+	 */
403
+	public function addToBasket($_piVars, $basketData) {
404 404
 
405
-        if (!$_piVars['startpage']) {
405
+		if (!$_piVars['startpage']) {
406 406
 
407
-            $page = 0;
407
+			$page = 0;
408 408
 
409
-        } else {
409
+		} else {
410 410
 
411
-            $page = intval($_piVars['startpage']);
411
+			$page = intval($_piVars['startpage']);
412 412
 
413
-        }
413
+		}
414 414
 
415
-        if ($page != null || $_piVars['addToBasket'] == 'list') {
415
+		if ($page != null || $_piVars['addToBasket'] == 'list') {
416 416
 
417
-            $documentItem = array(
418
-                'id' => intval($_piVars['id']),
419
-                'startpage' => intval($_piVars['startpage']),
420
-                'endpage' => intval($_piVars['endpage']),
421
-                'startX' => intval($_piVars['startX']),
422
-                'startY' => intval($_piVars['startY']),
423
-                'endX' => intval($_piVars['endX']),
424
-                'endY' => intval($_piVars['endY']),
425
-                'rotation' => intval($_piVars['rotation'])
426
-            );
417
+			$documentItem = array(
418
+				'id' => intval($_piVars['id']),
419
+				'startpage' => intval($_piVars['startpage']),
420
+				'endpage' => intval($_piVars['endpage']),
421
+				'startX' => intval($_piVars['startX']),
422
+				'startY' => intval($_piVars['startY']),
423
+				'endX' => intval($_piVars['endX']),
424
+				'endY' => intval($_piVars['endY']),
425
+				'rotation' => intval($_piVars['rotation'])
426
+			);
427 427
 
428
-            // update basket
429
-            if (!empty($basketData['doc_ids'])) {
428
+			// update basket
429
+			if (!empty($basketData['doc_ids'])) {
430 430
 
431
-                $items = json_decode($basketData['doc_ids']);
431
+				$items = json_decode($basketData['doc_ids']);
432 432
 
433
-                $items = get_object_vars($items);
433
+				$items = get_object_vars($items);
434 434
 
435
-            } else {
435
+			} else {
436 436
 
437
-                $items = array();
437
+				$items = array();
438 438
 
439
-            }
439
+			}
440 440
 
441
-            // get document instance to load further information
442
-            $document = tx_dlf_document::getInstance($documentItem['id'],0);
441
+			// get document instance to load further information
442
+			$document = tx_dlf_document::getInstance($documentItem['id'],0);
443 443
 
444
-            // set endpage for toc and subentry based on logid
445
-            if (($_piVars['addToBasket'] == 'subentry') OR ($_piVars['addToBasket'] == 'toc')) {
444
+			// set endpage for toc and subentry based on logid
445
+			if (($_piVars['addToBasket'] == 'subentry') OR ($_piVars['addToBasket'] == 'toc')) {
446 446
 
447
-                $smLinks = $document->smLinks;
447
+				$smLinks = $document->smLinks;
448 448
 
449
-                $pageCounter = sizeof($smLinks['l2p'][$_piVars['logId']]);
449
+				$pageCounter = sizeof($smLinks['l2p'][$_piVars['logId']]);
450 450
 
451
-                $documentItem['endpage'] = ($documentItem['startpage'] + $pageCounter) - 1;
451
+				$documentItem['endpage'] = ($documentItem['startpage'] + $pageCounter) - 1;
452 452
 
453
-            }
453
+			}
454 454
 
455
-            // add whole document
456
-            if ($_piVars['addToBasket'] == 'list') {
455
+			// add whole document
456
+			if ($_piVars['addToBasket'] == 'list') {
457 457
 
458
-                $documentItem['endpage'] = $document->numPages;
458
+				$documentItem['endpage'] = $document->numPages;
459 459
 
460
-            }
460
+			}
461 461
 
462
-            $arrayKey = $documentItem['id'].'_'.$page;
462
+			$arrayKey = $documentItem['id'].'_'.$page;
463 463
 
464
-            if (!empty($documentItem['startX'])) {
464
+			if (!empty($documentItem['startX'])) {
465 465
 
466
-                $arrayKey .= '_'.$documentItem['startX'];
466
+				$arrayKey .= '_'.$documentItem['startX'];
467 467
 
468
-            }
468
+			}
469 469
 
470
-            if (!empty($documentItem['endX'])) {
470
+			if (!empty($documentItem['endX'])) {
471 471
 
472
-                $arrayKey .= '_'.$documentItem['endX'];
472
+				$arrayKey .= '_'.$documentItem['endX'];
473 473
 
474
-            }
474
+			}
475 475
 
476
-            // do not add more than one identical object
477
-            if (!in_array($arrayKey, $items)) {
476
+			// do not add more than one identical object
477
+			if (!in_array($arrayKey, $items)) {
478 478
 
479
-                $items[$arrayKey] = $documentItem;
479
+				$items[$arrayKey] = $documentItem;
480 480
 
481
-                // replace url param placeholder
482
-                $pdfParams = str_replace("##startpage##", $documentItem['startpage'], $this->conf['pdfparams']);
481
+				// replace url param placeholder
482
+				$pdfParams = str_replace("##startpage##", $documentItem['startpage'], $this->conf['pdfparams']);
483 483
 
484
-                $pdfParams = str_replace("##docId##", $document->recordId, $pdfParams);
484
+				$pdfParams = str_replace("##docId##", $document->recordId, $pdfParams);
485 485
 
486
-                $pdfParams = str_replace("##startx##", $documentItem['startX'], $pdfParams);
486
+				$pdfParams = str_replace("##startx##", $documentItem['startX'], $pdfParams);
487 487
 
488
-                $pdfParams = str_replace("##starty##", $documentItem['startY'], $pdfParams);
488
+				$pdfParams = str_replace("##starty##", $documentItem['startY'], $pdfParams);
489 489
 
490
-                $pdfParams = str_replace("##endx##", $documentItem['endX'], $pdfParams);
490
+				$pdfParams = str_replace("##endx##", $documentItem['endX'], $pdfParams);
491 491
 
492
-                $pdfParams = str_replace("##endy##", $documentItem['endY'], $pdfParams);
492
+				$pdfParams = str_replace("##endy##", $documentItem['endY'], $pdfParams);
493 493
 
494
-                $pdfParams = str_replace("##rotation##", $documentItem['rotation'], $pdfParams);
494
+				$pdfParams = str_replace("##rotation##", $documentItem['rotation'], $pdfParams);
495 495
 
496
-                if ($documentItem['startpage'] != $documentItem['endpage']) {
496
+				if ($documentItem['startpage'] != $documentItem['endpage']) {
497 497
 
498
-                    $pdfParams = str_replace("##endpage##", $documentItem['endpage'], $pdfParams);
498
+					$pdfParams = str_replace("##endpage##", $documentItem['endpage'], $pdfParams);
499 499
 
500
-                } else {
500
+				} else {
501 501
 
502
-                    // remove parameter endpage
503
-                    $pdfParams = str_replace(",##endpage##", '', $pdfParams);
502
+					// remove parameter endpage
503
+					$pdfParams = str_replace(",##endpage##", '', $pdfParams);
504 504
 
505
-                }
505
+				}
506 506
 
507
-                $pdfGenerateUrl = $this->conf['pdfgenerate'].$pdfParams;
507
+				$pdfGenerateUrl = $this->conf['pdfgenerate'].$pdfParams;
508 508
 
509
-                if ($this->conf['pregeneration']) {
509
+				if ($this->conf['pregeneration']) {
510 510
 
511
-                    // send ajax request to webapp
512
-                    $output .= '
511
+					// send ajax request to webapp
512
+					$output .= '
513 513
 					<script>
514 514
 						$(document).ready(function(){
515 515
 							$.ajax({
@@ -519,431 +519,431 @@  discard block
 block discarded – undo
519 519
 						});
520 520
 					</script>';
521 521
 
522
-                }
522
+				}
523 523
 
524
-            }
524
+			}
525 525
 
526
-            $update = array('doc_ids' => json_encode($items));
526
+			$update = array('doc_ids' => json_encode($items));
527 527
 
528
-            $GLOBALS['TYPO3_DB']->exec_UPDATEquery('tx_dlf_basket', 'uid='.intval($basketData['uid']), $update);
528
+			$GLOBALS['TYPO3_DB']->exec_UPDATEquery('tx_dlf_basket', 'uid='.intval($basketData['uid']), $update);
529 529
 
530
-            $basketData['doc_ids'] = $items;
530
+			$basketData['doc_ids'] = $items;
531 531
 
532
-        }
532
+		}
533 533
 
534
-        return array('basketData' => $basketData, 'jsOutput' => $output);
534
+		return array('basketData' => $basketData, 'jsOutput' => $output);
535 535
 
536
-    }
536
+	}
537 537
 
538
-    /**
539
-     * Removes selected documents from basket
540
-     * @param  array $_piVars    plugin variables
541
-     * @param  array $basketData array with document information
542
-     * @return array             basket data
543
-     */
544
-    public function removeFromBasket($_piVars, $basketData) {
538
+	/**
539
+	 * Removes selected documents from basket
540
+	 * @param  array $_piVars    plugin variables
541
+	 * @param  array $basketData array with document information
542
+	 * @return array             basket data
543
+	 */
544
+	public function removeFromBasket($_piVars, $basketData) {
545 545
 
546
-        if (!empty($basketData['doc_ids'])) {
546
+		if (!empty($basketData['doc_ids'])) {
547 547
 
548
-            $items = $basketData['doc_ids'];
548
+			$items = $basketData['doc_ids'];
549 549
 
550
-            $items = get_object_vars($items);
550
+			$items = get_object_vars($items);
551 551
 
552
-        }
552
+		}
553 553
 
554
-        foreach ($_piVars['selected'] as $key => $value) {
554
+		foreach ($_piVars['selected'] as $key => $value) {
555 555
 
556
-            if (isset($value['id'])) {
556
+			if (isset($value['id'])) {
557 557
 
558
-                $arrayKey = $value['id'].'_'.$value['startpage'];
558
+				$arrayKey = $value['id'].'_'.$value['startpage'];
559 559
 
560
-                if (isset($value['startX'])) {
560
+				if (isset($value['startX'])) {
561 561
 
562
-                    $arrayKey .= '_'.$value['startX'];
562
+					$arrayKey .= '_'.$value['startX'];
563 563
 
564
-                }
564
+				}
565 565
 
566
-                if (isset($value['endX'])) {
566
+				if (isset($value['endX'])) {
567 567
 
568
-                    $arrayKey .= '_'.$value['endX'];
568
+					$arrayKey .= '_'.$value['endX'];
569 569
 
570
-                }
570
+				}
571 571
 
572
-                if (isset($items[$arrayKey])) {
572
+				if (isset($items[$arrayKey])) {
573 573
 
574
-                    unset($items[$arrayKey]);
574
+					unset($items[$arrayKey]);
575 575
 
576
-                }
576
+				}
577 577
 
578
-            }
578
+			}
579 579
 
580
-        }
580
+		}
581 581
 
582
-        if (empty($items)) {
582
+		if (empty($items)) {
583 583
 
584
-            $update = array('doc_ids' => '');
584
+			$update = array('doc_ids' => '');
585 585
 
586
-        } else {
586
+		} else {
587 587
 
588
-            $update = array('doc_ids' => json_encode($items));
588
+			$update = array('doc_ids' => json_encode($items));
589 589
 
590
-        }
590
+		}
591 591
 
592
-        $GLOBALS['TYPO3_DB']->exec_UPDATEquery('tx_dlf_basket', 'uid='.intval($basketData['uid']), $update);
592
+		$GLOBALS['TYPO3_DB']->exec_UPDATEquery('tx_dlf_basket', 'uid='.intval($basketData['uid']), $update);
593 593
 
594
-        $basketData['doc_ids'] = $items;
594
+		$basketData['doc_ids'] = $items;
595 595
 
596
-        return $basketData;
596
+		return $basketData;
597 597
 
598
-    }
598
+	}
599 599
 
600
-    /**
601
-     * Open selected documents from basket
602
-     * @param  array $_piVars    plugin variables
603
-     * @param  array $basketData array with document information
604
-     * @return array             basket data
605
-     */
606
-    public function openFromBasket($_piVars, $basketData) {
600
+	/**
601
+	 * Open selected documents from basket
602
+	 * @param  array $_piVars    plugin variables
603
+	 * @param  array $basketData array with document information
604
+	 * @return array             basket data
605
+	 */
606
+	public function openFromBasket($_piVars, $basketData) {
607 607
 
608
-        $pdfUrl = $this->conf['pdfgenerate'];
608
+		$pdfUrl = $this->conf['pdfgenerate'];
609 609
 
610
-        foreach ($this->piVars['selected'] as $docId => $docValue) {
610
+		foreach ($this->piVars['selected'] as $docId => $docValue) {
611 611
 
612
-            if ($docValue['id']) {
612
+			if ($docValue['id']) {
613 613
 
614
-                $filename .= $docValue['id'].'_';
614
+				$filename .= $docValue['id'].'_';
615 615
 
616
-                $docData = $this->getDocumentData($docValue['id'], $docValue);
616
+				$docData = $this->getDocumentData($docValue['id'], $docValue);
617 617
 
618
-                $pdfUrl .= $docData['urlParams'].$this->conf['pdfparamseparator'];
618
+				$pdfUrl .= $docData['urlParams'].$this->conf['pdfparamseparator'];
619 619
 
620
-                $numberOfPages += $docData['pageNums'];
620
+				$numberOfPages += $docData['pageNums'];
621 621
 
622
-            }
622
+			}
623 623
 
624
-        }
624
+		}
625 625
 
626
-        header('Location: '.$pdfUrl);
626
+		header('Location: '.$pdfUrl);
627 627
 
628
-        ob_end_flush();
628
+		ob_end_flush();
629 629
 
630
-        exit;
630
+		exit;
631 631
 
632
-    }
632
+	}
633 633
 
634
-    /**
635
-     * Returns the downloadurl configured in the basket
636
-     * @param  integer $id Document id
637
-     * @return mixed     download url or false
638
-     */
639
-    public function getDocumentData($id, $data) {
634
+	/**
635
+	 * Returns the downloadurl configured in the basket
636
+	 * @param  integer $id Document id
637
+	 * @return mixed     download url or false
638
+	 */
639
+	public function getDocumentData($id, $data) {
640 640
 
641
-        // get document instance to load further information
642
-        $document = tx_dlf_document::getInstance($id,0);
641
+		// get document instance to load further information
642
+		$document = tx_dlf_document::getInstance($id,0);
643 643
 
644
-        if ($document) {
644
+		if ($document) {
645 645
 
646
-            // replace url param placeholder
647
-            $urlParams = str_replace("##page##", intval($data['page']), $this->conf['pdfparams']);
646
+			// replace url param placeholder
647
+			$urlParams = str_replace("##page##", intval($data['page']), $this->conf['pdfparams']);
648 648
 
649
-            $urlParams = str_replace("##docId##", $document->recordId, $urlParams);
649
+			$urlParams = str_replace("##docId##", $document->recordId, $urlParams);
650 650
 
651
-            $urlParams = str_replace("##startpage##", intval($data['startpage']), $urlParams);
651
+			$urlParams = str_replace("##startpage##", intval($data['startpage']), $urlParams);
652 652
 
653
-            if ($data['startpage'] != $data['endpage']) {
653
+			if ($data['startpage'] != $data['endpage']) {
654 654
 
655
-                $urlParams = str_replace("##endpage##", intval($data['endpage']), $urlParams);
655
+				$urlParams = str_replace("##endpage##", intval($data['endpage']), $urlParams);
656 656
 
657
-            } else {
657
+			} else {
658 658
 
659
-                // remove parameter endpage
660
-                $urlParams = str_replace(",##endpage##", '', $urlParams);
659
+				// remove parameter endpage
660
+				$urlParams = str_replace(",##endpage##", '', $urlParams);
661 661
 
662
-            }
662
+			}
663 663
 
664
-            $urlParams = str_replace("##startx##", intval($data['startX']), $urlParams);
664
+			$urlParams = str_replace("##startx##", intval($data['startX']), $urlParams);
665 665
 
666
-            $urlParams = str_replace("##starty##", intval($data['startY']), $urlParams);
666
+			$urlParams = str_replace("##starty##", intval($data['startY']), $urlParams);
667 667
 
668
-            $urlParams = str_replace("##endx##", intval($data['endX']), $urlParams);
668
+			$urlParams = str_replace("##endx##", intval($data['endX']), $urlParams);
669 669
 
670
-            $urlParams = str_replace("##endy##", intval($data['endY']), $urlParams);
670
+			$urlParams = str_replace("##endy##", intval($data['endY']), $urlParams);
671 671
 
672
-            $urlParams = str_replace("##rotation##", intval($data['rotation']), $urlParams);
672
+			$urlParams = str_replace("##rotation##", intval($data['rotation']), $urlParams);
673 673
 
674
-            $downloadUrl = $this->conf['pdfgenerate'].$urlParams;
674
+			$downloadUrl = $this->conf['pdfgenerate'].$urlParams;
675 675
 
676
-            $title = $document->getTitle($id, TRUE);
676
+			$title = $document->getTitle($id, TRUE);
677 677
 
678
-            if (empty($title)) {
678
+			if (empty($title)) {
679 679
 
680
-                $title = $this->pi_getLL('noTitle', '', TRUE);
680
+				$title = $this->pi_getLL('noTitle', '', TRUE);
681 681
 
682
-            }
682
+			}
683 683
 
684
-            // Set page and cutout information
685
-            $info = '';
684
+			// Set page and cutout information
685
+			$info = '';
686 686
 
687
-            if ($data['startX'] != '' && $data['endX'] != '') {
687
+			if ($data['startX'] != '' && $data['endX'] != '') {
688 688
 
689
-                // cutout
690
-                $info .= $this->pi_getLL('cutout', '', TRUE).' ';
689
+				// cutout
690
+				$info .= $this->pi_getLL('cutout', '', TRUE).' ';
691 691
 
692
-            }
692
+			}
693 693
 
694
-            if ($data['startpage'] == $data['endpage']) {
694
+			if ($data['startpage'] == $data['endpage']) {
695 695
 
696
-                // One page
697
-                $info .= $this->pi_getLL('page', '', TRUE).' '.$data['startpage'];
696
+				// One page
697
+				$info .= $this->pi_getLL('page', '', TRUE).' '.$data['startpage'];
698 698
 
699
-            } else {
699
+			} else {
700 700
 
701
-                $info .= $this->pi_getLL('page', '', TRUE).' '.$data['startpage'].'-'.$data['endpage'];
701
+				$info .= $this->pi_getLL('page', '', TRUE).' '.$data['startpage'].'-'.$data['endpage'];
702 702
 
703
-            }
703
+			}
704 704
 
705
-            $downloadLink = '<a href="'.$downloadUrl.'" target="_blank">'.$title.'</a> ('.$info.')';
705
+			$downloadLink = '<a href="'.$downloadUrl.'" target="_blank">'.$title.'</a> ('.$info.')';
706 706
 
707
-            if ($data['startpage'] == $data['endpage']) {
707
+			if ($data['startpage'] == $data['endpage']) {
708 708
 
709
-                $pageNums = 1;
709
+				$pageNums = 1;
710 710
 
711
-            } else {
711
+			} else {
712 712
 
713
-                $pageNums = $data['endpage'] - $data['startpage'];
713
+				$pageNums = $data['endpage'] - $data['startpage'];
714 714
 
715
-            }
715
+			}
716 716
 
717
-            return array(
718
-                'downloadUrl' => $downloadUrl,
719
-                'downloadLink' => $downloadLink,
720
-                'pageNums'	=> $pageNums,
721
-                'urlParams' => $urlParams,
722
-                'record_id' => $document->recordId,
723
-            );
717
+			return array(
718
+				'downloadUrl' => $downloadUrl,
719
+				'downloadLink' => $downloadLink,
720
+				'pageNums'	=> $pageNums,
721
+				'urlParams' => $urlParams,
722
+				'record_id' => $document->recordId,
723
+			);
724 724
 
725
-        }
725
+		}
726 726
 
727
-        return false;
727
+		return false;
728 728
 
729
-    }
729
+	}
730 730
 
731
-    /**
732
-     * Send mail with pdf download url
733
-     */
734
-    public function sendMail() {
731
+	/**
732
+	 * Send mail with pdf download url
733
+	 */
734
+	public function sendMail() {
735 735
 
736
-        // send mail
737
-        $mailId = $this->piVars['mail_action'];
736
+		// send mail
737
+		$mailId = $this->piVars['mail_action'];
738 738
 
739
-        // get id from db and send selected doc downloadlink
740
-        $resultMail = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
741
-            '*',
742
-            'tx_dlf_mail',
743
-            'tx_dlf_mail.uid="'.intval($mailId).'"'.tx_dlf_helper::whereClause('tx_dlf_mail'),
744
-            '',
745
-            '',
746
-            '1'
747
-        );
739
+		// get id from db and send selected doc downloadlink
740
+		$resultMail = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
741
+			'*',
742
+			'tx_dlf_mail',
743
+			'tx_dlf_mail.uid="'.intval($mailId).'"'.tx_dlf_helper::whereClause('tx_dlf_mail'),
744
+			'',
745
+			'',
746
+			'1'
747
+		);
748 748
 
749
-        $mailData = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($resultMail);
749
+		$mailData = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($resultMail);
750 750
 
751
-        $body = $this->pi_getLL('mailBody', '', TRUE)."\n";
751
+		$body = $this->pi_getLL('mailBody', '', TRUE)."\n";
752 752
 
753
-        $numberOfPages = 0;
753
+		$numberOfPages = 0;
754 754
 
755
-        $pdfUrl = $this->conf['pdfdownload'];
755
+		$pdfUrl = $this->conf['pdfdownload'];
756 756
 
757
-        // prepare links
758
-        foreach ($this->piVars['selected'] as $docId => $docValue) {
757
+		// prepare links
758
+		foreach ($this->piVars['selected'] as $docId => $docValue) {
759 759
 
760
-            if ($docValue['id']) {
760
+			if ($docValue['id']) {
761 761
 
762
-                $explodeId = explode("_", $docValue['id']);
762
+				$explodeId = explode("_", $docValue['id']);
763 763
 
764
-                $docData = $this->getDocumentData($explodeId[0], $docValue);
764
+				$docData = $this->getDocumentData($explodeId[0], $docValue);
765 765
 
766
-                $pdfUrl .= $docData['urlParams'].$this->conf['pdfparamseparator'];
766
+				$pdfUrl .= $docData['urlParams'].$this->conf['pdfparamseparator'];
767 767
 
768
-                $pages = (abs(intval($docValue['startpage']) - intval($docValue['endpage'])));
768
+				$pages = (abs(intval($docValue['startpage']) - intval($docValue['endpage'])));
769 769
 
770
-                if ($pages === 0) {
770
+				if ($pages === 0) {
771 771
 
772
-                    $numberOfPages = $numberOfPages + 1;
772
+					$numberOfPages = $numberOfPages + 1;
773 773
 
774
-                } else {
774
+				} else {
775 775
 
776
-                    $numberOfPages = $numberOfPages + $pages;
776
+					$numberOfPages = $numberOfPages + $pages;
777 777
 
778
-                }
778
+				}
779 779
 
780
-            }
780
+			}
781 781
 
782
-        }
782
+		}
783 783
 
784
-        // Remove leading/tailing pdfparamseperator
785
-        $pdfUrl = trim($pdfUrl, $this->conf['pdfparamseparator']);
784
+		// Remove leading/tailing pdfparamseperator
785
+		$pdfUrl = trim($pdfUrl, $this->conf['pdfparamseparator']);
786 786
 
787
-        $body .= $pdfUrl;
787
+		$body .= $pdfUrl;
788 788
 
789
-        $from = \TYPO3\CMS\Core\Utility\MailUtility::getSystemFrom();
789
+		$from = \TYPO3\CMS\Core\Utility\MailUtility::getSystemFrom();
790 790
 
791
-        // send mail
792
-        $mail = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Mail\\MailMessage');
791
+		// send mail
792
+		$mail = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Mail\\MailMessage');
793 793
 
794
-        // Prepare and send the message
795
-        $mail
796
-            // subject
797
-            ->setSubject($this->pi_getLL('mailSubject', '', TRUE))
794
+		// Prepare and send the message
795
+		$mail
796
+			// subject
797
+			->setSubject($this->pi_getLL('mailSubject', '', TRUE))
798 798
 
799
-            // Set the From address with an associative array
800
-            ->setFrom($from)
799
+			// Set the From address with an associative array
800
+			->setFrom($from)
801 801
 
802
-            // Set the To addresses with an associative array
803
-            ->setTo(array($mailData['mail'] => $mailData['name']))
802
+			// Set the To addresses with an associative array
803
+			->setTo(array($mailData['mail'] => $mailData['name']))
804 804
 
805
-            ->setBody($body, 'text/html')
805
+			->setBody($body, 'text/html')
806 806
 
807
-            ->send()
808
-        ;
807
+			->send()
808
+		;
809 809
 
810
-        // protocol
811
-        $insertArray = array(
812
-            'pid' => $this->conf['pages'],
813
-            'file_name' => $pdfUrl,
814
-            'count_pages' => $numberOfPages,
815
-            'crdate' => time(),
816
-        );
810
+		// protocol
811
+		$insertArray = array(
812
+			'pid' => $this->conf['pages'],
813
+			'file_name' => $pdfUrl,
814
+			'count_pages' => $numberOfPages,
815
+			'crdate' => time(),
816
+		);
817 817
 
818
-        if ($GLOBALS["TSFE"]->loginUser) {
818
+		if ($GLOBALS["TSFE"]->loginUser) {
819 819
 
820
-            // internal user
821
-            $insertArray['user_id'] = $GLOBALS["TSFE"]->fe_user->user['uid'];
820
+			// internal user
821
+			$insertArray['user_id'] = $GLOBALS["TSFE"]->fe_user->user['uid'];
822 822
 
823
-            $insertArray['name'] = $GLOBALS["TSFE"]->fe_user->user['username'];
823
+			$insertArray['name'] = $GLOBALS["TSFE"]->fe_user->user['username'];
824 824
 
825
-            $insertArray['label'] = 'Mail: '.$mailData['mail'];
825
+			$insertArray['label'] = 'Mail: '.$mailData['mail'];
826 826
 
827
-        } else {
827
+		} else {
828 828
 
829
-            // external user
830
-            $insertArray['user_id'] = 0;
829
+			// external user
830
+			$insertArray['user_id'] = 0;
831 831
 
832
-            $insertArray['name'] = 'n/a';
832
+			$insertArray['name'] = 'n/a';
833 833
 
834
-            $insertArray['label'] = 'Mail: '.$mailData['mail'];
834
+			$insertArray['label'] = 'Mail: '.$mailData['mail'];
835 835
 
836
-        }
836
+		}
837 837
 
838
-        // add action to protocol
839
-        $GLOBALS['TYPO3_DB']->exec_INSERTquery('tx_dlf_actionlog', $insertArray);
838
+		// add action to protocol
839
+		$GLOBALS['TYPO3_DB']->exec_INSERTquery('tx_dlf_actionlog', $insertArray);
840 840
 
841
-    }
841
+	}
842 842
 
843
-    /**
844
-     * Sends document information to an external printer (url)
845
-     */
846
-    public function printDocument() {
843
+	/**
844
+	 * Sends document information to an external printer (url)
845
+	 */
846
+	public function printDocument() {
847 847
 
848
-        $pdfUrl = $this->conf['pdfprint'];
848
+		$pdfUrl = $this->conf['pdfprint'];
849 849
 
850
-        foreach ($this->piVars['selected'] as $docId => $docValue) {
850
+		foreach ($this->piVars['selected'] as $docId => $docValue) {
851 851
 
852
-            if ($docValue['id']) {
852
+			if ($docValue['id']) {
853 853
 
854
-                $docData = $this->getDocumentData($docValue['id'], $docValue);
854
+				$docData = $this->getDocumentData($docValue['id'], $docValue);
855 855
 
856
-                $pdfUrl .= $docData['urlParams'].$this->conf['pdfparamseparator'];
856
+				$pdfUrl .= $docData['urlParams'].$this->conf['pdfparamseparator'];
857 857
 
858
-                $numberOfPages += $docData['pageNums'];
858
+				$numberOfPages += $docData['pageNums'];
859 859
 
860
-            }
860
+			}
861 861
 
862
-        }
862
+		}
863 863
 
864
-        // get printer data
865
-        $printerId = $this->piVars['print_action'];
864
+		// get printer data
865
+		$printerId = $this->piVars['print_action'];
866 866
 
867
-        // get id from db and send selected doc downloadlink
868
-        $resultPrinter = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
869
-            '*',
870
-            'tx_dlf_printer',
871
-            'tx_dlf_printer.uid="'.intval($printerId).'"'.tx_dlf_helper::whereClause('tx_dlf_basket'),
872
-            '',
873
-            '',
874
-            '1'
875
-        );
867
+		// get id from db and send selected doc downloadlink
868
+		$resultPrinter = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
869
+			'*',
870
+			'tx_dlf_printer',
871
+			'tx_dlf_printer.uid="'.intval($printerId).'"'.tx_dlf_helper::whereClause('tx_dlf_basket'),
872
+			'',
873
+			'',
874
+			'1'
875
+		);
876 876
 
877
-        $printerData = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($resultPrinter);
877
+		$printerData = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($resultPrinter);
878 878
 
879
-        // printer is selected
880
-        if ($printerData) {
879
+		// printer is selected
880
+		if ($printerData) {
881 881
 
882
-            $pdfUrl = $printerData['print'];
882
+			$pdfUrl = $printerData['print'];
883 883
 
884
-            $filename = 'Document_';
884
+			$filename = 'Document_';
885 885
 
886
-            $numberOfPages = 0;
886
+			$numberOfPages = 0;
887 887
 
888
-            foreach ($this->piVars['selected'] as $docId => $docValue) {
888
+			foreach ($this->piVars['selected'] as $docId => $docValue) {
889 889
 
890
-                if ($docValue['id']) {
890
+				if ($docValue['id']) {
891 891
 
892
-                    $filename .= $docValue['id'].'_';
892
+					$filename .= $docValue['id'].'_';
893 893
 
894
-                    $explodeId = explode("_", $docId);
894
+					$explodeId = explode("_", $docId);
895 895
 
896
-                    $docData = $this->getDocumentData($explodeId[0], $docValue);
896
+					$docData = $this->getDocumentData($explodeId[0], $docValue);
897 897
 
898
-                    $pdfUrl .= $docData['urlParams'].$this->conf['pdfparamseparator'];
898
+					$pdfUrl .= $docData['urlParams'].$this->conf['pdfparamseparator'];
899 899
 
900
-                    $numberOfPages += $docData['pageNums'];
900
+					$numberOfPages += $docData['pageNums'];
901 901
 
902
-                }
902
+				}
903 903
 
904
-            }
904
+			}
905 905
 
906
-            $pdfUrl = trim($pdfUrl, $this->conf['pdfparamseparator']);
906
+			$pdfUrl = trim($pdfUrl, $this->conf['pdfparamseparator']);
907 907
 
908
-        }
908
+		}
909 909
 
910
-        // protocol
911
-        $insertArray = array(
912
-            'pid' => $this->conf['pages'],
913
-            'file_name' => $pdfUrl,
914
-            'count_pages' => $numberOfPages,
915
-            'crdate' => time(),
916
-        );
910
+		// protocol
911
+		$insertArray = array(
912
+			'pid' => $this->conf['pages'],
913
+			'file_name' => $pdfUrl,
914
+			'count_pages' => $numberOfPages,
915
+			'crdate' => time(),
916
+		);
917 917
 
918
-        if ($GLOBALS["TSFE"]->loginUser) {
918
+		if ($GLOBALS["TSFE"]->loginUser) {
919 919
 
920
-            // internal user
921
-            $insertArray['user_id'] = $GLOBALS["TSFE"]->fe_user->user['uid'];
920
+			// internal user
921
+			$insertArray['user_id'] = $GLOBALS["TSFE"]->fe_user->user['uid'];
922 922
 
923
-            $insertArray['name'] = $GLOBALS["TSFE"]->fe_user->user['username'];
923
+			$insertArray['name'] = $GLOBALS["TSFE"]->fe_user->user['username'];
924 924
 
925
-            $insertArray['label'] = 'Print: '.$printerData['label'];
925
+			$insertArray['label'] = 'Print: '.$printerData['label'];
926 926
 
927
-        } else {
927
+		} else {
928 928
 
929
-            // external user
930
-            $insertArray['user_id'] = 0;
929
+			// external user
930
+			$insertArray['user_id'] = 0;
931 931
 
932
-            $insertArray['name'] = 'n/a';
932
+			$insertArray['name'] = 'n/a';
933 933
 
934
-            $insertArray['label'] = 'Print: '.$printerData['label'];
934
+			$insertArray['label'] = 'Print: '.$printerData['label'];
935 935
 
936
-        }
936
+		}
937 937
 
938
-        // add action to protocol
939
-        $GLOBALS['TYPO3_DB']->exec_INSERTquery('tx_dlf_actionlog', $insertArray);
938
+		// add action to protocol
939
+		$GLOBALS['TYPO3_DB']->exec_INSERTquery('tx_dlf_actionlog', $insertArray);
940 940
 
941
-        header('Location: '.$pdfUrl);
941
+		header('Location: '.$pdfUrl);
942 942
 
943
-        ob_end_flush();
943
+		ob_end_flush();
944 944
 
945
-        exit;
945
+		exit;
946 946
 
947
-    }
947
+	}
948 948
 
949 949
 }
950 950
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
 
217 217
             $mailForm .= '<option value="">'.$this->pi_getLL('chooseMail', '', TRUE).'</option>';
218 218
 
219
-            while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($resultMail)){
219
+            while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($resultMail)) {
220 220
 
221 221
                 $mails[] = $row;
222 222
 
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
 
262 262
             $printForm .= '<option value="">'.$this->pi_getLL('choosePrinter', '', TRUE).'</option>';
263 263
 
264
-            while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($resultPrinter)){
264
+            while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($resultPrinter)) {
265 265
 
266 266
                 $printers[] = $row;
267 267
 
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
 
299 299
             $label = $this->pi_getLL('goBasket', '', TRUE);
300 300
 
301
-            $basketConf = array (
301
+            $basketConf = array(
302 302
                 'parameter' => $this->conf['targetBasket'],
303 303
                 'title' => $label
304 304
             );
@@ -439,7 +439,7 @@  discard block
 block discarded – undo
439 439
             }
440 440
 
441 441
             // get document instance to load further information
442
-            $document = tx_dlf_document::getInstance($documentItem['id'],0);
442
+            $document = tx_dlf_document::getInstance($documentItem['id'], 0);
443 443
 
444 444
             // set endpage for toc and subentry based on logid
445 445
             if (($_piVars['addToBasket'] == 'subentry') OR ($_piVars['addToBasket'] == 'toc')) {
@@ -639,7 +639,7 @@  discard block
 block discarded – undo
639 639
     public function getDocumentData($id, $data) {
640 640
 
641 641
         // get document instance to load further information
642
-        $document = tx_dlf_document::getInstance($id,0);
642
+        $document = tx_dlf_document::getInstance($id, 0);
643 643
 
644 644
         if ($document) {
645 645
 
Please login to merge, or discard this patch.
dlf/plugins/oai/class.tx_dlf_oai.php 1 patch
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -43,21 +43,21 @@  discard block
 block discarded – undo
43 43
 	 * @var	array
44 44
 	 * @access protected
45 45
 	 */
46
-	protected $formats = array (
47
-		'oai_dc' => array (
46
+	protected $formats = array(
47
+		'oai_dc' => array(
48 48
 			'schema' => 'http://www.openarchives.org/OAI/2.0/oai_dc.xsd',
49 49
 			'namespace' => 'http://www.openarchives.org/OAI/2.0/oai_dc/',
50
-			'requiredFields' => array ('record_id'),
50
+			'requiredFields' => array('record_id'),
51 51
 		),
52
-		'epicur' => array (
52
+		'epicur' => array(
53 53
 			'schema' => 'http://www.persistent-identifier.de/xepicur/version1.0/xepicur.xsd',
54 54
 			'namespace' => 'urn:nbn:de:1111-2004033116',
55
-			'requiredFields' => array ('purl', 'urn'),
55
+			'requiredFields' => array('purl', 'urn'),
56 56
 		),
57
-		'mets' => array (
57
+		'mets' => array(
58 58
 			'schema' => 'http://www.loc.gov/standards/mets/version17/mets.v1-7.xsd',
59 59
 			'namespace' => 'http://www.loc.gov/METS/',
60
-			'requiredFields' => array ('location'),
60
+			'requiredFields' => array('location'),
61 61
 		)
62 62
 	);
63 63
 
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 	 */
120 120
 	protected function getUrlParams() {
121 121
 
122
-		$allowedParams = array (
122
+		$allowedParams = array(
123 123
 			'verb',
124 124
 			'identifier',
125 125
 			'metadataPrefix',
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 		);
131 131
 
132 132
 		// Clear plugin variables.
133
-		$this->piVars = array ();
133
+		$this->piVars = array();
134 134
 
135 135
 		// Set only allowed parameters.
136 136
 		foreach ($allowedParams as $param) {
@@ -516,7 +516,7 @@  discard block
 block discarded – undo
516 516
 		}
517 517
 
518 518
 		// Add request.
519
-		$linkConf = array (
519
+		$linkConf = array(
520 520
 			'parameter' => $GLOBALS['TSFE']->id,
521 521
 			'forceAbsoluteUrl' => 1
522 522
 		);
@@ -600,7 +600,7 @@  discard block
 block discarded – undo
600 600
 
601 601
 		$complete = FALSE;
602 602
 
603
-		$todo = array ();
603
+		$todo = array();
604 604
 
605 605
 		$resume = $this->oai->createElementNS('http://www.openarchives.org/OAI/2.0/', $this->piVars['verb']);
606 606
 
@@ -720,14 +720,14 @@  discard block
 block discarded – undo
720 720
 			// Save result set to database and generate resumption token.
721 721
 			$token = uniqid();
722 722
 
723
-			$resultSet->metadata = array (
723
+			$resultSet->metadata = array(
724 724
 				'offset' => intval($resultSet->metadata['offset'] + $this->conf['limit']),
725 725
 				'metadataPrefix' => $resultSet->metadata['metadataPrefix'],
726 726
 			);
727 727
 
728 728
 			$result = $GLOBALS['TYPO3_DB']->exec_INSERTquery(
729 729
 				'tx_dlf_tokens',
730
-				array (
730
+				array(
731 731
 					'tstamp' => $GLOBALS['EXEC_TIME'],
732 732
 					'token' => $token,
733 733
 					'options' => serialize($resultSet),
@@ -955,7 +955,7 @@  discard block
 block discarded – undo
955 955
 		$result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
956 956
 			'tx_dlf_documents.tstamp AS tstamp',
957 957
 			'tx_dlf_documents',
958
-			'tx_dlf_documents.pid=' . intval($this->conf['pages']),
958
+			'tx_dlf_documents.pid='.intval($this->conf['pages']),
959 959
 			'',
960 960
 			'tx_dlf_documents.tstamp ASC',
961 961
 			'1'
@@ -970,14 +970,14 @@  discard block
 block discarded – undo
970 970
 
971 971
 			if (TYPO3_DLOG) {
972 972
 
973
-				\TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_oai->verbIdentify()] No records found with PID "' .
974
-						  $this->conf['pages'] . '"', $this->extKey, SYSLOG_SEVERITY_NOTICE);
973
+				\TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_oai->verbIdentify()] No records found with PID "'.
974
+						  $this->conf['pages'].'"', $this->extKey, SYSLOG_SEVERITY_NOTICE);
975 975
 
976 976
 			}
977 977
 
978 978
 		}
979 979
 
980
-		$linkConf = array (
980
+		$linkConf = array(
981 981
 			'parameter' => $GLOBALS['TSFE']->id,
982 982
 			'forceAbsoluteUrl' => 1
983 983
 		);
@@ -1164,7 +1164,7 @@  discard block
 block discarded – undo
1164 1164
 		} else {
1165 1165
 
1166 1166
 			// Build result set.
1167
-			$results = array ();
1167
+			$results = array();
1168 1168
 
1169 1169
 			while ($resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)) {
1170 1170
 
@@ -1181,7 +1181,7 @@  discard block
 block discarded – undo
1181 1181
 
1182 1182
 			$complete = FALSE;
1183 1183
 
1184
-			$todo = array ();
1184
+			$todo = array();
1185 1185
 
1186 1186
 			$ListIdentifiers = $this->oai->createElementNS('http://www.openarchives.org/OAI/2.0/', 'ListIdentifiers');
1187 1187
 
@@ -1252,14 +1252,14 @@  discard block
 block discarded – undo
1252 1252
 				// Save result set to database and generate resumption token.
1253 1253
 				$token = uniqid();
1254 1254
 
1255
-				$resultSet->metadata = array (
1255
+				$resultSet->metadata = array(
1256 1256
 					'offset' => intval($this->conf['limit']),
1257 1257
 					'metadataPrefix' => $this->piVars['metadataPrefix'],
1258 1258
 				);
1259 1259
 
1260 1260
 				$result = $GLOBALS['TYPO3_DB']->exec_INSERTquery(
1261 1261
 					'tx_dlf_tokens',
1262
-					array (
1262
+					array(
1263 1263
 						'tstamp' => $GLOBALS['EXEC_TIME'],
1264 1264
 						'token' => $token,
1265 1265
 						'options' => serialize($resultSet),
@@ -1306,7 +1306,7 @@  discard block
 block discarded – undo
1306 1306
 	 */
1307 1307
 	protected function verbListMetadataFormats() {
1308 1308
 
1309
-		$resArray = array ();
1309
+		$resArray = array();
1310 1310
 
1311 1311
 		// Check for invalid arguments.
1312 1312
 		if (count($this->piVars) > 1) {
@@ -1540,7 +1540,7 @@  discard block
 block discarded – undo
1540 1540
 		} else {
1541 1541
 
1542 1542
 			// Build result set.
1543
-			$results = array ();
1543
+			$results = array();
1544 1544
 
1545 1545
 			while ($resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)) {
1546 1546
 
@@ -1551,7 +1551,7 @@  discard block
 block discarded – undo
1551 1551
 
1552 1552
 			$complete = FALSE;
1553 1553
 
1554
-			$todo = array ();
1554
+			$todo = array();
1555 1555
 
1556 1556
 			$ListRecords = $this->oai->createElementNS('http://www.openarchives.org/OAI/2.0/', 'ListRecords');
1557 1557
 
@@ -1657,14 +1657,14 @@  discard block
 block discarded – undo
1657 1657
 				// Save result set to database and generate resumption token.
1658 1658
 				$token = uniqid();
1659 1659
 
1660
-				$resultSet->metadata = array (
1660
+				$resultSet->metadata = array(
1661 1661
 					'offset' => intval($this->conf['limit']),
1662 1662
 					'metadataPrefix' => $this->piVars['metadataPrefix'],
1663 1663
 				);
1664 1664
 
1665 1665
 				$result = $GLOBALS['TYPO3_DB']->exec_INSERTquery(
1666 1666
 					'tx_dlf_tokens',
1667
-					array (
1667
+					array(
1668 1668
 						'tstamp' => $GLOBALS['EXEC_TIME'],
1669 1669
 						'token' => $token,
1670 1670
 						'options' => serialize($resultSet),
Please login to merge, or discard this patch.
dlf/plugins/audioplayer/class.tx_dlf_audioplayer.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 	 * @var	array
28 28
 	 * @access protected
29 29
 	 */
30
-	protected $audio = array ();
30
+	protected $audio = array();
31 31
 
32 32
 	/**
33 33
 	 * Adds Player javascript
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 	 */
39 39
 	protected function addPlayerJS() {
40 40
 
41
-		$output = array ();
41
+		$output = array();
42 42
 
43 43
 		$output[] = '<link type="text/css" rel="stylesheet" href="'.\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'lib/jPlayer/blue.monday/css/jplayer.blue.monday.min.css">';
44 44
 
@@ -55,9 +55,9 @@  discard block
 block discarded – undo
55 55
 			$(document).ready(function() {
56 56
 				tx_dlf_audioplayer = new dlfAudioPlayer({
57 57
 					audio: {
58
-						mimeType: "' . $this->audio['mimetype'] . '",
59
-						title: "' . $this->audio['label'] . '",
60
-						url:  "' . $this->audio['url'] . '"
58
+						mimeType: "' . $this->audio['mimetype'].'",
59
+						title: "' . $this->audio['label'].'",
60
+						url:  "' . $this->audio['url'].'"
61 61
 					},
62 62
 					parentElId: "tx-dlf-audio",
63 63
 					swfPath: "'.\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'lib/jPlayer/jquery.jplayer.swf"
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
 		}
139 139
 
140 140
 		// Fill in the template markers.
141
-		$markerArray = array (
141
+		$markerArray = array(
142 142
 			'###PLAYER_JS###' => $this->addPlayerJS()
143 143
 		);
144 144
 
Please login to merge, or discard this patch.
dlf/plugins/feeds/class.tx_dlf_feeds.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -164,10 +164,10 @@
 block discarded – undo
164 164
 					$item->appendChild($rss->createElement('title', htmlspecialchars($title, ENT_NOQUOTES, 'UTF-8')));
165 165
 
166 166
 					// Add link.
167
-					$linkConf = array (
167
+					$linkConf = array(
168 168
 						'parameter' => $this->conf['targetPid'],
169 169
 						'forceAbsoluteUrl' => 1,
170
-						'additionalParams' => \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, array ('id' => $resArray['uid']), '', TRUE, FALSE)
170
+						'additionalParams' => \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, array('id' => $resArray['uid']), '', TRUE, FALSE)
171 171
 					);
172 172
 
173 173
 					$item->appendChild($rss->createElement('link', htmlspecialchars($this->cObj->typoLink_URL($linkConf), ENT_NOQUOTES, 'UTF-8')));
Please login to merge, or discard this patch.