From: tokul Date: Sun, 12 Feb 2006 09:08:11 +0000 (+0000) Subject: disable template selection, when only one template is present X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=9edbc08b1a549c2efc8181fe7c321447b58c466d;p=squirrelmail.git disable template selection, when only one template is present git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@10724 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/include/options/display.php b/include/options/display.php index 039d5560..0c07e5af 100644 --- a/include/options/display.php +++ b/include/options/display.php @@ -73,15 +73,17 @@ function load_optpage_data_display() { } ksort($templateset_values); $templateset_values = array_flip($templateset_values); - $optvals[SMOPT_GRP_GENERAL][] = array( - 'name' => 'sTplDir', - 'caption' => _("Template"), - 'type' => SMOPT_TYPE_STRLIST, - 'refresh' => SMOPT_REFRESH_ALL, - 'posvals' => $templateset_values, - 'save' => 'save_option_template' - ); - + // display template options only when there is more than one template + if (count($templateset_values)>1) { + $optvals[SMOPT_GRP_GENERAL][] = array( + 'name' => 'sTplDir', + 'caption' => _("Template"), + 'type' => SMOPT_TYPE_STRLIST, + 'refresh' => SMOPT_REFRESH_ALL, + 'posvals' => $templateset_values, + 'save' => 'save_option_template' + ); + } /* Load the theme option. */ $theme_values = array();