[Fusionforge-commits] r12232 - branches/Branch_5_1/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm

Olivier Berger olberger at libremir.placard.fr.eu.org
Thu Feb 10 16:12:11 CET 2011


Author: olberger
Date: 2011-02-10 16:12:11 +0100 (Thu, 10 Feb 2011)
New Revision: 12232

Modified:
   branches/Branch_5_1/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/oslc-cm-service-document.phtml
   branches/Branch_5_1/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/oslc-cm-service-document.xml.phtml
   branches/Branch_5_1/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/oslc-service-catalog-project.json.phtml
   branches/Branch_5_1/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/oslc-service-catalog-project.phtml
   branches/Branch_5_1/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/oslc-service-catalog-project.xml.phtml
   branches/Branch_5_1/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/oslc-service-catalog.json.phtml
   branches/Branch_5_1/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/oslc-service-catalog.phtml
   branches/Branch_5_1/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/oslc-service-catalog.xml.phtml
   branches/Branch_5_1/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/read-resource-collection.phtml
Log:
Use absolute URLS for services discovery and description.

Modified: branches/Branch_5_1/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/oslc-cm-service-document.phtml
===================================================================
--- branches/Branch_5_1/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/oslc-cm-service-document.phtml	2011-02-10 15:12:07 UTC (rev 12231)
+++ branches/Branch_5_1/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/oslc-cm-service-document.phtml	2011-02-10 15:12:11 UTC (rev 12232)
@@ -48,10 +48,9 @@
 <h1>OSLC-CM V1 Service Description document</h1>
 <pre>
 <?php
-	$xml = project_to_service_description($this->baseUrl(), $this->project, $this->tracker);
+	$xml = project_to_service_description($this->serverUrl() . $this->baseUrl(), $this->project, $this->tracker);
 	$text = str_replace('>', '>', str_replace('<', '<', $xml));
-	$text = add_links($text, "http");
-	$text = add_links($text, $this->baseUrl());
+	$text = add_links($text, $this->serverUrl().$this->baseUrl());
 	echo $text;?>
 </pre>
 </body>

Modified: branches/Branch_5_1/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/oslc-cm-service-document.xml.phtml
===================================================================
--- branches/Branch_5_1/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/oslc-cm-service-document.xml.phtml	2011-02-10 15:12:07 UTC (rev 12231)
+++ branches/Branch_5_1/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/oslc-cm-service-document.xml.phtml	2011-02-10 15:12:11 UTC (rev 12232)
@@ -27,4 +27,4 @@
 
 require('_service-document_xml.php');
 
-print project_to_service_description($this->baseUrl(), $this->project, $this->tracker);
\ No newline at end of file
+print project_to_service_description($this->serverUrl().$this->baseUrl(), $this->project, $this->tracker);
\ No newline at end of file

Modified: branches/Branch_5_1/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/oslc-service-catalog-project.json.phtml
===================================================================
--- branches/Branch_5_1/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/oslc-service-catalog-project.json.phtml	2011-02-10 15:12:07 UTC (rev 12231)
+++ branches/Branch_5_1/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/oslc-service-catalog-project.json.phtml	2011-02-10 15:12:11 UTC (rev 12232)
@@ -5,7 +5,7 @@
 	$service["oslc_disc:entry"]["oslc_disc:ServiceProvider"]["dc:identifier"] = $tracker["id"];
 	$service["oslc_disc:entry"]["oslc_disc:ServiceProvider"]["dc:title"] = $tracker["name"];
 	$service["oslc_disc:entry"]["oslc_disc:ServiceProvider"]["dc:descrption"] = $tracker["description"];
-	$service["oslc_disc:entry"]["oslc_disc:ServiceProvider"]["oslc_disc:services"]["rdf:ressource"] = $this->base_url.'/cm/oslc-cm-service/'.$tracker['group_id'].'/tracker/'.$tracker['id'];
+	$service["oslc_disc:entry"]["oslc_disc:ServiceProvider"]["oslc_disc:services"]["rdf:ressource"] = $this->serverUrl() . util_make_uri($this->base_url().'/cm/oslc-cm-service/'.$tracker['group_id'].'/tracker/'.$tracker['id']);
 	$catalog[] = $service;
 }
 $json["rdf:about"] = "";

Modified: branches/Branch_5_1/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/oslc-service-catalog-project.phtml
===================================================================
--- branches/Branch_5_1/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/oslc-service-catalog-project.phtml	2011-02-10 15:12:07 UTC (rev 12231)
+++ branches/Branch_5_1/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/oslc-service-catalog-project.phtml	2011-02-10 15:12:11 UTC (rev 12232)
@@ -30,11 +30,9 @@
 <h1>OSLC-CM V1 Service Catalog document</h1>
 <pre>
 <?php
-	$xml = project_trackers_to_service_catalog($this->baseUrl(), $this->trackers, $this->project);
-	//print $xml;
+	$xml = project_trackers_to_service_catalog($this->serverUrl() . $this->baseUrl(), $this->trackers, $this->project);
 	$text = str_replace('>', '>', str_replace('<', '<', $xml));
-	$text = add_links($text, "http");
-	$text = add_links($text, $this->baseUrl());
+	$text = add_links($text, $this->serverUrl().$this->baseUrl());
 	echo $text;
 ?>
 </pre>

Modified: branches/Branch_5_1/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/oslc-service-catalog-project.xml.phtml
===================================================================
--- branches/Branch_5_1/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/oslc-service-catalog-project.xml.phtml	2011-02-10 15:12:07 UTC (rev 12231)
+++ branches/Branch_5_1/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/oslc-service-catalog-project.xml.phtml	2011-02-10 15:12:11 UTC (rev 12232)
@@ -24,4 +24,4 @@
 
 require_once('_service-catalog_xml.php');
 
-print project_trackers_to_service_catalog($this->baseUrl(), $this->trackers, $this->project);
+print project_trackers_to_service_catalog($this->serverUrl().$this->baseUrl(), $this->trackers, $this->project);

Modified: branches/Branch_5_1/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/oslc-service-catalog.json.phtml
===================================================================
--- branches/Branch_5_1/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/oslc-service-catalog.json.phtml	2011-02-10 15:12:07 UTC (rev 12231)
+++ branches/Branch_5_1/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/oslc-service-catalog.json.phtml	2011-02-10 15:12:11 UTC (rev 12232)
@@ -4,7 +4,7 @@
 foreach ($this->projects as $proj)
 {
 	$service["oslc_disc:entry"]["oslc_disc:ServiceProvider"]["dc:title"] = $proj["name"];
-	$service["oslc_disc:entry"]["oslc_disc:ServiceProvider"]["oslc_disc:services"] = $this->baseUrl().'/cm/oslc-cm-service/'.$proj['id'];
+	$service["oslc_disc:entry"]["oslc_disc:ServiceProvider"]["oslc_disc:services"] = $this->serverUrl().util_make_uri($this->baseUrl().'/cm/oslc-cm-service/'.$proj['id']);
 	$catalog[] = $service;
 }
 

Modified: branches/Branch_5_1/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/oslc-service-catalog.phtml
===================================================================
--- branches/Branch_5_1/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/oslc-service-catalog.phtml	2011-02-10 15:12:07 UTC (rev 12231)
+++ branches/Branch_5_1/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/oslc-service-catalog.phtml	2011-02-10 15:12:11 UTC (rev 12232)
@@ -47,11 +47,9 @@
 <h1>OSLC-CM V1 Service Catalog document</h1>
 <pre>
 <?php
-	$xml = projects_to_service_catalog($this->baseUrl(), $this->projects);
-	//print $xml;
+	$xml = projects_to_service_catalog($this->serverUrl().$this->baseUrl(), $this->projects);
 	$text = str_replace('>', '>', str_replace('<', '<', $xml));
-	$text = add_links($text, "http");
-	$text = add_links($text, $this->baseUrl());
+	$text = add_links($text, $this->serverUrl().$this->baseUrl());
 	echo $text;?>
 </pre>
 </body>

Modified: branches/Branch_5_1/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/oslc-service-catalog.xml.phtml
===================================================================
--- branches/Branch_5_1/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/oslc-service-catalog.xml.phtml	2011-02-10 15:12:07 UTC (rev 12231)
+++ branches/Branch_5_1/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/oslc-service-catalog.xml.phtml	2011-02-10 15:12:11 UTC (rev 12232)
@@ -27,4 +27,4 @@
 
 require('_service-catalog_xml.php');
 
-print projects_to_service_catalog($this->baseUrl(), $this->projects);
+print projects_to_service_catalog($this->serverUrl().$this->baseUrl(), $this->projects);

Modified: branches/Branch_5_1/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/read-resource-collection.phtml
===================================================================
--- branches/Branch_5_1/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/read-resource-collection.phtml	2011-02-10 15:12:07 UTC (rev 12231)
+++ branches/Branch_5_1/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/read-resource-collection.phtml	2011-02-10 15:12:11 UTC (rev 12232)
@@ -42,7 +42,7 @@
 print '<h1>'.$tracker.' Change Requests:</h1>';
 $xml = createRessourceCollectionView($this);
 $text = str_replace('>', '>', str_replace('<', '<', $xml));
-$text = add_links($text, "http");
+$text = add_links($text, $this->serverUrl().$this->baseUrl());
 print '<pre>'.$text.'</pre>';?>
 
 </body>




More information about the Fusionforge-commits mailing list