Permalink
Browse files

Treating spaces in title search as wildcards

  • Loading branch information...
1 parent 057655a commit 243084f1992ba3abc0567393d4df2f1ce821e433 @jaronkk jaronkk committed May 1, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 admin/classes/domain/Resource.php
@@ -850,7 +850,10 @@ public static function getSearchDetails() {
//if name is passed in also search alias, organizations and organization aliases
if ($search['name']) {
- $nameQueryString = "'%" . mysql_real_escape_string(strtoupper($search['name'])) . "%'";
+ $nameQueryString = mysql_real_escape_string(strtoupper(trim($search['name'])));
+ $nameQueryString = preg_replace("/ +/", "%", $nameQueryString);
+ $nameQueryString = "'%" . $nameQueryString . "%'";
+
if ($config->settings->organizationsModule == 'Y'){
$dbName = $config->settings->organizationsDatabaseName;

0 comments on commit 243084f

Please sign in to comment.