Skip to content

Commit

Permalink
Undoing that last checkin while I examine the consequences for other
Browse files Browse the repository at this point in the history
database types
  • Loading branch information
moodler committed Dec 2, 2003
1 parent ce24824 commit 3f1d9b2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/datalib.php
Expand Up @@ -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;
}
}
}
Expand All @@ -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'";
}
}
Expand Down

0 comments on commit 3f1d9b2

Please sign in to comment.