Private GIT

Skip to content
Snippets Groups Projects
Commit 5e697f1a authored by Carsten Schoenert's avatar Carsten Schoenert
Browse files

l10n: add some outstanding Log->write messages

These are some left over Log generating messages that aren't added to
the l10n catalogue yet.
parent fec18718
No related branches found
No related tags found
No related merge requests found
......@@ -127,7 +127,7 @@ $delete = $_POST['action']=="delete" ? "disabled" : "";
<?php
# check for socket support !
if(!in_array("sockets", get_loaded_extensions())) {
$Log->write( "Radius login", "php Socket extension missing!", 2 );
$Log->write( _("Radius login"), _("php Socket extension missing!"), 2 );
$Result->show("danger", _("php Socket extension missing!"), false);
}
?>
......
......@@ -33,7 +33,7 @@ if ($_POST['id']=="1" || $_POST['id']=="2") {
try { $Database->updateObject("instructions", array("id"=>$_POST['id'], "instructions"=>$_POST['instructions']), "id"); }
catch (Exception $e) {
$Result->show("danger", _("Error: ").$e->getMessage(), false);
$Log->write( "Instructions updated", "Failed to update instructions<hr>".$e->getMessage(), 1);
$Log->write( _("Instructions updated"), _("Failed to update instructions")."<hr>".$e->getMessage(), 1);
}
}
// create new
......@@ -41,13 +41,13 @@ if ($_POST['id']=="1" || $_POST['id']=="2") {
try { $Database->insertObject("instructions", array("id"=>$_POST['id'], "instructions"=>$_POST['instructions']), false, true, false); }
catch (Exception $e) {
$Result->show("danger", _("Error: ").$e->getMessage(), false);
$Log->write( "Instructions updated", "Failed to update instructions<hr>".$e->getMessage(), 1);
$Log->write( _("Instructions updated"), _("Failed to update instructions")."<hr>".$e->getMessage(), 1);
}
}
// success
if (!isset($e)) {
# ok
$Log->write( "Instructions updated", "Instructions updated succesfully", 0);
$Log->write( _("Instructions updated"), _("Instructions updated succesfully"), 0);
$Result->show("success", _("Instructions updated successfully"), true);
}
}
......
......@@ -50,7 +50,7 @@ else {
}
}
else {
$Log->write( "Login IP blocked", "Login from IP address ".$_SERVER['REMOTE_ADDR']." was blocked because of 5 minute block after 5 failed 2fa attempts", 1);
$Log->write( _("Login IP blocked"), _("Login from IP address")." ".$_SERVER['REMOTE_ADDR']." "._("was blocked because of 5 minute block after 5 failed 2fa attempts"), 1);
$Result->show("danger", _('You have been blocked for 5 minutes due to 2fa authentication failures'), true);
}
}
\ No newline at end of file
......@@ -36,7 +36,7 @@ if( !empty($_POST['ipamusername']) && !empty($_POST['ipampassword']) ) {
}
# count set, captcha required
elseif(!isset($_POST['captcha'])) {
$Log->write( "Login IP blocked", "Login from IP address ".$_SERVER['REMOTE_ADDR']." was blocked because of 5 minute block after 5 failed attempts", 1);
$Log->write( _("Login IP blocked"), _("Login from IP address")." ".$_SERVER['REMOTE_ADDR']." "._("was blocked because of 5 minute block after 5 failed 2fa attempts"), 1);
$Result->show("danger", _('You have been blocked for 5 minutes due to authentication failures'), true);
}
# captcha check
......
......@@ -101,16 +101,16 @@ $max_width = (@$temp_objects[$_GET['section']]->type=="ipaddresses" || isset($_G
# disbled
if($settings->tempShare!=1) { $Result->show("danger", _("Temporary sharing disabled"), false); }
# none
elseif(sizeof($temp_objects)==0) { $Log->write( "Tempory share access", $_GET['section'], 2); $Result->show("danger", _("Invalid share key")."! <a href='".create_link("login")."' class='btn btn-sm btn-default'>Login</a>", false); }
elseif(sizeof($temp_objects)==0) { $Log->write( _("Tempory share access"), $_GET['section'], 2); $Result->show("danger", _("Invalid share key")."! <a href='".create_link("login")."' class='btn btn-sm btn-default'>Login</a>", false); }
# try to fetch object
elseif(!array_key_exists($_GET['section'], $temp_objects)) { $Log->write( "Tempory share access", $_GET['section'], 2); $Result->show("danger", _("Invalid share key")."! <a href='".create_link("login")."' class='btn btn-sm btn-default'>Login</a>", false); }
elseif(!array_key_exists($_GET['section'], $temp_objects)) { $Log->write( _("Tempory share access"), $_GET['section'], 2); $Result->show("danger", _("Invalid share key")."! <a href='".create_link("login")."' class='btn btn-sm btn-default'>Login</a>", false); }
# ok, include script
else {
//check if expired
if(time()>$temp_objects[$_GET['section']]->validity) { $Log->write( "Tempory share access", $_GET['section'], 2); $Result->show("danger", _("Share expired")."!", false); }
if(time()>$temp_objects[$_GET['section']]->validity) { $Log->write( _("Tempory share access"), $_GET['section'], 2); $Result->show("danger", _("Share expired")."!", false); }
else {
//log
$Log->write( "Tempory share access", $_GET['section'], 0);
$Log->write( _("Tempory share access"), $_GET['section'], 0);
if($temp_objects[$_GET['section']]->type=="subnets") {
# address?
......
......@@ -403,7 +403,7 @@ class PowerDNS extends Common_functions {
return false;
}
// write log
$this->Log->write( "PowerDNS domain edit", "PowerDNS domain edited<hr>".$this->array_to_log((array) $values), 0);
$this->Log->write( _("PowerDNS domain edit"), _("PowerDNS domain edited")."<hr>".$this->array_to_log((array) $values), 0);
# ok
return true;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment