Skip to content
Snippets Groups Projects
Commit 6a4b127e authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

7941 - do not log creation step that fails if project id wasn't created yet

parent 34b68f29
No related branches found
No related tags found
1 merge request!867941 - do not log creation step that fails if project id wasn't created yet
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment