aboutsummaryrefslogtreecommitdiffstats
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
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.
-rw-r--r--config/squidGuard/squidguard.inc7
-rw-r--r--pkg_config.8.xml2
-rw-r--r--pkg_config.8.xml.amd642
3 files changed, 6 insertions, 5 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 !
}
diff --git a/pkg_config.8.xml b/pkg_config.8.xml
index cbaa5ea2..e610743f 100644
--- a/pkg_config.8.xml
+++ b/pkg_config.8.xml
@@ -1353,7 +1353,7 @@
<website>http://www.squidGuard.org/</website>
<maintainer>dv_serg@mail.ru</maintainer>
<category>Network Management</category>
- <version>1.4_4 pkg v.1.9.3</version>
+ <version>1.4_4 pkg v.1.9.4</version>
<status>Beta</status>
<required_version>1.1</required_version>
<depends_on_package_base_url>http://files.pfsense.org/packages/8/All/</depends_on_package_base_url>
diff --git a/pkg_config.8.xml.amd64 b/pkg_config.8.xml.amd64
index bc44aa70..b07e1358 100644
--- a/pkg_config.8.xml.amd64
+++ b/pkg_config.8.xml.amd64
@@ -1340,7 +1340,7 @@
<website>http://www.squidGuard.org/</website>
<maintainer>dv_serg@mail.ru</maintainer>
<category>Network Management</category>
- <version>1.4_4 pkg v.1.9.3</version>
+ <version>1.4_4 pkg v.1.9.4</version>
<status>Beta</status>
<required_version>1.1</required_version>
<depends_on_package_base_url>http://files.pfsense.org/packages/amd64/8/All/</depends_on_package_base_url>