From 131500f24e0298058a33aa79ced9d01111c7b778 Mon Sep 17 00:00:00 2001 From: artem Date: Tue, 29 Apr 2008 08:41:15 +0000 Subject: - [DEV-158] added standart sorting to screens (Artem) git-svn-id: svn://svn.zabbix.com/trunk@5665 97f52cf1-0a1b-0410-bd0e-c28be96e8082 --- frontends/php/scripts.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'frontends/php/scripts.php') diff --git a/frontends/php/scripts.php b/frontends/php/scripts.php index 95875cf5..e6fa7b1e 100644 --- a/frontends/php/scripts.php +++ b/frontends/php/scripts.php @@ -198,6 +198,8 @@ if(isset($_REQUEST['form'])){ $frmScr->Show(); } else { + validate_sort_and_sortorder('s.name',ZBX_SORT_UP); + $form = new CForm(); $form->SetName('scripts'); $form->AddOption('id','scripts'); @@ -206,8 +208,8 @@ else { $table=new CTableInfo(S_NO_SCRIPTS_DEFINED); $table->setHeader(array( - array(new CCheckBox('all_scripts',null,"CheckAll('".$form->GetName()."','all_scripts');"),S_NAME), - S_COMMAND, + array(new CCheckBox('all_scripts',null,"CheckAll('".$form->GetName()."','all_scripts');"),make_sorting_link(S_NAME,'s.name')), + make_sorting_link(S_COMMAND,'s.command'), S_USER_GROUP, S_HOST_GROUP, S_HOST_ACCESS @@ -217,7 +219,7 @@ else { $sql = 'SELECT s.* '. ' FROM scripts s '. ' WHERE '.DBin_node('s.scriptid'). - ' ORDER BY s.scriptid ASC'; + order_by('s.name,s.command'); $scripts=DBselect($sql); -- cgit