]> git.mjollnir.org Git - moodle.git/commitdiff
Fixed a couple PHP notices which cropped up
authordefacer <defacer>
Sat, 20 Nov 2004 18:30:31 +0000 (18:30 +0000)
committerdefacer <defacer>
Sat, 20 Nov 2004 18:30:31 +0000 (18:30 +0000)
enrol/enrol.class.php

index dc41a2cd8037b9bf25ca5ff62612749121021c7f..79d17d2bcc0d26ebcd42ba7906bb0d720663826d 100644 (file)
@@ -325,13 +325,13 @@ function get_access_icons($course) {
 
     $str = '';
 
-    if ($course->guest) {
+    if (!empty($course->guest)) {
         $strallowguests = get_string("allowguests");
         $str .= '<a title="'.$strallowguests.'" href="'.$CFG->wwwroot.'/course/view.php?id='.$course->id.'">';
         $str .= '<img vspace="4" alt="'.$strallowguests.'" height="16" width="16" border="0" '.
                 'src="'.$CFG->pixpath.'/i/guest.gif" /></a>&nbsp;&nbsp;';
     }
-    if ($course->password) {
+    if (!empty($course->password)) {
         $strrequireskey = get_string("requireskey");
         $str .= '<a title="'.$strrequireskey.'" href="'.$CFG->wwwroot.'/course/view.php?id='.$course->id.'">';
         $str .= '<img vspace="4" alt="'.$strrequireskey.'" height="16" width="16" border="0" src="'.$CFG->pixpath.'/i/key.gif" /></a>';