mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
Add update_record() postgres bytea support
To get ready for the postgres utf8 migration script
This commit is contained in:
parent
d70fd5612d
commit
6442124426
1 changed files with 4 additions and 0 deletions
|
@ -1241,6 +1241,10 @@ function update_record($table, $dataobject) {
|
||||||
foreach ($columns as $column) {
|
foreach ($columns as $column) {
|
||||||
if ($column->name <> 'id' and isset($data[$column->name]) ) {
|
if ($column->name <> 'id' and isset($data[$column->name]) ) {
|
||||||
$ddd[$column->name] = $data[$column->name];
|
$ddd[$column->name] = $data[$column->name];
|
||||||
|
// PostgreSQL bytea support
|
||||||
|
if ($CFG->dbtype == 'postgres7' && $column->type == 'bytea') {
|
||||||
|
$ddd[$column->name] = $db->BlobEncode($ddd[$column->name]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue