mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
MDL-19313 Use an existing exception code
This commit is contained in:
parent
229a70996a
commit
15ac57cbc0
@ -45,7 +45,7 @@ $huburl = optional_param('huburl', '', PARAM_URL);
|
||||
$password = optional_param('password', '', PARAM_TEXT);
|
||||
$hubname = optional_param('hubname', '', PARAM_TEXT);
|
||||
if (empty($huburl) or !confirm_sesskey()) {
|
||||
throw new moodle_exception('cannotaccessthispage');
|
||||
throw new moodle_exception('missingparameter');
|
||||
}
|
||||
|
||||
/* TO DO
|
||||
|
@ -50,7 +50,7 @@ if (has_capability('moodle/course:publish', get_context_instance(CONTEXT_COURSE,
|
||||
$huburl = optional_param('huburl', '', PARAM_URL);
|
||||
$hubname = optional_param('hubname', '', PARAM_TEXT);
|
||||
if (empty($huburl) or !confirm_sesskey()) {
|
||||
throw new moodle_exception('cannotaccessthispage');
|
||||
throw new moodle_exception('missingparameter');
|
||||
}
|
||||
|
||||
//set the publication form
|
||||
|
@ -54,7 +54,7 @@ if (has_capability('moodle/course:publish', get_context_instance(CONTEXT_COURSE,
|
||||
$huburl = optional_param('huburl', '', PARAM_URL);
|
||||
$hubname = optional_param('hubname', '', PARAM_TEXT);
|
||||
if (empty($huburl) or !confirm_sesskey()) {
|
||||
throw new moodle_exception('cannotaccessthispage');
|
||||
throw new moodle_exception('missingparameter');
|
||||
}
|
||||
|
||||
$advertise = optional_param('advertise', false, PARAM_BOOL);
|
||||
|
Loading…
x
Reference in New Issue
Block a user