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


PHP Updater::getUpdates方法代码示例

本文整理汇总了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);
开发者ID:nrueckmann,项目名称:yeager,代码行数:31,代码来源:updates.php

示例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');
开发者ID:nrueckmann,项目名称:yeager,代码行数:31,代码来源:updater.php


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