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


PHP VersionCheck::getCurrentCodeVersion方法代码示例

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


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

示例1: getPatch

 /**
  * Find the applicable patch for the current code version (if available).
  * @param $versionInfo array as returned by parseVersionXML()
  * @param $codeVersion as returned by getCurrentCodeVersion()
  * @return string
  */
 function getPatch(&$versionInfo, $codeVersion = null)
 {
     if (!isset($codeVersion)) {
         $codeVersion =& VersionCheck::getCurrentCodeVersion();
     }
     if (isset($versionInfo['patch'][$codeVersion->getVersionString()])) {
         return $versionInfo['patch'][$codeVersion->getVersionString()];
     }
     return null;
 }
开发者ID:alenoosh,项目名称:ojs,代码行数:16,代码来源:VersionCheck.inc.php

示例2: display

 /**
  * Display the form.
  */
 function display()
 {
     $templateMgr =& TemplateManager::getManager();
     $templateMgr->assign('localeOptions', $this->supportedLocales);
     $templateMgr->assign('clientCharsetOptions', $this->supportedClientCharsets);
     $templateMgr->assign('connectionCharsetOptions', $this->supportedConnectionCharsets);
     $templateMgr->assign('databaseCharsetOptions', $this->supportedDatabaseCharsets);
     $templateMgr->assign('encryptionOptions', $this->supportedEncryptionAlgorithms);
     $templateMgr->assign('databaseDriverOptions', $this->checkDBDrivers());
     $templateMgr->assign('supportsMBString', String::hasMBString() ? Locale::translate('common.yes') : Locale::translate('common.no'));
     $templateMgr->assign('phpIsSupportedVersion', version_compare(PHP_REQUIRED_VERSION, PHP_VERSION) != 1);
     $templateMgr->assign('phpRequiredVersion', PHP_REQUIRED_VERSION);
     $templateMgr->assign('phpVersion', PHP_VERSION);
     $templateMgr->assign('version', VersionCheck::getCurrentCodeVersion());
     parent::display();
 }
开发者ID:alenoosh,项目名称:ojs,代码行数:19,代码来源:InstallForm.inc.php

示例3: display

 /**
  * Display the form.
  */
 function display()
 {
     $templateMgr =& TemplateManager::getManager();
     $templateMgr->assign_by_ref('version', VersionCheck::getCurrentCodeVersion());
     parent::display();
 }
开发者ID:LiteratimBi,项目名称:jupitertfn,代码行数:9,代码来源:UpgradeForm.inc.php

示例4: checkVersion

 /**
  * Perform version check.
  * @param $versionInfo array latest version info
  * @param $displayInfo boolean just display info, don't perform check
  */
 function checkVersion($versionInfo, $displayInfo = false)
 {
     if (!$versionInfo) {
         $application =& PKPApplication::getApplication();
         printf("Failed to load version info from %s\n", $application->getVersionDescriptorUrl());
         exit(1);
     }
     $dbVersion = VersionCheck::getCurrentDBVersion();
     $codeVersion = VersionCheck::getCurrentCodeVersion();
     $latestVersion = $versionInfo['version'];
     printf("Code version:      %s\n", $codeVersion->getVersionString());
     printf("Database version:  %s\n", $dbVersion->getVersionString());
     printf("Latest version:    %s\n", $latestVersion->getVersionString());
     $compare1 = $codeVersion->compare($latestVersion);
     $compare2 = $dbVersion->compare($codeVersion);
     if (!$displayInfo) {
         if ($compare2 < 0) {
             printf("Database version is older than code version\n");
             printf("Run \"{$this->scriptName} upgrade\" to update\n");
             exit(0);
         } else {
             if ($compare2 > 0) {
                 printf("Database version is newer than code version!\n");
                 exit(1);
             } else {
                 if ($compare1 == 0) {
                     printf("Your system is up-to-date\n");
                 } else {
                     if ($compare1 < 0) {
                         printf("A newer version is available:\n");
                         $displayInfo = true;
                     } else {
                         printf("Current version is newer than latest!\n");
                         exit(1);
                     }
                 }
             }
         }
     }
     if ($displayInfo) {
         $patch = VersionCheck::getPatch($versionInfo, $codeVersion);
         printf("         tag:     %s\n", $versionInfo['tag']);
         printf("         date:    %s\n", $versionInfo['date']);
         printf("         info:    %s\n", $versionInfo['info']);
         printf("         package: %s\n", $versionInfo['package']);
         printf("         patch:   %s\n", isset($patch) ? $patch : 'N/A');
     }
     return $compare1;
 }
开发者ID:ingmarschuster,项目名称:MindResearchRepository,代码行数:54,代码来源:UpgradeTool.inc.php

示例5: display

 /**
  * Display the form.
  */
 function display()
 {
     $templateMgr = TemplateManager::getManager($this->_request);
     $templateMgr->assign('version', VersionCheck::getCurrentCodeVersion());
     parent::display($this->_request);
 }
开发者ID:jprk,项目名称:pkp-lib,代码行数:9,代码来源:MaintenanceForm.inc.php

示例6: display

 /**
  * Display the form.
  */
 function display()
 {
     $templateMgr =& TemplateManager::getManager();
     $templateMgr->assign('localeOptions', $this->supportedLocales);
     $templateMgr->assign('localesComplete', $this->localesComplete);
     $templateMgr->assign('clientCharsetOptions', $this->supportedClientCharsets);
     $templateMgr->assign('connectionCharsetOptions', $this->supportedConnectionCharsets);
     $templateMgr->assign('databaseCharsetOptions', $this->supportedDatabaseCharsets);
     $templateMgr->assign('encryptionOptions', $this->supportedEncryptionAlgorithms);
     $templateMgr->assign('allowFileUploads', get_cfg_var('file_uploads') ? __('common.yes') : __('common.no'));
     $templateMgr->assign('maxFileUploadSize', get_cfg_var('upload_max_filesize'));
     $templateMgr->assign('databaseDriverOptions', $this->checkDBDrivers());
     $templateMgr->assign('supportsMBString', String::hasMBString() ? __('common.yes') : __('common.no'));
     $templateMgr->assign('phpIsSupportedVersion', version_compare(PHP_REQUIRED_VERSION, PHP_VERSION) != 1);
     $templateMgr->assign('phpRequiredVersion', PHP_REQUIRED_VERSION);
     $templateMgr->assign('phpVersion', PHP_VERSION);
     $templateMgr->assign('version', VersionCheck::getCurrentCodeVersion());
     $templateMgr->assign('passwordLength', INSTALLER_DEFAULT_MIN_PASSWORD_LENGTH);
     parent::display();
 }
开发者ID:EreminDm,项目名称:water-cao,代码行数:23,代码来源:InstallForm.inc.php

示例7: display

 /**
  * Display the form.
  */
 function display()
 {
     $templateMgr = TemplateManager::getManager($this->_request);
     $templateMgr->assign('localeOptions', $this->supportedLocales);
     $templateMgr->assign('localesComplete', $this->localesComplete);
     $templateMgr->assign('clientCharsetOptions', $this->supportedClientCharsets);
     $templateMgr->assign('connectionCharsetOptions', $this->supportedConnectionCharsets);
     $templateMgr->assign('databaseCharsetOptions', $this->supportedDatabaseCharsets);
     $templateMgr->assign('encryptionOptions', $this->supportedEncryptionAlgorithms);
     $templateMgr->assign('allowFileUploads', get_cfg_var('file_uploads') ? __('common.yes') : __('common.no'));
     $templateMgr->assign('maxFileUploadSize', get_cfg_var('upload_max_filesize'));
     $templateMgr->assign('databaseDriverOptions', $this->checkDBDrivers());
     $templateMgr->assign('supportsMBString', String::hasMBString() ? __('common.yes') : __('common.no'));
     $templateMgr->assign('phpIsSupportedVersion', version_compare(PHP_REQUIRED_VERSION, PHP_VERSION) != 1);
     $templateMgr->assign('xslEnabled', Core::checkGeneralPHPModule('xsl'));
     $templateMgr->assign('xslRequired', false);
     $templateMgr->assign('phpRequiredVersion', PHP_REQUIRED_VERSION);
     $templateMgr->assign('phpVersion', PHP_VERSION);
     $templateMgr->assign('version', VersionCheck::getCurrentCodeVersion());
     parent::display();
 }
开发者ID:utlib,项目名称:ojs,代码行数:24,代码来源:InstallForm.inc.php

示例8: display

 /**
  * @copydoc Form::display
  */
 function display($request = null, $template = null)
 {
     $templateMgr = TemplateManager::getManager($request);
     $templateMgr->assign('version', VersionCheck::getCurrentCodeVersion());
     parent::display($request, $template);
 }
开发者ID:pkp,项目名称:pkp-lib,代码行数:9,代码来源:MaintenanceForm.inc.php


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