mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
MDL-21189 yui2/3 combo loader implemented - yay! admin settings in the next commit; yui libs stored in more standard locations
This commit is contained in:
parent
60f2c8666a
commit
aa42314ded
842 changed files with 137 additions and 12 deletions
|
@ -45,6 +45,18 @@ function min_optional_param($name, $default, $type) {
|
|||
$value = $_GET['amp;'.$name];
|
||||
}
|
||||
|
||||
return min_clean_param($value, $type);
|
||||
}
|
||||
|
||||
/**
|
||||
* Minimalistic parameter cleaning function.
|
||||
* Can not use optional param because moodlelib.php is not loaded yet
|
||||
* @param string $name
|
||||
* @param mixed $default
|
||||
* @param string $type
|
||||
* @return mixed
|
||||
*/
|
||||
function min_clean_param($value, $type) {
|
||||
switch($type) {
|
||||
case 'RAW': break;
|
||||
case 'INT': $value = (int)$value;
|
||||
|
@ -59,5 +71,4 @@ function min_optional_param($name, $default, $type) {
|
|||
}
|
||||
|
||||
return $value;
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue