From d5d079dba4faef842b69176e9132d60035d37057 Mon Sep 17 00:00:00 2001 From: Miles Lott Date: Mon, 12 Dec 2005 12:58:17 +0000 Subject: [PATCH] Add subsection using existing class function --- preferences/inc/class.uisettings.inc.php | 3 +++ preferences/preferences.php | 24 +++++++++++++++++------- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/preferences/inc/class.uisettings.inc.php b/preferences/inc/class.uisettings.inc.php index 7ea17a31c9..9cef41a016 100755 --- a/preferences/inc/class.uisettings.inc.php +++ b/preferences/inc/class.uisettings.inc.php @@ -188,6 +188,9 @@ case 'section': $this->create_section($valarray['title']); break; + case 'subsection': + $this->create_subsection($valarray['title']); + break; case 'input': $this->create_input_box( $valarray['label'], diff --git a/preferences/preferences.php b/preferences/preferences.php index 8f3946879b..df3fb7f7d1 100755 --- a/preferences/preferences.php +++ b/preferences/preferences.php @@ -27,7 +27,17 @@ 'admin' => True, // admin is controlled by the old-format hook_settings file itself 'xmlrpc' => True, // make everything availible via xmlrpc 'title' => $title, - 'type' => 'section', + 'type' => 'section' + ); + } + + function create_subsection($title) + { + $GLOBALS['settings'][] = array( + 'admin' => True, // admin is controlled by the old-format hook_settings file itself + 'xmlrpc' => True, // make everything availible via xmlrpc + 'title' => $title, + 'type' => 'subsection' ); } @@ -36,7 +46,7 @@ $GLOBALS['settings'][$name] = array( 'admin' => True, // admin is controlled by the old-format hook_settings file itself 'xmlrpc' => True, // make everything availible via xmlrpc - 'type' => 'input', + 'type' => 'input' ); foreach(array('label','name','help','default','size','maxsize','type','run_lang','rows','cols','values','subst_help') as $var) { @@ -52,7 +62,7 @@ $GLOBALS['settings'][$name] = array( 'admin' => True, // admin is controlled by the old-format hook_settings file itself 'xmlrpc' => True, // make everything availible via xmlrpc - 'type' => 'password', + 'type' => 'password' ); foreach(array('label','name','help','default','size','maxsize','type','run_lang','rows','cols','values','subst_help') as $var) { @@ -68,7 +78,7 @@ $GLOBALS['settings'][$name] = array( 'admin' => True, // admin is controlled by the old-format hook_settings file itself 'xmlrpc' => True, // make everything availible via xmlrpc - 'type' => 'text', + 'type' => 'text' ); foreach(array('label','name','help','default','size','maxsize','type','run_lang','rows','cols','values','subst_help') as $var) { @@ -84,7 +94,7 @@ $GLOBALS['settings'][$name] = array( 'admin' => True, // admin is controlled by the old-format hook_settings file itself 'xmlrpc' => True, // make everything availible via xmlrpc - 'type' => 'select', + 'type' => 'select' ); foreach(array('label','name','help','default','size','maxsize','type','run_lang','rows','cols','values','subst_help') as $var) { @@ -100,7 +110,7 @@ $GLOBALS['settings'][$name] = array( 'admin' => True, // admin is controlled by the old-format hook_settings file itself 'xmlrpc' => True, // make everything availible via xmlrpc - 'type' => 'check', + 'type' => 'check' ); foreach(array('label','name','help','default','size','maxsize','type','run_lang','rows','cols','values','subst_help') as $var) { @@ -116,7 +126,7 @@ $GLOBALS['settings'][$name] = array( 'admin' => True, // admin is controlled by the old-format hook_settings file itself 'xmlrpc' => True, // make everything availible via xmlrpc - 'type' => 'notify', + 'type' => 'notify' ); foreach(array('label','name','help','default','size','maxsize','type','run_lang','rows','cols','values','subst_help') as $var) {