mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2025-07-23 23:11:04 -04:00
Add _is_deleted status message to Controller and prompt for button click after paste delete
This commit is contained in:
parent
d69d29f3a9
commit
f2b60d3765
4 changed files with 26 additions and 8 deletions
|
@ -67,6 +67,14 @@ class Controller
|
|||
*/
|
||||
private $_status = '';
|
||||
|
||||
/**
|
||||
* status message
|
||||
*
|
||||
* @access private
|
||||
* @var boolean
|
||||
*/
|
||||
private $_is_deleted = false;
|
||||
|
||||
/**
|
||||
* JSON message
|
||||
*
|
||||
|
@ -309,6 +317,7 @@ class Controller
|
|||
// Paste exists and deletion token is valid: Delete the paste.
|
||||
$paste->delete();
|
||||
$this->_status = 'Paste was properly deleted.';
|
||||
$this->_is_deleted = true;
|
||||
} else {
|
||||
$this->_error = 'Wrong deletion token. Paste was not deleted.';
|
||||
}
|
||||
|
@ -412,6 +421,7 @@ class Controller
|
|||
}
|
||||
$page->assign('BASEPATH', I18n::_($this->_conf->getKey('basepath')));
|
||||
$page->assign('STATUS', I18n::_($this->_status));
|
||||
$page->assign('ISDELETED', I18n::_(json_encode($this->_is_deleted)));
|
||||
$page->assign('VERSION', self::VERSION);
|
||||
$page->assign('DISCUSSION', $this->_conf->getKey('discussion'));
|
||||
$page->assign('OPENDISCUSSION', $this->_conf->getKey('opendiscussion'));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue