⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.50
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
/
turba
/
lib
/
Form
/
View File Name :
DeleteAddressBook.php
* @package Turba */ class Turba_Form_DeleteAddressBook extends Horde_Form { /** * Address book being deleted */ protected $_addressbook; public function __construct($vars, $addressbook) { $this->_addressbook = $addressbook; parent::__construct($vars, sprintf(_("Delete %s"), $addressbook->get('name'))); $this->addHidden('', 'a', 'text', true); $this->addVariable(sprintf(_("Really delete the address book \"%s\"? This cannot be undone and all contacts in this address book will be permanently removed."), htmlspecialchars($this->_addressbook->get('name'))), 'desc', 'description', false); $this->setButtons(array( array('class' => 'horde-delete', 'value' => _("Delete")), array('class' => 'horde-cancel', 'value' => _("Cancel")), )); } /** * @throws Turba_Exception */ public function execute() { // If cancel was clicked, return false. if ($this->_vars->get('submitbutton') == _("Cancel")) { Horde::url('', true)->redirect(); } if (!$GLOBALS['registry']->getAuth() || $this->_addressbook->get('owner') != $GLOBALS['registry']->getAuth()) { throw new Turba_Exception(_("You do not have permissions to delete this address book.")); } $driver = $GLOBALS['injector'] ->getInstance('Turba_Factory_Driver') ->create($this->_addressbook->getName()); if ($driver->hasCapability('delete_all')) { try { $driver->deleteAll(); } catch (Turba_Exception $e) { Horde::log($e->getMessage(), 'ERR'); throw $e; } } // Address book successfully deleted from backend, remove the share. try { $GLOBALS['injector'] ->getInstance('Turba_Shares') ->removeShare($this->_addressbook); } catch (Horde_Share_Exception $e) { Horde::log($e->getMessage(), 'ERR'); throw new Turba_Exception($e); } if ($GLOBALS['session']->get('turba', 'source') == Horde_Util::getFormData('deleteshare')) { $GLOBALS['session']->remove('turba', 'source'); } } }