Do not use set_default() and isset_param(), becasue those ugly hacks will be removed SOON!!

This commit is contained in:
skodak 2005-11-15 23:32:22 +00:00
parent d9d0456f51
commit 4d7c4f7f5c

View file

@ -263,10 +263,7 @@ function optional_param($varname, $default=NULL, $options=PARAM_CLEAN) {
} }
/** /**
* Convenience function to test if a parameter is set * HACK ALERT! Do not use this function, it will be removed soon!!
*
* @param string $varname The name of the parameter being checked
* @return bool Returns true if the parameter set, otherwise false
*/ */
function isset_param($varname) { function isset_param($varname) {
if (isset($_GET[$varname])) { if (isset($_GET[$varname])) {
@ -538,11 +535,7 @@ function optional_variable(&$var, $default=0) {
/** /**
* If a variable is empty set it to the default * HACK ALERT! Do not use this function, it will be removed soon!!
* otherwise leave it alone
* @param mixed $var the variable to test
* @param mixed $default the default value
* @return bool true if variable has changed
*/ */
function set_default( &$var, $default ) { function set_default( &$var, $default ) {
if (empty($var)) { if (empty($var)) {