Skip to content
Browse files

Merge branch 'w12_MDL-32071_m21_dbfamily' of git://github.com/skodak/…

…moodle into MOODLE_21_STABLE
  • Loading branch information...
2 parents d29f6eb + 6bdb01c commit a11492d7e8918e47e45911020857a82b3c9d7a06 Sam Hemelryk committed Mar 20, 2012
Showing with 7 additions and 7 deletions.
  1. +6 −6 lib/searchlib.php
  2. +1 −1 mod/wiki/db/migration/wiki/ewikimoodlelib.php
View
12 lib/searchlib.php
@@ -359,14 +359,14 @@ function search_generate_text_SQL($parsetree, $datafield, $metafield, $mainidfie
/// First of all, search for reasons to switch to standard SQL generation
/// Only mysql are supported for now
- if ($DB->get_db_family() != 'mysql') {
+ if ($DB->get_dbfamily() != 'mysql') {
return search_generate_SQL($parsetree, $datafield, $metafield, $mainidfield, $useridfield,
$userfirstnamefield, $userlastnamefield, $timefield, $instancefield);
}
/// Some languages don't have "word separators" and MySQL FULLTEXT doesn't perform well with them, so
/// switch to standard SQL search generation
- if ($DB->get_db_family() == 'mysql') {
+ if ($DB->get_dbfamily() == 'mysql') {
$nonseparatedlangs = array('ja', 'th', 'zh_cn', 'zh_tw');
if (in_array(current_language(), $nonseparatedlangs)) {
return search_generate_SQL($parsetree, $datafield, $metafield, $mainidfield, $useridfield,
@@ -445,12 +445,12 @@ function search_generate_text_SQL($parsetree, $datafield, $metafield, $mainidfie
$text_sql_string .= ', ' . $metafield;
}
/// Begin with the AGAINST clause
- $text_sql_string .= ') AGAINST (' . "'";
+ $text_sql_string .= ') AGAINST (';
/// Add the search terms
$text_sql_string .= ':sgt'.$p;
$params['sgt'.$p++] = trim($datasearch_clause);
/// Close AGAINST clause
- $text_sql_string .= "' IN BOOLEAN MODE)";
+ $text_sql_string .= " IN BOOLEAN MODE)";
}
}
/// Now add the metasearch_clause
@@ -463,12 +463,12 @@ function search_generate_text_SQL($parsetree, $datafield, $metafield, $mainidfie
}
$text_sql_string .= 'MATCH (' . $metafield;
/// Begin with the AGAINST clause
- $text_sql_string .= ') AGAINST (' . "'";
+ $text_sql_string .= ') AGAINST (';
/// Add the search terms
$text_sql_string .= ':sgt'.$p;
$params['sgt'.$p++] = trim($metasearch_clause);
/// Close AGAINST clause
- $text_sql_string .= "' IN BOOLEAN MODE)";
+ $text_sql_string .= " IN BOOLEAN MODE)";
}
}
/// Finally add the non-text conditions
View
2 mod/wiki/db/migration/wiki/ewikimoodlelib.php
@@ -192,7 +192,7 @@ function ewiki_database_moodle($action, &$args, $sw1, $sw2) {
array("flags","meta","lastmodified");
*/
case "GETALL":
- switch ($DB->get_db_family()) {
+ switch ($DB->get_dbfamily()) {
case 'postgres':
// All but the latest version eliminated by DISTINCT
// ON (pagename)

0 comments on commit a11492d

Please sign in to comment.
Something went wrong with that request. Please try again.