Skip to content
Snippets Groups Projects

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

Merged Hahn Axel (hahn) requested to merge 7941-fix-creation-of-new-project into master
1 file
+ 6
5
Compare changes
  • Side-by-side
  • Inline
@@ -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;
}
Loading