Example #1
0
 /**
  * Деактивирует плагин.
  * @return boolean
  */
 public function deactivatePlugin()
 {
     $this->messageSucces = $this->lang['ACT_NOT_ACTIVE_PLUG'] . ' "' . $_POST['pluginTitle'] . '"';
     $pluginFolder = $_POST['pluginFolder'];
     $res = DB::query("\n      SELECT *\n      FROM  `" . PREFIX . "plugins`\n      WHERE folderName = '%s'\n      ", $pluginFolder);
     if (DB::numRows($res)) {
         DB::query("\n        UPDATE `" . PREFIX . "plugins`\n        SET active = '0'\n        WHERE `folderName` = '%s'\n      ", $pluginFolder);
         MG::createDeactivationHook($pluginFolder);
         return true;
     }
     return false;
 }