diff -Naur WebCalendar-1.2.3.orig/includes/classes/WebCalendar.class WebCalendar-1.2.3.new/includes/classes/WebCalendar.class --- WebCalendar-1.2.3.orig/includes/classes/WebCalendar.class 2011-04-14 17:11:22.307271821 +0200 +++ WebCalendar-1.2.3.new/includes/classes/WebCalendar.class 2011-04-14 19:20:58.351077771 +0200 @@ -153,6 +153,7 @@ load_global_settings (); $this->setLanguage (); + $user = getValue ( 'user', '[A-Za-z0-9_\.=@,\-]*', true ); if ( empty ( $ovrd ) ) load_user_preferences (); @@ -166,7 +167,6 @@ $id = getValue ( 'id', '[0-9]+', true ); $minute = getValue ( 'minute', '[0-9]+' ); $month = getValue ( 'month', '[0-9]+' ); - $user = getValue ( 'user', '[A-Za-z0-9_\.=@,\-]*', true ); $year = getValue ( 'year', '[0-9]+' ); if ( empty ( $PUBLIC_ACCESS ) ) $PUBLIC_ACCESS = 'N'; @@ -227,7 +227,8 @@ if ( ! empty ( $user ) ) { $u_url = 'user=' . $user . '&'; - user_load_variables ( $user, 'user_' ); + if (!user_load_variables ( $user, 'user_' )) + nonuser_load_variables($user, 'user_'); if ( $user == '__public__' ) $user_fullname = translate ( $PUBLIC_ACCESS_FULLNAME ); } else { diff -Naur WebCalendar-1.2.3.orig/includes/functions.php WebCalendar-1.2.3.new/includes/functions.php --- WebCalendar-1.2.3.orig/includes/functions.php 2011-04-14 17:11:22.271275172 +0200 +++ WebCalendar-1.2.3.new/includes/functions.php 2011-04-14 19:22:25.296955185 +0200 @@ -4275,6 +4275,7 @@ $GLOBALS[$prefix . 'login'] = $row[0]; $GLOBALS[$prefix . 'lastname'] = $row[1]; $GLOBALS[$prefix . 'firstname'] = $row[2]; + $GLOBALS[$prefix . 'fullname'] = trim($raw[1] . ' ' . $row[2]); $GLOBALS[$prefix . 'admin'] = $row[3]; $GLOBALS[$prefix . 'is_public'] = $row[4]; $GLOBALS[$prefix . 'url'] = $row[5]; @@ -5860,7 +5861,8 @@ if ( $rows ) { for ( $i = 0, $cnt = count ( $rows ); $i < $cnt; $i++ ) { $row = $rows[$i]; - user_load_variables ( $row[0], 'bosstemp_' ); + if (!user_load_variables ( $row[0], 'bosstemp_' )) + nonuser_load_variables($row[0], 'bosstemp_'); $ret[$count++] = array ( 'cal_login' => $row[0], 'cal_fullname' => $bosstemp_fullname diff -Naur WebCalendar-1.2.3.orig/includes/menu/index.php WebCalendar-1.2.3.new/includes/menu/index.php --- WebCalendar-1.2.3.orig/includes/menu/index.php 2011-04-14 17:11:22.171284485 +0200 +++ WebCalendar-1.2.3.new/includes/menu/index.php 2011-04-14 19:33:10.341676201 +0200 @@ -211,12 +211,17 @@ } $groups = ''; $grouplistcnt = count ( $grouplist ); + $gdone = array(); for ( $i = 0; $i < $grouplistcnt; $i++ ) { $l = $grouplist[$i]['cal_login']; $f = $grouplist[$i]['cal_fullname']; // Don't display current $user in group list. if ( ! empty ( $user ) && $user == $l ) continue; + // Do not show duplicate entries. + if (isset($gdone[$l])) + continue; + $gdone[$l] = true; /* Use the preferred view if it is day/month/week/year.php. Try not to use a user-created view because it might not display the proper user's events.