|
From: Wizard <wi...@ne...> - 2003-01-24 14:38:58
|
I'm adding this to the methods used in Config: $cfg->is_true( $key ); $cfg->is_false( $key ); where: T | F =======|======== [Yy].* | [Nn].* Yes,yes,Y,y or No,no,N,n [Tt].* | [Ff].* True,true,T,t or False,false,F,f [Oo]n | [Oo]ff On,on or Off,off 1 | 0 1 or 0 basically, /^[Yy]|[Tt]|[Oo]n|[1]/ and /^[Nn]|[Ff]|[Oo]ff|[0]/. All other values are treated as NOT_TRUE && NOT_FALSE. This allows configuration values to be more intuitive. For example, these all indicate false && not true: Threading = off moderate = No allow_html = 0 expletive_filtering_enabled = False Any comments? Grant M. |