From f511742b9bb25a7f90deb978211366acf23c311c Mon Sep 17 00:00:00 2001
From: Rasmus Fuhse <fuhse@data-quest.de>
Date: Thu, 19 Mar 2015 15:13:43 +0100
Subject: [PATCH] re #9

---
 controllers/extern.php | 1 +
 views/extern/xml.php   | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/controllers/extern.php b/controllers/extern.php
index 4cfe7b2..dc03f3b 100644
--- a/controllers/extern.php
+++ b/controllers/extern.php
@@ -5,6 +5,7 @@ class ExternController extends PluginController
 {
     public function xml_action() {
         $this->plugins = MarketPlugin::findBySQL("publiclyvisible = 1 AND approved = 1 ORDER BY name ASC");
+        URLHelper::setBaseUrl($GLOBALS['ABSOLUTE_URI_STUDIP']);
         $this->set_layout(null);
         $this->response->add_header('Content-Type', "text/xml");
     }
diff --git a/views/extern/xml.php b/views/extern/xml.php
index 6313a28..298077a 100644
--- a/views/extern/xml.php
+++ b/views/extern/xml.php
@@ -6,13 +6,13 @@
         homepage="<?= htmlReady(studip_utf8encode($marketplugin['url'])) ?>"
         short_description="<?= htmlReady(studip_utf8encode($marketplugin['short_description'])) ?>"
         description="<?= htmlReady(studip_utf8encode($marketplugin['description'])) ?>"
-        image="<?= htmlReady(studip_utf8encode($GLOBALS['ABSOLUTE_URI_STUDIP'].$marketplugin->getLogoURL())) ?>">
+        image="<?= htmlReady(studip_utf8encode($marketplugin->getLogoURL())) ?>">
         <? foreach ($marketplugin->releases as $release) : ?>
         <release
             version="<?= htmlReady(studip_utf8encode($release['version'])) ?>"
             studipMinVersion="<?= htmlReady(studip_utf8encode($release['studip_min_version'])) ?>"
             studipMaxVersion="<?= htmlReady(studip_utf8encode($release['studip_min_version'])) ?>"
-            url="<?= htmlReady(studip_utf8encode($GLOBALS['ABSOLUTE_URI_STUDIP']."plugins.php/pluginmarket/presenting/download/" . $release->getId())) ?>"
+            url="<?= htmlReady(studip_utf8encode($controller->url_for('presenting/download/' . $release->getId()))) ?>"
             />
         <? endforeach ?>
     </plugin>
-- 
GitLab