Exemple #1
0
 public function view()
 {
     $this->set('latest_version', \Concrete\Core\Updater\Update::getLatestAvailableVersionNumber());
     $tp = new \TaskPermission();
     $updates = 0;
     $local = array();
     $remote = array();
     if ($tp->canInstallPackages()) {
         $local = Package::getLocalUpgradeablePackages();
         $remote = Package::getRemotelyUpgradeablePackages();
     }
     // now we strip out any dupes for the total
     $updates = 0;
     $localHandles = array();
     foreach ($local as $_pkg) {
         $updates++;
         $localHandles[] = $_pkg->getPackageHandle();
     }
     foreach ($remote as $_pkg) {
         if (!in_array($_pkg->getPackageHandle(), $localHandles)) {
             $updates++;
         }
     }
     $this->set('updates', $updates);
 }
 public function view()
 {
     $this->set('latest_version', Update::getLatestAvailableVersionNumber());
     $local = [];
     $remote = [];
     $p = new Permissions();
     if ($p->canInstallPackages()) {
         $local = Package::getLocalUpgradeablePackages();
         $remote = Package::getRemotelyUpgradeablePackages();
     }
     // now we strip out any dupes for the total
     $updates = 0;
     $localHandles = [];
     foreach ($local as $_pkg) {
         ++$updates;
         $localHandles[] = $_pkg->getPackageHandle();
     }
     foreach ($remote as $_pkg) {
         if (!in_array($_pkg->getPackageHandle(), $localHandles)) {
             ++$updates;
         }
     }
     $this->set('updates', $updates);
 }
 public function check_for_updates()
 {
     Config::clear('concrete.misc.latest_version');
     \Concrete\Core\Updater\Update::getLatestAvailableVersionNumber();
     $this->redirect('/dashboard/system/backup/update');
 }
 public function check_for_updates()
 {
     Config::clear('APP_VERSION_LATEST', false);
     \Concrete\Core\Updater\Update::getLatestAvailableVersionNumber();
     $this->redirect('/dashboard/system/backup/update');
 }