cvs: pear /Perm_LiveUser/Admin/Perm/Container DB_Medium.php DB_Simple.php MDB2_Medium.php MDB2_Simple.php MDB_Medium.php MDB_Simple.php
| From: | Arnaud Limbourg | Date: | Sat, 03 Jul 2004 09:06:48 +0000 |
| Subject: | cvs: pear /Perm_LiveUser/Admin/Perm/Container DB_Medium.php DB_Simple.php MDB2_Medium.php MDB2_Simple.php MDB_Medium.php MDB_Simple.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-21456@lists.php.net to get a copy of this message | ||
arnaud Sat Jul 3 05:06:48 2004 EDT
Modified files:
/pear/Perm_LiveUser/Admin/Perm/Container DB_Medium.php
DB_Simple.php
MDB2_Medium.php
MDB2_Simple.php
MDB_Medium.php
MDB_Simple.php
Log:
* fix #1773 : Perm admin class removeRight method fails with DB_Simple
# http://pear.php.net/bugs/bug.php?id=1773
http://cvs.php.net/diff.php/pear/Perm_LiveUser/Admin/Perm/Container/DB_Medium.php?r1=1.56&r2=1.57&ty=u Index: pear/Perm_LiveUser/Admin/Perm/Container/DB_Medium.php diff -u pear/Perm_LiveUser/Admin/Perm/Container/DB_Medium.php:1.56 pear/Perm_LiveUser/Admin/Perm/Container/DB_Medium.php:1.57 --- pear/Perm_LiveUser/Admin/Perm/Container/DB_Medium.php:1.56 Mon Jun 21 16:45:06 2004 +++ pear/Perm_LiveUser/Admin/Perm/Container/DB_Medium.php Sat Jul 3 05:06:48 2004 @@ -50,7 +50,7 @@ * @author Markus Wolff <wolff@21st.de> * @author Matt Scifo <mscifo@php.net> * @author Arnaud Limbourg <arnaud@php.net> - * @version $Id: DB_Medium.php,v 1.56 2004/06/21 20:45:06 lsmith Exp $ + * @version $Id: DB_Medium.php,v 1.57 2004/07/03 09:06:48 arnaud Exp $ * @package LiveUser */ class LiveUser_Admin_Perm_Container_DB_Medium extends LiveUser_Admin_Perm_Container_DB_Simple @@ -356,12 +356,30 @@ } /** + * Delete a right + * + * @access public + * @param integer id of right + * @return mixed boolean or DB Error object + */ + function removeRight($right_id) + { + $res = $this->revokeGroupRight($right_id); + + if (!$res) { + return false; + } + + parent::removeRight($right_id); + } + + /** * Revoke right from group * * @access public * @param integer id of group * @param integer id of right - * @return mixed boolean or DB Error object + * @return boolean true on success or false on failure */ function revokeGroupRight($group_id, $right_id = null) { @@ -377,7 +395,7 @@ $result = $this->dbc->query($query); if (DB::isError($result)) { - return $result; + return false; }; // Job done ... http://cvs.php.net/diff.php/pear/Perm_LiveUser/Admin/Perm/Container/DB_Simple.php?r1=1.27&r2=1.28&ty=u Index: pear/Perm_LiveUser/Admin/Perm/Container/DB_Simple.php diff -u pear/Perm_LiveUser/Admin/Perm/Container/DB_Simple.php:1.27 pear/Perm_LiveUser/Admin/Perm/Container/DB_Simple.php:1.28 --- pear/Perm_LiveUser/Admin/Perm/Container/DB_Simple.php:1.27 Mon Jun 21 16:29:28 2004 +++ pear/Perm_LiveUser/Admin/Perm/Container/DB_Simple.php Sat Jul 3 05:06:48 2004 @@ -32,7 +32,7 @@ * @author Christian Dickmann <dickmann@php.net> * @author Markus Wolff <wolff@21st.de> * @author Matt Scifo <mscifo@php.net> - * @version $Id: DB_Simple.php,v 1.27 2004/06/21 20:29:28 lsmith Exp $ + * @version $Id: DB_Simple.php,v 1.28 2004/07/03 09:06:48 arnaud Exp $ * @package LiveUser */ class LiveUser_Admin_Perm_Container_DB_Simple extends LiveUser_Admin_Perm_Common @@ -895,7 +895,7 @@ * * @access public * @param integer id of right - * @return mixed boolean or DB Error object + * @return boolean true on success or false on failure */ function removeRight($right_id) { @@ -908,25 +908,14 @@ $result = $this->dbc->query($query); if (DB::isError($result)) { - return $result; - }; - - // Delete group right - $query = 'DELETE FROM - ' . $this->prefix . 'grouprights - WHERE - right_id = ' . (int)$right_id; - $result = $this->dbc->query($query); - - if (DB::isError($result)) { - return $result; + return false; }; // Delete right translations $result = $this->removeTranslation($right_id, LIVEUSER_SECTION_RIGHT, $this->getCurrentLanguage(), true); if (DB::isError($result)) { - return $result; + return false; }; // Delete right itself @@ -934,9 +923,11 @@ ' . $this->prefix . 'rights WHERE right_id = ' . (int)$right_id; + $result = $this->dbc->query($query); + if (DB::isError($result)) { - return $result; + return false; }; // Job done ... http://cvs.php.net/diff.php/pear/Perm_LiveUser/Admin/Perm/Container/MDB2_Medium.php?r1=1.20&r2=1.21&ty=u Index: pear/Perm_LiveUser/Admin/Perm/Container/MDB2_Medium.php diff -u pear/Perm_LiveUser/Admin/Perm/Container/MDB2_Medium.php:1.20 pear/Perm_LiveUser/Admin/Perm/Container/MDB2_Medium.php:1.21 --- pear/Perm_LiveUser/Admin/Perm/Container/MDB2_Medium.php:1.20 Mon Jun 21 16:45:06 2004 +++ pear/Perm_LiveUser/Admin/Perm/Container/MDB2_Medium.php Sat Jul 3 05:06:48 2004 @@ -51,7 +51,7 @@ * @author Markus Wolff <wolff@21st.de> * @author Matt Scifo <mscifo@php.net> * @author Arnaud Limbourg <arnaud@php.net> - * @version $Id: MDB2_Medium.php,v 1.20 2004/06/21 20:45:06 lsmith Exp $ + * @version $Id: MDB2_Medium.php,v 1.21 2004/07/03 09:06:48 arnaud Exp $ * @package LiveUser */ class LiveUser_Admin_Perm_Container_MDB2_Medium extends LiveUser_Admin_Perm_Container_MDB2_Simple @@ -356,12 +356,30 @@ } /** + * Delete a right + * + * @access public + * @param integer id of right + * @return mixed boolean or DB Error object + */ + function removeRight($right_id) + { + $res = $this->revokeGroupRight($right_id); + + if (!$res) { + return false; + } + + parent::removeRight($right_id); + } + + /** * Revoke right from group * * @access public * @param integer id of group * @param integer id of right - * @return mixed boolean or MDB2 Error object + * @return boolean true on success or false on failure */ function revokeGroupRight($group_id, $right_id = null) { @@ -377,7 +395,7 @@ $result = $this->dbc->query($query); if (MDB2::isError($result)) { - return $result; + return false; }; // Job done ... http://cvs.php.net/diff.php/pear/Perm_LiveUser/Admin/Perm/Container/MDB2_Simple.php?r1=1.24&r2=1.25&ty=u Index: pear/Perm_LiveUser/Admin/Perm/Container/MDB2_Simple.php diff -u pear/Perm_LiveUser/Admin/Perm/Container/MDB2_Simple.php:1.24 pear/Perm_LiveUser/Admin/Perm/Container/MDB2_Simple.php:1.25 --- pear/Perm_LiveUser/Admin/Perm/Container/MDB2_Simple.php:1.24 Mon Jun 21 16:29:29 2004 +++ pear/Perm_LiveUser/Admin/Perm/Container/MDB2_Simple.php Sat Jul 3 05:06:48 2004 @@ -29,7 +29,7 @@ * groups assignements and more see DB_Medium and DB_Complex. * * @category authentication - * @version $Id: MDB2_Simple.php,v 1.24 2004/06/21 20:29:29 lsmith Exp $ + * @version $Id: MDB2_Simple.php,v 1.25 2004/07/03 09:06:48 arnaud Exp $ * @package LiveUser */ class LiveUser_Admin_Perm_Container_MDB2_Simple extends LiveUser_Admin_Perm_Common @@ -898,7 +898,7 @@ * * @access public * @param integer id of right - * @return mixed boolean or MDB2 Error object + * @return boolean true on success or false on failure */ function removeRight($right_id) { @@ -911,18 +911,7 @@ $result = $this->dbc->query($query); if (MDB2::isError($result)) { - return $result; - }; - - // Delete group right - $query = 'DELETE FROM - ' . $this->prefix . 'grouprights - WHERE - right_id = ' . $this->dbc->quote($right_id, 'integer'); - $result = $this->dbc->query($query); - - if (MDB2::isError($result)) { - return $result; + return false; }; // Delete right translations @@ -937,9 +926,11 @@ ' . $this->prefix . 'rights WHERE right_id = ' . $this->dbc->quote($right_id, 'integer'); + $result = $this->dbc->query($query); + if (MDB2::isError($result)) { - return $result; + return false; }; // Job done ... http://cvs.php.net/diff.php/pear/Perm_LiveUser/Admin/Perm/Container/MDB_Medium.php?r1=1.46&r2=1.47&ty=u Index: pear/Perm_LiveUser/Admin/Perm/Container/MDB_Medium.php diff -u pear/Perm_LiveUser/Admin/Perm/Container/MDB_Medium.php:1.46 pear/Perm_LiveUser/Admin/Perm/Container/MDB_Medium.php:1.47 --- pear/Perm_LiveUser/Admin/Perm/Container/MDB_Medium.php:1.46 Mon Jun 21 16:45:06 2004 +++ pear/Perm_LiveUser/Admin/Perm/Container/MDB_Medium.php Sat Jul 3 05:06:48 2004 @@ -46,7 +46,7 @@ * @author Markus Wolff <wolff@21st.de> * @author Matt Scifo <mscifo@php.net> * @author Arnaud Limbourg <arnaud@php.net> - * @version $Id: MDB_Medium.php,v 1.46 2004/06/21 20:45:06 lsmith Exp $ + * @version $Id: MDB_Medium.php,v 1.47 2004/07/03 09:06:48 arnaud Exp $ * @package LiveUser */ class LiveUser_Admin_Perm_Container_MDB_Medium extends LiveUser_Admin_Perm_Container_MDB_Simple @@ -351,12 +351,30 @@ } /** + * Delete a right + * + * @access public + * @param integer id of right + * @return mixed boolean or DB Error object + */ + function removeRight($right_id) + { + $res = $this->revokeGroupRight($right_id); + + if (!$res) { + return false; + } + + parent::removeRight($right_id); + } + + /** * Revoke right from group * * @access public * @param integer id of group * @param integer id of right - * @return mixed boolean or MDB Error object + * @return boolean true on success or false on failure */ function revokeGroupRight($group_id, $right_id = null) { @@ -364,6 +382,7 @@ ' . $this->prefix . 'grouprights WHERE group_id = ' . $this->dbc->getValue('integer', $group_id); + if (!is_null($right_id)) { $query .= ' AND right_id = ' . $this->dbc->getValue('integer', $right_id); @@ -372,7 +391,7 @@ $result = $this->dbc->query($query); if (MDB::isError($result)) { - return $result; + return false; }; // Job done ... http://cvs.php.net/diff.php/pear/Perm_LiveUser/Admin/Perm/Container/MDB_Simple.php?r1=1.37&r2=1.38&ty=u Index: pear/Perm_LiveUser/Admin/Perm/Container/MDB_Simple.php diff -u pear/Perm_LiveUser/Admin/Perm/Container/MDB_Simple.php:1.37 pear/Perm_LiveUser/Admin/Perm/Container/MDB_Simple.php:1.38 --- pear/Perm_LiveUser/Admin/Perm/Container/MDB_Simple.php:1.37 Mon Jun 21 16:29:29 2004 +++ pear/Perm_LiveUser/Admin/Perm/Container/MDB_Simple.php Sat Jul 3 05:06:48 2004 @@ -29,7 +29,7 @@ * groups assignements and more see DB_Medium and DB_Complex. * * @category authentication - * @version $Id: MDB_Simple.php,v 1.37 2004/06/21 20:29:29 lsmith Exp $ + * @version $Id: MDB_Simple.php,v 1.38 2004/07/03 09:06:48 arnaud Exp $ * @package LiveUser */ class LiveUser_Admin_Perm_Container_MDB_Simple extends LiveUser_Admin_Perm_Common @@ -898,7 +898,7 @@ * * @access public * @param integer id of right - * @return mixed boolean or MDB Error object + * @return boolean true on success or false on failure */ function removeRight($right_id) { @@ -911,18 +911,7 @@ $result = $this->dbc->query($query); if (MDB::isError($result)) { - return $result; - }; - - // Delete group right - $query = 'DELETE FROM - ' . $this->prefix . 'grouprights - WHERE - right_id = ' . $this->dbc->getValue('integer', $right_id); - $result = $this->dbc->query($query); - - if (MDB::isError($result)) { - return $result; + return false; }; // Delete right translations @@ -937,9 +926,11 @@ ' . $this->prefix . 'rights WHERE right_id = ' . $this->dbc->getValue('integer', $right_id); + $result = $this->dbc->query($query); + if (MDB::isError($result)) { - return $result; + return false; }; // Job done ...
http://cvs.php.net/diff.php/pear/Perm_LiveUser/Admin/Perm/Container/DB_Medium.php?r1=1.56&r2=1.57&ty=u Index: pear/Perm_LiveUser/Admin/Perm/Container/DB_Medium.php diff -u pear/Perm_LiveUser/Admin/Perm/Container/DB_Medium.php:1.56 pear/Perm_LiveUser/Admin/Perm/Container/DB_Medium.php:1.57 --- pear/Perm_LiveUser/Admin/Perm/Container/DB_Medium.php:1.56 Mon Jun 21 16:45:06 2004 +++ pear/Perm_LiveUser/Admin/Perm/Container/DB_Medium.php Sat Jul 3 05:06:48 2004 @@ -50,7 +50,7 @@ * @author Markus Wolff <wolff@21st.de> * @author Matt Scifo <mscifo@php.net> * @author Arnaud Limbourg <arnaud@php.net> - * @version $Id: DB_Medium.php,v 1.56 2004/06/21 20:45:06 lsmith Exp $ + * @version $Id: DB_Medium.php,v 1.57 2004/07/03 09:06:48 arnaud Exp $ * @package LiveUser */ class LiveUser_Admin_Perm_Container_DB_Medium extends LiveUser_Admin_Perm_Container_DB_Simple @@ -356,12 +356,30 @@ } /** + * Delete a right + * + * @access public + * @param integer id of right + * @return mixed boolean or DB Error object + */ + function removeRight($right_id) + { + $res = $this->revokeGroupRight($right_id); + + if (!$res) { + return false; + } + + parent::removeRight($right_id); + } + + /** * Revoke right from group * * @access public * @param integer id of group * @param integer id of right - * @return mixed boolean or DB Error object + * @return boolean true on success or false on failure */ function revokeGroupRight($group_id, $right_id = null) { @@ -377,7 +395,7 @@ $result = $this->dbc->query($query); if (DB::isError($result)) { - return $result; + return false; }; // Job done ... http://cvs.php.net/diff.php/pear/Perm_LiveUser/Admin/Perm/Container/DB_Simple.php?r1=1.27&r2=1.28&ty=u Index: pear/Perm_LiveUser/Admin/Perm/Container/DB_Simple.php diff -u pear/Perm_LiveUser/Admin/Perm/Container/DB_Simple.php:1.27 pear/Perm_LiveUser/Admin/Perm/Container/DB_Simple.php:1.28 --- pear/Perm_LiveUser/Admin/Perm/Container/DB_Simple.php:1.27 Mon Jun 21 16:29:28 2004 +++ pear/Perm_LiveUser/Admin/Perm/Container/DB_Simple.php Sat Jul 3 05:06:48 2004 @@ -32,7 +32,7 @@ * @author Christian Dickmann <dickmann@php.net> * @author Markus Wolff <wolff@21st.de> * @author Matt Scifo <mscifo@php.net> - * @version $Id: DB_Simple.php,v 1.27 2004/06/21 20:29:28 lsmith Exp $ + * @version $Id: DB_Simple.php,v 1.28 2004/07/03 09:06:48 arnaud Exp $ * @package LiveUser */ class LiveUser_Admin_Perm_Container_DB_Simple extends LiveUser_Admin_Perm_Common @@ -895,7 +895,7 @@ * * @access public * @param integer id of right - * @return mixed boolean or DB Error object + * @return boolean true on success or false on failure */ function removeRight($right_id) { @@ -908,25 +908,14 @@ $result = $this->dbc->query($query); if (DB::isError($result)) { - return $result; - }; - - // Delete group right - $query = 'DELETE FROM - ' . $this->prefix . 'grouprights - WHERE - right_id = ' . (int)$right_id; - $result = $this->dbc->query($query); - - if (DB::isError($result)) { - return $result; + return false; }; // Delete right translations $result = $this->removeTranslation($right_id, LIVEUSER_SECTION_RIGHT, $this->getCurrentLanguage(), true); if (DB::isError($result)) { - return $result; + return false; }; // Delete right itself @@ -934,9 +923,11 @@ ' . $this->prefix . 'rights WHERE right_id = ' . (int)$right_id; + $result = $this->dbc->query($query); + if (DB::isError($result)) { - return $result; + return false; }; // Job done ... http://cvs.php.net/diff.php/pear/Perm_LiveUser/Admin/Perm/Container/MDB2_Medium.php?r1=1.20&r2=1.21&ty=u Index: pear/Perm_LiveUser/Admin/Perm/Container/MDB2_Medium.php diff -u pear/Perm_LiveUser/Admin/Perm/Container/MDB2_Medium.php:1.20 pear/Perm_LiveUser/Admin/Perm/Container/MDB2_Medium.php:1.21 --- pear/Perm_LiveUser/Admin/Perm/Container/MDB2_Medium.php:1.20 Mon Jun 21 16:45:06 2004 +++ pear/Perm_LiveUser/Admin/Perm/Container/MDB2_Medium.php Sat Jul 3 05:06:48 2004 @@ -51,7 +51,7 @@ * @author Markus Wolff <wolff@21st.de> * @author Matt Scifo <mscifo@php.net> * @author Arnaud Limbourg <arnaud@php.net> - * @version $Id: MDB2_Medium.php,v 1.20 2004/06/21 20:45:06 lsmith Exp $ + * @version $Id: MDB2_Medium.php,v 1.21 2004/07/03 09:06:48 arnaud Exp $ * @package LiveUser */ class LiveUser_Admin_Perm_Container_MDB2_Medium extends LiveUser_Admin_Perm_Container_MDB2_Simple @@ -356,12 +356,30 @@ } /** + * Delete a right + * + * @access public + * @param integer id of right + * @return mixed boolean or DB Error object + */ + function removeRight($right_id) + { + $res = $this->revokeGroupRight($right_id); + + if (!$res) { + return false; + } + + parent::removeRight($right_id); + } + + /** * Revoke right from group * * @access public * @param integer id of group * @param integer id of right - * @return mixed boolean or MDB2 Error object + * @return boolean true on success or false on failure */ function revokeGroupRight($group_id, $right_id = null) { @@ -377,7 +395,7 @@ $result = $this->dbc->query($query); if (MDB2::isError($result)) { - return $result; + return false; }; // Job done ... http://cvs.php.net/diff.php/pear/Perm_LiveUser/Admin/Perm/Container/MDB2_Simple.php?r1=1.24&r2=1.25&ty=u Index: pear/Perm_LiveUser/Admin/Perm/Container/MDB2_Simple.php diff -u pear/Perm_LiveUser/Admin/Perm/Container/MDB2_Simple.php:1.24 pear/Perm_LiveUser/Admin/Perm/Container/MDB2_Simple.php:1.25 --- pear/Perm_LiveUser/Admin/Perm/Container/MDB2_Simple.php:1.24 Mon Jun 21 16:29:29 2004 +++ pear/Perm_LiveUser/Admin/Perm/Container/MDB2_Simple.php Sat Jul 3 05:06:48 2004 @@ -29,7 +29,7 @@ * groups assignements and more see DB_Medium and DB_Complex. * * @category authentication - * @version $Id: MDB2_Simple.php,v 1.24 2004/06/21 20:29:29 lsmith Exp $ + * @version $Id: MDB2_Simple.php,v 1.25 2004/07/03 09:06:48 arnaud Exp $ * @package LiveUser */ class LiveUser_Admin_Perm_Container_MDB2_Simple extends LiveUser_Admin_Perm_Common @@ -898,7 +898,7 @@ * * @access public * @param integer id of right - * @return mixed boolean or MDB2 Error object + * @return boolean true on success or false on failure */ function removeRight($right_id) { @@ -911,18 +911,7 @@ $result = $this->dbc->query($query); if (MDB2::isError($result)) { - return $result; - }; - - // Delete group right - $query = 'DELETE FROM - ' . $this->prefix . 'grouprights - WHERE - right_id = ' . $this->dbc->quote($right_id, 'integer'); - $result = $this->dbc->query($query); - - if (MDB2::isError($result)) { - return $result; + return false; }; // Delete right translations @@ -937,9 +926,11 @@ ' . $this->prefix . 'rights WHERE right_id = ' . $this->dbc->quote($right_id, 'integer'); + $result = $this->dbc->query($query); + if (MDB2::isError($result)) { - return $result; + return false; }; // Job done ... http://cvs.php.net/diff.php/pear/Perm_LiveUser/Admin/Perm/Container/MDB_Medium.php?r1=1.46&r2=1.47&ty=u Index: pear/Perm_LiveUser/Admin/Perm/Container/MDB_Medium.php diff -u pear/Perm_LiveUser/Admin/Perm/Container/MDB_Medium.php:1.46 pear/Perm_LiveUser/Admin/Perm/Container/MDB_Medium.php:1.47 --- pear/Perm_LiveUser/Admin/Perm/Container/MDB_Medium.php:1.46 Mon Jun 21 16:45:06 2004 +++ pear/Perm_LiveUser/Admin/Perm/Container/MDB_Medium.php Sat Jul 3 05:06:48 2004 @@ -46,7 +46,7 @@ * @author Markus Wolff <wolff@21st.de> * @author Matt Scifo <mscifo@php.net> * @author Arnaud Limbourg <arnaud@php.net> - * @version $Id: MDB_Medium.php,v 1.46 2004/06/21 20:45:06 lsmith Exp $ + * @version $Id: MDB_Medium.php,v 1.47 2004/07/03 09:06:48 arnaud Exp $ * @package LiveUser */ class LiveUser_Admin_Perm_Container_MDB_Medium extends LiveUser_Admin_Perm_Container_MDB_Simple @@ -351,12 +351,30 @@ } /** + * Delete a right + * + * @access public + * @param integer id of right + * @return mixed boolean or DB Error object + */ + function removeRight($right_id) + { + $res = $this->revokeGroupRight($right_id); + + if (!$res) { + return false; + } + + parent::removeRight($right_id); + } + + /** * Revoke right from group * * @access public * @param integer id of group * @param integer id of right - * @return mixed boolean or MDB Error object + * @return boolean true on success or false on failure */ function revokeGroupRight($group_id, $right_id = null) { @@ -364,6 +382,7 @@ ' . $this->prefix . 'grouprights WHERE group_id = ' . $this->dbc->getValue('integer', $group_id); + if (!is_null($right_id)) { $query .= ' AND right_id = ' . $this->dbc->getValue('integer', $right_id); @@ -372,7 +391,7 @@ $result = $this->dbc->query($query); if (MDB::isError($result)) { - return $result; + return false; }; // Job done ... http://cvs.php.net/diff.php/pear/Perm_LiveUser/Admin/Perm/Container/MDB_Simple.php?r1=1.37&r2=1.38&ty=u Index: pear/Perm_LiveUser/Admin/Perm/Container/MDB_Simple.php diff -u pear/Perm_LiveUser/Admin/Perm/Container/MDB_Simple.php:1.37 pear/Perm_LiveUser/Admin/Perm/Container/MDB_Simple.php:1.38 --- pear/Perm_LiveUser/Admin/Perm/Container/MDB_Simple.php:1.37 Mon Jun 21 16:29:29 2004 +++ pear/Perm_LiveUser/Admin/Perm/Container/MDB_Simple.php Sat Jul 3 05:06:48 2004 @@ -29,7 +29,7 @@ * groups assignements and more see DB_Medium and DB_Complex. * * @category authentication - * @version $Id: MDB_Simple.php,v 1.37 2004/06/21 20:29:29 lsmith Exp $ + * @version $Id: MDB_Simple.php,v 1.38 2004/07/03 09:06:48 arnaud Exp $ * @package LiveUser */ class LiveUser_Admin_Perm_Container_MDB_Simple extends LiveUser_Admin_Perm_Common @@ -898,7 +898,7 @@ * * @access public * @param integer id of right - * @return mixed boolean or MDB Error object + * @return boolean true on success or false on failure */ function removeRight($right_id) { @@ -911,18 +911,7 @@ $result = $this->dbc->query($query); if (MDB::isError($result)) { - return $result; - }; - - // Delete group right - $query = 'DELETE FROM - ' . $this->prefix . 'grouprights - WHERE - right_id = ' . $this->dbc->getValue('integer', $right_id); - $result = $this->dbc->query($query); - - if (MDB::isError($result)) { - return $result; + return false; }; // Delete right translations @@ -937,9 +926,11 @@ ' . $this->prefix . 'rights WHERE right_id = ' . $this->dbc->getValue('integer', $right_id); + $result = $this->dbc->query($query); + if (MDB::isError($result)) { - return $result; + return false; }; // Job done ...