Exemple #1
0
 static function clearCache()
 {
     self::$_instance->clearCache();
 }
 public function uninstallJsonAction()
 {
     $json = new stdClass();
     $json->success = 1;
     $json->msg = array();
     $ids = $this->_getParam('ids', array());
     $manager = new RM_Plugin_Manager($this->_translate);
     $dao = new RM_Plugins();
     foreach ($ids as $id) {
         $row = $dao->find($id)->current();
         try {
             $json->success = $json->success && $manager->uninstall($row);
             RM_Loader::clearCache();
         } catch (Exception $e) {
             $json->success = 0;
             $json->msg[] = $e->getMessage();
         }
     }
     return array('data' => $json);
 }