Example #1
0
 static function update()
 {
     if (null == ($manifest = self::_readPluginManifest('libs/devblocks', false))) {
         return FALSE;
     }
     if (!isset($manifest->manifest_cache['patches'])) {
         return TRUE;
     }
     foreach ($manifest->manifest_cache['patches'] as $mft_patch) {
         $path = APP_PATH . '/' . $manifest->dir . '/' . $mft_patch['file'];
         if (!file_exists($path)) {
             return FALSE;
         }
         $patch = new DevblocksPatch($manifest->id, $mft_patch['version'], $mft_patch['revision'], $path);
         if (!$patch->run()) {
             return FALSE;
         }
     }
     return TRUE;
 }
Example #2
0
 public function registerPatch(DevblocksPatch $patch)
 {
     // index by revision
     $rev = $patch->getRevision();
     $this->patches[$rev] = $patch;
     ksort($this->patches);
 }