Index: trunk/kernel/include/searchconfig.php =================================================================== diff -u -r1566 -r3534 --- trunk/kernel/include/searchconfig.php (.../searchconfig.php) (revision 1566) +++ trunk/kernel/include/searchconfig.php (.../searchconfig.php) (revision 3534) @@ -269,7 +269,7 @@ function GetNextDisplayOrder($mod) { $ret = 0; - $sql = "SELECT max(DisplayOrder) as do FROM ".$this->SourceTable." WHERE ModuleName='$mod'"; + $sql = "SELECT MAX(DisplayOrder) AS do FROM ".$this->SourceTable." WHERE ModuleName = '$mod'"; $rs = $this->adodbConnection->Execute($sql); if($rs && !$rs->EOF) $ret = $rs->fields["do"]+1; @@ -381,9 +381,9 @@ return $f; } - function &AddSearchField($Table,$FieldName,$Module,$Simple,$Adv,$Description,$DisplayName,$ConfigHeader,$DisplayOrder=0, - $Priority=0,$FieldType="text",$JoinClause=NULL,$IsWhere=NULL,$IsNotWhere=NULL,$ContainsWhere=NULL,$NotContainsWhere=NULL,$CustomId=0, $ForeignField = NULL) + function &AddSearchField($Table,$FieldName,$Module,$Simple,$Adv,$Description,$DisplayName,$ConfigHeader,$DisplayOrder=0,$Priority=0,$FieldType="text",$JoinClause=NULL,$IsWhere=NULL,$IsNotWhere=NULL,$ContainsWhere=NULL,$NotContainsWhere=NULL,$CustomId=0, $ForeignField = NULL) { + $f = new clsSearchConfig(); if($DisplayOrder==0) $DisplayOrder = $this->GetNextDisplayOrder($Module);