Permalink
Browse files

Undoing that last checkin while I examine the consequences for other

database types
  • Loading branch information...
1 parent ce24824 commit 3f1d9b22bac979ad140fd3ab0086ace1c8d6bf0d moodler committed Dec 2, 2003
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/datalib.php
View
@@ -765,13 +765,13 @@ function insert_record($table, $dataobject, $returnid=true) {
if ($column->name <> "id") {
if (isset($data[$column->name])) {
if ((string)$data[$column->name] == "" and !empty($column->has_default) and !empty($column->default_value)) {
- $ddd[$column->name] = 'DEFAULT';
+ $ddd[$column->name] = $column->default_value;
} else {
$ddd[$column->name] = $data[$column->name];
}
} else {
if (!empty($column->has_default) and !empty($column->default_value)) {
- $ddd[$column->name] = 'DEFAULT';
+ $ddd[$column->name] = $column->default_value;
}
}
}
@@ -796,7 +796,7 @@ function insert_record($table, $dataobject, $returnid=true) {
$select .= " AND ";
}
$inscolumns .= "$key";
- $insvalues .= ($value != 'DEFAULT') ? "'$value'" : $value ;
+ $insvalues .= "'$value'";
$select .= "$key = '$value'";
}
}

0 comments on commit 3f1d9b2

Please sign in to comment.