Example #1
0
 private function _oneExtension($wid = 0)
 {
     $folder = WExtension::get($wid, 'folder');
     $component = 'com_' . $folder;
     $joomlaExtensionsM = WModel::get('joomla.extensions');
     $joomlaExtensionsM->whereE('type', 'component');
     $joomlaExtensionsM->whereE('element', $component);
     $id = $joomlaExtensionsM->load('lr', 'extension_id');
     $joomlaExtensionsM = WModel::get('joomla.extensions');
     $joomlaExtensionsM->whereE('extension_id', $id);
     $joomlaExtensionsM->delete();
     $joomlaMenuM = WModel::get('joomla.menu');
     $joomlaMenuM->whereE('component_id', $id);
     $joomlaMenuM->delete();
     $assetsT = WTable::get('assets');
     $assetsT->whereE('name', $component);
     $assetsT->delete();
     $folderS = WGet::folder();
     $folderS->delete(JOOBI_DS_ADMIN . $component);
     $folderS->delete(JOOBI_DS_ROOT . 'components' . DS . $component);
 }
Example #2
0
 /**
  * update the version and time in extensions_node table , this decides the licensing
  */
 private function _updateVersionAndTime($appID = 0)
 {
     try {
         $this->_joobiInfoLog("_updateVersionAndTime()");
         if (!isset($appID)) {
             throw new Exception('Could not retirive wid also known as the application id for ' . $this->appName . ' application installation');
         }
         $this->_joobiInfoLog("appID : " . $appID);
         //$this->_joobiInfoLog("_appVersion : ".$this->_appVersion);
         $appsM = WModel::get('apps');
         $appsM->setVal('publish', 1);
         //	$appsM->setVal( 'version', $this->_appVersion );
         //	$appsM->setVal( 'lversion', $this->_appVersion );
         $appsM->setVal('modified', time());
         $appsM->setVal('created', time());
         $appsM->whereE('wid', $appID);
         $appsM->update();
     } catch (Exception $e) {
         throw new Exception("Problem while updating version and time");
     }
 }