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


PHP VersionCheck::checkIfNewVersionExists方法代码示例

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


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

示例1: index

 /**
  * Display conference management index page.
  */
 function index($args, &$request)
 {
     // Manager requests should come to the Conference context, not Sched Conf
     if ($request->getRequestedSchedConfPath() != 'index') {
         $request->redirect(null, 'index', 'manager');
     }
     $this->validate();
     $this->setupTemplate($request);
     $conference =& $request->getConference();
     $templateMgr =& TemplateManager::getManager($request);
     // Display a warning message if there is a new version of OJS available
     $newVersionAvailable = false;
     if (Config::getVar('general', 'show_upgrade_warning')) {
         import('lib.pkp.classes.site.VersionCheck');
         if ($latestVersion = VersionCheck::checkIfNewVersionExists()) {
             $newVersionAvailable = true;
             $templateMgr->assign('latestVersion', $latestVersion);
             $currentVersion =& VersionCheck::getCurrentDBVersion();
             $templateMgr->assign('currentVersion', $currentVersion->getVersionString());
             // Get contact information for site administrator
             $roleDao = DAORegistry::getDAO('RoleDAO');
             $siteAdmins =& $roleDao->getUsersByRoleId(ROLE_ID_SITE_ADMIN);
             $templateMgr->assign_by_ref('siteAdmin', $siteAdmins->next());
         }
     }
     $templateMgr->assign('newVersionAvailable', $newVersionAvailable);
     $schedConfDao = DAORegistry::getDAO('SchedConfDAO');
     $schedConfs = $schedConfDao->getAll(false, $conference->getId());
     $templateMgr->assign_by_ref('schedConfs', $schedConfs);
     $templateMgr->assign('announcementsEnabled', $conference->getSetting('enableAnnouncements'));
     $templateMgr->assign('helpTopicId', 'conference.index');
     $templateMgr->display(ROLE_PATH_MANAGER . '/index.tpl');
 }
开发者ID:artkuo,项目名称:ocs,代码行数:36,代码来源:ManagerHandler.inc.php

示例2: index

 /**
  * Display journal management index page.
  */
 function index($args, $request)
 {
     $this->setupTemplate($request);
     $journal = $request->getJournal();
     $templateMgr = TemplateManager::getManager($request);
     // Display a warning message if there is a new version of OJS available
     $newVersionAvailable = false;
     if (Config::getVar('general', 'show_upgrade_warning')) {
         import('lib.pkp.classes.site.VersionCheck');
         if ($latestVersion = VersionCheck::checkIfNewVersionExists()) {
             $newVersionAvailable = true;
             $templateMgr->assign('latestVersion', $latestVersion);
             $currentVersion = VersionCheck::getCurrentDBVersion();
             $templateMgr->assign('currentVersion', $currentVersion->getVersionString());
             // Get contact information for site administrator
             $roleDao = DAORegistry::getDAO('RoleDAO');
             $siteAdmins = $roleDao->getUsersByRoleId(ROLE_ID_SITE_ADMIN);
             $templateMgr->assign('siteAdmin', $siteAdmins->next());
         }
     }
     $templateMgr->assign('newVersionAvailable', $newVersionAvailable);
     $templateMgr->assign('publishingMode', $journal->getSetting('publishingMode'));
     $templateMgr->assign('announcementsEnabled', $journal->getSetting('enableAnnouncements'));
     $session = $request->getSession();
     $session->unsetSessionVar('enrolmentReferrer');
     $templateMgr->display('manager/index.tpl');
 }
开发者ID:utlib,项目名称:ojs,代码行数:30,代码来源:ManagerHandler.inc.php

示例3: index

 /**
  * Display site admin index page.
  */
 function index($args, &$request)
 {
     $this->validate();
     $this->setupTemplate($request);
     $templateMgr =& TemplateManager::getManager();
     // Display a warning message if there is a new version of OJS available
     $newVersionAvailable = false;
     if (Config::getVar('general', 'show_upgrade_warning')) {
         import('lib.pkp.classes.site.VersionCheck');
         if ($latestVersion = VersionCheck::checkIfNewVersionExists()) {
             $newVersionAvailable = true;
             $templateMgr->assign('latestVersion', $latestVersion);
             $currentVersion =& VersionCheck::getCurrentDBVersion();
             $templateMgr->assign('currentVersion', $currentVersion->getVersionString());
         }
     }
     $templateMgr->assign('newVersionAvailable', $newVersionAvailable);
     $templateMgr->display('admin/index.tpl');
 }
开发者ID:Rygbee,项目名称:harvester,代码行数:22,代码来源:AdminHandler.inc.php

示例4: journal

 /**
  * Display The Journal page.
  * @param $args array
  * @param $request PKPRequest
  */
 function journal($args, $request)
 {
     $templateMgr = TemplateManager::getManager($request);
     $this->setupTemplate($request);
     // Display a warning message if there is a new version of OJS available
     if (Config::getVar('general', 'show_upgrade_warning')) {
         import('lib.pkp.classes.site.VersionCheck');
         if ($latestVersion = VersionCheck::checkIfNewVersionExists()) {
             $templateMgr->assign('newVersionAvailable', true);
             $templateMgr->assign('latestVersion', $latestVersion);
             $currentVersion = VersionCheck::getCurrentDBVersion();
             $templateMgr->assign('currentVersion', $currentVersion->getVersionString());
             // Get contact information for site administrator
             $roleDao = DAORegistry::getDAO('RoleDAO');
             $siteAdmins = $roleDao->getUsersByRoleId(ROLE_ID_SITE_ADMIN);
             $templateMgr->assign('siteAdmin', $siteAdmins->next());
         }
     }
     $templateMgr->display('management/settings/journal.tpl');
 }
开发者ID:bkroll,项目名称:ojs,代码行数:25,代码来源:SettingsHandler.inc.php


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