execute_sql("ALTER TABLE `user_students` CHANGE `end` `timeend` INT(10) UNSIGNED DEFAULT '0' NOT NULL ");
}
- if ($oldversion < 2002122301) {
+ if ($oldversion < 2002122700) {
if (! record_exists("log_display", "module", "user", "action", "view")) {
execute_sql("INSERT INTO {$CFG->prefix}log_display VALUES ('user', 'view', 'user', 'CONCAT(firstname,' ',lastname)') ");
}
//////////////////////////////////////////////////////////////
/// If there are any errors in the standard libraries we want to know!
- error_reporting(15); // use 0=none 7=normal 15=all
+ error_reporting(E_ALL); // use 0=none 7=normal 15=all
/// Connect to the database using adodb
/// Set error reporting back to normal
- error_reporting(7);
+ error_reporting(15);
/// Load up any configuration from the config table
if (! isset($_SESSION["USER"])) { $_SESSION["USER"] = new object; }
extract($_SESSION); // Makes $SESSION and $USER available for read-only access
- if (!$FULLME) {
+ if (isset($FULLME)) {
+ $ME = $FULLME;
+ } else {
$FULLME = qualified_me();
+ $ME = strip_querystring($FULLME);
}
- $ME = strip_querystring($FULLME);
/// Set language/locale of printed times. If user has chosen a language that
if ($navigation == "home") {
$home = true;
$navigation = "";
+ } else {
+ $home = false;
}
if ($button == "") {
}
/// User links
- if ($USER->realuser) {
+ if (isset($USER->realuser)) {
if ($realuser = get_record("user", "id", $USER->realuser)) {
$realuserinfo = " [<A HREF=\"$CFG->wwwroot/course/loginas.php?id=$course->id&return=$realuser->id\">$realuser->firstname $realuser->lastname</A>] ";
}
+ } else {
+ $realuserinfo = "";
}
if ($USER->id) {
global $THEME;
if ($align) {
- $tablealign = "ALIGN=\"$align\"";
+ $align = "ALIGN=\"$align\"";
}
if ($width) {
- $tablewidth = "WIDTH=\"$width\"";
+ $width = "WIDTH=\"$width\"";
}
- echo "<table $tablealign $tablewidth class=\"$class\" border=\"0\" cellpadding=\"$padding\" cellspacing=\"0\"><tr><td bgcolor=\"$color\" class=\"$class"."content\">";
+ echo "<table $align $width class=\"$class\" border=\"0\" cellpadding=\"$padding\" cellspacing=\"0\"><tr><td bgcolor=\"$color\" class=\"$class"."content\">";
}
function print_simple_box_end() {
}
}
- if (!$table->width) {
+ if (empty($table->width)) {
$table->width = "80%";
}
- if (!$table->cellpadding) {
+ if (empty($table->cellpadding)) {
$table->cellpadding = "5";
}
- if (!$table->cellspacing) {
+ if (empty($table->cellspacing)) {
$table->cellspacing = "1";
}
if ($table->head) {
echo "<TR>";
foreach ($table->head as $key => $heading) {
+ if (!isset($size[$key])) {
+ $size[$key] = "";
+ }
+ if (!isset($align[$key])) {
+ $align[$key] = "";
+ }
echo "<TH VALIGN=top ".$align[$key].$size[$key]." NOWRAP class=\"generaltableheader\">$heading</TH>";
}
echo "</TR>\n";
foreach ($table->data as $row) {
echo "<TR VALIGN=TOP>";
foreach ($row as $key => $item) {
+ if (!isset($size[$key])) {
+ $size[$key] = "";
+ }
+ if (!isset($align[$key])) {
+ $align[$key] = "";
+ }
echo "<TD ".$align[$key].$size[$key]." class=\"generaltablecell\">$item</TD>";
}
echo "</TR>\n";