Additional quotes for default values for text fields
Brought to you by:
freddy78
If a default value for a text (string) field is given, then when modifying the table/field, additional quotes are added around the value. The same holds if a record is inserted.
Example:
The table:
CREATE TABLE 't2' ( 'id' INTEGER NOT NULL PRIMARY KEY, 'name' TEXT NOT NULL DEFAULT '""', 'info' TEXT NOT NULL DEFAULT 'simple info' );
When modifying any field additional quotes are inserted around the default value. When inserting - the value has quotes, while it shouldn't.
Temporary fix (file common.lib.php):
434c434
< if($info['dflt_value']!= '') $data = $info['dflt_value'];
---
> if($info['dflt_value']!= '') $data = unquote($info['dflt_value']);
450d449
<