Exemple #1
0
 /** 
  * Looks in the designated updates location for all directories, ascertains what
  * version they represent, and finds all versions greater than the currently installed version of
  * concrete5
  */
 public function getLocalAvailableUpdates()
 {
     $fh = Loader::helper('file');
     $updates = array();
     $contents = @$fh->getDirectoryContents(DIR_APP_UPDATES);
     foreach ($contents as $con) {
         if (is_dir(DIR_APP_UPDATES . '/' . $con)) {
             $obj = ApplicationUpdate::get($con);
             if (is_object($obj)) {
                 if (version_compare($obj->getUpdateVersion(), APP_VERSION, '>')) {
                     $updates[] = $obj;
                 }
             }
         }
     }
     return $updates;
 }