更新到 5.2 正式版后第一次 SVN 提交。

[email protected]


git-svn-id: https://svn.code.sf.net/p/hawebs/svn@570 a2543c7e-f6e9-4f8a-8bff-1ffc34733512
This commit is contained in:
YuCheng Hu
2010-11-14 14:46:58 +00:00
parent 549a9dad8c
commit 951f0e4023
708 changed files with 167299 additions and 235367 deletions
@@ -782,10 +782,32 @@ class QueryGenerator {
list($fieldName,$typeOfData) = split("::::",str_replace('\'','',
stripslashes($input[$fieldInfo])));
$moduleFields = $this->meta->getModuleFields();
$field = $moduleFields[$fieldName];
$type = $field->getFieldDataType();
$operator = str_replace('\'','',stripslashes($input[$condition]));
$searchValue = $input[$value];
$searchValue = function_exists(iconv) ? @iconv("UTF-8",$default_charset,
$searchValue) : $searchValue;
if($type == 'picklist') {
global $mod_strings;
// Get all the keys for the for the Picklist value
$mod_keys = array_keys($mod_strings, $searchValue);
if(sizeof($mod_keys) >= 1) {
// Iterate on the keys, to get the first key which doesn't start with LBL_ (assuming it is not used in PickList)
foreach($mod_keys as $mod_idx=>$mod_key) {
$stridx = strpos($mod_key, 'LBL_');
// Use strict type comparision, refer strpos for more details
if ($stridx !== 0) {
$searchValue = $mod_key;
break;
}
}
}
}
$this->addCondition($fieldName, $searchValue, $operator);
if($i+1<$noOfConditions) {
$this->addConditionGlue($matchType);
@@ -841,6 +863,23 @@ class QueryGenerator {
if(!$this->isStringType($type)) {
$value=trim($stringConvert);
}
if($type == 'picklist') {
global $mod_strings;
// Get all the keys for the for the Picklist value
$mod_keys = array_keys($mod_strings, $value);
if(sizeof($mod_keys) >= 1) {
// Iterate on the keys, to get the first key which doesn't start with LBL_ (assuming it is not used in PickList)
foreach($mod_keys as $mod_idx=>$mod_key) {
$stridx = strpos($mod_key, 'LBL_');
// Use strict type comparision, refer strpos for more details
if ($stridx !== 0) {
$value = $mod_key;
break;
}
}
}
}
}
if(!empty($input['operator'])) {
$operator = $input['operator'];