⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.37
Server IP:
41.128.143.86
Server:
Linux host.raqmix.cloud 6.8.0-1025-azure #30~22.04.1-Ubuntu SMP Wed Mar 12 15:28:20 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
8.3.23
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
psa-horde
/
mnemo
/
lib
/
Form
/
View File Name :
DeleteNotepad.php
* @package Mnemo */ class Mnemo_Form_DeleteNotepad extends Horde_Form { /** * Notepad being deleted */ protected $_notepad; /** * Const'r */ public function __construct(&$vars, $notepad) { $this->_notepad = $notepad; parent::__construct($vars, sprintf(_("Delete %s"), $notepad->get('name'))); $this->addHidden('', 'n', 'text', true); $this->addVariable(sprintf(_("Really delete the notepad \"%s\"? This cannot be undone and all data on this notepad will be permanently removed."), htmlspecialchars($this->_notepad->get('name'))), 'desc', 'description', false); $this->setButtons(array( array('class' => 'horde-delete', 'value' => _("Delete")), array('class' => 'horde-cancel', 'value' => _("Cancel")), )); } public function execute() { // If cancel was clicked, return false. if ($this->_vars->get('submitbutton') == _("Cancel")) { Horde::url('', true)->redirect(); } if (!$GLOBALS['registry']->getAuth() || $this->_notepad->get('owner') != $GLOBALS['registry']->getAuth()) { throw new Horde_Exception_PermissionDenied(_("Permission denied")); } // Delete the notepad. $storage = $GLOBALS['injector']->getInstance('Mnemo_Factory_Driver')->create($this->_notepad->getName()); $result = $storage->deleteAll(); // Remove share and all groups/permissions. try { $GLOBALS['mnemo_shares']->removeShare($this->_notepad); } catch (Horde_Share_Exception $e) { Horde::log($e->getMessage(), 'ERR'); throw new Mnemo_Exception($e->getMessage()); } } }