mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 12:40:01 +01:00
MDL-23856 fixed incorrect integer comparison, we should not use === or !== because one may be integer and the other string
This commit is contained in:
parent
99f9f85f00
commit
7b2e259c8c
@ -30,7 +30,7 @@ require_once('change_password_form.php');
|
||||
$id = optional_param('id', SITEID, PARAM_INT); // current course
|
||||
|
||||
$url = new moodle_url('/login/change_password.php');
|
||||
if ($id !== SITEID) {
|
||||
if ($id != SITEID) {
|
||||
$url->param('id', $id);
|
||||
}
|
||||
$PAGE->set_url($url);
|
||||
|
@ -32,7 +32,7 @@ $url = new moodle_url('/message/edit.php');
|
||||
if ($userid !== $USER->id) {
|
||||
$url->param('id', $userid);
|
||||
}
|
||||
if ($course !== SITEID) {
|
||||
if ($course != SITEID) {
|
||||
$url->param('course', $course);
|
||||
}
|
||||
$PAGE->set_url($url);
|
||||
|
@ -16,7 +16,7 @@ $filtertype = optional_param('filtertype', '', PARAM_ALPHA);
|
||||
$filterselect = optional_param('filterselect', 0, PARAM_INT);
|
||||
|
||||
$url = new moodle_url('/notes/index.php');
|
||||
if ($courseid !== SITEID) {
|
||||
if ($courseid != SITEID) {
|
||||
$url->param('course', $courseid);
|
||||
}
|
||||
if ($userid !== 0) {
|
||||
|
@ -146,7 +146,7 @@ if ($component === 'blog') {
|
||||
//TODO: nobody implemented this yet in grade edit form!!
|
||||
send_file_not_found();
|
||||
|
||||
if ($CFG->forcelogin || $course->id !== SITEID) {
|
||||
if ($CFG->forcelogin || $course->id != SITEID) {
|
||||
require_login($course);
|
||||
}
|
||||
|
||||
@ -244,7 +244,7 @@ if ($component === 'blog') {
|
||||
|
||||
// Respect forcelogin and require login unless this is the site.... it probably
|
||||
// should NEVER be the site
|
||||
if ($CFG->forcelogin || $course->id !== SITEID) {
|
||||
if ($CFG->forcelogin || $course->id != SITEID) {
|
||||
require_login($course);
|
||||
}
|
||||
|
||||
@ -488,7 +488,7 @@ if ($component === 'blog') {
|
||||
} else if ($filearea === 'section') {
|
||||
if ($CFG->forcelogin) {
|
||||
require_login($course);
|
||||
} else if ($course->id !== SITEID) {
|
||||
} else if ($course->id != SITEID) {
|
||||
require_login($course);
|
||||
}
|
||||
|
||||
|
@ -61,7 +61,7 @@ if ($contextid !== 0) {
|
||||
$url->param('contextid', $contextid);
|
||||
$baseurl->param('contextid', $contextid);
|
||||
}
|
||||
if ($usercourseid !== SITEID) {
|
||||
if ($usercourseid != SITEID) {
|
||||
$url->param('usercourseid', $usercourseid);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user