FIxed the logininfo classes in some situations (bug 2657)

This commit is contained in:
moodler
2005-03-01 02:49:10 +00:00
parent 68796e6b60
commit 0e18f8278b
2 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -40,7 +40,7 @@
} else {
$wwwroot = str_replace('http', 'https', $CFG->wwwroot);
}
$loginstring = "<span class=\"logininfo\"><a href=\"$wwwroot/login/index.php\">".get_string('login').'</a></font>';
$loginstring = "<div class=\"logininfo\"><a href=\"$wwwroot/login/index.php\">".get_string('login').'</a></div>';
} else {
$loginstring = user_login_string($SITE);
add_to_log(SITEID, 'course', 'view', 'view.php?id='.SITEID, SITEID);
@@ -70,7 +70,7 @@
print_header(strip_tags($SITE->fullname), $SITE->fullname, 'home', '',
'<meta name="description" content="'. s(strip_tags($SITE->summary)) .'" />',
true, '', $loginstring . '<br />' . $langmenu);
true, '', $loginstring.$langmenu);
?>
+4 -4
View File
@@ -1540,10 +1540,10 @@ function print_header ($title='', $heading='', $navigation='', $focus='', $meta=
} else {
$wwwroot = str_replace('http','https',$CFG->wwwroot);
}
if (isset($USER->id)) {
$menu = '<font size="2"><a target="'. $CFG->framename .'" href="'. $wwwroot .'/login/logout.php">'. get_string('logout') .'</a></font>';
if (isset($course->id)) {
$menu = user_login_string($course->id);
} else {
$menu = '<font size="2"><a target="'. $CFG->framename .'" href="'. $wwwroot .'/login/index.php">'. get_string('login') .'</a></font>';
$menu = user_login_string(SITEID);
}
}
@@ -1913,7 +1913,7 @@ function theme_setup($theme = '', $params=NULL) {
function user_login_string($course, $user=NULL) {
global $USER, $CFG;
if (empty($user)) {
if (empty($user) and isset($USER->id)) {
$user = $USER;
}