diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2013-02-26 16:52:53 +0100 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2013-02-26 16:52:53 +0100 |
commit | e0df5934485df0eee22141d1c5ded3e432119b20 (patch) | |
tree | 6d83ed4aa03e5a3a1ca4687a3f46f19beefe2f78 /phpBB/includes/groupposition/legend.php | |
parent | 41eea66da975a3b4140d8f4dc3f6931ea84916db (diff) | |
download | forums-e0df5934485df0eee22141d1c5ded3e432119b20.tar forums-e0df5934485df0eee22141d1c5ded3e432119b20.tar.gz forums-e0df5934485df0eee22141d1c5ded3e432119b20.tar.bz2 forums-e0df5934485df0eee22141d1c5ded3e432119b20.tar.xz forums-e0df5934485df0eee22141d1c5ded3e432119b20.zip |
[ticket/10411] Throw exceptions instead of using trigger_error()
PHPBB3-10411
Diffstat (limited to 'phpBB/includes/groupposition/legend.php')
-rw-r--r-- | phpBB/includes/groupposition/legend.php | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/phpBB/includes/groupposition/legend.php b/phpBB/includes/groupposition/legend.php index 8f115a8b1e..7fddadde99 100644 --- a/phpBB/includes/groupposition/legend.php +++ b/phpBB/includes/groupposition/legend.php @@ -43,11 +43,6 @@ class phpbb_groupposition_legend implements phpbb_groupposition_interface protected $user; /** - * URI for the adm_back_link when there was an error. - */ - protected $adm_back_link = ''; - - /** * Constructor * * @param phpbb_db_driver $db Database object @@ -60,16 +55,6 @@ class phpbb_groupposition_legend implements phpbb_groupposition_interface } /** - * Set the back link for error messages - * - * @param string $adm_back_link Return URL to use after an error occured - */ - public function set_admin_back_link($adm_back_link) - { - $this->adm_back_link = $adm_back_link; - } - - /** * Returns the group_legend for a given group, if the group exists. * * {@inheritDoc} @@ -86,7 +71,7 @@ class phpbb_groupposition_legend implements phpbb_groupposition_interface if ($current_value === false) { // Group not found. - $this->error('NO_GROUP'); + throw new phpbb_groupposition_exception('NO_GROUP'); } return (int) $current_value; @@ -242,16 +227,6 @@ class phpbb_groupposition_legend implements phpbb_groupposition_interface } /** - * Error - * - * {@inheritDoc} - */ - private function error($message) - { - trigger_error($this->user->lang[$message] . (($this->adm_back_link) ? adm_back_link($this->adm_back_link) : ''), E_USER_WARNING); - } - - /** * Get group type language var * * @param int $group_type group_type from the groups-table |