From b0593ec5d01b1b1d29d7e62a8df5e39687484bfa Mon Sep 17 00:00:00 2001 From: Sergey Dvoriancev Date: Mon, 13 Apr 2015 00:30:45 +0300 Subject: Squidguard fix ACL order problem --- config/squidGuard/squidguard.inc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/config/squidGuard/squidguard.inc b/config/squidGuard/squidguard.inc index 0fd450b7..c4c47bcc 100644 --- a/config/squidGuard/squidguard.inc +++ b/config/squidGuard/squidguard.inc @@ -502,12 +502,13 @@ function squidguard_before_form_acl(&$pkg, $is_acl=true) { } } # order - if (is_array($source_items) && $field['fieldname'] == 'order') { + if ($field['fieldname'] == 'order') { $fld = &$pkg['fields']['field'][$i]; - foreach($source_items as $nmkey => $nm) - $fld['options']['option'][] = array('name'=>$nm, 'value'=>$nmkey); - $fld['options']['option'][] = array('name'=>'--- Last ---', 'value'=>'9999'); - $fld['options']['option'][] = array('name'=>'-----', 'value'=>''); # ! this is must be last ! + if (is_array($source_items)) + foreach($source_items as $nmkey => $nm) + $fld['options']['option'][] = array('name'=>$nm, 'value'=>$nmkey); + $fld['options']['option'][] = array('name'=>'--- Last ---', 'value'=>'9999'); + $fld['options']['option'][] = array('name'=>'-----', 'value'=>''); # ! this is must be last ! } $i++; } -- cgit v1.2.3