From d5b61b32439e5196ec1104ccdd7645453496678e Mon Sep 17 00:00:00 2001
From: Rasmus Fuhse <fuhse@data-quest.de>
Date: Thu, 1 Aug 2019 09:02:29 +0200
Subject: [PATCH] update versions

---
 PluginMarket.class.php          | 8 +++-----
 classes/MarketRelease.class.php | 3 ++-
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/PluginMarket.class.php b/PluginMarket.class.php
index a6be982..b1fd909 100755
--- a/PluginMarket.class.php
+++ b/PluginMarket.class.php
@@ -8,12 +8,10 @@ class PluginMarket extends StudIPPlugin implements SystemPlugin, HomepagePlugin
     static public function getStudipReleases()
     {
         return array(
-            '1.4', '1.5', '1.6', '1.7', '1.8',
-            '1.9', '1.10', '1.11',
-            '2.0', '2.1', '2.2', '2.3', '2.4',
-            '2.5',
+            '1.4', '1.5', '1.6', '1.7', '1.8', '1.9', '1.10', '1.11',
+            '2.0', '2.1', '2.2', '2.3', '2.4', '2.5',
             '3.0', '3.1', '3.2', "3.3", "3.4", "3.5",
-            "4.0", "4.1", "4.2", "4.3"
+            "4.0", "4.1", "4.2", "4.3", "4.4"
         );
     }
 
diff --git a/classes/MarketRelease.class.php b/classes/MarketRelease.class.php
index 0edc6dc..a10913d 100755
--- a/classes/MarketRelease.class.php
+++ b/classes/MarketRelease.class.php
@@ -149,9 +149,10 @@ class MarketRelease extends SimpleORMap {
         $this['studip_max_version'] = $manifest['studipMaxVersion'];
         if (!$this['studip_max_version']) {
             $versions = PluginMarket::getStudipReleases();
+            preg_match("/^(\d+\.\d+)/", StudipVersion::getStudipVersion(false), $matches);
             $manifest['studipMaxVersion']
                 = $this['studip_max_version']
-                = array_pop($versions).".99";
+                = $matches[1].".99";
             if (!$this['studip_max_version']) {
                 PageLayout::postMessage(MessageBox::info(sprintf(_("Die studipMaxVersion wurde auf %s gesetzt, da keine andere angegeben wurde."), $manifest['studipMaxVersion'])));
             }
-- 
GitLab