public function updatePlugin() { $this->messageSucces = $this->lang['ACT_PLUGIN_UPD']; $this->messageError = $this->lang['ACT_PLUGIN_UPD_ERR']; if (!MG::libExists()) { $update = true; $pluginName = $_POST['pluginName']; $data = PM::getPluginDir($pluginName); $update = PM::updatePlugin($pluginName, $data['dir'], $data['version']); if ($data['last_version']) { $this->data['last_version'] = true; } if (!$update) { PM::failtureUpdate($pluginName, $data['version']); $this->messageError = $this->lang['ACT_PLUGIN_UPD_ERR']; return false; } return true; } else { $this->messageError = $this->lang['ACT_PLUGIN_CURL_NOT_INCLUDE']; return false; } }