Commit 9c161f79 authored by Franco Fichtner's avatar Franco Fichtner

config: unify the change messages

Changes are not unknown, the config can be diff'ed.

(cherry picked from commit 1955be17)
parent f546fc83
...@@ -321,7 +321,7 @@ function make_config_revision_entry($desc = '') ...@@ -321,7 +321,7 @@ function make_config_revision_entry($desc = '')
} }
if (empty($desc)) { if (empty($desc)) {
$desc = sprintf(gettext('%s changed the configuration'), $_SERVER['SCRIPT_NAME']); $desc = sprintf(gettext('%s made changes'), $_SERVER['SCRIPT_NAME']);
} }
$revision = array(); $revision = array();
......
<?php <?php
/** /**
* Copyright (C) 2015 Deciso B.V. * Copyright (C) 2015 Deciso B.V.
* *
...@@ -26,6 +27,7 @@ ...@@ -26,6 +27,7 @@
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
* *
*/ */
namespace OPNsense\Core; namespace OPNsense\Core;
use \Phalcon\DI\FactoryDefault; use \Phalcon\DI\FactoryDefault;
...@@ -372,10 +374,10 @@ class Config extends Singleton ...@@ -372,10 +374,10 @@ class Config extends Singleton
} }
if (!empty($_SERVER['REQUEST_URI'])) { if (!empty($_SERVER['REQUEST_URI'])) {
// when update revision is called from a controller, log the endpoint uri // when update revision is called from a controller, log the endpoint uri
$revision['description'] = sprintf(gettext("%s made unknown change"), $_SERVER['REQUEST_URI']); $revision['description'] = sprintf(gettext('%s made changes'), $_SERVER['REQUEST_URI']);
} else { } else {
// called from a script, log script name and path // called from a script, log script name and path
$revision['description'] = sprintf(gettext("%s made unknown change"), $_SERVER['SCRIPT_NAME']); $revision['description'] = sprintf(gettext('%s made changes'), $_SERVER['SCRIPT_NAME']);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment