Skip to content

Commit

Permalink
MDL-49293 db: Pass sql_concat_join to sql_concat
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewnicols authored and stronk7 committed Aug 11, 2015
1 parent 878a6a9 commit 8e58a58
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
6 changes: 1 addition & 5 deletions lib/dml/mssql_native_moodle_database.php
Expand Up @@ -1207,11 +1207,7 @@ public function sql_concat_join($separator="' '", $elements=array()) {
for ($n=count($elements)-1; $n > 0 ; $n--) {
array_splice($elements, $n, 0, $separator);
}
$s = implode(' + ', $elements);
if ($s === '') {
return " '' ";
}
return " $s ";
return call_user_func_array(array($this, 'sql_concat'), $elements);
}

public function sql_isempty($tablename, $fieldname, $nullablefield, $textfield) {
Expand Down
7 changes: 1 addition & 6 deletions lib/dml/sqlsrv_native_moodle_database.php
Expand Up @@ -1272,12 +1272,7 @@ public function sql_concat_join($separator = "' '", $elements = array ()) {
for ($n = count($elements) - 1; $n > 0; $n--) {
array_splice($elements, $n, 0, $separator);
}
$s = implode(' + ', $elements);

if ($s === '') {
return " '' ";
}
return " $s ";
return call_user_func_array(array($this, 'sql_concat'), $elements);
}

public function sql_isempty($tablename, $fieldname, $nullablefield, $textfield) {
Expand Down

0 comments on commit 8e58a58

Please sign in to comment.