} if (!isset($lastInstallTime) || empty($lastInstallTime)) { if (is_file("{$base_path}install/index.php")) { header('Location: install/index.php?action=mode'); } else { echo 'Not installed.'; } exit; } } set_parser_mode(); if (session_id() === '') { startCMSSession(); } require_once "{$core_path}protect.inc.php"; // initiate a new document parser include_once "{$core_path}document.parser.class.inc.php"; $modx = new DocumentParser(); $etomite =& $modx; // for backward compatibility $modx->tstart = $tstart; $modx->mstart = $mstart; $modx->cacheRefreshTime = $cacheRefreshTime; if (isset($error_reporting)) { $modx->error_reporting = $error_reporting; } // execute the parser if index.php was not included if (!MODX_API_MODE) { $result = $modx->executeParser(); echo $result; }
exit; } } // start session startCMSSession(); // initiate a new document parser include_once MODX_MANAGER_PATH . 'includes/document.parser.class.inc.php'; $modx = new DocumentParser(); $etomite =& $modx; // for backward compatibility // set some parser options $modx->minParserPasses = 1; // min number of parser recursive loops or passes $modx->maxParserPasses = 10; // max number of parser recursive loops or passes $modx->dumpSQL = false; $modx->dumpSnippets = false; // feed the parser the execution start time $modx->dumpPlugins = false; $modx->tstart = $tstart; $modx->mstart = $mstart; // Debugging mode: $modx->stopOnNotice = false; // Don't show PHP errors to the public if (!isset($_SESSION['mgrValidated']) || !$_SESSION['mgrValidated']) { @ini_set("display_errors", "0"); } // execute the parser if index.php was not included if (!MODX_API_MODE) { $modx->executeParser(); }