diff --git a/appinfo/info.xml b/appinfo/info.xml index 89e59e5c1e585439b674bf93dc5f994d30a0040e..e8ec3d46520a604141b5f48c4c8115d781909bf9 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -5,7 +5,7 @@ Murena Dashboard Murena Dashboard - 7.1.0 + 7.1.1 agpl Murena MurenaDashboard diff --git a/lib/Service/AppsService.php b/lib/Service/AppsService.php index 452b8f963d08bbe97248c1c13e1cc9d5c81956e6..793cc2b81eb12b052f224f9a9793cbcf70dc7e2f 100644 --- a/lib/Service/AppsService.php +++ b/lib/Service/AppsService.php @@ -98,11 +98,22 @@ class AppsService { $order_raw = !$order_raw ? $this->config->getUserValue($this->userId, 'apporder', 'order') : $order_raw; // If order raw is still empty, return empty array if (!$order_raw) { - return self::DEFAULT_ORDER; + $order = self::DEFAULT_ORDER; + } else { + $order = json_decode($order_raw, true); } - return json_decode($order_raw); + return $this->insertVaultAt6thPlace($order); } - + private function insertVaultAt6thPlace(array $order): array { + $vaultUrl = "https://vault.murena.io"; + + if (!in_array($vaultUrl, $order)) { + array_splice($order, 5, 0, $vaultUrl); // Insert at index 5 (6th position) + } + + return $order; + } + public function getAppEntries() { $entries = array_values($this->navigationManager->getAll()); $order = $this->getAppOrder();