Index: trunk/admin/config/addcustomfield.php
===================================================================
diff -u -N -r898 -r964
--- trunk/admin/config/addcustomfield.php (.../addcustomfield.php) (revision 898)
+++ trunk/admin/config/addcustomfield.php (.../addcustomfield.php) (revision 964)
@@ -188,7 +188,7 @@
>
|
- "> |
+ "> |
|
Index: trunk/admin/include/mainscript.php
===================================================================
diff -u -N -r720 -r964
--- trunk/admin/include/mainscript.php (.../mainscript.php) (revision 720)
+++ trunk/admin/include/mainscript.php (.../mainscript.php) (revision 964)
@@ -265,6 +265,18 @@
return valid;
}
+function ValidCustomName(name_str)
+{
+ if (trim(name_str) == '') return false;
+ var re = new RegExp('^[a-zA-Z0-9_]{1,}$');
+ if (name_str.match(re)) {
+ return true;
+ }
+ else {
+ return false;
+ }
+}
+
function DaysInMonth(month,year)
{
timeA = new Date(year, month,1);
Index: trunk/kernel/frontaction.php
===================================================================
diff -u -N -r959 -r964
--- trunk/kernel/frontaction.php (.../frontaction.php) (revision 959)
+++ trunk/kernel/frontaction.php (.../frontaction.php) (revision 964)
@@ -798,7 +798,7 @@
$isExact = (substr($keywords, 0, 1) == '"' && substr($keywords, strlen($keywords) - 1, 1) == '"');
if ($isExact) {
- $performSearch = (strlen(trim(str_replace('"', '', $keywords))) >= $length);
+ $performSearch = (strlen(trim(str_replace('\"', '', $keywords))) >= $length);
}
else {
$key_arr = explode(' ', $keywords);
@@ -811,6 +811,7 @@
}
$keywords = str_replace(' ', ' ', $keywords);
+ //$keywords = str_replace('\"', '', $keywords);
$performSearch = (strlen($keywords) >= $length);
}
Index: trunk/admin/include/tabs.js
===================================================================
diff -u -N -r277 -r964
--- trunk/admin/include/tabs.js (.../tabs.js) (revision 277)
+++ trunk/admin/include/tabs.js (.../tabs.js) (revision 964)
@@ -93,6 +93,9 @@
case 'time': // text must be a formatted time
result = ValidTime(FieldValue);
break;
+ case 'custom_name':
+ result = ValidCustomName(FieldValue);
+ break;
}
return result;
}
Index: trunk/kernel/include/searchitems.php
===================================================================
diff -u -N -r787 -r964
--- trunk/kernel/include/searchitems.php (.../searchitems.php) (revision 787)
+++ trunk/kernel/include/searchitems.php (.../searchitems.php) (revision 964)
@@ -406,8 +406,7 @@
$this->SourceTable = GetTablePrefix().$ctype->Get("SourceTable");
$result=0;
$PopField = $ctype->Get("PopField");
- $RateField = $ctype->Get("RateField");
-
+ $RateField = $ctype->Get("RateField");
//print_pre($this->keywords);
if(!strlen($SelectSQL))
@@ -604,6 +603,7 @@
if(!$exact_match_close)
break;
$exact_word=substr($phrase, $i+1, ($exact_match_close-$i)-1);
+ $exact_word = str_replace("\\", "", $exact_word);
$i=$exact_match_close;
if($exact_word)
{