Index: trunk/kernel/include/customfield.php =================================================================== diff -u -r4077 -r4330 --- trunk/kernel/include/customfield.php (.../customfield.php) (revision 4077) +++ trunk/kernel/include/customfield.php (.../customfield.php) (revision 4330) @@ -67,22 +67,28 @@ { var $Type; - function clsCustomFieldList($type=-1,$table="CustomField") + function clsCustomFieldList($type = -1, $table = 'CustomField') { $this->clsItemCollection(); - $this->Type=$type; - $this->classname = "clsCustomField"; - if($table=="CustomField") - $table = GetTablePrefix().$table; + $this->Type = $type; + $this->classname = 'clsCustomField'; + if ($table == 'CustomField') { + $table = GetTablePrefix().$table; + } + $this->SourceTable = $table; - if($this->Type>0) - $this->LoadFields(); + if ($this->Type > 0) { + $this->LoadFields(); + } } function LoadFields() { $this->Clear(); - $sql = "SELECT * FROM ".$this->SourceTable." WHERE Type=".$this->Type." ORDER BY DisplayOrder DESC, CustomFieldId ASC"; + $sql = 'SELECT * + FROM '.$this->SourceTable.' + WHERE Type = '.$this->Type.' AND IsSystem = 0 + ORDER BY DisplayOrder DESC, CustomFieldId ASC'; if($this->debuglevel > 1) echo $sql."
\n"; $rs = $this->adodbConnection->Execute($sql); @@ -125,20 +131,17 @@ function GetFieldUIList($GeneralTab=FALSE) { - $ret = new clsConfigAdmin(); - - if($this->NumItems()>0) - { - foreach($this->Items as $field) - { - if($GeneralTab==TRUE && $field->Get("OnGeneralTab")==1 || !$GeneralTab) - { - $ui = $field->GetAdminUI(); - array_push($ret->Items,$ui); - } - } - } - return $ret; + $ret = new clsConfigAdmin(); + + if ($this->NumItems() > 0) { + foreach ($this->Items as $field) { + if ($GeneralTab == true && $field->Get('OnGeneralTab') == 1 || !$GeneralTab) { + $ui = $field->GetAdminUI(); + array_push($ret->Items,$ui); + } + } + } + return $ret; } function GetFieldNames()