public function processWindow($window, $id, $ctrl, $param1, $param2)
 {
     global $neardConfig, $neardWinbinder;
     switch ($id) {
         case $this->wbLinkPatch[WinBinder::CTRL_ID]:
             $neardWinbinder->exec($neardConfig->getBrowser(), Util::getPatchUrl($this->currentVersion, $this->latestVersion));
             break;
         case $this->wbLinkFull[WinBinder::CTRL_ID]:
             $neardWinbinder->exec($neardConfig->getBrowser(), Util::getVersionUrl($this->latestVersion));
             break;
         case IDCLOSE:
         case $this->wbBtnOk[WinBinder::CTRL_ID]:
             $neardWinbinder->destroyWindow($window);
             break;
     }
 }
Ejemplo n.º 2
0
<?php

$neardCurrentVersion = $neardCore->getAppVersion();
$neardLatestVersion = Util::getLatestVersion();
if ($neardLatestVersion != null && version_compare($neardCurrentVersion, $neardLatestVersion, '<')) {
    $fullVersionUrl = Util::getVersionUrl($neardLatestVersion);
    $patchVersionUrl = Util::getPatchUrl($neardCurrentVersion, $neardLatestVersion);
    ?>

<div class="alert alert-dismissable alert-success">
    <button data-dismiss="alert" class="close" type="button">×</button>
    <h4><?php 
    echo $neardLang->getValue(Lang::CHECK_VERSION_AVAILABLE_TEXT);
    ?>
</h4>
    <p>
      <a role="button" class="btn btn-success" href="<?php 
    echo $patchVersionUrl;
    ?>
" target="_blank"><i class="fa fa-download"></i> <?php 
    echo $neardLang->getValue(Lang::DOWNLOAD);
    ?>
 <strong>Neard <?php 
    echo $neardCurrentVersion;
    ?>
-<?php 
    echo $neardLatestVersion;
    ?>
 Patch</strong><br /><small>neard-<?php 
    echo $neardCurrentVersion;
    ?>