本文整理匯總了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');
}
示例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');
}
示例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');
}
示例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');
}