當前位置: 首頁>>代碼示例>>PHP>>正文


PHP XenForo_Error::setIgnorePendingUpgrade方法代碼示例

本文整理匯總了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();
開發者ID:namgiangle90,項目名稱:tokyobaito,代碼行數:31,代碼來源:run-upgrade.php

示例2: preLoadData

 /**
  * Pre-loads globally required data for the system.
  */
 public function preLoadData()
 {
     XenForo_Application::$javaScriptUrl = 'js';
     XenForo_Error::setIgnorePendingUpgrade(true);
 }
開發者ID:Sywooch,項目名稱:forums,代碼行數:8,代碼來源:Install.php


注:本文中的XenForo_Error::setIgnorePendingUpgrade方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。