Commit 4904c2bc authored by mmn's avatar mmn

Merge branch 'profile-prefs-getall' into 'nightly'

Fixup Profile_prefs::getAll() 

Ref. #98 

See merge request !69
parents bb0faaea 90945e54
......@@ -85,17 +85,17 @@ class Profile_prefs extends Managed_DataObject
static function getAll(Profile $profile)
{
try {
$prefs = self::listFind('profile_id', $profile->getID());
$prefs = self::listFind('profile_id', array($profile->getID()));
} catch (NoResultException $e) {
return array();
}
$list = array();
while ($entry = $prefs->fetch()) {
if (!isset($list[$entry->namespace])) {
$list[$entry->namespace] = array();
while ($prefs->fetch()) {
if (!isset($list[$prefs->namespace])) {
$list[$prefs->namespace] = array();
}
$list[$entry->namespace][$entry->topic] = $entry->data;
$list[$prefs->namespace][$prefs->topic] = $prefs->data;
}
return $list;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment