Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Wiki: correct behaviour in Postgres with pages that have ' in name

  • Loading branch information...
commit 5c135dd4fde51578e66898e8741efb7f3fb9d3bb 1 parent 13ef403
sam_marshall authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  mod/wiki/ewikimoodlelib.php
View
2  mod/wiki/ewikimoodlelib.php
@@ -240,7 +240,7 @@ function ewiki_database_moodle($action, &$args, $sw1, $sw2) {
$sql= "SELECT pagename AS id, version, flags" .
(EWIKI_DBQUERY_BUFFER && ($field!="pagename") ? ", $field" : "") .
" FROM " . $CFG->prefix.EWIKI_DB_TABLE_NAME .
- " WHERE $field ILIKE '%".$content."%' and wiki=".$wiki_entry->id .
+ " WHERE $field ILIKE '%".anydb_escape_string($content)."%' and wiki=".$wiki_entry->id .
" GROUP BY id, pagename, version, flags ".
(EWIKI_DBQUERY_BUFFER && ($field!="pagename") ? ", $field" : "") ;
break;
Please sign in to comment.
Something went wrong with that request. Please try again.