From 52316a41555ade73f098a67eb692174f4c65c751 Mon Sep 17 00:00:00 2001 From: Jonas Heinrich Date: Tue, 31 Jul 2018 10:26:51 +0200 Subject: [PATCH] starting to fix nextcloud 14 compatibility --- appinfo/app.php | 8 +++++--- appinfo/info.xml | 5 ++--- index.php | 3 ++- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/appinfo/app.php b/appinfo/app.php index 8c1ba22..f2c3f61 100755 --- a/appinfo/app.php +++ b/appinfo/app.php @@ -23,10 +23,12 @@ * */ -OCP\App::addNavigationEntry( array( +$g = \OC::$server->getURLGenerator(); + +OC::$server->getNavigationManager()->add( array( 'id' => 'radio', 'order' => 74, - 'href' => OCP\Util::linkTo( 'radio', 'index.php' ), - 'icon' => OCP\Util::imagePath( 'radio', 'radio.png' ), + 'href' => $g->linkTo( 'radio', 'index.php' ), + 'icon' => $g->imagePath( 'radio', 'radio.png' ), 'name' => 'Radio' )); diff --git a/appinfo/info.xml b/appinfo/info.xml index 02add50..5cfcef2 100755 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -3,7 +3,7 @@ radio Radio Listening to your favorite radio stations in Nextcloud - 0.6.1 + 0.6.2 agpl Jonas Heinrich https://git.project-insanity.org/onny/nextcloud-app-radio/issues @@ -11,7 +11,6 @@ multimedia https://onny.project-insanity.org/files/radio-app.png - - + diff --git a/index.php b/index.php index cb1da9c..cfe89f8 100755 --- a/index.php +++ b/index.php @@ -26,6 +26,7 @@ // Check if we are a user OCP\User::checkLoggedIn(); -OCP\App::setActiveNavigationEntry( 'radio' ); +$navigationManager = \OC::$server->getNavigationManager(); +$navigationManager->setActiveEntry( 'radio' ); $tmpl = new OCP\Template( 'radio', 'main', 'user' ); $tmpl->printPage();