Merge branch 'MDL-30405-23' of git://github.com/FMCorz/moodle into MOODLE_23_STABLE
authorDan Poltawski <dan@moodle.com>
Mon, 20 Aug 2012 03:39:59 +0000 (11:39 +0800)
committerDan Poltawski <dan@moodle.com>
Mon, 20 Aug 2012 03:39:59 +0000 (11:39 +0800)
mod/forum/lib.php
mod/lesson/lib.php

index daf6f02..7c4ed9d 100644 (file)
@@ -2091,8 +2091,7 @@ function forum_search_posts($searchterms, $courseid=0, $limitfrom=0, $limitnum=5
                          u.lastname,
                          u.email,
                          u.picture,
-                         u.imagealt,
-                         u.email
+                         u.imagealt
                     FROM $fromsql
                    WHERE $selectsql
                 ORDER BY p.modified DESC";
index 8c7b4d9..dc3495b 100644 (file)
@@ -345,7 +345,7 @@ function lesson_get_user_grades($lesson, $userid=0) {
 
     $params = array("lessonid" => $lesson->id,"lessonid2" => $lesson->id);
 
-    if (isset($userid)) {
+    if (!empty($userid)) {
         $params["userid"] = $userid;
         $params["userid2"] = $userid;
         $user = "AND u.id = :userid";