MDL-29401 introduce new frankenstyle PARAM types
New PARAM_COMPONENT, PARAM_AREA and PARAM_PLUGIN + fixing of hopefully all current incorrect parameter types. This should help with diagnosing of incorrectly named 3rd party plugins too.
This commit is contained in:
+2
-2
@@ -49,8 +49,8 @@ if (count($args) < 3) { // always at least context, component and filearea
|
||||
}
|
||||
|
||||
$contextid = (int)array_shift($args);
|
||||
$component = clean_param(array_shift($args), PARAM_SAFEDIR);
|
||||
$filearea = clean_param(array_shift($args), PARAM_SAFEDIR);
|
||||
$component = clean_param(array_shift($args), PARAM_COMPONENT);
|
||||
$filearea = clean_param(array_shift($args), PARAM_AREA);
|
||||
|
||||
list($context, $course, $cm) = get_context_info_array($contextid);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user