Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sysutils/pfSense-pkg-System_Patches: Add reason to write_config() calls #403

Merged
merged 3 commits into from
Sep 22, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions sysutils/pfSense-pkg-System_Patches/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# $FreeBSD$

PORTNAME= pfSense-pkg-System_Patches
PORTVERSION= 1.1.6
PORTREVISION= 1
PORTVERSION= 1.1.7
CATEGORIES= sysutils
MASTER_SITES= # empty
DISTFILES= # empty
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* system_patches.php
*
* part of pfSense (https://www.pfsense.org)
* Copyright (c) 2012-2015 Rubicon Communications, LLC (Netgate)
* Copyright (c) 2012-2017 Rubicon Communications, LLC (Netgate)
* All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -47,7 +47,7 @@
if ($_POST) {
$pconfig = $_POST;
if ($_POST['apply']) {
write_config();
write_config(gettext("System: Patches: applied a patch."));
}
}

Expand Down Expand Up @@ -136,7 +136,7 @@
}

if ($need_save) {
write_config();
write_config(gettext("System: Patches: saved configuration."));
header("Location: system_patches.php");
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* system_patches_edit.php
*
* part of pfSense (https://www.pfsense.org)
* Copyright (c) 2012-2015 Rubicon Communications, LLC (Netgate)
* Copyright (c) 2012-2017 Rubicon Communications, LLC (Netgate)
* All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -80,12 +80,7 @@
$reqdfieldsn = array(gettext("Description"),gettext("URL/Commit ID"));
}

$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);
}
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.");
Expand Down Expand Up @@ -131,7 +126,7 @@
}
}

write_config();
write_config(gettext("System: Patches: edited a patch."));
if ($thispatch['autoapply']) {
patch_add_shellcmd();
}
Expand Down