Permalink
Browse files

MDL-26842 fix o_ prefix regression

  • Loading branch information...
1 parent 200b455 commit 4c1638c10fd3fc313f9e18c779f48736e78249df @skodak skodak committed Mar 21, 2011
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/dml/oci_native_moodle_database.php
@@ -867,11 +867,12 @@ protected function bind_params($stmt, array $params=null, $tablename=null) {
}
foreach($params as $key => $value) {
// Decouple column name and param name as far as sometimes they aren't the same
- $columnname = $key; // Default columnname (for DB introspecting is key), but...
- if ($key == 'newfieldtoset') { // found case where column and key diverge, handle that
+ if ($key == 'o_newfieldtoset') { // found case where column and key diverge, handle that
$columnname = key($value); // columnname is the key of the array
$params[$key] = $value[$columnname]; // set the proper value in the $params array and
$value = $value[$columnname]; // set the proper value in the $value variable
+ } else {
+ $columnname = preg_replace('/^o_/', '', $key); // Default columnname (for DB introspecting is key), but...
}
// Continue processing
// Now, handle already detected LOBs

0 comments on commit 4c1638c

Please sign in to comment.