Merge branch 'w07_MDL-26389_20_profile' of git://github.com/skodak/moodle

This commit is contained in:
Eloy Lafuente (stronk7) 2011-02-14 15:58:26 +01:00
commit 76b7e2d1d6
5 changed files with 49 additions and 21 deletions

View file

@ -106,11 +106,10 @@ switch ($mode) {
echo '<div class="user-content">';
if ($course->id == SITEID) {
if (empty($CFG->forceloginforprofiles) || isloggedin()) {
$searchcourse = SITEID;
if (empty($CFG->forceloginforprofiles) or (isloggedin() and !isguestuser() and !is_web_crawler())) {
// Search throughout the whole site.
$searchcourse = 0;
} else {
$searchcourse = SITEID;
}
} else {
// Search only for posts the user made in this course.