/** * Delete a file. * * @return void */ public function delete() { $input = JFactory::getApplication()->input; try { EcrFile::deleteFile(); JFactory::getApplication()->enqueueMessage(jgettext('Template has been deleted.')); } catch (Exception $e) { EcrHtml::message($e); } //try $input->set('view', 'templates'); $input->set('task', 'tplarchive'); parent::display(); }
/** * Delete a zip file. * * @return void */ public function delete() { ob_start(); try { EcrFile::deleteFile(); $this->response->message = jgettext('The file has been deleted'); } catch (Exception $e) { $this->response->debug .= ECR_DEBUG ? nl2br($e) : ''; $this->response->message = $e->getMessage(); $this->response->status = 1; } $buffer = ob_get_clean(); if ($buffer) { $this->response->status = 1; $this->response->debug .= $buffer; } echo $this->response; jexit(); }