Skip to content

Commit

Permalink
Do not use set_default() and isset_param(), becasue those ugly hacks …
Browse files Browse the repository at this point in the history
…will be removed SOON!!
  • Loading branch information
skodak committed Nov 15, 2005
1 parent d9d0456 commit 4d7c4f7
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions lib/moodlelib.php
Expand Up @@ -263,10 +263,7 @@ function optional_param($varname, $default=NULL, $options=PARAM_CLEAN) {
}

/**
* Convenience function to test if a parameter is set
*
* @param string $varname The name of the parameter being checked
* @return bool Returns true if the parameter set, otherwise false
* HACK ALERT! Do not use this function, it will be removed soon!!
*/
function isset_param($varname) {
if (isset($_GET[$varname])) {
Expand Down Expand Up @@ -538,11 +535,7 @@ function optional_variable(&$var, $default=0) {


/**
* If a variable is empty set it to the default
* otherwise leave it alone
* @param mixed $var the variable to test
* @param mixed $default the default value
* @return bool true if variable has changed
* HACK ALERT! Do not use this function, it will be removed soon!!
*/
function set_default( &$var, $default ) {
if (empty($var)) {
Expand Down

0 comments on commit 4d7c4f7

Please sign in to comment.