LiveUser_Admin removeApplication bug

From: Date: Thu, 01 Jun 2006 14:20:09 +0000
Subject: LiveUser_Admin removeApplication bug
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-24220@lists.php.net to get a copy of this message
The problem is in the function below... here the filters should be allowed to be set to nothing... , ive included a patch at the bottom /**
    * Remove applications and all their relevant relations
    *
    * @param array key values pairs (value may be a string or an array)
    *                      This will construct the WHERE clause of your update
    *                      Be careful, if you leave this blank no WHERE clause
    *                      will be used and all applications will be
affected by the remove
    * @return int|bool false on error, the affected rows on success
    *
    * @access public
    */
function removeApplication($filters) {
       // Prepare the filters. Based on the provided filters a new
array will be
       // created with the corresponding application_id's. If the
filters are empty,
       // cause an error or just have no result 0 or false will be returned
       $filters = $this->_makeRemoveFilter($filters,
'application_id', 'getApplications');
       if (!$filters) {
           return $filters;
       }
       // Remove all the area's that are part of this application
446,448c446,448
<         //if (!$filters) {
<         //    return $filters;
<         //}
---
        if (!$filters) {
            return $filters;
        }


« previous php.pear.general (#24220) next »