On Thu, Aug 16, 2012 at 04:23:15PM -0600, Travis Johnson wrote:
> We just upgraded to the latest version from 0.8.5. In our previous
> version, when we brought up the host list, it was alphabetical. Now with
> the new version is it listing them by HostID number instead. How do we
> change that?
Add this patch that is attached. The problem is that everything is
defined so the isset() on line 244 always matches, when it should be
using !empty()
- Craig
--
Craig Small VK2XLZ http://enc.com.au/ csmall at : enc.com.au
Debian GNU/Linux http://www.debian.org/ csmall at : debian.org
GPG fingerprint: 5D2F B320 B825 D939 04D2 0519 3938 F96B DF50 FEA5
diff --git a/htdocs/admin/adm/adm_standard.php
b/htdocs/admin/adm/adm_standard.php
index b5a3df1..7fbc3c9 100644
--- a/htdocs/admin/adm/adm_standard.php
+++ b/htdocs/admin/adm/adm_standard.php
@@ -172,7 +172,7 @@ if ($st['show_id']) //add ID Field
$rows += count($st['fields']);
-if (!isset($actionid) || $actionid!='new')
+if (empty($actionid) || $actionid!='new')
{
// OLD Filter handling
if (isset($st['filter_field']))
@@ -229,7 +229,7 @@ if (!empty($filter_field) && ($filter_value!==""))
$records = array_record_search($records, $filter_field, $filter_value);
// SORT Records
-if (!isset($sf) || !isset($so))
+if (empty($sf) || empty($so))
{
if (isset($st['default_sort_field']))
$sf = $st['default_sort_field'];
@@ -238,7 +238,7 @@ if (!isset($sf) || !isset($so))
$so = $st['default_sort_order'];
}
-if (isset($sf) && isset($so))
+if (!empty($sf) && !empty($so))
array_key_sort($records, array($sf=>(($so=='asc')?SORT_ASC:SORT_DESC)));
@@ -286,7 +286,7 @@ if ($adm_view_type=='html')
}
//show only the init and span the user asked for
-if ($cant > 0 && isset($actionid) && $actionid!='new')
+if ($cant > 0 && !empty($actionid) && $actionid!='new')
$records = array_slice($records,$init,$span);
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
jffnms-users mailing list
jffnms-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jffnms-users