forked from extern/egroupware
make egw_db::from_bool() static and use that to work around PHP 5.3 limitation of not making class scope available in closures
This commit is contained in:
parent
4d5b7540bd
commit
af9b8303d6
@ -92,7 +92,7 @@ class egw_customfields implements IteratorAggregate
|
||||
$row['private'] = $row['private'] ? explode(',', $row['private']) : array();
|
||||
$row['type2'] = $row['type2'] ? explode(',', $row['type2']) : array();
|
||||
$row['values'] = json_decode($row['values'], true);
|
||||
$row['needed'] = self::$db->from_bool($row['needed']);
|
||||
$row['needed'] = egw_db::from_bool($row['needed']);
|
||||
|
||||
return $row;
|
||||
}, array(), function($row)
|
||||
|
@ -592,7 +592,7 @@ class egw_db
|
||||
* @param string $val boolean value in db-specfic notation
|
||||
* @return boolean
|
||||
*/
|
||||
function from_bool($val)
|
||||
public static function from_bool($val)
|
||||
{
|
||||
return $val && $val[0] !== 'f'; // everthing other then 0 or f[alse] is returned as true
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user