TYPO3 CMS  TYPO3_6-2
FileContentParser.php
Go to the documentation of this file.
1 <?php
3 
29 
30  // This value is also overridden from config.
34  public $pdf_mode = -20;
35 
36  // zero: whole PDF file is indexed in one. positive value: Indicates number of pages at a time, eg. "5" would means 1-5,6-10,.... Negative integer would indicate (abs value) number of groups. Eg "3" groups of 10 pages would be 1-4,5-8,9-10
37  // This array is configured in initialization:
41  public $app = array();
42 
46  public $ext2itemtype_map = array();
47 
51  public $supportedExtensions = array();
52 
56  public $pObj;
57 
58  // Reference to parent object (indexer class)
59  protected $langObject;
60 
61  // Reference to LANG-Object
65  public function __construct() {
66  // Set the language object to be used accordant to current TYPO3_MODE:
67  $this->langObject = TYPO3_MODE == 'FE' ? $GLOBALS['TSFE'] : $GLOBALS['LANG'];
68  }
69 
77  public function initParser($extension) {
78  // Then read indexer-config and set if appropriate:
79  $indexerConfig = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['indexed_search']);
80  // If windows, apply extension to tool name:
81  $exe = TYPO3_OS == 'WIN' ? '.exe' : '';
82  // lg
83  $extOK = FALSE;
84  $mainExtension = '';
85  // Ignore extensions
86  $ignoreExtensions = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', strtolower($indexerConfig['ignoreExtensions']), TRUE);
87  if (in_array($extension, $ignoreExtensions)) {
88  $this->pObj->log_setTSlogMessage(sprintf($this->sL('LLL:EXT:indexed_search/locallang.xlf:ignoreExtensions'), $extension), 1);
89  return FALSE;
90  }
91  // Switch on file extension:
92  switch ($extension) {
93  case 'pdf':
94  // PDF
95  if ($indexerConfig['pdftools']) {
96  $pdfPath = rtrim($indexerConfig['pdftools'], '/') . '/';
97  if (@is_file(($pdfPath . 'pdftotext' . $exe)) && @is_file(($pdfPath . 'pdfinfo' . $exe))) {
98  $this->app['pdfinfo'] = $pdfPath . 'pdfinfo' . $exe;
99  $this->app['pdftotext'] = $pdfPath . 'pdftotext' . $exe;
100  // PDF mode:
101  $this->pdf_mode = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange($indexerConfig['pdf_mode'], -100, 100);
102  $extOK = TRUE;
103  } else {
104  $this->pObj->log_setTSlogMessage(sprintf($this->sL('LLL:EXT:indexed_search/locallang.xlf:pdfToolsNotFound'), $pdfPath), 3);
105  }
106  } else {
107  $this->pObj->log_setTSlogMessage($this->sL('LLL:EXT:indexed_search/locallang.xlf:pdfToolsDisabled'), 1);
108  }
109  break;
110  case 'doc':
111  // Catdoc
112  if ($indexerConfig['catdoc']) {
113  $catdocPath = rtrim($indexerConfig['catdoc'], '/') . '/';
114  if (@is_file(($catdocPath . 'catdoc' . $exe))) {
115  $this->app['catdoc'] = $catdocPath . 'catdoc' . $exe;
116  $extOK = TRUE;
117  } else {
118  $this->pObj->log_setTSlogMessage(sprintf($this->sL('LLL:EXT:indexed_search/locallang.xlf:catdocNotFound'), $catdocPath), 3);
119  }
120  } else {
121  $this->pObj->log_setTSlogMessage($this->sL('LLL:EXT:indexed_search/locallang.xlf:catdocDisabled'), 1);
122  }
123  break;
124  case 'pps':
125 
126  case 'ppt':
127  // MS PowerPoint
128  // ppthtml
129  if ($indexerConfig['ppthtml']) {
130  $ppthtmlPath = rtrim($indexerConfig['ppthtml'], '/') . '/';
131  if (@is_file(($ppthtmlPath . 'ppthtml' . $exe))) {
132  $this->app['ppthtml'] = $ppthtmlPath . 'ppthtml' . $exe;
133  $extOK = TRUE;
134  } else {
135  $this->pObj->log_setTSlogMessage(sprintf($this->sL('LLL:EXT:indexed_search/locallang.xlf:ppthtmlNotFound'), $ppthtmlPath), 3);
136  }
137  } else {
138  $this->pObj->log_setTSlogMessage($this->sL('LLL:EXT:indexed_search/locallang.xlf:ppthtmlDisabled'), 1);
139  }
140  break;
141  case 'xls':
142  // MS Excel
143  // Xlhtml
144  if ($indexerConfig['xlhtml']) {
145  $xlhtmlPath = rtrim($indexerConfig['xlhtml'], '/') . '/';
146  if (@is_file(($xlhtmlPath . 'xlhtml' . $exe))) {
147  $this->app['xlhtml'] = $xlhtmlPath . 'xlhtml' . $exe;
148  $extOK = TRUE;
149  } else {
150  $this->pObj->log_setTSlogMessage(sprintf($this->sL('LLL:EXT:indexed_search/locallang.xlf:xlhtmlNotFound'), $xlhtmlPath), 3);
151  }
152  } else {
153  $this->pObj->log_setTSlogMessage($this->sL('LLL:EXT:indexed_search/locallang.xlf:xlhtmlDisabled'), 1);
154  }
155  break;
156  case 'sxc':
157 
158  case 'sxi':
159 
160  case 'sxw':
161 
162  case 'ods':
163 
164  case 'odp':
165 
166  case 'odt':
167  // Oasis OpenDocument Text
168  if ($indexerConfig['unzip']) {
169  $unzipPath = rtrim($indexerConfig['unzip'], '/') . '/';
170  if (@is_file(($unzipPath . 'unzip' . $exe))) {
171  $this->app['unzip'] = $unzipPath . 'unzip' . $exe;
172  $extOK = TRUE;
173  } else {
174  $this->pObj->log_setTSlogMessage(sprintf($this->sL('LLL:EXT:indexed_search/locallang.xlf:unzipNotFound'), $unzipPath), 3);
175  }
176  } else {
177  $this->pObj->log_setTSlogMessage($this->sL('LLL:EXT:indexed_search/locallang.xlf:unzipDisabled'), 1);
178  }
179  break;
180  case 'rtf':
181  // Catdoc
182  if ($indexerConfig['unrtf']) {
183  $unrtfPath = rtrim($indexerConfig['unrtf'], '/') . '/';
184  if (@is_file(($unrtfPath . 'unrtf' . $exe))) {
185  $this->app['unrtf'] = $unrtfPath . 'unrtf' . $exe;
186  $extOK = TRUE;
187  } else {
188  $this->pObj->log_setTSlogMessage(sprintf($this->sL('LLL:EXT:indexed_search/locallang.xlf:unrtfNotFound'), $unrtfPath), 3);
189  }
190  } else {
191  $this->pObj->log_setTSlogMessage($this->sL('LLL:EXT:indexed_search/locallang.xlf:unrtfDisabled'), 1);
192  }
193  break;
194  case 'txt':
195 
196  case 'csv':
197 
198  case 'xml':
199 
200  case 'tif':
201  // PHP EXIF
202  $extOK = TRUE;
203  break;
204  case 'html':
205 
206  case 'htm':
207  // PHP strip-tags()
208  $extOK = TRUE;
209  $mainExtension = 'html';
210  // making "html" the common "item_type"
211  break;
212  case 'jpg':
213 
214  case 'jpeg':
215  // PHP EXIF
216  $extOK = TRUE;
217  $mainExtension = 'jpeg';
218  // making "jpeg" the common item_type
219  break;
220  }
221  // If extension was OK:
222  if ($extOK) {
223  $this->supportedExtensions[$extension] = TRUE;
224  $this->ext2itemtype_map[$extension] = $mainExtension ?: $extension;
225  return TRUE;
226  }
227  }
228 
237  public function softInit($extension) {
238  switch ($extension) {
239  case 'pdf':
240 
241  case 'doc':
242 
243  case 'pps':
244 
245  case 'ppt':
246 
247  case 'xls':
248 
249  case 'sxc':
250 
251  case 'sxi':
252 
253  case 'sxw':
254 
255  case 'ods':
256 
257  case 'odp':
258 
259  case 'odt':
260 
261  case 'rtf':
262 
263  case 'txt':
264 
265  case 'html':
266 
267  case 'htm':
268 
269  case 'csv':
270 
271  case 'xml':
272 
273  case 'jpg':
274 
275  case 'jpeg':
276 
277  case 'tif':
278  // TIF images (EXIF comment)
279  return TRUE;
280  break;
281  }
282  }
283 
291  public function searchTypeMediaTitle($extension) {
292  // Read indexer-config
293  $indexerConfig = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['indexed_search']);
294  // Ignore extensions
295  $ignoreExtensions = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', strtolower($indexerConfig['ignoreExtensions']), TRUE);
296  if (in_array($extension, $ignoreExtensions)) {
297  return FALSE;
298  }
299  // Switch on file extension:
300  switch ($extension) {
301  case 'pdf':
302  // PDF
303  if ($indexerConfig['pdftools']) {
304  return sprintf($this->sL('LLL:EXT:indexed_search/locallang.xlf:extension.PDF'), $extension);
305  }
306  break;
307  case 'doc':
308  // Catdoc
309  if ($indexerConfig['catdoc']) {
310  return sprintf($this->sL('LLL:EXT:indexed_search/locallang.xlf:extension.DOC'), $extension);
311  }
312  break;
313  case 'pps':
314 
315  case 'ppt':
316  // MS PowerPoint
317  // ppthtml
318  if ($indexerConfig['ppthtml']) {
319  return sprintf($this->sL('LLL:EXT:indexed_search/locallang.xlf:extension.PP'), $extension);
320  }
321  break;
322  case 'xls':
323  // MS Excel
324  // Xlhtml
325  if ($indexerConfig['xlhtml']) {
326  return sprintf($this->sL('LLL:EXT:indexed_search/locallang.xlf:extension.XLS'), $extension);
327  }
328  break;
329  case 'sxc':
330  // Open Office Calc.
331  if ($indexerConfig['unzip']) {
332  return sprintf($this->sL('LLL:EXT:indexed_search/locallang.xlf:extension.SXC'), $extension);
333  }
334  break;
335  case 'sxi':
336  // Open Office Impress
337  if ($indexerConfig['unzip']) {
338  return sprintf($this->sL('LLL:EXT:indexed_search/locallang.xlf:extension.SXI'), $extension);
339  }
340  break;
341  case 'sxw':
342  // Open Office Writer
343  if ($indexerConfig['unzip']) {
344  return sprintf($this->sL('LLL:EXT:indexed_search/locallang.xlf:extension.SXW'), $extension);
345  }
346  break;
347  case 'ods':
348  // Oasis OpenDocument Spreadsheet
349  if ($indexerConfig['unzip']) {
350  return sprintf($this->sL('LLL:EXT:indexed_search/locallang.xlf:extension.ODS'), $extension);
351  }
352  break;
353  case 'odp':
354  // Oasis OpenDocument Presentation
355  if ($indexerConfig['unzip']) {
356  return sprintf($this->sL('LLL:EXT:indexed_search/locallang.xlf:extension.ODP'), $extension);
357  }
358  break;
359  case 'odt':
360  // Oasis OpenDocument Text
361  if ($indexerConfig['unzip']) {
362  return sprintf($this->sL('LLL:EXT:indexed_search/locallang.xlf:extension.ODT'), $extension);
363  }
364  break;
365  case 'rtf':
366  // Catdoc
367  if ($indexerConfig['unrtf']) {
368  return sprintf($this->sL('LLL:EXT:indexed_search/locallang.xlf:extension.RTF'), $extension);
369  }
370  break;
371  case 'jpeg':
372 
373  case 'jpg':
374 
375  case 'tif':
376  // PHP EXIF
377  return sprintf($this->sL('LLL:EXT:indexed_search/locallang.xlf:extension.Images'), $extension);
378  break;
379  case 'html':
380 
381  case 'htm':
382  // PHP strip-tags()
383  return sprintf($this->sL('LLL:EXT:indexed_search/locallang.xlf:extension.HTML'), $extension);
384  break;
385  case 'txt':
386  // Raw text
387  return sprintf($this->sL('LLL:EXT:indexed_search/locallang.xlf:extension.TXT'), $extension);
388  break;
389  case 'csv':
390  // Raw text
391  return sprintf($this->sL('LLL:EXT:indexed_search/locallang.xlf:extension.CSV'), $extension);
392  break;
393  case 'xml':
394  // PHP strip-tags()
395  return sprintf($this->sL('LLL:EXT:indexed_search/locallang.xlf:extension.XML'), $extension);
396  break;
397  default:
398  // Do nothing
399  }
400  }
401 
409  public function isMultiplePageExtension($extension) {
410  // Switch on file extension:
411  switch ((string) $extension) {
412  case 'pdf':
413  return TRUE;
414  break;
415  }
416  }
417 
425  protected function sL($reference, $useHtmlSpecialChar = FALSE) {
426  return $this->langObject->sL($reference, $useHtmlSpecialChar);
427  }
428 
429  /************************
430  *
431  * Reading documents (for parsing)
432  *
433  ************************/
443  public function readFileContent($ext, $absFile, $cPKey) {
444  unset($contentArr);
445  // Return immediately if initialization didn't set support up:
446  if (!$this->supportedExtensions[$ext]) {
447  return FALSE;
448  }
449  // Switch by file extension
450  switch ($ext) {
451  case 'pdf':
452  if ($this->app['pdfinfo']) {
454  // Getting pdf-info:
455  $cmd = $this->app['pdfinfo'] . ' ' . escapeshellarg($absFile);
457  $pdfInfo = $this->splitPdfInfo($res);
458  unset($res);
459  if ((int)$pdfInfo['pages']) {
460  list($low, $high) = explode('-', $cPKey);
461  // Get pdf content:
462  $tempFileName = \TYPO3\CMS\Core\Utility\GeneralUtility::tempnam('Typo3_indexer');
463  // Create temporary name
464  @unlink($tempFileName);
465  // Delete if exists, just to be safe.
466  $cmd = $this->app['pdftotext'] . ' -f ' . $low . ' -l ' . $high . ' -enc UTF-8 -q ' . escapeshellarg($absFile) . ' ' . $tempFileName;
468  if (@is_file($tempFileName)) {
469  $content = \TYPO3\CMS\Core\Utility\GeneralUtility::getUrl($tempFileName);
470  unlink($tempFileName);
471  } else {
472  $this->pObj->log_setTSlogMessage(sprintf($this->sL('LLL:EXT:indexed_search/locallang.xlf:pdfToolsFailed'), $absFile), 2);
473  }
474  if (strlen($content)) {
475  $contentArr = $this->pObj->splitRegularContent($this->removeEndJunk($content));
476  }
477  }
478  $this->setLocaleForServerFileSystem(TRUE);
479  }
480  break;
481  case 'doc':
482  if ($this->app['catdoc']) {
484  $cmd = $this->app['catdoc'] . ' -d utf-8 ' . escapeshellarg($absFile);
486  $content = implode(LF, $res);
487  unset($res);
488  $contentArr = $this->pObj->splitRegularContent($this->removeEndJunk($content));
489  $this->setLocaleForServerFileSystem(TRUE);
490  }
491  break;
492  case 'pps':
493 
494  case 'ppt':
495  if ($this->app['ppthtml']) {
497  $cmd = $this->app['ppthtml'] . ' ' . escapeshellarg($absFile);
499  $content = implode(LF, $res);
500  unset($res);
501  $content = $this->pObj->convertHTMLToUtf8($content);
502  $contentArr = $this->pObj->splitHTMLContent($this->removeEndJunk($content));
503  $contentArr['title'] = basename($absFile);
504  $this->setLocaleForServerFileSystem(TRUE);
505  }
506  break;
507  case 'xls':
508  if ($this->app['xlhtml']) {
510  $cmd = $this->app['xlhtml'] . ' -nc -te ' . escapeshellarg($absFile);
512  $content = implode(LF, $res);
513  unset($res);
514  $content = $this->pObj->convertHTMLToUtf8($content);
515  $contentArr = $this->pObj->splitHTMLContent($this->removeEndJunk($content));
516  $contentArr['title'] = basename($absFile);
517  $this->setLocaleForServerFileSystem(TRUE);
518  }
519  break;
520  case 'sxi':
521 
522  case 'sxc':
523 
524  case 'sxw':
525 
526  case 'ods':
527 
528  case 'odp':
529 
530  case 'odt':
531  if ($this->app['unzip']) {
533  // Read content.xml:
534  $cmd = $this->app['unzip'] . ' -p ' . escapeshellarg($absFile) . ' content.xml';
536  $content_xml = implode(LF, $res);
537  unset($res);
538  // Read meta.xml:
539  $cmd = $this->app['unzip'] . ' -p ' . escapeshellarg($absFile) . ' meta.xml';
541  $meta_xml = implode(LF, $res);
542  unset($res);
543  $utf8_content = trim(strip_tags(str_replace('<', ' <', $content_xml)));
544  $contentArr = $this->pObj->splitRegularContent($utf8_content);
545  $contentArr['title'] = basename($absFile);
546  // Make sure the title doesn't expose the absolute path!
547  // Meta information
548  $metaContent = \TYPO3\CMS\Core\Utility\GeneralUtility::xml2tree($meta_xml);
549  $metaContent = $metaContent['office:document-meta'][0]['ch']['office:meta'][0]['ch'];
550  if (is_array($metaContent)) {
551  $contentArr['title'] = $metaContent['dc:title'][0]['values'][0] ? $metaContent['dc:title'][0]['values'][0] : $contentArr['title'];
552  $contentArr['description'] = $metaContent['dc:subject'][0]['values'][0] . ' ' . $metaContent['dc:description'][0]['values'][0];
553  // Keywords collected:
554  if (is_array($metaContent['meta:keywords'][0]['ch']['meta:keyword'])) {
555  foreach ($metaContent['meta:keywords'][0]['ch']['meta:keyword'] as $kwDat) {
556  $contentArr['keywords'] .= $kwDat['values'][0] . ' ';
557  }
558  }
559  }
560  $this->setLocaleForServerFileSystem(TRUE);
561  }
562  break;
563  case 'rtf':
564  if ($this->app['unrtf']) {
566  $cmd = $this->app['unrtf'] . ' ' . escapeshellarg($absFile);
568  $fileContent = implode(LF, $res);
569  unset($res);
570  $fileContent = $this->pObj->convertHTMLToUtf8($fileContent);
571  $contentArr = $this->pObj->splitHTMLContent($fileContent);
572  $this->setLocaleForServerFileSystem(TRUE);
573  }
574  break;
575  case 'txt':
576 
577  case 'csv':
579  // Raw text
581  // TODO: Implement auto detection of charset (currently assuming utf-8)
582  $contentCharset = 'utf-8';
583  $content = $this->pObj->convertHTMLToUtf8($content, $contentCharset);
584  $contentArr = $this->pObj->splitRegularContent($content);
585  $contentArr['title'] = basename($absFile);
586  // Make sure the title doesn't expose the absolute path!
587  $this->setLocaleForServerFileSystem(TRUE);
588  break;
589  case 'html':
590 
591  case 'htm':
592  $fileContent = \TYPO3\CMS\Core\Utility\GeneralUtility::getUrl($absFile);
593  $fileContent = $this->pObj->convertHTMLToUtf8($fileContent);
594  $contentArr = $this->pObj->splitHTMLContent($fileContent);
595  break;
596  case 'xml':
598  // PHP strip-tags()
599  $fileContent = \TYPO3\CMS\Core\Utility\GeneralUtility::getUrl($absFile);
600  // Finding charset:
601  preg_match('/^[[:space:]]*<\\?xml[^>]+encoding[[:space:]]*=[[:space:]]*["\'][[:space:]]*([[:alnum:]_-]+)[[:space:]]*["\']/i', substr($fileContent, 0, 200), $reg);
602  $charset = $reg[1] ? $this->pObj->csObj->parse_charset($reg[1]) : 'utf-8';
603  // Converting content:
604  $fileContent = $this->pObj->convertHTMLToUtf8(strip_tags(str_replace('<', ' <', $fileContent)), $charset);
605  $contentArr = $this->pObj->splitRegularContent($fileContent);
606  $contentArr['title'] = basename($absFile);
607  // Make sure the title doesn't expose the absolute path!
608  $this->setLocaleForServerFileSystem(TRUE);
609  break;
610  case 'jpg':
611 
612  case 'jpeg':
613 
614  case 'tif':
616  // PHP EXIF
617  if (function_exists('exif_read_data')) {
618  $exif = @exif_read_data($absFile, 'IFD0');
619  } else {
620  $exif = FALSE;
621  }
622  if ($exif) {
623  $comment = trim($exif['COMMENT'][0] . ' ' . $exif['ImageDescription']);
624  } else {
625  $comment = '';
626  }
627  $contentArr = $this->pObj->splitRegularContent($comment);
628  $contentArr['title'] = basename($absFile);
629  // Make sure the title doesn't expose the absolute path!
630  $this->setLocaleForServerFileSystem(TRUE);
631  break;
632  default:
633  return FALSE;
634  }
635  // If no title (and why should there be...) then the file-name is set as title. This will raise the hits considerably if the search matches the document name.
636  if (is_array($contentArr) && !$contentArr['title']) {
637  // Substituting "_" for " " because many filenames may have this instead of a space char.
638  $contentArr['title'] = str_replace('_', ' ', basename($absFile));
639  }
640  return $contentArr;
641  }
642 
654  protected function setLocaleForServerFileSystem($resetLocale = FALSE) {
655  static $lastLocale = NULL;
656  if (!$GLOBALS['TYPO3_CONF_VARS']['SYS']['UTF8filesystem']) {
657  return;
658  }
659 
660  if ($resetLocale) {
661  if ($lastLocale == NULL) {
662  throw new \RuntimeException('Cannot reset locale to NULL.', 1357064326);
663  }
664  setlocale(LC_CTYPE, $lastLocale);
665  $lastLocale = NULL;
666  } else {
667  if ($lastLocale !== NULL) {
668  throw new \RuntimeException('Cannot set new locale as locale has already been changed before.', 1357064437);
669  }
670  $lastLocale = setlocale(LC_CTYPE, 0);
671  setlocale(LC_CTYPE, $GLOBALS['TYPO3_CONF_VARS']['SYS']['systemLocale']);
672  }
673  }
674 
686  public function fileContentParts($ext, $absFile) {
687  $cParts = array(0);
688  switch ($ext) {
689  case 'pdf':
691  // Getting pdf-info:
692  $cmd = $this->app['pdfinfo'] . ' ' . escapeshellarg($absFile);
694  $pdfInfo = $this->splitPdfInfo($res);
695  unset($res);
696  if ((int)$pdfInfo['pages']) {
697  $cParts = array();
698  // Calculate mode
699  if ($this->pdf_mode > 0) {
700  $iter = ceil($pdfInfo['pages'] / $this->pdf_mode);
701  } else {
702  $iter = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange(abs($this->pdf_mode), 1, $pdfInfo['pages']);
703  }
704  // Traverse and create intervals.
705  for ($a = 0; $a < $iter; $a++) {
706  $low = floor($a * ($pdfInfo['pages'] / $iter)) + 1;
707  $high = floor(($a + 1) * ($pdfInfo['pages'] / $iter));
708  $cParts[] = $low . '-' . $high;
709  }
710  }
711  $this->setLocaleForServerFileSystem(TRUE);
712  break;
713  default:
714  }
715  return $cParts;
716  }
717 
727  public function splitPdfInfo($pdfInfoArray) {
728  $res = array();
729  if (is_array($pdfInfoArray)) {
730  foreach ($pdfInfoArray as $line) {
731  $parts = explode(':', $line, 2);
732  if (count($parts) > 1 && trim($parts[0])) {
733  $res[strtolower(trim($parts[0]))] = trim($parts[1]);
734  }
735  }
736  }
737  return $res;
738  }
739 
747  public function removeEndJunk($string) {
748  return trim(preg_replace('/[' . LF . chr(12) . ']*$/', '', $string));
749  }
750 
751  /************************
752  *
753  * Backend analyzer
754  *
755  ************************/
763  public function getIcon($extension) {
764  if ($extension == 'htm') {
765  $extension = 'html';
766  }
767  if ($extension == 'jpeg') {
768  $extension = 'jpg';
769  }
770  return 'EXT:indexed_search/pi/res/' . $extension . '.gif';
771  }
772 
773 }
static xml2tree($string, $depth=999)
static forceIntegerInRange($theInt, $min, $max=2000000000, $defaultValue=0)
Definition: MathUtility.php:32
const TYPO3_MODE
Definition: init.php:40
static trimExplode($delim, $string, $removeEmptyValues=FALSE, $limit=0)
sL($reference, $useHtmlSpecialChar=FALSE)
static getUrl($url, $includeHeader=0, $requestHeaders=FALSE, &$report=NULL)
static tempnam($filePrefix, $fileSuffix='')
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]
static exec($command, &$output=NULL, &$returnValue=0)