d26c19f2a8369e8b8390e22b1826dba06249b2e7
[Packages/TYPO3.CMS.git] / typo3 / sysext / lowlevel / dbint / cli / refindex_cli.php
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::class);
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 }