getChangeablePrefs() defaults to the current prefs UI group
authorMichael M Slusarz <slusarz@curecanti.org>
Tue, 25 Jan 2011 22:38:35 +0000 (15:38 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Tue, 25 Jan 2011 22:38:35 +0000 (15:38 -0700)
framework/Core/lib/Horde/Core/Prefs/Ui.php

index 54777c0..246742f 100644 (file)
@@ -149,10 +149,18 @@ class Horde_Core_Prefs_Ui
      *
      * @return array  The list of changeable prefs.
      */
-    public function getChangeablePrefs($group)
+    public function getChangeablePrefs($group = null)
     {
         $prefs = array();
 
+        if (is_null($group)) {
+            if (!$this->group) {
+                return $prefs;
+            }
+
+            $group = $this->group;
+        }
+
         if (!empty($this->prefGroups[$group]['members'])) {
             foreach ($this->prefGroups[$group]['members'] as $pref) {
                 /* Changeable pref if: