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; }