Index: /MediaWiki/trunk/extensions/FCKeditor/FCKeditorSajax.body.php
===================================================================
--- /MediaWiki/trunk/extensions/FCKeditor/FCKeditorSajax.body.php	(revision 699)
+++ /MediaWiki/trunk/extensions/FCKeditor/FCKeditorSajax.body.php	(revision 700)
@@ -56,5 +56,5 @@
     $res = $db->select( 'page', 'page_title',
     array(  'page_namespace' => NS_IMAGE,
-    "LCASE(page_title) LIKE '%". $db->strencode( $term2 ) ."%'" ),
+    "LOWER(page_title) LIKE '%". $db->strencode( $term2 ) ."%'" ),
     "wfSajaxSearch",
     array( 'LIMIT' => $limit+1 )
@@ -103,5 +103,5 @@
     $res = $db->select( 'page', 'page_title',
     array(  'page_namespace' => $ns,
-    "LCASE(page_title) LIKE '%". $db->strencode( $term2 ) ."%'" ),
+    "LOWER(page_title) LIKE '%". $db->strencode( $term2 ) ."%'" ),
     "wfSajaxSearch",
     array( 'LIMIT' => $limit+1 )
@@ -111,5 +111,5 @@
     $i=0;
     while ( ( $row = $db->fetchObject( $res ) ) && ( ++$i <= $limit ) ) {
-        if (!is_null($prefix)) {
+        if (isset($prefix) && !is_null($prefix)) {
             $ret .= $prefix;
         }
