本文整理汇总了PHP中Updater::getUpdates方法的典型用法代码示例。如果您正苦于以下问题:PHP Updater::getUpdates方法的具体用法?PHP Updater::getUpdates怎么用?PHP Updater::getUpdates使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Updater
的用法示例。
在下文中一共展示了Updater::getUpdates方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: sConfig
//sApp()
$this->yeager_version = $versionp;
//$this->yeager_revision = YEAGER_REVISION;
//$this->yeager_date = YEAGER_DATE;
$databaseInfo = sConfig()->getVars('CONFIG/DB');
$databaseHost = $databaseInfo[0]['host'];
$databaseHost = explode(':', $databaseHost);
if (count($databaseHost) > 1) {
$databasePort = $databaseHost[1];
$databaseHost = $databaseHost[0];
} else {
$databasePort = '3306';
$databaseHost = $databaseHost[0];
}
$_SESSION['APPINFO'] = array('VERSION' => $this->yeager_version, 'REVISION' => $this->yeager_revision, 'DATABASE_SERVER' => $databaseHost, 'DATABASE_PORT' => $databasePort, 'DATABASE_USER' => $databaseInfo[0]['user'], 'DATABASE_PASSWORD' => $databaseInfo[0]['password'], 'DATABASE_NAME' => $databaseInfo[0]['db'], 'PATH_BASE' => dirname($_SERVER['SCRIPT_FILENAME']) . '/');
$updateMgr = new Updater();
$updates = $updateMgr->getUpdates();
$currVersion = $updateMgr->current_version_string;
$currRevision = $this->yeager_revision;
//$currDate = explode('-', substr(YEAGER_DATE, 6, 11));
//$currDate = gmmktime(0, 0, 0, $currDate[1], $currDate[2], $currDate[0]);
$currDate = '';
}
$winID = $this->request->parameters['win_no'];
$smarty->assign("adminAllowed", $adminAllowed);
$smarty->assign("win_no", $winID);
$smarty->assign("updates", $updates);
$smarty->assign("current_version", $currVersion);
$smarty->assign("current_revision", $currRevision);
$smarty->assign("current_date", $currDate);
$smarty->display('file:' . $this->page_template);
示例2: JSQueue
<?php
$jsQueue = new JSQueue(NULL);
switch ($action) {
case 'checkUpdates':
$winID = $this->params['winID'];
$updateMgr = new Updater();
$currentUpdates = $updateMgr->getUpdates();
if (count($currentUpdates)) {
$newVersionNo = $currentUpdates[0]['VERSION'];
$newVersionDate = date($itext['DATE_FORMAT'], $currentUpdates[0]['DATE']);
$newVersionText = $itext['TXT_NEW_UPDATE_AVAILABLE'];
$koala->queueScript('Koala.yg_updaterNewVersion(\'' . $winID . '\', \'' . $newVersionNo . '\', \'' . $newVersionDate . '\', \'' . $newVersionText . '\');');
}
break;
case 'updateInstalled':
$updatePath = $this->approot . sConfig()->getVar('CONFIG/DIRECTORIES/UPDATES');
$revision = $this->params['revision'];
$matchingUpdates = glob($updatePath . 'yeager_*_r' . $revision . '.php');
if (count($matchingUpdates) > 0) {
foreach ($matchingUpdates as $matchingUpdate) {
@unlink($matchingUpdate);
}
}
break;
case 'installUpdate':
$installRevision = $this->params['installRevision'];
$sigStart = "-----BEGIN YEAGER SIGNATURE-----\n";
$sigEnd = "-----END YEAGER SIGNATURE-----";
// Download, verify and trigger update installation
$updatesDirectory = $this->approot . sConfig()->getVar('CONFIG/DIRECTORIES/UPDATES');