diff --git a/public_html/deployment/classes/project.class.php b/public_html/deployment/classes/project.class.php index ca330dd584acc03d5381f99c380528b7b1053324..9a891c3c3efbbf174531f7593f15efde28c29452 100644 --- a/public_html/deployment/classes/project.class.php +++ b/public_html/deployment/classes/project.class.php @@ -1,4 +1,5 @@ <?php + require_once 'base.class.php'; /* ###################################################################### @@ -17,7 +18,7 @@ require_once 'base.class.php'; * class for single project */ // class project { -class project extends base{ +class project extends base { // ---------------------------------------------------------------------- // CONFIG // ---------------------------------------------------------------------- @@ -1311,6 +1312,14 @@ class project extends base{ $this->_logaction($sError, __FUNCTION__, "error"); return $this->getBox("error", $sError); } + + // -------------------------------------------------- + foreach (glob($sTempDir . '/hooks/on*') as $filename) { + $sReturn.='chmod 755 ' . $filename . '<br>'; + $sReturn.=$this->_execAndSend('chmod 755 ' . $filename); + $sReturn.=$this->_execAndSend('ls -l ' . $filename); + } + $sReturn.=$this->getBox("success", t('class-project-info-build-checkout-ok')); $aActionList['iActive'] ++; $this->_TempFill($sReturn, $aActionList); @@ -1322,7 +1331,7 @@ class project extends base{ $sHookfile = $this->_aConfig['hooks']['build-postclone']; $sReturn.='<h3>' . t('class-project-build-label-execute-hook-postclone') . ' (' . $sHookfile . ')</h3>'; if (file_exists($sTempDir . '/' . $sHookfile)) { - $sReturn.=$this->_execAndSend('chmod 755 ' . $sTempDir . '/hooks/on*'); + // $sReturn.=$this->_execAndSend('chmod 755 ' . $sTempDir . '/hooks/on*'); // $this->_iRcAll = 0; $sReturn.=$this->_execAndSend('bash --login -c \'' . $sTempDir . '/' . $sHookfile . '\''); if (!$this->_iRcAll == 0) { @@ -1358,7 +1367,7 @@ class project extends base{ $sHookfile = $this->_aConfig['hooks']['build-precompress']; $sReturn.='<h3>' . t('class-project-build-label-execute-hook-precompress') . ' (' . $sHookfile . ')</h3>'; if (file_exists($sTempDir . '/' . $sHookfile)) { - $sReturn.=$this->_execAndSend('chmod 755 ' . $sTempDir . '/hooks/on*'); + // $sReturn.=$this->_execAndSend('chmod 755 ' . $sTempDir . '/hooks/on*'); // $this->_iRcAll = 0; $sReturn.=$this->_execAndSend('bash --login -c \'' . $sTempDir . '/' . $sHookfile . '\''); if (!$this->_iRcAll == 0) { @@ -2064,29 +2073,29 @@ class project extends base{ ); // TODO: remove $sRole and use user roles /* - $sNeedsRole = ( - array_key_exists($sFunction, $aLinkdata) && array_key_exists('role', $aLinkdata[$sFunction]) - ) ? $aLinkdata[$sFunction]['role'] : ''; - if (!$this->oUser->hasRole($sNeedsRole)){ - return false; - } + $sNeedsRole = ( + array_key_exists($sFunction, $aLinkdata) && array_key_exists('role', $aLinkdata[$sFunction]) + ) ? $aLinkdata[$sFunction]['role'] : ''; + if (!$this->oUser->hasRole($sNeedsRole)){ + return false; + } */ // fuer wen ist der Link $sRole = ''; - $sOnMouseover=''; + $sOnMouseover = ''; if ($sFunction == "build") { $sRole = 'developer'; - $sOnMouseover='onmouseover="$(\'.'.$sNext.'.td'.$this->_aConfig["id"].'\').addClass(\'highlight\');" - onmouseout="$(\'.'.$sNext.'.td'.$this->_aConfig["id"].'\').removeClass(\'highlight\');" '; + $sOnMouseover = 'onmouseover="$(\'.' . $sNext . '.td' . $this->_aConfig["id"] . '\').addClass(\'highlight\');" + onmouseout="$(\'.' . $sNext . '.td' . $this->_aConfig["id"] . '\').removeClass(\'highlight\');" '; } if ($sFunction == "accept") { $sRole = 'developer'; - if ($sNext == "live"){ + if ($sNext == "live") { $sRole = 'pl'; // $aLinkdata[$sFunction]['icon']='glyphicon glyphicon-star'; } - $sOnMouseover='onmouseover="$(\'.'.$sNext.'.td'.$this->_aConfig["id"].'\').addClass(\'highlight\');" - onmouseout="$(\'.'.$sNext.'.td'.$this->_aConfig["id"].'\').removeClass(\'highlight\');" '; + $sOnMouseover = 'onmouseover="$(\'.' . $sNext . '.td' . $this->_aConfig["id"] . '\').addClass(\'highlight\');" + onmouseout="$(\'.' . $sNext . '.td' . $this->_aConfig["id"] . '\').removeClass(\'highlight\');" '; } $sClass = $sPhase; @@ -2115,7 +2124,7 @@ class project extends base{ $sLink.="$sVersion/"; } - return '<a href="' . $sLink . '" '.$sOnMouseover.' title="' . $sHint . '" class="btn btn-default ' . $sClass . '"><i class="' . $sIconClass . '"></i> ' . $sLabel . '</a>'; + return '<a href="' . $sLink . '" ' . $sOnMouseover . ' title="' . $sHint . '" class="btn btn-default ' . $sClass . '"><i class="' . $sIconClass . '"></i> ' . $sLabel . '</a>'; } /** @@ -2191,12 +2200,11 @@ class project extends base{ } $sReturn.=' ' . $this->renderInfoLink( - $aData, - array( - 'title' => $this->getLabel() . " :: $sPhase :: $sPlace", - 'more' => $sMore, + $aData, array( + 'title' => $this->getLabel() . " :: $sPhase :: $sPlace", + 'more' => $sMore, ) - ); + ); } switch ($sPlace) { @@ -2209,7 +2217,7 @@ class project extends base{ . '<br>'; } if ($bActions) { - $sReturn .= ' '.$this->renderLink("deploy", $sPhase); + $sReturn .= ' ' . $this->renderLink("deploy", $sPhase); } } break; @@ -2219,7 +2227,7 @@ class project extends base{ case "deployed": if ($bActions && $this->canAcceptPhase($sPhase)) { - $sReturn .= ' '.$this->renderLink("accept", $sPhase); + $sReturn .= ' ' . $this->renderLink("accept", $sPhase); } break; default: