summaryrefslogtreecommitdiffstats
path: root/frontends/php/actionconf.php
diff options
context:
space:
mode:
authorartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-11-12 10:20:29 +0000
committerartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-11-12 10:20:29 +0000
commitc0c1b50df1ec73e0cd6b72c7cc10197e6cc44a0a (patch)
tree43b9a3f70cc15cfcc674fafbd0c8a3829417331e /frontends/php/actionconf.php
parentd7d135227396a5b3cede974e94c25032a1bc69d2 (diff)
downloadzabbix-c0c1b50df1ec73e0cd6b72c7cc10197e6cc44a0a.tar.gz
zabbix-c0c1b50df1ec73e0cd6b72c7cc10197e6cc44a0a.tar.xz
zabbix-c0c1b50df1ec73e0cd6b72c7cc10197e6cc44a0a.zip
- [DEV-66] added sorting to screens (Artem)
git-svn-id: svn://svn.zabbix.com/trunk@4996 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/actionconf.php')
-rw-r--r--frontends/php/actionconf.php15
1 files changed, 10 insertions, 5 deletions
diff --git a/frontends/php/actionconf.php b/frontends/php/actionconf.php
index 4b0edd93..a590bcc5 100644
--- a/frontends/php/actionconf.php
+++ b/frontends/php/actionconf.php
@@ -82,6 +82,7 @@ include_once "include/page_header.php";
);
check_fields($fields);
+ validate_sort_and_sortorder();
if(isset($_REQUEST['actionid']) && !action_accessiable($_REQUEST['actionid'], PERM_READ_WRITE))
{
@@ -339,14 +340,18 @@ include_once "include/page_header.php";
$tblActions = new CTableInfo(S_NO_ACTIONS_DEFINED);
$tblActions->SetHeader(array(
array( new CCheckBox('all_items',null,'CheckAll("'.$form->GetName().'","all_items");'),
- S_NAME
+ make_sorting_link(S_NAME,'a.name')
),
S_CONDITIONS,
S_OPERATIONS,
- S_STATUS));
-
- $db_actions = DBselect('select * from actions where eventsource='.$_REQUEST['eventsource'].
- ' and '.DBin_node('actionid').' order by name,actionid');
+ make_sorting_link(S_STATUS,'a.status')
+ ));
+
+ $db_actions = DBselect('SELECT a.* '.
+ ' FROM actions a'.
+ ' WHERE a.eventsource='.$_REQUEST['eventsource'].
+ ' AND '.DBin_node('actionid').
+ order_by('a.name,a.status','a.actionid'));
while($action_data = DBfetch($db_actions))
{
if(!action_accessiable($action_data['actionid'], PERM_READ_WRITE)) continue;