Order the options by how they were added.
authorSteve Sutton <steve@gaslightmedia.com>
Thu, 9 Aug 2018 17:51:33 +0000 (13:51 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Thu, 9 Aug 2018 17:51:33 +0000 (13:51 -0400)
Use id for order by.

models/admin/entity/fields.php
models/admin/management/fields.php
setup/adminHooks.php

index ea4f9f4..910bea1 100644 (file)
@@ -187,7 +187,7 @@ class GlmMembersAdmin_entity_fields extends GlmDataFieldsCustomFields
                                     "SELECT *
                                       FROM " . GLM_MEMBERS_FIELDS_PLUGIN_DB_PREFIX . "custom_field_options
                                      WHERE field_id = %d
-                                     ORDER BY option_text",
+                                     ORDER BY id",
                                     $field['id']
                                 ),
                                 ARRAY_A
index d0c7588..a727387 100644 (file)
@@ -430,7 +430,7 @@ class GlmMembersAdmin_management_fields extends GlmDataFieldsCustomFields
                                     "SELECT *
                                       FROM " . GLM_MEMBERS_FIELDS_PLUGIN_DB_PREFIX . "custom_field_options
                                      WHERE field_id = %d
-                                     ORDER BY option_text",
+                                     ORDER BY id",
                                     $field['id']
                                 ),
                                 ARRAY_A
index 053d3cf..3c08f3b 100644 (file)
@@ -151,7 +151,7 @@ $parts = array();
                         "SELECT *
                            FROM " . GLM_MEMBERS_FIELDS_PLUGIN_DB_PREFIX . "custom_field_options
                           WHERE field_id = %d
-                        ORDER BY option_text",
+                        ORDER BY id",
                         $field['id']
                     ),
                     ARRAY_A