r36425 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r36424‎ | r36425 | r36426 >
Date:16:17, 18 June 2008
Author:yaron
Status:old
Tags:
Comment:
Fixed remote autocompletion of namespaces to complete on the beginning of
every word, not just the beginning of the whole string
Modified paths:
  • /trunk/extensions/SemanticForms/includes/SF_GlobalFunctions.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/includes/SF_GlobalFunctions.php
@@ -13,7 +13,7 @@
1414 */
1515 if ( !defined( 'MEDIAWIKI' ) ) die();
1616
17 -define('SF_VERSION','1.2.3');
 17+define('SF_VERSION','1.2.4');
1818
1919 // constants for special properties
2020 define('SF_SP_HAS_DEFAULT_FORM', 1);
@@ -798,7 +798,7 @@
799799 $substring = str_replace(' ', '_', strtolower($substring));
800800 $substring = str_replace('_', '\_', $substring);
801801 $substring = str_replace("'", "\'", $substring);
802 - $conditions .= " AND LOWER(page_title) LIKE '$substring%'";
 802+ $conditions .= " AND (LOWER(page_title) LIKE '$substring%' OR LOWER(page_title) LIKE '%\_$substring%')";
803803 }
804804 $sql_options['ORDER BY'] = 'page_title';
805805 $res = $db->select( $db->tableNames('page'),

Status & tagging log