public function execute()
 {
     //TODO use POST
     $app_ids = waRequest::request('app_id');
     try {
         if (installerHelper::isDeveloper()) {
             throw new waException(_w('Unable to delete application (developer version is on)'));
         }
         if (!$app_ids || !is_array($app_ids)) {
             throw new waException(_w('Application not found'));
         }
         foreach ($app_ids as &$info) {
             if (!is_array($info)) {
                 $info = array('vendor' => $info);
             }
         }
         unset($info);
         $this->apps = new waInstallerApps();
         $app_list = $this->apps->getApps(array('installed' => true));
         $deleted_apps = array();
         foreach ($app_list as $info) {
             $app_id = $info['slug'];
             if (isset($app_ids[$app_id]) && $app_ids[$app_id]['vendor'] == $info['vendor']) {
                 if (!empty($info['installed']['system'])) {
                     throw new waException(sprintf(_w('Can not delete system application "%s"'), $info['name']));
                 }
                 $deleted_apps[] = $this->deleteApp($app_id);
             }
         }
         wa()->setActive('installer');
         if (!$deleted_apps) {
             throw new waException(_w('Application not found'));
         }
         $message = _w('Application %s has been deleted', 'Applications %s have been deleted', min(2, count($deleted_apps)), false);
         $message = sprintf($message, implode(', ', $deleted_apps));
         $msg = installerMessage::getInstance()->raiseMessage($message);
     } catch (Exception $ex) {
         wa()->setActive('installer');
         $msg = installerMessage::getInstance()->raiseMessage($ex->getMessage(), installerMessage::R_FAIL);
     }
     //'module' => installerHelper::getModule(),
     $this->redirect(array('msg' => $msg));
 }