mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
Merge branch 'MDL-27824_m23' of git://github.com/rwijaya/moodle into MOODLE_23_STABLE
This commit is contained in:
commit
edd4257a1a
1 changed files with 10 additions and 1 deletions
|
@ -31,7 +31,6 @@ require_once($CFG->libdir.'/textlib.class.php');
|
|||
|
||||
$id = required_param('id', PARAM_INT); // Category id
|
||||
$page = optional_param('page', 0, PARAM_INT); // which page to show
|
||||
$perpage = optional_param('perpage', $CFG->coursesperpage, PARAM_INT); // how many per page
|
||||
$categoryedit = optional_param('categoryedit', -1, PARAM_BOOL);
|
||||
$hide = optional_param('hide', 0, PARAM_INT);
|
||||
$show = optional_param('show', 0, PARAM_INT);
|
||||
|
@ -41,6 +40,16 @@ $moveto = optional_param('moveto', 0, PARAM_INT);
|
|||
$resort = optional_param('resort', 0, PARAM_BOOL);
|
||||
$sesskey = optional_param('sesskey', '', PARAM_RAW);
|
||||
|
||||
// MDL-27824 - This is a temporary fix until we have the proper
|
||||
// way to check/initialize $CFG value.
|
||||
// @todo MDL-35138 remove this temporary solution
|
||||
if (!empty($CFG->coursesperpage)) {
|
||||
$defaultperpage = $CFG->coursesperpage;
|
||||
} else {
|
||||
$defaultperpage = 20;
|
||||
}
|
||||
$perpage = optional_param('perpage', $defaultperpage, PARAM_INT); // how many per page
|
||||
|
||||
if (empty($id)) {
|
||||
print_error("unknowcategory");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue