mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
Do not use set_default() and isset_param(), becasue those ugly hacks will be removed SOON!!
This commit is contained in:
parent
d9d0456f51
commit
4d7c4f7f5c
1 changed files with 2 additions and 9 deletions
|
@ -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])) {
|
||||
|
@ -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)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue