本文整理汇总了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);
}