diff options
Diffstat (limited to 'config/systempatches')
-rw-r--r-- | config/systempatches/system_patches.php | 2 | ||||
-rw-r--r-- | config/systempatches/system_patches_edit.php | 6 | ||||
-rw-r--r-- | config/systempatches/systempatches.xml | 2 |
3 files changed, 7 insertions, 3 deletions
diff --git a/config/systempatches/system_patches.php b/config/systempatches/system_patches.php index 7fe860bd..793448d7 100644 --- a/config/systempatches/system_patches.php +++ b/config/systempatches/system_patches.php @@ -67,7 +67,7 @@ if ($_GET['act'] == "del") { } if (($_GET['act'] == "fetch") && ($a_patches[$_GET['id']])) { - $savemsg = patch_fetch(& $a_patches[$_GET['id']]) ? gettext("Patch Fetched Successfully") : gettext("Patch Fetch Failed"); + $savemsg = patch_fetch($a_patches[$_GET['id']]) ? gettext("Patch Fetched Successfully") : gettext("Patch Fetch Failed"); } if (($_GET['act'] == "test") && ($a_patches[$_GET['id']])) { $savemsg = patch_test_apply($a_patches[$_GET['id']]) ? gettext("Patch can be applied cleanly") : gettext("Patch can NOT be applied cleanly"); diff --git a/config/systempatches/system_patches_edit.php b/config/systempatches/system_patches_edit.php index ffa2fe13..3e63038e 100644 --- a/config/systempatches/system_patches_edit.php +++ b/config/systempatches/system_patches_edit.php @@ -86,7 +86,11 @@ if ($_POST) { $reqdfieldsn = array(gettext("Description"),gettext("URL/Commit ID")); } - do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors); + $pf_version=substr(trim(file_get_contents("/etc/version")),0,3); + if ($pf_version < 2.1) + $input_errors = eval('do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors); return $input_errors;'); + else + do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); if (!empty($_POST['location']) && !is_commit_id($_POST['location']) && !is_URL($_POST['location'])) { $input_errors[] = gettext("The supplied commit ID/URL appears to be invalid."); diff --git a/config/systempatches/systempatches.xml b/config/systempatches/systempatches.xml index 23b0795b..b9875140 100644 --- a/config/systempatches/systempatches.xml +++ b/config/systempatches/systempatches.xml @@ -40,7 +40,7 @@ <requirements>None</requirements> <faq>Applies patches supplied by the user to the firewall.</faq> <name>System Patches</name> - <version>1.0</version> + <version>1.0.2</version> <title>System: Patches</title> <include_file>/usr/local/pkg/patches.inc</include_file> <menu> |