当前位置: 首页>>代码示例>>PHP>>正文


PHP CRM_Upgrade_Form::checkCurrentVersion方法代码示例

本文整理汇总了PHP中CRM_Upgrade_Form::checkCurrentVersion方法的典型用法代码示例。如果您正苦于以下问题:PHP CRM_Upgrade_Form::checkCurrentVersion方法的具体用法?PHP CRM_Upgrade_Form::checkCurrentVersion怎么用?PHP CRM_Upgrade_Form::checkCurrentVersion使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CRM_Upgrade_Form的用法示例。


在下文中一共展示了CRM_Upgrade_Form::checkCurrentVersion方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: runFinish

 /**
  * Display any final messages, clear caches, etc
  */
 public function runFinish()
 {
     $upgrade = new CRM_Upgrade_Form();
     $template = CRM_Core_Smarty::singleton();
     // If we're redirected from queue-runner, then isUpgradePending=true.
     // If user then reloads the finish page, the isUpgradePending will be unset. (Because the session has been cleared.)
     if ($this->get('isUpgradePending')) {
         // TODO: Use structured message store
         $postUpgradeMessage = file_get_contents($this->get('postUpgradeMessageFile'));
         // This destroys $session, so do it after get('postUpgradeMessageFile')
         CRM_Upgrade_Form::doFinish();
     } else {
         $postUpgradeMessage = '';
         // Session was destroyed! Can't recover messages.
     }
     // do a version check - after doFinish() sets the final version
     list($currentVer, $latestVer) = $upgrade->getUpgradeVersions();
     if ($error = $upgrade->checkCurrentVersion($currentVer, $latestVer)) {
         CRM_Core_Error::fatal($error);
     }
     $template->assign('message', $postUpgradeMessage);
     $template->assign('upgraded', TRUE);
     $template->assign('sid', CRM_Utils_System::getSiteID());
     // Render page header
     if (!defined('CIVICRM_UF_HEAD') && ($region = CRM_Core_Region::instance('html-header', FALSE))) {
         CRM_Utils_System::addHTMLHead($region->render(''));
     }
     $content = $template->fetch('CRM/common/success.tpl');
     echo CRM_Utils_System::theme($content, $this->_print, TRUE);
 }
开发者ID:rameshrr99,项目名称:civicrm-core,代码行数:33,代码来源:Upgrade.php

示例2: runFinish

 /**
  * Display any final messages, clear caches, etc
  */
 function runFinish()
 {
     $upgrade = new CRM_Upgrade_Form();
     $template = CRM_Core_Smarty::singleton();
     // TODO: Use structured message store
     $postUpgradeMessage = file_get_contents($this->get('postUpgradeMessageFile'));
     // This destroys $session, so do it after ge('postUpgradeMessageFile')
     CRM_Upgrade_Form::doFinish();
     // do a version check - after doFinish() sets the final version
     list($currentVer, $latestVer) = $upgrade->getUpgradeVersions();
     if ($error = $upgrade->checkCurrentVersion($currentVer, $latestVer)) {
         CRM_Core_Error::fatal($error);
     }
     $template->assign('message', $postUpgradeMessage);
     $template->assign('upgraded', TRUE);
     $content = $template->fetch('CRM/common/success.tpl');
     echo CRM_Utils_System::theme('page', $content, TRUE, $this->_print, FALSE, TRUE);
 }
开发者ID:peteainsworth,项目名称:civicrm-4.2.9-drupal,代码行数:21,代码来源:Upgrade.php


注:本文中的CRM_Upgrade_Form::checkCurrentVersion方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。