/** * Remove a folder * * @return void */ public function removefolderTask() { // Check for request forgeries Request::checkToken(['get', 'post']); // Incoming $ids = Request::getVar('id', array()); $ids = is_array($ids) ?: array($ids); $no_html = Request::getInt('no_html', 0); foreach ($ids as $id) { $row = new Query($this->database); $row->deleteByFolder(intval($id)); $row = new QueryFolder($this->database); $row->delete(intval($id)); } if (!$no_html) { // Output messsage and redirect App::redirect(Route::url('index.php?option=' . $this->_option . '&controller=' . $this->_controller, false), Lang::txt('COM_SUPPORT_QUERY_FOLDER_SUCCESSFULLY_REMOVED')); } $this->listTask(); }
/** * Remove a folder * * @return void */ public function removefolderTask() { // Check for request forgeries Request::checkToken(['get', 'post']); // Incoming $ids = Request::getVar('id', array()); $ids = is_array($ids) ?: array($ids); $no_html = Request::getInt('no_html', 0); foreach ($ids as $id) { $row = new Query($this->database); $row->deleteByFolder(intval($id)); $row = new QueryFolder($this->database); $row->delete(intval($id)); } if (!$no_html) { // Output messsage and redirect Notify::success(Lang::txt('COM_SUPPORT_QUERY_FOLDER_SUCCESSFULLY_REMOVED')); return $this->cancelTask(); } $this->listTask(); }