Exemplo n.º 1
0
 /**
  * Deactivates a package.
  *
  * @return bool TRUE on success, FALSE on error
  */
 public function deactivate()
 {
     $state = $this->checkDependencies();
     if ($state === true) {
         $this->package->setProperty('status', false);
         $this->saveConfig();
     }
     if ($state === true) {
         // reload autoload cache when addon is deactivated,
         // so the index doesn't contain outdated class definitions
         rex_autoload::removeCache();
         if ($this->generatePackageOrder) {
             self::generatePackageOrder();
         }
         $this->message = $this->i18n('deactivated', $this->package->getName());
         return true;
     }
     $this->message = $this->i18n('no_deactivation', $this->package->getName()) . '<br />' . $this->message;
     return false;
 }