From 2efc3c1ce0a30dcab224e9c10c096c885e47701c Mon Sep 17 00:00:00 2001
From: hahn <hahn@AAE49.campus.unibe.ch>
Date: Fri, 23 May 2014 08:53:43 +0200
Subject: [PATCH] - fixed: variables for json url

---
 public_html/deployment/classes/project.class.php | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/public_html/deployment/classes/project.class.php b/public_html/deployment/classes/project.class.php
index 504b141e..0dd0ac95 100644
--- a/public_html/deployment/classes/project.class.php
+++ b/public_html/deployment/classes/project.class.php
@@ -289,7 +289,8 @@ class project {
         // url for deployed
         if ($sPlace == "deployed") {
             if ($this->isActivePhase($sPhase) && array_key_exists("url", $this->_aPrjConfig["phases"][$sPhase])) {
-                $sBase = $this->_aPrjConfig["phases"][$sPhase]["url"] . $this->_aPrjConfig["fileprefix"];
+                // $sBase = $this->_aPrjConfig["phases"][$sPhase]["url"] . $this->_aPrjConfig["fileprefix"];
+                $sBase = $this->_aPrjConfig["phases"][$sPhase]["url"];
             } else {
                 $sBase = '';
             }
@@ -645,19 +646,18 @@ class project {
             $sJsonfile = $this->_getInfofile($sPhase, $sKey);
             $aTmp[$sKey] = array();
             if ($this->isActivePhase($sPhase)) {
-                $sJsonUrl = $this->_aPrjConfig["phases"][$sPhase]["url"] . $this->_aPrjConfig["fileprefix"] . ".json";
-                $sJsonData = @file_get_contents($sJsonUrl);
+                $sJsonData = @file_get_contents($sJsonfile);
                 if ($sJsonData) {
                     $aJson = json_decode($sJsonData, true);
                     if (array_key_exists("version", $aJson)) {
                         $aTmp[$sKey] = $aJson;
-                        $aTmp[$sKey]["infofile"] = $sJsonUrl;
+                        $aTmp[$sKey]["infofile"] = $sJsonfile;
                         $aTmp[$sKey]["ok"] = 1;
                     } else {
                         $aTmp[$sKey]["error"] = sprintf(t("class-project-error-metafile-has-no-version"), $sJsonfile, print_r($aJson, true));
                     }
                 } else {
-                    $aTmp[$sKey]["error"] = sprintf(t("class-project-error-metafile-wrong-format"), $sJsonUrl);
+                    $aTmp[$sKey]["error"] = sprintf(t("class-project-error-metafile-wrong-format"), $sJsonfile);
                 }
             } else {
                 $aTmp[$sKey]["warning"] = t("class-project-warning-phase-not-active");
@@ -1436,7 +1436,7 @@ class project {
         // $sReturn.=$this->_execAndSend("ln -s $sLinkTarget $sLinkName");
         if (array_key_exists('mirrorPackages', $this->_aConfig) && count($this->_aConfig['mirrorPackages'])) {
             foreach ($this->_aConfig['mirrorPackages'] as $sLabel => $aTarget) {
-                $sReturn.=sprintf(t("class-project-info-deploy-synching-package"), $sLabel) . "<br>";
+                $sReturn.='<h3>'.sprintf(t("class-project-info-deploy-synching-package"), $sLabel) . "</h3>";
                 if (array_key_exists('type', $aTarget)) {
                     $sCmd = false;
                     // $sSource=$this->_aConfig["packageDir"]."/$sPhase/*";
@@ -1473,7 +1473,7 @@ class project {
         // TODO: run puppet agent on target server(s) - for preview only
         if (array_key_exists("puppethost", $this->_aPrjConfig["phases"][$sPhase]) && $this->_aPrjConfig["phases"][$sPhase]["puppethost"]
         ) {
-            $sReturn.=t("class-project-info-deploy-start-puppet") . "<br>";
+            $sReturn.='<h3>'.t("class-project-info-deploy-start-puppet") . '</h3>';
             $sCmd = 'ssh ' . $this->_aConfig["installPackages"]["user"]
                     . '@' . $this->_aPrjConfig["phases"][$sPhase]["puppethost"]
                     . ' ' . $this->_aConfig["installPackages"]["command"];
-- 
GitLab