[Fusionforge-commits] r12352 - branches/Branch_5_1/src/plugins/hudson/include

Roland Mas lolando at fusionforge.org
Thu Feb 24 15:51:45 CET 2011


Author: lolando
Date: 2011-02-24 15:51:43 +0100 (Thu, 24 Feb 2011)
New Revision: 12352

Modified:
   branches/Branch_5_1/src/plugins/hudson/include/HudsonJob.class.php
Log:
Postpone fetching of .../job/foo/config.xml until it's needed

Modified: branches/Branch_5_1/src/plugins/hudson/include/HudsonJob.class.php
===================================================================
--- branches/Branch_5_1/src/plugins/hudson/include/HudsonJob.class.php	2011-02-24 12:42:01 UTC (rev 12351)
+++ branches/Branch_5_1/src/plugins/hudson/include/HudsonJob.class.php	2011-02-24 14:51:43 UTC (rev 12352)
@@ -53,7 +53,6 @@
         $this->_setStreamContext();
         
         $this->buildJobObject();
-        $this->configJobObject();
         
     }
     function getHudsonControler() {
@@ -64,7 +63,10 @@
         $this->dom_job = $this->_getXMLObject($this->hudson_job_url);
     }
     
-	public function configJobObject() {
+    public function configJobObject() {
+	if ($this->config_job) {
+	    return;
+	}
         $this->config_job = $this->_getXMLObject($this->hudson_config_job_url);
     }
     
@@ -289,7 +291,8 @@
         }
     }
     
-	function getSvnLocation() {
+    function getSvnLocation() {
+        $this->configJobObject();
         return $this->config_job->scm->locations->{'hudson.scm.SubversionSCM_-ModuleLocation'}->remote;
     }
     




More information about the Fusionforge-commits mailing list