starting to fix nextcloud 14 compatibility

This commit is contained in:
Jonas Heinrich 2018-07-31 10:26:51 +02:00
parent 6272731df8
commit 52316a4155
3 changed files with 9 additions and 7 deletions

View File

@ -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'
));

View File

@ -3,7 +3,7 @@
<id>radio</id>
<name>Radio</name>
<description>Listening to your favorite radio stations in Nextcloud</description>
<version>0.6.1</version>
<version>0.6.2</version>
<licence>agpl</licence>
<author>Jonas Heinrich</author>
<bugs>https://git.project-insanity.org/onny/nextcloud-app-radio/issues</bugs>
@ -11,7 +11,6 @@
<category>multimedia</category>
<screenshot>https://onny.project-insanity.org/files/radio-app.png</screenshot>
<dependencies>
<owncloud min-version="9.1" max-version="9.2"/>
<nextcloud min-version="10" max-version="13"/>
<nextcloud min-version="10" max-version="14"/>
</dependencies>
</info>

View File

@ -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();