From 54d2374216321d61b5b1f4a87ec66cf3c5b60e2c Mon Sep 17 00:00:00 2001 From: pdontthink Date: Tue, 26 Aug 2008 06:40:25 +0000 Subject: [PATCH] Move options constants to constants include file git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@13269 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/options.php | 42 ------------------------------------------ include/constants.php | 43 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 42 deletions(-) diff --git a/functions/options.php b/functions/options.php index 61ddf027..84b8b9ae 100644 --- a/functions/options.php +++ b/functions/options.php @@ -12,48 +12,6 @@ * @subpackage prefs */ -/**********************************************/ -/* Define constants used in the options code. */ -/**********************************************/ - -/* Define constants for the various option types. */ -define('SMOPT_TYPE_STRING', 0); -define('SMOPT_TYPE_STRLIST', 1); -define('SMOPT_TYPE_TEXTAREA', 2); -define('SMOPT_TYPE_INTEGER', 3); -define('SMOPT_TYPE_FLOAT', 4); -define('SMOPT_TYPE_BOOLEAN', 5); -define('SMOPT_TYPE_HIDDEN', 6); -define('SMOPT_TYPE_COMMENT', 7); -define('SMOPT_TYPE_FLDRLIST', 8); -define('SMOPT_TYPE_FLDRLIST_MULTI', 9); -define('SMOPT_TYPE_EDIT_LIST', 10); -define('SMOPT_TYPE_STRLIST_MULTI', 11); -define('SMOPT_TYPE_BOOLEAN_CHECKBOX', 12); -define('SMOPT_TYPE_BOOLEAN_RADIO', 13); -define('SMOPT_TYPE_STRLIST_RADIO', 14); -define('SMOPT_TYPE_SUBMIT', 15); - -/* Define constants for the layout scheme for edit lists. */ -define('SMOPT_EDIT_LIST_LAYOUT_LIST', 0); -define('SMOPT_EDIT_LIST_LAYOUT_SELECT', 1); - -/* Define constants for the options refresh levels. */ -define('SMOPT_REFRESH_NONE', 0); -define('SMOPT_REFRESH_FOLDERLIST', 1); -define('SMOPT_REFRESH_ALL', 2); - -/* Define constants for the options size. */ -define('SMOPT_SIZE_TINY', 0); -define('SMOPT_SIZE_SMALL', 1); -define('SMOPT_SIZE_MEDIUM', 2); -define('SMOPT_SIZE_LARGE', 3); -define('SMOPT_SIZE_HUGE', 4); -define('SMOPT_SIZE_NORMAL', 5); - -define('SMOPT_SAVE_DEFAULT', 'save_option'); -define('SMOPT_SAVE_NOOP', 'save_option_noop'); - /** * SquirrelOption: An option for SquirrelMail. * diff --git a/include/constants.php b/include/constants.php index c9ac8431..9dae98ac 100644 --- a/include/constants.php +++ b/include/constants.php @@ -214,3 +214,46 @@ define('SQ_SMARTY_TEMPLATE', 'Smarty_'); */ define('SQ_INCOMPATIBLE', 'INCOMPATIBLE'); +/** + * Define constants used in the options code + */ + +// Define constants for the various option types +define('SMOPT_TYPE_STRING', 0); +define('SMOPT_TYPE_STRLIST', 1); +define('SMOPT_TYPE_TEXTAREA', 2); +define('SMOPT_TYPE_INTEGER', 3); +define('SMOPT_TYPE_FLOAT', 4); +define('SMOPT_TYPE_BOOLEAN', 5); +define('SMOPT_TYPE_HIDDEN', 6); +define('SMOPT_TYPE_COMMENT', 7); +define('SMOPT_TYPE_FLDRLIST', 8); +define('SMOPT_TYPE_FLDRLIST_MULTI', 9); +define('SMOPT_TYPE_EDIT_LIST', 10); +define('SMOPT_TYPE_STRLIST_MULTI', 11); +define('SMOPT_TYPE_BOOLEAN_CHECKBOX', 12); +define('SMOPT_TYPE_BOOLEAN_RADIO', 13); +define('SMOPT_TYPE_STRLIST_RADIO', 14); +define('SMOPT_TYPE_SUBMIT', 15); + +// Define constants for the layout scheme for edit lists +define('SMOPT_EDIT_LIST_LAYOUT_LIST', 0); +define('SMOPT_EDIT_LIST_LAYOUT_SELECT', 1); + +// Define constants for the options refresh levels +define('SMOPT_REFRESH_NONE', 0); +define('SMOPT_REFRESH_FOLDERLIST', 1); +define('SMOPT_REFRESH_ALL', 2); + +// Define constants for the options size +define('SMOPT_SIZE_TINY', 0); +define('SMOPT_SIZE_SMALL', 1); +define('SMOPT_SIZE_MEDIUM', 2); +define('SMOPT_SIZE_LARGE', 3); +define('SMOPT_SIZE_HUGE', 4); +define('SMOPT_SIZE_NORMAL', 5); + +// Define miscellaneous options constants +define('SMOPT_SAVE_DEFAULT', 'save_option'); +define('SMOPT_SAVE_NOOP', 'save_option_noop'); + -- 2.25.1