Passed
Branch oai_solr (423cc8)
by Erik
09:50 queued 02:55
created
dlf/plugins/basket/class.tx_dlf_basket.php 1 patch
Indentation   +547 added lines, -547 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
-            $result = $GLOBALS['TYPO3_DB']->exec_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
+			$result = $GLOBALS['TYPO3_DB']->exec_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
-            $result = $GLOBALS['TYPO3_DB']->exec_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
+			$result = $GLOBALS['TYPO3_DB']->exec_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
-        // session already exists
92
-        if ($GLOBALS['TYPO3_DB']->sql_num_rows($result) == 1) {
91
+		// session already exists
92
+		if ($GLOBALS['TYPO3_DB']->sql_num_rows($result) == 1) {
93 93
 
94
-            // basket found get data
95
-            $basketData = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result);
94
+			// basket found get data
95
+			$basketData = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result);
96 96
 
97
-        } else {
97
+		} else {
98 98
 
99
-            // create new basket in db
100
-            $insertArray['session_id'] = $sessionId;
99
+			// create new basket in db
100
+			$insertArray['session_id'] = $sessionId;
101 101
 
102
-            $query = $GLOBALS['TYPO3_DB']->exec_INSERTquery('tx_dlf_basket', $insertArray);
102
+			$query = $GLOBALS['TYPO3_DB']->exec_INSERTquery('tx_dlf_basket', $insertArray);
103 103
 
104
-            $res = $GLOBALS['TYPO3_DB']->sql_query($query);
104
+			$res = $GLOBALS['TYPO3_DB']->sql_query($query);
105 105
 
106
-            $basketData = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
106
+			$basketData = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
107 107
 
108
-        }
108
+		}
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
-            '',
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
+			'',
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,440 +519,440 @@  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="_new">'.$title.'</a> ('.$info.')';
705
+			$downloadLink = '<a href="'.$downloadUrl.'" target="_new">'.$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
-        $i = 0;
757
+		$i = 0;
758 758
 
759
-        // prepare links
760
-        foreach ($this->piVars['selected'] as $docId => $docValue) {
759
+		// prepare links
760
+		foreach ($this->piVars['selected'] as $docId => $docValue) {
761 761
 
762
-            if ($docValue['id']) {
762
+			if ($docValue['id']) {
763 763
 
764
-                $explodeId = explode("_", $docValue['id']);
764
+				$explodeId = explode("_", $docValue['id']);
765 765
 
766
-                $docData = $this->getDocumentData($explodeId[0], $docValue);
766
+				$docData = $this->getDocumentData($explodeId[0], $docValue);
767 767
 
768
-                if ($i === 0) {
768
+				if ($i === 0) {
769 769
 
770
-                    $pdfUrl .= $docData['urlParams'];
770
+					$pdfUrl .= $docData['urlParams'];
771 771
 
772
-                } else {
772
+				} else {
773 773
 
774
-                    $pdfUrl .= $docData['urlParams'].$this->conf['pdfparamseparator'];
774
+					$pdfUrl .= $docData['urlParams'].$this->conf['pdfparamseparator'];
775 775
 
776
-                }
776
+				}
777 777
 
778
-                $pages = (abs(intval($docValue['startpage']) - intval($docValue['endpage'])));
778
+				$pages = (abs(intval($docValue['startpage']) - intval($docValue['endpage'])));
779 779
 
780
-                if ($pages === 0) {
780
+				if ($pages === 0) {
781 781
 
782
-                    $numberOfPages = $numberOfPages + 1;
782
+					$numberOfPages = $numberOfPages + 1;
783 783
 
784
-                } else {
784
+				} else {
785 785
 
786
-                    $numberOfPages = $numberOfPages + $pages;
786
+					$numberOfPages = $numberOfPages + $pages;
787 787
 
788
-                }
788
+				}
789 789
 
790
-                $i++;
790
+				$i++;
791 791
 
792
-            }
792
+			}
793 793
 
794
-        }
794
+		}
795 795
 
796
-        $body .= $pdfUrl;
796
+		$body .= $pdfUrl;
797 797
 
798
-        $from = \TYPO3\CMS\Core\Utility\MailUtility::getSystemFrom();
798
+		$from = \TYPO3\CMS\Core\Utility\MailUtility::getSystemFrom();
799 799
 
800
-        // send mail
801
-        $mail = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Mail\\MailMessage');
800
+		// send mail
801
+		$mail = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Mail\\MailMessage');
802 802
 
803
-        // Prepare and send the message
804
-        $mail
805
-            // subject
806
-            ->setSubject($this->pi_getLL('mailSubject', '', TRUE))
803
+		// Prepare and send the message
804
+		$mail
805
+			// subject
806
+			->setSubject($this->pi_getLL('mailSubject', '', TRUE))
807 807
 
808
-            // Set the From address with an associative array
809
-            ->setFrom($from)
808
+			// Set the From address with an associative array
809
+			->setFrom($from)
810 810
 
811
-            // Set the To addresses with an associative array
812
-            ->setTo(array($mailData['mail'] => $mailData['name']))
811
+			// Set the To addresses with an associative array
812
+			->setTo(array($mailData['mail'] => $mailData['name']))
813 813
 
814
-            ->setBody($body, 'text/html')
814
+			->setBody($body, 'text/html')
815 815
 
816
-            ->send()
817
-        ;
816
+			->send()
817
+		;
818 818
 
819
-        // protocol
820
-        $insertArray = array(
821
-            'pid' => $this->conf['pages'],
822
-            'file_name' => $pdfUrl,
823
-            'count_pages' => $numberOfPages,
824
-            'crdate' => time(),
825
-        );
819
+		// protocol
820
+		$insertArray = array(
821
+			'pid' => $this->conf['pages'],
822
+			'file_name' => $pdfUrl,
823
+			'count_pages' => $numberOfPages,
824
+			'crdate' => time(),
825
+		);
826 826
 
827
-        if ($GLOBALS["TSFE"]->loginUser) {
827
+		if ($GLOBALS["TSFE"]->loginUser) {
828 828
 
829
-            // internal user
830
-            $insertArray['user_id'] = $GLOBALS["TSFE"]->fe_user->user['uid'];
829
+			// internal user
830
+			$insertArray['user_id'] = $GLOBALS["TSFE"]->fe_user->user['uid'];
831 831
 
832
-            $insertArray['name'] = $GLOBALS["TSFE"]->fe_user->user['username'];
832
+			$insertArray['name'] = $GLOBALS["TSFE"]->fe_user->user['username'];
833 833
 
834
-            $insertArray['label'] = 'Mail: '.$mailData['mail'];
834
+			$insertArray['label'] = 'Mail: '.$mailData['mail'];
835 835
 
836
-        } else {
836
+		} else {
837 837
 
838
-            // external user
839
-            $insertArray['user_id'] = 0;
838
+			// external user
839
+			$insertArray['user_id'] = 0;
840 840
 
841
-            $insertArray['name'] = 'n/a';
841
+			$insertArray['name'] = 'n/a';
842 842
 
843
-            $insertArray['label'] = 'Mail: '.$mailData['mail'];
843
+			$insertArray['label'] = 'Mail: '.$mailData['mail'];
844 844
 
845
-        }
845
+		}
846 846
 
847
-        // add action to protocol
848
-        $GLOBALS['TYPO3_DB']->exec_INSERTquery('tx_dlf_actionlog', $insertArray);
847
+		// add action to protocol
848
+		$GLOBALS['TYPO3_DB']->exec_INSERTquery('tx_dlf_actionlog', $insertArray);
849 849
 
850
-    }
850
+	}
851 851
 
852
-    /**
853
-     * Sends document information to an external printer (url)
854
-     */
855
-    public function printDocument() {
852
+	/**
853
+	 * Sends document information to an external printer (url)
854
+	 */
855
+	public function printDocument() {
856 856
 
857
-        $pdfUrl = $this->conf['pdfprint'];
857
+		$pdfUrl = $this->conf['pdfprint'];
858 858
 
859
-        foreach ($this->piVars['selected'] as $docId => $docValue) {
859
+		foreach ($this->piVars['selected'] as $docId => $docValue) {
860 860
 
861
-            if ($docValue['id']) {
861
+			if ($docValue['id']) {
862 862
 
863
-                $docData = $this->getDocumentData($docValue['id'], $docValue);
863
+				$docData = $this->getDocumentData($docValue['id'], $docValue);
864 864
 
865
-                $pdfUrl .= $docData['urlParams'].$this->conf['pdfparamseparator'];
865
+				$pdfUrl .= $docData['urlParams'].$this->conf['pdfparamseparator'];
866 866
 
867
-                $numberOfPages += $docData['pageNums'];
867
+				$numberOfPages += $docData['pageNums'];
868 868
 
869
-            }
869
+			}
870 870
 
871
-        }
871
+		}
872 872
 
873
-        // get printer data
874
-        $printerId = $this->piVars['print_action'];
873
+		// get printer data
874
+		$printerId = $this->piVars['print_action'];
875 875
 
876
-        // get id from db and send selected doc downloadlink
877
-        $resultPrinter = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
878
-            '*',
879
-            'tx_dlf_printer',
880
-            'tx_dlf_printer.uid="'.intval($printerId).'"'.tx_dlf_helper::whereClause('tx_dlf_basket'),
881
-            '',
882
-            '',
883
-            '1'
884
-        );
876
+		// get id from db and send selected doc downloadlink
877
+		$resultPrinter = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
878
+			'*',
879
+			'tx_dlf_printer',
880
+			'tx_dlf_printer.uid="'.intval($printerId).'"'.tx_dlf_helper::whereClause('tx_dlf_basket'),
881
+			'',
882
+			'',
883
+			'1'
884
+		);
885 885
 
886
-        $printerData = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($resultPrinter);
886
+		$printerData = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($resultPrinter);
887 887
 
888
-        // printer is selected
889
-        if ($printerData) {
888
+		// printer is selected
889
+		if ($printerData) {
890 890
 
891
-            $pdfUrl = $printerData['print'];
891
+			$pdfUrl = $printerData['print'];
892 892
 
893
-            $filename = 'Document_';
893
+			$filename = 'Document_';
894 894
 
895
-            $numberOfPages = 0;
895
+			$numberOfPages = 0;
896 896
 
897
-            foreach ($this->piVars['selected'] as $docId => $docValue) {
897
+			foreach ($this->piVars['selected'] as $docId => $docValue) {
898 898
 
899
-                if ($docValue['id']) {
899
+				if ($docValue['id']) {
900 900
 
901
-                    $filename .= $docValue['id'].'_';
901
+					$filename .= $docValue['id'].'_';
902 902
 
903
-                    $explodeId = explode("_", $docId);
903
+					$explodeId = explode("_", $docId);
904 904
 
905
-                    $docData = $this->getDocumentData($explodeId[0], $docValue);
905
+					$docData = $this->getDocumentData($explodeId[0], $docValue);
906 906
 
907
-                    $pdfUrl .= $docData['urlParams'].$this->conf['pdfparamseparator'];
907
+					$pdfUrl .= $docData['urlParams'].$this->conf['pdfparamseparator'];
908 908
 
909
-                    $numberOfPages += $docData['pageNums'];
909
+					$numberOfPages += $docData['pageNums'];
910 910
 
911
-                }
911
+				}
912 912
 
913
-            }
913
+			}
914 914
 
915
-            $pdfUrl = trim($pdfUrl, '*');
915
+			$pdfUrl = trim($pdfUrl, '*');
916 916
 
917
-        }
917
+		}
918 918
 
919
-        // protocol
920
-        $insertArray = array(
921
-            'pid' => $this->conf['pages'],
922
-            'file_name' => $pdfUrl,
923
-            'count_pages' => $numberOfPages,
924
-            'crdate' => time(),
925
-        );
919
+		// protocol
920
+		$insertArray = array(
921
+			'pid' => $this->conf['pages'],
922
+			'file_name' => $pdfUrl,
923
+			'count_pages' => $numberOfPages,
924
+			'crdate' => time(),
925
+		);
926 926
 
927
-        if ($GLOBALS["TSFE"]->loginUser) {
927
+		if ($GLOBALS["TSFE"]->loginUser) {
928 928
 
929
-            // internal user
930
-            $insertArray['user_id'] = $GLOBALS["TSFE"]->fe_user->user['uid'];
929
+			// internal user
930
+			$insertArray['user_id'] = $GLOBALS["TSFE"]->fe_user->user['uid'];
931 931
 
932
-            $insertArray['name'] = $GLOBALS["TSFE"]->fe_user->user['username'];
932
+			$insertArray['name'] = $GLOBALS["TSFE"]->fe_user->user['username'];
933 933
 
934
-            $insertArray['label'] = 'Print: '.$printerData['label'];
934
+			$insertArray['label'] = 'Print: '.$printerData['label'];
935 935
 
936
-        } else {
936
+		} else {
937 937
 
938
-            // external user
939
-            $insertArray['user_id'] = 0;
938
+			// external user
939
+			$insertArray['user_id'] = 0;
940 940
 
941
-            $insertArray['name'] = 'n/a';
941
+			$insertArray['name'] = 'n/a';
942 942
 
943
-            $insertArray['label'] = 'Print: '.$printerData['label'];
943
+			$insertArray['label'] = 'Print: '.$printerData['label'];
944 944
 
945
-        }
945
+		}
946 946
 
947
-        // add action to protocol
948
-        $GLOBALS['TYPO3_DB']->exec_INSERTquery('tx_dlf_actionlog', $insertArray);
947
+		// add action to protocol
948
+		$GLOBALS['TYPO3_DB']->exec_INSERTquery('tx_dlf_actionlog', $insertArray);
949 949
 
950
-        header('Location: '.$pdfUrl);
950
+		header('Location: '.$pdfUrl);
951 951
 
952
-        ob_end_flush();
952
+		ob_end_flush();
953 953
 
954
-        exit;
954
+		exit;
955 955
 
956
-    }
956
+	}
957 957
 
958 958
 }
959 959
\ No newline at end of file
Please login to merge, or discard this patch.
dlf/plugins/toc/class.tx_dlf_toc.php 1 patch
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.
dlf/plugins/pageview/class.tx_dlf_pageview.php 1 patch
Indentation   +73 added lines, -73 removed lines patch added patch discarded remove patch
@@ -101,130 +101,130 @@  discard block
 block discarded – undo
101 101
 	}
102 102
 
103 103
 	/**
104
-     * Adds pageview interaction (crop, magnifier and rotation)
105
-     *
106
-     * @access	protected
107
-     *
108
-     * @return	array		Marker array
109
-     */
110
-    protected function addInteraction() {
104
+	 * Adds pageview interaction (crop, magnifier and rotation)
105
+	 *
106
+	 * @access	protected
107
+	 *
108
+	 * @return	array		Marker array
109
+	 */
110
+	protected function addInteraction() {
111 111
 
112
-        $markerArray = array();
112
+		$markerArray = array();
113 113
 
114
-        if ($this->piVars['id']) {
114
+		if ($this->piVars['id']) {
115 115
 
116
-            if (empty($this->piVars['page'])) {
116
+			if (empty($this->piVars['page'])) {
117 117
 
118
-                $params['page'] = 1;
118
+				$params['page'] = 1;
119 119
 
120
-            }
120
+			}
121 121
 
122
-            if ($this->conf['crop']) {
122
+			if ($this->conf['crop']) {
123 123
 
124
-                $markerArray['###EDITBUTTON###'] = '<a href="javascript: tx_dlf_viewer.activateSelection();">'.$this->pi_getLL('editMode', '', TRUE).'</a>';
124
+				$markerArray['###EDITBUTTON###'] = '<a href="javascript: tx_dlf_viewer.activateSelection();">'.$this->pi_getLL('editMode', '', TRUE).'</a>';
125 125
 
126
-                $markerArray['###EDITREMOVE###'] = '<a href="javascript: tx_dlf_viewer.resetCropSelection();">'.$this->pi_getLL('editRemove', '', TRUE).'</a>';
126
+				$markerArray['###EDITREMOVE###'] = '<a href="javascript: tx_dlf_viewer.resetCropSelection();">'.$this->pi_getLL('editRemove', '', TRUE).'</a>';
127 127
 
128
-            } else {
128
+			} else {
129 129
 
130
-                $markerArray['###EDITBUTTON###'] = '';
130
+				$markerArray['###EDITBUTTON###'] = '';
131 131
 
132
-                $markerArray['###EDITREMOVE###'] = '';
132
+				$markerArray['###EDITREMOVE###'] = '';
133 133
 
134
-            }
134
+			}
135 135
 
136
-            if ($this->conf['magnifier']) {
136
+			if ($this->conf['magnifier']) {
137 137
 
138
-                $markerArray['###MAGNIFIER###'] = '<a href="javascript: tx_dlf_viewer.activateMagnifier();">'.$this->pi_getLL('magnifier', '', TRUE).'</a>';
138
+				$markerArray['###MAGNIFIER###'] = '<a href="javascript: tx_dlf_viewer.activateMagnifier();">'.$this->pi_getLL('magnifier', '', TRUE).'</a>';
139 139
 
140
-            } else {
140
+			} else {
141 141
 
142
-                $markerArray['###MAGNIFIER###'] = '';
142
+				$markerArray['###MAGNIFIER###'] = '';
143 143
 
144
-            }
144
+			}
145 145
 
146
-        }
146
+		}
147 147
 
148
-        return $markerArray;
149
-    }
148
+		return $markerArray;
149
+	}
150 150
 
151
-    /**
152
-     * Adds form to save cropping data to basket
153
-     *
154
-     * @access	protected
155
-     *
156
-     * @return	array		Marker array
157
-     */
158
-    protected function addBasketForm() {
151
+	/**
152
+	 * Adds form to save cropping data to basket
153
+	 *
154
+	 * @access	protected
155
+	 *
156
+	 * @return	array		Marker array
157
+	 */
158
+	protected function addBasketForm() {
159 159
 
160
-        $markerArray = array();
160
+		$markerArray = array();
161 161
 
162
-        // Add basket button
163
-        if ($this->conf['basketButton'] && $this->conf['targetBasket'] && $this->piVars['id']) {
162
+		// Add basket button
163
+		if ($this->conf['basketButton'] && $this->conf['targetBasket'] && $this->piVars['id']) {
164 164
 
165
-            $label = $this->pi_getLL('addBasket', '', TRUE);
165
+			$label = $this->pi_getLL('addBasket', '', TRUE);
166 166
 
167
-            $params = array(
168
-                'id' => $this->piVars['id'],
169
-                'addToBasket' => true
170
-            );
167
+			$params = array(
168
+				'id' => $this->piVars['id'],
169
+				'addToBasket' => true
170
+			);
171 171
 
172
-            if (empty($this->piVars['page'])) {
172
+			if (empty($this->piVars['page'])) {
173 173
 
174
-                $params['page'] = 1;
174
+				$params['page'] = 1;
175 175
 
176
-            }
176
+			}
177 177
 
178
-            $basketConf = array (
179
-                'parameter' => $this->conf['targetBasket'],
180
-                'additionalParams' => \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, $params, '', TRUE, FALSE),
181
-                'title' => $label
182
-            );
178
+			$basketConf = array (
179
+				'parameter' => $this->conf['targetBasket'],
180
+				'additionalParams' => \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, $params, '', TRUE, FALSE),
181
+				'title' => $label
182
+			);
183 183
 
184
-            $output = '<form id="addToBasketForm" action="'.$this->cObj->typoLink_URL($basketConf).'" method="post">';
184
+			$output = '<form id="addToBasketForm" action="'.$this->cObj->typoLink_URL($basketConf).'" method="post">';
185 185
 
186
-            $output .= '<input type="hidden" name="tx_dlf[startpage]" id="startpage" value="'.$this->piVars['page'].'">';
186
+			$output .= '<input type="hidden" name="tx_dlf[startpage]" id="startpage" value="'.$this->piVars['page'].'">';
187 187
 
188
-            $output .= '<input type="hidden" name="tx_dlf[endpage]" id="endpage" value="'.$this->piVars['page'].'">';
188
+			$output .= '<input type="hidden" name="tx_dlf[endpage]" id="endpage" value="'.$this->piVars['page'].'">';
189 189
 
190
-            $output .= '<input type="hidden" name="tx_dlf[startX]" id="startX">';
190
+			$output .= '<input type="hidden" name="tx_dlf[startX]" id="startX">';
191 191
 
192
-            $output .= '<input type="hidden" name="tx_dlf[startY]" id="startY">';
192
+			$output .= '<input type="hidden" name="tx_dlf[startY]" id="startY">';
193 193
 
194
-            $output .= '<input type="hidden" name="tx_dlf[endX]" id="endX">';
194
+			$output .= '<input type="hidden" name="tx_dlf[endX]" id="endX">';
195 195
 
196
-            $output .= '<input type="hidden" name="tx_dlf[endY]" id="endY">';
196
+			$output .= '<input type="hidden" name="tx_dlf[endY]" id="endY">';
197 197
 
198
-            $output .= '<input type="hidden" name="tx_dlf[rotation]" id="rotation">';
198
+			$output .= '<input type="hidden" name="tx_dlf[rotation]" id="rotation">';
199 199
 
200
-            $output .= '<button id="submitBasketForm" onclick="this.form.submit()">'.$label.'</button>';
200
+			$output .= '<button id="submitBasketForm" onclick="this.form.submit()">'.$label.'</button>';
201 201
 
202
-            $output .= '</form>';
202
+			$output .= '</form>';
203 203
 
204
-            $output .= '<script>';
204
+			$output .= '<script>';
205 205
 
206
-            $output .= '
206
+			$output .= '
207 207
 			$(document).ready(function() {
208 208
 				$("#submitBasketForm").click(function() {
209 209
 					$("#addToBasketForm").submit();
210 210
 				});
211 211
 			});';
212 212
 
213
-            $output .= '</script>';
213
+			$output .= '</script>';
214 214
 
215
-            $markerArray['###BASKETBUTTON###'] = $output;
215
+			$markerArray['###BASKETBUTTON###'] = $output;
216 216
 
217
-        } else {
217
+		} else {
218 218
 
219
-            $markerArray['###BASKETBUTTON###'] = '';
219
+			$markerArray['###BASKETBUTTON###'] = '';
220 220
 
221
-        }
221
+		}
222 222
 
223
-        return $markerArray;
224
-    }
223
+		return $markerArray;
224
+	}
225 225
 
226
-    /**
227
-     * Get image's URL and MIME type
226
+	/**
227
+	 * Get image's URL and MIME type
228 228
 	 *
229 229
 	 * @access	protected
230 230
 	 *
@@ -390,7 +390,7 @@  discard block
 block discarded – undo
390 390
 
391 391
 		$markerArray = array_merge($markerArray, $this->addInteraction(), $this->addBasketForm());
392 392
 
393
-        $content .= $this->cObj->substituteMarkerArray($this->template, $markerArray);
393
+		$content .= $this->cObj->substituteMarkerArray($this->template, $markerArray);
394 394
 
395 395
 		return $this->pi_wrapInBaseClass($content);
396 396
 
Please login to merge, or discard this patch.
dlf/plugins/pageview/class.tx_dlf_geturl_eid.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
 		$this->scriptRelPath = 'plugins/pageview/class.tx_dlf_geturl_eid.php';
48 48
 
49 49
 		$url = GeneralUtility::_GP('url');
50
-    $includeHeader = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange(GeneralUtility::_GP('header'), 0, 2, 0);
50
+	$includeHeader = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange(GeneralUtility::_GP('header'), 0, 2, 0);
51 51
 
52 52
 		// first we fetch header separately
53 53
 		$fetchedHeader = GeneralUtility::getUrl($url, 2);
Please login to merge, or discard this patch.
dlf/common/class.tx_dlf_document.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1304,7 +1304,7 @@
 block discarded – undo
1304 1304
 			if (TYPO3_DLOG) {
1305 1305
 
1306 1306
 				\TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->save('.$_pid.', '.$_core.')] Could not identify document/structure type ' . $GLOBALS['TYPO3_DB']->fullQuoteStr($metadata['type'][0], 'tx_dlf_structures'),
1307
-									       self::$extKey, SYSLOG_SEVERITY_ERROR);
1307
+										   self::$extKey, SYSLOG_SEVERITY_ERROR);
1308 1308
 
1309 1309
 			}
1310 1310
 
Please login to merge, or discard this patch.
dlf/ext_autoload.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,8 +33,8 @@
 block discarded – undo
33 33
 	'tx_dlf_modIndexing' => $extensionPath.'modules/indexing/index.php',
34 34
 	'tx_dlf_modNewclient' => $extensionPath.'modules/newclient/index.php',
35 35
 	'tx_dlf_audioplayer' => $extensionPath.'plugins/audioplayer/class.tx_dlf_audioplayer.php',
36
-    'tx_dlf_basket' => $extensionPath.'plugins/basket/class.tx_dlf_basket.php',
37
-    'tx_dlf_collection' => $extensionPath.'plugins/collection/class.tx_dlf_collection.php',
36
+	'tx_dlf_basket' => $extensionPath.'plugins/basket/class.tx_dlf_basket.php',
37
+	'tx_dlf_collection' => $extensionPath.'plugins/collection/class.tx_dlf_collection.php',
38 38
 	'tx_dlf_feeds' => $extensionPath.'plugins/feeds/class.tx_dlf_feeds.php',
39 39
 	'tx_dlf_listview' => $extensionPath.'plugins/listview/class.tx_dlf_listview.php',
40 40
 	'tx_dlf_metadata' => $extensionPath.'plugins/metadata/class.tx_dlf_metadata.php',
Please login to merge, or discard this patch.
dlf/Configuration/TCA/tx_dlf_printer.php 1 patch
Indentation   +42 added lines, -42 removed lines patch added patch discarded remove patch
@@ -10,46 +10,46 @@
 block discarded – undo
10 10
  */
11 11
 
12 12
 return array (
13
-    'ctrl' => array (
14
-        'title'     => 'LLL:EXT:dlf/locallang.xml:tx_dlf_printer',
15
-        'label'     => 'label',
16
-        'default_sortby' => 'ORDER BY label',
17
-        'delete'	=> 'deleted',
18
-        'iconfile'	=> \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('dlf').'res/icons/txdlfprinter.png',
19
-        'rootLevel'	=> 0,
20
-        'dividers2tabs' => 2,
21
-        'searchFields' => 'label,print',
22
-    ),
23
-    'interface' => array (
24
-        'showRecordFieldList' => 'label,name,address',
25
-    ),
26
-    'feInterface' => array (
27
-        'fe_admin_fieldList' => '',
28
-    ),
29
-    'columns' => array (
30
-        'label' => array (
31
-            'label' => 'LLL:EXT:dlf/locallang.xml:tx_dlf_printer.label',
32
-            'config' => array (
33
-                'type' => 'input',
34
-                'size' => 30,
35
-                'max' => 255,
36
-                'eval' => 'required,trim',
37
-            ),
38
-        ),
39
-        'print' => array (
40
-            'label' => 'LLL:EXT:dlf/locallang.xml:tx_dlf_printer.printcommand',
41
-            'config' => array (
42
-                'type' => 'input',
43
-                'size' => 30,
44
-                'max' => 255,
45
-                'eval' => 'required',
46
-            ),
47
-        ),
48
-    ),
49
-    'types' => array (
50
-        '0' => array ('showitem' => '--div--;LLL:EXT:dlf/locallang.xml:tx_dlf_printer.tab1, label;;;;1-1-1, print;;;;2-2-2'),
51
-    ),
52
-    'palettes' => array (
53
-        '1' => array ('showitem' => ''),
54
-    ),
13
+	'ctrl' => array (
14
+		'title'     => 'LLL:EXT:dlf/locallang.xml:tx_dlf_printer',
15
+		'label'     => 'label',
16
+		'default_sortby' => 'ORDER BY label',
17
+		'delete'	=> 'deleted',
18
+		'iconfile'	=> \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('dlf').'res/icons/txdlfprinter.png',
19
+		'rootLevel'	=> 0,
20
+		'dividers2tabs' => 2,
21
+		'searchFields' => 'label,print',
22
+	),
23
+	'interface' => array (
24
+		'showRecordFieldList' => 'label,name,address',
25
+	),
26
+	'feInterface' => array (
27
+		'fe_admin_fieldList' => '',
28
+	),
29
+	'columns' => array (
30
+		'label' => array (
31
+			'label' => 'LLL:EXT:dlf/locallang.xml:tx_dlf_printer.label',
32
+			'config' => array (
33
+				'type' => 'input',
34
+				'size' => 30,
35
+				'max' => 255,
36
+				'eval' => 'required,trim',
37
+			),
38
+		),
39
+		'print' => array (
40
+			'label' => 'LLL:EXT:dlf/locallang.xml:tx_dlf_printer.printcommand',
41
+			'config' => array (
42
+				'type' => 'input',
43
+				'size' => 30,
44
+				'max' => 255,
45
+				'eval' => 'required',
46
+			),
47
+		),
48
+	),
49
+	'types' => array (
50
+		'0' => array ('showitem' => '--div--;LLL:EXT:dlf/locallang.xml:tx_dlf_printer.tab1, label;;;;1-1-1, print;;;;2-2-2'),
51
+	),
52
+	'palettes' => array (
53
+		'1' => array ('showitem' => ''),
54
+	),
55 55
 );
56 56
\ No newline at end of file
Please login to merge, or discard this patch.
dlf/Configuration/TCA/tx_dlf_actionlog.php 1 patch
Indentation   +73 added lines, -73 removed lines patch added patch discarded remove patch
@@ -10,77 +10,77 @@
 block discarded – undo
10 10
  */
11 11
 
12 12
 return array (
13
-    'ctrl' => array (
14
-        'title'     => 'LLL:EXT:dlf/locallang.xml:tx_dlf_actionlog',
15
-        'label'     => 'label',
16
-        'crdate'    => 'crdate',
17
-        'cruser_id' => 'user_id',
18
-        'default_sortby' => 'ORDER BY label',
19
-        'delete'	=> 'deleted',
20
-        'iconfile'	=> \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('dlf').'res/icons/txdlfreport.png',
21
-        'rootLevel'	=> 0,
22
-        'dividers2tabs' => 2,
23
-        'searchFields' => 'label,name,crdate',
24
-    ),
25
-    'interface' => array (
26
-        'showRecordFieldList' => 'label,name,crdate',
27
-        'maxDBListItems' => 25,
28
-        'maxSingleDBListItems' => 50,
29
-    ),
30
-    'feInterface' => array (
31
-        'fe_admin_fieldList' => '',
32
-    ),
33
-    'columns' => array (
34
-        'label' => array (
35
-            'label' => 'LLL:EXT:dlf/locallang.xml:tx_dlf_actionlog.label',
36
-            'config' => array (
37
-                'type' => 'input',
38
-                'size' => 30,
39
-                'max' => 255,
40
-                'eval' => 'required,trim',
41
-            ),
42
-        ),
43
-        'user_id' => array (
44
-            'label' => 'LLL:EXT:dlf/locallang.xml:tx_dlf_actionlog.user_id',
45
-            'config' => array (
46
-                'type' => 'input',
47
-                'size' => 30,
48
-                'max' => 255,
49
-                'eval' => 'alphanum,unique',
50
-            ),
51
-        ),
52
-        'file_name' => array (
53
-            'label' => 'LLL:EXT:dlf/locallang.xml:tx_dlf_actionlog.file_name',
54
-            'config' => array (
55
-                'type' => 'input',
56
-                'size' => 30,
57
-                'max' => 255,
58
-                'eval' => 'alphanum,unique',
59
-            ),
60
-        ),
61
-        'count_pages' => array (
62
-            'label' => 'LLL:EXT:dlf/locallang.xml:tx_dlf_actionlog.count_pages',
63
-            'config' => array (
64
-                'type' => 'input',
65
-                'size' => 30,
66
-                'max' => 255,
67
-                'eval' => 'trim',
68
-            ),
69
-        ),
70
-        'name' => array (
71
-            'label' => 'LLL:EXT:dlf/locallang.xml:tx_dlf_actionlog.name',
72
-            'config' => array (
73
-                'type' => 'input',
74
-                'size' => 30,
75
-                'max' => 255,
76
-                'eval' => 'trim',
77
-            ),
78
-        )
79
-    ),
80
-    'types' => array (
81
-        '0' => array ('showitem' => '--div--;LLL:EXT:dlf/locallang.xml:tx_dlf_actionlog.tab1, label;;;;1-1-1, name;;;;2-2-2, file_name;;;;2-2-2, crdate;;;;2-2-2, count_pages;;;;2-2-2'),
82
-    ),
83
-    'palettes' => array (
84
-        '1' => array ('showitem' => ''),
85
-    ),
13
+	'ctrl' => array (
14
+		'title'     => 'LLL:EXT:dlf/locallang.xml:tx_dlf_actionlog',
15
+		'label'     => 'label',
16
+		'crdate'    => 'crdate',
17
+		'cruser_id' => 'user_id',
18
+		'default_sortby' => 'ORDER BY label',
19
+		'delete'	=> 'deleted',
20
+		'iconfile'	=> \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('dlf').'res/icons/txdlfreport.png',
21
+		'rootLevel'	=> 0,
22
+		'dividers2tabs' => 2,
23
+		'searchFields' => 'label,name,crdate',
24
+	),
25
+	'interface' => array (
26
+		'showRecordFieldList' => 'label,name,crdate',
27
+		'maxDBListItems' => 25,
28
+		'maxSingleDBListItems' => 50,
29
+	),
30
+	'feInterface' => array (
31
+		'fe_admin_fieldList' => '',
32
+	),
33
+	'columns' => array (
34
+		'label' => array (
35
+			'label' => 'LLL:EXT:dlf/locallang.xml:tx_dlf_actionlog.label',
36
+			'config' => array (
37
+				'type' => 'input',
38
+				'size' => 30,
39
+				'max' => 255,
40
+				'eval' => 'required,trim',
41
+			),
42
+		),
43
+		'user_id' => array (
44
+			'label' => 'LLL:EXT:dlf/locallang.xml:tx_dlf_actionlog.user_id',
45
+			'config' => array (
46
+				'type' => 'input',
47
+				'size' => 30,
48
+				'max' => 255,
49
+				'eval' => 'alphanum,unique',
50
+			),
51
+		),
52
+		'file_name' => array (
53
+			'label' => 'LLL:EXT:dlf/locallang.xml:tx_dlf_actionlog.file_name',
54
+			'config' => array (
55
+				'type' => 'input',
56
+				'size' => 30,
57
+				'max' => 255,
58
+				'eval' => 'alphanum,unique',
59
+			),
60
+		),
61
+		'count_pages' => array (
62
+			'label' => 'LLL:EXT:dlf/locallang.xml:tx_dlf_actionlog.count_pages',
63
+			'config' => array (
64
+				'type' => 'input',
65
+				'size' => 30,
66
+				'max' => 255,
67
+				'eval' => 'trim',
68
+			),
69
+		),
70
+		'name' => array (
71
+			'label' => 'LLL:EXT:dlf/locallang.xml:tx_dlf_actionlog.name',
72
+			'config' => array (
73
+				'type' => 'input',
74
+				'size' => 30,
75
+				'max' => 255,
76
+				'eval' => 'trim',
77
+			),
78
+		)
79
+	),
80
+	'types' => array (
81
+		'0' => array ('showitem' => '--div--;LLL:EXT:dlf/locallang.xml:tx_dlf_actionlog.tab1, label;;;;1-1-1, name;;;;2-2-2, file_name;;;;2-2-2, crdate;;;;2-2-2, count_pages;;;;2-2-2'),
82
+	),
83
+	'palettes' => array (
84
+		'1' => array ('showitem' => ''),
85
+	),
86 86
 );
87 87
\ No newline at end of file
Please login to merge, or discard this patch.
dlf/Configuration/TCA/tx_dlf_mail.php 1 patch
Indentation   +51 added lines, -51 removed lines patch added patch discarded remove patch
@@ -10,55 +10,55 @@
 block discarded – undo
10 10
  */
11 11
 
12 12
 return array (
13
-    'ctrl' => array (
14
-        'title'     => 'LLL:EXT:dlf/locallang.xml:tx_dlf_mail',
15
-        'label'     => 'label',
16
-        'default_sortby' => 'ORDER BY label',
17
-        'delete'	=> 'deleted',
18
-        'iconfile'	=> \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('dlf').'res/icons/txdlfemail.png',
19
-        'rootLevel'	=> 0,
20
-        'dividers2tabs' => 2,
21
-        'searchFields' => 'label,name,mail',
22
-    ),
23
-    'interface' => array (
24
-        'showRecordFieldList' => 'label,name,mail',
25
-    ),
26
-    'feInterface' => array (
27
-        'fe_admin_fieldList' => '',
28
-    ),
29
-    'columns' => array (
30
-        'label' => array (
31
-            'label' => 'LLL:EXT:dlf/locallang.xml:tx_dlf_mail',
32
-            'config' => array (
33
-                'type' => 'input',
34
-                'size' => 30,
35
-                'max' => 255,
36
-                'eval' => 'required',
37
-            ),
38
-        ),
39
-        'name' => array (
40
-            'label' => 'LLL:EXT:dlf/locallang.xml:tx_dlf_mail.name',
41
-            'config' => array (
42
-                'type' => 'input',
43
-                'size' => 30,
44
-                'max' => 255,
45
-                'eval' => '',
46
-            ),
47
-        ),
48
-        'mail' => array (
49
-            'label' => 'LLL:EXT:dlf/locallang.xml:tx_dlf_mail.mail',
50
-            'config' => array (
51
-                'type' => 'input',
52
-                'size' => 30,
53
-                'max' => 255,
54
-                'eval' => 'unique',
55
-            ),
56
-        ),
57
-    ),
58
-    'types' => array (
59
-        '0' => array ('showitem' => '--div--;LLL:EXT:dlf/locallang.xml:tx_dlf_mail.tab1, label;;;;1-1-1, name;;;;2-2-2, mail;;;;2-2-2'),
60
-    ),
61
-    'palettes' => array (
62
-        '1' => array ('showitem' => ''),
63
-    ),
13
+	'ctrl' => array (
14
+		'title'     => 'LLL:EXT:dlf/locallang.xml:tx_dlf_mail',
15
+		'label'     => 'label',
16
+		'default_sortby' => 'ORDER BY label',
17
+		'delete'	=> 'deleted',
18
+		'iconfile'	=> \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('dlf').'res/icons/txdlfemail.png',
19
+		'rootLevel'	=> 0,
20
+		'dividers2tabs' => 2,
21
+		'searchFields' => 'label,name,mail',
22
+	),
23
+	'interface' => array (
24
+		'showRecordFieldList' => 'label,name,mail',
25
+	),
26
+	'feInterface' => array (
27
+		'fe_admin_fieldList' => '',
28
+	),
29
+	'columns' => array (
30
+		'label' => array (
31
+			'label' => 'LLL:EXT:dlf/locallang.xml:tx_dlf_mail',
32
+			'config' => array (
33
+				'type' => 'input',
34
+				'size' => 30,
35
+				'max' => 255,
36
+				'eval' => 'required',
37
+			),
38
+		),
39
+		'name' => array (
40
+			'label' => 'LLL:EXT:dlf/locallang.xml:tx_dlf_mail.name',
41
+			'config' => array (
42
+				'type' => 'input',
43
+				'size' => 30,
44
+				'max' => 255,
45
+				'eval' => '',
46
+			),
47
+		),
48
+		'mail' => array (
49
+			'label' => 'LLL:EXT:dlf/locallang.xml:tx_dlf_mail.mail',
50
+			'config' => array (
51
+				'type' => 'input',
52
+				'size' => 30,
53
+				'max' => 255,
54
+				'eval' => 'unique',
55
+			),
56
+		),
57
+	),
58
+	'types' => array (
59
+		'0' => array ('showitem' => '--div--;LLL:EXT:dlf/locallang.xml:tx_dlf_mail.tab1, label;;;;1-1-1, name;;;;2-2-2, mail;;;;2-2-2'),
60
+	),
61
+	'palettes' => array (
62
+		'1' => array ('showitem' => ''),
63
+	),
64 64
 );
65 65
\ No newline at end of file
Please login to merge, or discard this patch.