From a1db63c131fab7259d1bc865abd279c51d20bbce Mon Sep 17 00:00:00 2001 From: jim-p Date: Wed, 7 May 2014 15:50:27 -0400 Subject: Fix call-time pass-by-reference in System Patches, bump version --- config/systempatches/system_patches_edit.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'config/systempatches/system_patches_edit.php') diff --git a/config/systempatches/system_patches_edit.php b/config/systempatches/system_patches_edit.php index ffa2fe13..39d0f12a 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) + do_input_validation($_POST, $reqdfields, $reqdfieldsn, $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."); -- cgit v1.2.3