aboutsummaryrefslogtreecommitdiffstats
path: root/config/squidGuard
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2013-05-16 16:15:30 -0400
committerjim-p <jimp@pfsense.org>2013-05-16 16:15:30 -0400
commit60b11790e713d6b110c662bcd6f864a4e51a0ff4 (patch)
tree66c9a81946c3520a2a5dc7377156f7100036375c /config/squidGuard
parent3f58411b952db4ecc1f3e002ab0a5721498235ba (diff)
downloadpfsense-packages-60b11790e713d6b110c662bcd6f864a4e51a0ff4.tar.gz
pfsense-packages-60b11790e713d6b110c662bcd6f864a4e51a0ff4.tar.bz2
pfsense-packages-60b11790e713d6b110c662bcd6f864a4e51a0ff4.zip
Rework "order" field code for squidguard target categories, to avoid a php error when no other target categories exist.
Diffstat (limited to 'config/squidGuard')
-rw-r--r--config/squidGuard/squidguard.inc7
1 files changed, 4 insertions, 3 deletions
diff --git a/config/squidGuard/squidguard.inc b/config/squidGuard/squidguard.inc
index f3126649..1ea1b5a5 100644
--- a/config/squidGuard/squidguard.inc
+++ b/config/squidGuard/squidguard.inc
@@ -645,10 +645,11 @@ function squidguard_before_form_dest($pkg) {
$i=0;
foreach($pkg['fields']['field'] as $field) {
# order
- if (is_array($destination_items) && $field['fieldname'] == 'order') {
+ if ($field['fieldname'] == 'order') {
$fld = &$pkg['fields']['field'][$i];
- foreach($destination_items as $nmkey => $nm)
- $fld['options']['option'][] = array('name'=>$nm, 'value'=>$nmkey);
+ if (is_array($destination_items))
+ foreach($destination_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 !
}