From f71693bf52b09a8767ea695ec44399240c6e123b Mon Sep 17 00:00:00 2001
From: Jan-Hendrik Willms <tleilax+github@gmail.com>
Date: Fri, 29 Mar 2019 10:07:09 +0100
Subject: [PATCH] add url to marktplace in xml

---
 controllers/extern.php | 11 ++++++-----
 plugin.manifest        |  2 +-
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/controllers/extern.php b/controllers/extern.php
index 9f89019..6d60546 100755
--- a/controllers/extern.php
+++ b/controllers/extern.php
@@ -19,7 +19,7 @@ class ExternController extends MarketController
 
         $plugins = MarketPlugin::findBySQL("publiclyvisible = 1 AND approved = 1 ORDER BY name ASC");
         foreach ($plugins as $plugin) {
-            $xml_plugin = $xml_plugins->appendChild($this->create_xml_element($doc, 'plugin', null, array(
+            $xml_plugin = $xml_plugins->appendChild($this->create_xml_element($doc, 'plugin', null, [
                 'displayname'       => $plugin->name,
                 'name'              => $plugin->pluginname,
                 'homepage'          => $plugin->url,
@@ -27,14 +27,15 @@ class ExternController extends MarketController
                 'description'       => $plugin->description,
                 'image'             => $plugin->getLogoURL(true),
                 'score'             => $plugin['rating'],
-            )));
+                'marketplace_url'   => $this->absolute_url_for("presenting/details/{$plugin->id}"),
+            ]));
             foreach ($plugin->releases as $release) {
-                $xml_plugin->appendChild($this->create_xml_element($doc, 'release', null, array(
+                $xml_plugin->appendChild($this->create_xml_element($doc, 'release', null, [
                     'version'          => $release->version,
                     'studipMinVersion' => $release->studip_min_version,
                     'studipMaxVersion' => $release->studip_max_version,
                     'url'              => $this->absolute_url_for('presenting/download/' . $release->id),
-                )));
+                ]));
             }
         }
 
@@ -65,4 +66,4 @@ class ExternController extends MarketController
         }
         $this->render_json($output);
     }
-}
\ No newline at end of file
+}
diff --git a/plugin.manifest b/plugin.manifest
index c903f4f..a180133 100755
--- a/plugin.manifest
+++ b/plugin.manifest
@@ -1,4 +1,4 @@
 pluginname=PluginMarktplatz
 pluginclassname=PluginMarket
 origin=studip
-version=1.0.16
+version=1.0.17
-- 
GitLab