Index: trunk/kernel/admin_templates/custom_fields/custom_fields_list.tpl
===================================================================
diff -u
--- trunk/kernel/admin_templates/custom_fields/custom_fields_list.tpl (revision 0)
+++ trunk/kernel/admin_templates/custom_fields/custom_fields_list.tpl (revision 4008)
@@ -0,0 +1,69 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
Index: trunk/core/kernel/db/db_event_handler.php
===================================================================
diff -u -r4000 -r4008
--- trunk/core/kernel/db/db_event_handler.php (.../db_event_handler.php) (revision 4000)
+++ trunk/core/kernel/db/db_event_handler.php (.../db_event_handler.php) (revision 4008)
@@ -1576,14 +1576,15 @@
$item_type = $this->Application->getUnitOption($main_prefix, 'ItemType');
$sql = 'SELECT FieldName, CustomFieldId
FROM '.TABLE_PREFIX.'CustomField
- WHERE Type = '.$item_type;
+ WHERE Type = '.$item_type.'
+ ORDER BY CustomFieldId';
$custom_fields = $this->Conn->GetCol($sql, 'CustomFieldId');
// 2. create fields (for customdata item)
$fields = $this->Application->getUnitOption($event->Prefix, 'Fields', Array());
$field_options = Array('type' => 'string', 'formatter' => 'kMultiLanguage', 'not_null' => 1, 'db_type' => 'text', 'default' => '');
foreach ($custom_fields as $custom_id => $custom_name) {
- $fields['cust_'.$custom_name] = $field_options;
+ $fields['cust_'.$custom_id] = $field_options;
}
$this->Application->setUnitOption($event->Prefix, 'Fields', $fields);
Index: trunk/kernel/admin_templates/custom_fields/custom_fields_edit.tpl
===================================================================
diff -u
--- trunk/kernel/admin_templates/custom_fields/custom_fields_edit.tpl (revision 0)
+++ trunk/kernel/admin_templates/custom_fields/custom_fields_edit.tpl (revision 4008)
@@ -0,0 +1,93 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file