From 0b8e8d83a5eae5d7d94ee68335c9cfbee2b63fb3 Mon Sep 17 00:00:00 2001 From: hahn <hahn@AAE49.campus.unibe.ch> Date: Fri, 28 Mar 2014 14:24:18 +0100 Subject: [PATCH] - added: comparison of lang texts - project class: removed a hardcoded variable - project overview: no tabs (was not handy) - added: logging project actions - added .htkeep in database directory; excluded log.db --- config/lang/de.json | 3 +++ config/lang/en.json | 3 +++ database/.htkeep | 0 public_html/deployment/classes/actionlog.class.php | 7 ++++--- public_html/deployment/classes/project.class.php | 6 +++--- 5 files changed, 13 insertions(+), 6 deletions(-) create mode 100644 database/.htkeep diff --git a/config/lang/de.json b/config/lang/de.json index 7e59e8a2..e8114eeb 100644 --- a/config/lang/de.json +++ b/config/lang/de.json @@ -28,6 +28,9 @@ "overview-filterreset":"Reset Filter", "overview-filterreset-hint":"Filter zurücksetzen", + "class-actionlog-title": "Action-Log", + "class-actionlog-filter": "Filter", + "class-actionlog-nolog": "Hinweis: Es wurden keine Logeinträge gefunden.", "class-pl-error-no-project": "<strong>Hinweis</strong><br>Es wurde noch kein Projekt eingerichtet.", diff --git a/config/lang/en.json b/config/lang/en.json index 47a5674e..9ec56b4f 100644 --- a/config/lang/en.json +++ b/config/lang/en.json @@ -27,6 +27,9 @@ "overview-filterreset":"Reset filter", "overview-filterreset-hint":"Remove all filter settings", + "class-actionlog-title": "Action-Log", + "class-actionlog-filter": "Filter", + "class-actionlog-nolog": "Remark: There was no logentry found.", "class-pl-error-no-project": "<strong>Remark</strong><br>No data. No project was created yet.", diff --git a/database/.htkeep b/database/.htkeep new file mode 100644 index 00000000..e69de29b diff --git a/public_html/deployment/classes/actionlog.class.php b/public_html/deployment/classes/actionlog.class.php index 788ca719..1e968a28 100644 --- a/public_html/deployment/classes/actionlog.class.php +++ b/public_html/deployment/classes/actionlog.class.php @@ -40,7 +40,7 @@ class Actionlog { $this->_sProject = $sProject; if (isset($_SERVER) && is_array($_SERVER)) { $this->_sIP = $_SERVER["REMOTE_ADDR"]; - $this->_sUser = $_SERVER["PHP_AUTH_USER"] . "(web)"; + $this->_sUser = $_SERVER["PHP_AUTH_USER"] . " (web)"; } else { $this->_sIP = 'local'; $this->_sUser = get_current_user() . " (system)"; @@ -149,7 +149,7 @@ class Actionlog { $sReturn=""; $aData=$this->getLogs($aFilter); if (!count($aData)){ - $sReturn=t("empty"); + $sReturn=t("class-actionlog-nolog"); } else { $sReturn.='<thead><tr>'; foreach (array_keys($aData[0]) as $sRow){ @@ -169,7 +169,8 @@ class Actionlog { } $sReturn='<br><hr>' - . '<h3>Action-Log</h3><p>Filter: '.print_r($aFilter, true).')</p>' + . '<h3>'.t("class-actionlog-title").'</h3>' + . '<p>'.t("class-actionlog-filter").': '.print_r($aFilter, true).')</p>' . $sReturn; return $sReturn; diff --git a/public_html/deployment/classes/project.class.php b/public_html/deployment/classes/project.class.php index 02df7e44..f974ef07 100644 --- a/public_html/deployment/classes/project.class.php +++ b/public_html/deployment/classes/project.class.php @@ -1226,9 +1226,9 @@ class project { $sReturn.=t("class-project-info-build-remove-oldest-archives"); $sReturn.='<pre>' . print_r($this->cleanupArchive(), true) . '</pre>'; - $sError=t("class-project-info-build-successful"); - $this->_logaction(t('finished').' '.$sError, __FUNCTION__, "success"); - $sReturn.=$this->getBox("success", $sError); + $sInfo=t("class-project-info-build-successful"); + $this->_logaction(t('finished').' '.$sInfo, __FUNCTION__, "success"); + $sReturn.=$this->getBox("success", $sInfo); $aActionList['iActive'] ++; $this->_TempFill($sReturn, $aActionList); -- GitLab