Merge branch 'MDL-47874' of git://github.com/stronk7/moodle

This commit is contained in:
Dan Poltawski 2014-11-05 14:27:12 +00:00
commit c293eb004b
2 changed files with 11 additions and 1 deletions

View File

@ -2288,7 +2288,7 @@ abstract class moodle_database {
if (core_text::strlen($search) < core_text::strlen($replace)) {
$colsize = $column->max_length;
$sql = "UPDATE {".$table."}
SET $columnname = SUBSTRING(REPLACE($columnname, ?, ?), 1, $colsize)
SET $columnname = " . $this->sql_substr("REPLACE(" . $columnname . ", ?, ?)", 1, $colsize) . "
WHERE $columnname IS NOT NULL";
}
$this->execute($sql, array($search, $replace));

View File

@ -1731,6 +1731,16 @@ class oci_native_moodle_database extends moodle_database {
}
}
/**
* Does this driver support tool_replace?
*
* @since Moodle 2.8
* @return bool
*/
public function replace_all_text_supported() {
return true;
}
public function session_lock_supported() {
return true;
}