Permalink
Browse files

MDL-43746 fix require_course_login regression caused by MDL-25981

  • Loading branch information...
1 parent b88bb98 commit c22d036916dc9f19cd2f2ee145519596441e1e30 @skodak skodak committed with skodak Jan 21, 2014
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/moodlelib.php
View
@@ -3210,8 +3210,8 @@ function require_logout() {
*/
function require_course_login($courseorid, $autologinguest = true, $cm = null, $setwantsurltome = true, $preventredirect = false) {
global $CFG, $PAGE, $SITE;
- $issite = (is_object($courseorid) and $courseorid->id == SITEID)
- or (!is_object($courseorid) and $courseorid == SITEID);
+ $issite = ((is_object($courseorid) and $courseorid->id == SITEID)
+ or (!is_object($courseorid) and $courseorid == SITEID));
if ($issite && !empty($cm) && !($cm instanceof cm_info)) {
// Note: nearly all pages call get_fast_modinfo anyway and it does not make any
// db queries so this is not really a performance concern, however it is obviously

0 comments on commit c22d036

Please sign in to comment.