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', 'id' => 'radio',
'order' => 74, 'order' => 74,
'href' => OCP\Util::linkTo( 'radio', 'index.php' ), 'href' => $g->linkTo( 'radio', 'index.php' ),
'icon' => OCP\Util::imagePath( 'radio', 'radio.png' ), 'icon' => $g->imagePath( 'radio', 'radio.png' ),
'name' => 'Radio' 'name' => 'Radio'
)); ));

View File

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

View File

@ -26,6 +26,7 @@
// Check if we are a user // Check if we are a user
OCP\User::checkLoggedIn(); OCP\User::checkLoggedIn();
OCP\App::setActiveNavigationEntry( 'radio' ); $navigationManager = \OC::$server->getNavigationManager();
$navigationManager->setActiveEntry( 'radio' );
$tmpl = new OCP\Template( 'radio', 'main', 'user' ); $tmpl = new OCP\Template( 'radio', 'main', 'user' );
$tmpl->printPage(); $tmpl->printPage();