本文整理匯總了PHP中XenForo_Error::setIgnorePendingUpgrade方法的典型用法代碼示例。如果您正苦於以下問題:PHP XenForo_Error::setIgnorePendingUpgrade方法的具體用法?PHP XenForo_Error::setIgnorePendingUpgrade怎麽用?PHP XenForo_Error::setIgnorePendingUpgrade使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類XenForo_Error
的用法示例。
在下文中一共展示了XenForo_Error::setIgnorePendingUpgrade方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: die
<?php
// CLI only
if (PHP_SAPI != 'cli') {
die('This script may only be run at the command line.');
}
$fileDir = realpath(dirname(__FILE__) . '/../../../');
chdir($fileDir);
require_once $fileDir . '/library/XenForo/Autoloader.php';
XenForo_Autoloader::getInstance()->setupAutoloader($fileDir . '/library');
XenForo_Application::initialize($fileDir . '/library', $fileDir);
XenForo_Error::setIgnorePendingUpgrade(true);
XenForo_Phrase::setPhrases(require $fileDir . '/install/language_en.php');
XenForo_Template_Install::setFilePath($fileDir . '/install/templates');
XenForo_Application::get('db')->setProfiler(false);
// this causes lots of memory usage in debug mode, so stop that
$dependencies = new XenForo_Dependencies_Install();
$dependencies->preLoadData();
/** @var $upgradeModel XenForo_Install_Model_Upgrade */
$upgradeModel = XenForo_Model::create('XenForo_Install_Model_Upgrade');
/** @var $installModel XenForo_Install_Model_Install */
$installModel = XenForo_Model::create('XenForo_Install_Model_Install');
$cliHelper = new XenForo_Install_CliHelper();
if ($upgradeModel->getNewestUpgradeVersionId() > XenForo_Application::$versionId) {
$cliHelper->triggerFatalError('An upgrade was found for a version of XenForo that is newer than the uploaded files. Please reupload all of the files for the new version and reload this page.');
}
if ($upgradeModel->getLatestUpgradeVersionId() === XenForo_Application::$versionId && XenForo_Application::get('options')->currentVersionId >= XenForo_Application::$versionId) {
//$cliHelper->triggerFatalError('You are already running the latest version.');
}
if (class_exists('XenForo_Install_Data_FileSums')) {
$hashes = XenForo_Install_Data_FileSums::getHashes();
示例2: preLoadData
/**
* Pre-loads globally required data for the system.
*/
public function preLoadData()
{
XenForo_Application::$javaScriptUrl = 'js';
XenForo_Error::setIgnorePendingUpgrade(true);
}