Exemplo n.º 1
0
 /**
  * Deletes plugin.
  *
  * @param array $params
  */
 public function delete(array $params)
 {
     $this->checkXP();
     $ftp = $this->getFtpConnection();
     $key = trim($params['key']);
     $availablePlugins = $this->pluginService->getAvailablePluginsList();
     if (!isset($availablePlugins[$key])) {
         OW::getFeedback()->error(OW::getLanguage()->text('admin', 'manage_plugins_plugin_not_found'));
         $this->redirectToAction('available');
     }
     $ftp->rmDir($availablePlugins[$key]['path']);
     OW::getFeedback()->info(OW::getLanguage()->text('admin', 'manage_plugins_delete_success_message', array('plugin' => $availablePlugins[$key]['title'])));
     $this->redirectToAction('available');
 }