TYPO3 CMS  TYPO3_6-2
refindex_cli.php
Go to the documentation of this file.
1 <?php
2 if (!defined('TYPO3_cliMode')) {
3  die('You cannot run this script directly!');
4 }
5 // Call the functionality
6 if (in_array('-e', $_SERVER['argv']) || in_array('-c', $_SERVER['argv'])) {
7  $testOnly = in_array('-c', $_SERVER['argv']);
8  $refIndexObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\ReferenceIndex');
9  list($headerContent, $bodyContent) = $refIndexObj->updateIndex($testOnly, !in_array('-s', $_SERVER['argv']));
10 } else {
11  echo '
12 Options:
13 -c = Check refindex
14 -e = Update refindex
15 -s = Silent
16 ';
17  die;
18 }
die