protected function deleteFile()
    {
        $this->controlAccess('file_delete');

        if ($this->file->deleteAll($this->data_file['file_id'])) {
            $this->redirect('admin/content/file', $this->text('File has been deleted from database and disk'), 'success');
        }

        // Redirect in any case as file can be already deleted from the database
        $this->redirect('admin/content/file', $this->text('An error occurred'), 'warning');
    }
protected function deleteFile()
    {
        $this->controlAccess('file_delete');

        if ($this->file->deleteAll($this->data_file['file_id'])) {
            $this->redirect('admin/content/file', $this->text('File has been deleted from database and disk'), 'success');
        }

        // Redirect in any case as file can be already deleted from the database
        $this->redirect('admin/content/file', $this->text('An error occurred'), 'warning');
    }
protected function deleteFile ( ) { $ this -> controlAccess ( 'file_delete' ) ; if ( $ this -> file -> deleteAll ( $ this -> data_file [ 'file_id' ] ) ) { $ this -> redirect ( 'admin/content/file' , $ this -> text ( 'File has been deleted from database and disk' ) , 'success' ) ; } // Redirect in any case as file can be already deleted from the database $ this -> redirect ( 'admin/content/file' , $ this -> text ( 'An error occurred' ) , 'warning' ) ; }
Deletes a file from the database an disk
Deletes a file from the database an disk