MDL-19313 Use an existing exception code

This commit is contained in:
Martin Dougiamas 2010-05-12 07:56:48 +00:00
parent 229a70996a
commit 15ac57cbc0
3 changed files with 6 additions and 6 deletions

View File

@ -45,7 +45,7 @@ $huburl = optional_param('huburl', '', PARAM_URL);
$password = optional_param('password', '', PARAM_TEXT); $password = optional_param('password', '', PARAM_TEXT);
$hubname = optional_param('hubname', '', PARAM_TEXT); $hubname = optional_param('hubname', '', PARAM_TEXT);
if (empty($huburl) or !confirm_sesskey()) { if (empty($huburl) or !confirm_sesskey()) {
throw new moodle_exception('cannotaccessthispage'); throw new moodle_exception('missingparameter');
} }
/* TO DO /* TO DO
@ -158,4 +158,4 @@ $siteregistrationform->display();
echo $OUTPUT->footer(); echo $OUTPUT->footer();

View File

@ -50,7 +50,7 @@ if (has_capability('moodle/course:publish', get_context_instance(CONTEXT_COURSE,
$huburl = optional_param('huburl', '', PARAM_URL); $huburl = optional_param('huburl', '', PARAM_URL);
$hubname = optional_param('hubname', '', PARAM_TEXT); $hubname = optional_param('hubname', '', PARAM_TEXT);
if (empty($huburl) or !confirm_sesskey()) { if (empty($huburl) or !confirm_sesskey()) {
throw new moodle_exception('cannotaccessthispage'); throw new moodle_exception('missingparameter');
} }
//set the publication form //set the publication form
@ -71,4 +71,4 @@ if (has_capability('moodle/course:publish', get_context_instance(CONTEXT_COURSE,
echo $OUTPUT->footer(); echo $OUTPUT->footer();
} }

View File

@ -54,7 +54,7 @@ if (has_capability('moodle/course:publish', get_context_instance(CONTEXT_COURSE,
$huburl = optional_param('huburl', '', PARAM_URL); $huburl = optional_param('huburl', '', PARAM_URL);
$hubname = optional_param('hubname', '', PARAM_TEXT); $hubname = optional_param('hubname', '', PARAM_TEXT);
if (empty($huburl) or !confirm_sesskey()) { if (empty($huburl) or !confirm_sesskey()) {
throw new moodle_exception('cannotaccessthispage'); throw new moodle_exception('missingparameter');
} }
$advertise = optional_param('advertise', false, PARAM_BOOL); $advertise = optional_param('advertise', false, PARAM_BOOL);
@ -174,4 +174,4 @@ if (has_capability('moodle/course:publish', get_context_instance(CONTEXT_COURSE,
} }
echo $OUTPUT->footer(); echo $OUTPUT->footer();
} }