From 2696e12bd643eaca85b9780b1c7d8ec1377df0fb Mon Sep 17 00:00:00 2001 From: latham <latham@ispconfig3> Date: Fri, 04 Nov 2011 09:57:16 -0400 Subject: [PATCH] This will sort the modules by alpha before the dashboard is pushed to the front. This patch keeps the menu tabs stable instead of different on each user. Logging in as an admin, reseller, and user would show the tabs in different order each time do to user creation. --- interface/lib/classes/listform_actions.inc.php | 18 ++++++++++-------- 1 files changed, 10 insertions(+), 8 deletions(-) diff --git a/interface/lib/classes/listform_actions.inc.php b/interface/lib/classes/listform_actions.inc.php index 70d6652..a35aca9 100644 --- a/interface/lib/classes/listform_actions.inc.php +++ b/interface/lib/classes/listform_actions.inc.php @@ -86,15 +86,17 @@ $rec['bgcolor'] = $this->DataRowColor; //* substitute value for select fields - foreach($app->listform->listDef['item'] as $field) { - $key = $field['field']; - if(isset($field['formtype']) && $field['formtype'] == 'SELECT') { - if(strtolower($rec[$key]) == 'y' or strtolower($rec[$key]) == 'n') { - // Set a additional image variable for bolean fields - $rec['_'.$key.'_'] = (strtolower($rec[$key]) == 'y')?'x16/tick_circle.png':'x16/cross_circle.png'; + if(is_array($app->listform->listDef['item']) && count($app->listform->listDef['item']) > 0) { + foreach($app->listform->listDef['item'] as $field) { + $key = $field['field']; + if(isset($field['formtype']) && $field['formtype'] == 'SELECT') { + if(strtolower($rec[$key]) == 'y' or strtolower($rec[$key]) == 'n') { + // Set a additional image variable for bolean fields + $rec['_'.$key.'_'] = (strtolower($rec[$key]) == 'y')?'x16/tick_circle.png':'x16/cross_circle.png'; + } + //* substitute value for select field + $rec[$key] = @$field['value'][$rec[$key]]; } - //* substitute value for select field - $rec[$key] = @$field['value'][$rec[$key]]; } } -- Gitblit v1.9.1