diff --git a/config/lang/de-de.json b/config/lang/de-de.json index 6404074b4f20bc3e4e396d8236d4d36000ce8f0b..3911549d4e8d056a9f940566aaad315db32b238c 100644 --- a/config/lang/de-de.json +++ b/config/lang/de-de.json @@ -162,6 +162,7 @@ "page-build-info-processing": "processing ... please wait ...", "page-build-info-load": "Load", "page-build-info-processes": "ausgeführte Prozesse", + "page-build-reload-branches": "Branches neu laden", "page-cleanup-info-archives-deleted": "Folgende Verzeichnisse wurden gelöscht", "page-cleanup-info-archives-left": "Folgende Versionen sind derzeit vorhanden - mit Angabe, wo sie verwendet werden", diff --git a/config/lang/en-en.json b/config/lang/en-en.json index 941b70d5484bc4ab9d1b64ace04fda253e3c69cf..aad495d685642ec31e096f13328fc68707cf6b7e 100644 --- a/config/lang/en-en.json +++ b/config/lang/en-en.json @@ -163,6 +163,7 @@ "page-build-info-processing": "processing ... please wait ...", "page-build-info-load": "Load", "page-build-info-processes": "active prozesses", + "page-build-reload-branches": "Reload all branches", "page-cleanup-info-archives-deleted": "The following directories have been deleted", "page-cleanup-info-archives-left": "This versions currently exist - with information of their usage", diff --git a/public_html/api/index.php b/public_html/api/index.php index c84e9617d90ec202aa429c8d3e495954c00e63c6..d2350da19b7443c24e27d937ccc18ee72aa54165 100644 --- a/public_html/api/index.php +++ b/public_html/api/index.php @@ -216,7 +216,7 @@ $aResult=$oProject->setBranchname($sBranch); } $sBranchname=$oProject->getBranchname(); - $aRepodata = $oProject->getRemoteBranches(true); + $aRepodata = $oProject->getRemoteBranches(true); // ignore cache = true if(!isset($aRepodata[$sBranchname])){ _quit('ERROR: branch not found: '.$sBranchname, 404); } diff --git a/public_html/deployment/classes/project.class.php b/public_html/deployment/classes/project.class.php index ebf90df8bf5da483a52f4b3a371a323ccce8ea69..2bfaed7d84178eaa3e2908579403a464701dfb81 100644 --- a/public_html/deployment/classes/project.class.php +++ b/public_html/deployment/classes/project.class.php @@ -1198,18 +1198,18 @@ class project extends base { /** * get list of remote branches and tags - * @param type $sActiveBranchname + * @param type $getRemoteBranches * @return string|boolean */ - public function getRemoteBranches($sActiveBranchname = false) { - $this->log(__FUNCTION__ . " start"); + public function getRemoteBranches($bForceNoCache=false) { + $this->log(__FUNCTION__ . "($bForceNoCache) start"); $this->_initVcs(); if ($this->_oVcs) { if (!method_exists($this->_oVcs, "getRemoteBranches")) { // the version control class does not have this method return ''; } - return $this->_oVcs->getRemoteBranches(); + return $this->_oVcs->getRemoteBranches($bForceNoCache); } return false; } @@ -1220,7 +1220,7 @@ class project extends base { * @param string $sActiveBranchname force active branch name * @return string */ - public function renderSelectRemoteBranches($sActiveBranchname = false) { + public function renderSelectRemoteBranches($sActiveBranchname = false, $bForceNoCache=false) { $aReturn = array(); $aRadios = array(); $bFoundActive = false; @@ -1237,7 +1237,7 @@ class project extends base { // the version control class does not have this method return ''; } - foreach ($this->_oVcs->getRemoteBranches() as $aBranch) { + foreach ($this->_oVcs->getRemoteBranches($bForceNoCache) as $aBranch) { $sBranch = $aBranch['name']; $aRadios[$sBranch] = array( 'value' => $sBranch, diff --git a/public_html/deployment/classes/vcs.git.class.php b/public_html/deployment/classes/vcs.git.class.php index 24c96d16e76f58568bc68e20ec582df32d76aff9..02750cbb9f39e4569bcf48072f70b01bd1b3f0b3 100644 --- a/public_html/deployment/classes/vcs.git.class.php +++ b/public_html/deployment/classes/vcs.git.class.php @@ -302,12 +302,13 @@ class vcs implements iVcs { /** * get a flat array with names of all remote branches + * @param bool $bForceNoCache flag: ignore caching; default: use cache * @return array */ - public function getRemoteBranches() { - $this->log(__FUNCTION__." start"); + public function getRemoteBranches($bForceNoCache=false) { + $this->log(__FUNCTION__."($bForceNoCache) start"); if (!$this->_aRemoteBranches) { - $this->_fetchRemoteBranches(); + $this->_fetchRemoteBranches($bForceNoCache); } return $this->_aRemoteBranches; }