Update of /cvsroot/phpwiki/phpwiki/lib
In directory usw-pr-cvs1:/tmp/cvs-serv10849/lib
Modified Files:
Tag: release-1_2-branch
mysql.php
Log Message:
Fixed SF Bug #233898. (MySQL backend insensitive to case in page names.)
Note that this involves a change to the MySQL schema. A convenient
mysql script, schemas/update.mysql.1.2.0-1.2.1, is provided which can
be used to update your schema in-place.
Index: mysql.php
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/lib/mysql.php,v
retrieving revision 1.10.2.1
retrieving revision 1.10.2.2
diff -C2 -r1.10.2.1 -r1.10.2.2
*** mysql.php 2001/08/18 00:35:10 1.10.2.1
--- mysql.php 2001/08/18 03:57:27 1.10.2.2
***************
*** 214,226 ****
$clause = '';
while($term) {
! $word = "$term";
if ($word[0] == '-') {
$word = substr($word, 1);
! $clause .= "not ($column like '%$word%') ";
} else {
! $clause .= "($column like '%$word%') ";
}
if ($term = strtok(' '))
! $clause .= 'and ';
}
return $clause;
--- 214,226 ----
$clause = '';
while($term) {
! $word = strtolower("$term");
if ($word[0] == '-') {
$word = substr($word, 1);
! $clause .= "not (LCASE($column) like '%$word%') ";
} else {
! $clause .= "(LCASE($column) like '%$word%') ";
}
if ($term = strtok(' '))
! $clause .= 'AND ';
}
return $clause;
|