From 6a4b127e78ec59c0803c58dc9c9313c25655bf80 Mon Sep 17 00:00:00 2001
From: "Hahn Axel (hahn)" <axel.hahn@unibe.ch>
Date: Thu, 3 Apr 2025 14:54:18 +0200
Subject: [PATCH] 7941 - do not log creation step that fails if project id
 wasn't created yet

---
 public_html/deployment/classes/project.class.php | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/public_html/deployment/classes/project.class.php b/public_html/deployment/classes/project.class.php
index 1d5157c7..9f2eb997 100644
--- a/public_html/deployment/classes/project.class.php
+++ b/public_html/deployment/classes/project.class.php
@@ -2587,26 +2587,27 @@ class project extends base
         if (!$this->oUser->hasPermission("project-action-create")) {
             return $this->oUser->showDenied();
         }
-        $this->_logaction(t('starting') . " create($sId)", __FUNCTION__);
+        // 7941 - do not log creation step that fails if project id wasn't created yet
+        // $this->_logaction(t('starting') . " create($sId)", __FUNCTION__);
         if (!$sId) {
             $sError = t("class-project-error-create-missing-id");
-            $this->_logaction(t('aborted') . " create($sId)" . $sError, __FUNCTION__, "error");
+            // $this->_logaction(t('aborted') . " create($sId)" . $sError, __FUNCTION__, "error");
             return $sError;
         }
         $s = preg_replace('/[a-z\-\_0-9]*/', "", $sId);
         if ($s) {
             $sError = sprintf(t("class-project-error-create-wrcng-chars-in-id"), $sId);
-            $this->_logaction(t('aborted') . " create($sId)" . $sError, __FUNCTION__, "error");
+            // $this->_logaction(t('aborted') . " create($sId)" . $sError, __FUNCTION__, "error");
             return $sError;
         }
         if ($sId == "all") {
             $sError = sprintf(t("class-project-error-create-id-has-reserved-name"), $sId);
-            $this->_logaction(t('aborted') . " create($sId)" . $sError, __FUNCTION__, "error");
+            // $this->_logaction(t('aborted') . " create($sId)" . $sError, __FUNCTION__, "error");
             return $sError;
         }
         if (array_search($sId, $this->getProjects()) !== false) {
             $sError = sprintf(t("class-project-error-create-id-exists"), $sId);
-            $this->_logaction(t('aborted') . " create($sId)" . $sError, __FUNCTION__, "error");
+            // $this->_logaction(t('aborted') . " create($sId)" . $sError, __FUNCTION__, "error");
             return $sError;
         }
 
-- 
GitLab