config: unify the change messages

Changes are not unknown, the config can be diff'ed.
This commit is contained in:
Franco Fichtner 2016-01-29 20:54:50 +01:00
parent ec244ebe52
commit 1955be171e
2 changed files with 5 additions and 3 deletions

View File

@ -336,7 +336,7 @@ function make_config_revision_entry($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();

View File

@ -1,4 +1,5 @@
<?php
/**
* Copyright (C) 2015 Deciso B.V.
*
@ -26,6 +27,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
*/
namespace OPNsense\Core;
use \Phalcon\DI\FactoryDefault;
@ -372,10 +374,10 @@ class Config extends Singleton
}
if (!empty($_SERVER['REQUEST_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 {
// 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']);
}
}