Add error checking for file argument
[lhc/web/wiklou.git] / includes / Preferences.php
index 0f8dcc3..096f8e3 100644 (file)
@@ -1655,4 +1655,12 @@ class PreferencesForm extends HTMLForm {
                Hooks::run( 'PreferencesGetLegend', array( $this, $key, &$legend ) );
                return $legend;
        }
+
+       /**
+        * Get the keys of each top level preference section.
+        * @return array of section keys
+        */
+       function getPreferenceSections() {
+               return array_keys( array_filter( $this->mFieldTree, 'is_array' ) );
+       }
 }