aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Panter <joshu@unfettered.net>2018-10-05 23:19:05 +0200
committerChristian Weiske <cweiske@cweiske.de>2018-10-05 23:20:31 +0200
commit4c85b6387c7612e40ad94960225e55533ae85011 (patch)
tree09e26035e98e0a4fc998f18e0c7cba0950cea97a
parent9a5be0bddd55d2dbc462197a388c5f7625d01a5b (diff)
downloadgrauphel-4c85b6387c7612e40ad94960225e55533ae85011.tar.gz
grauphel-4c85b6387c7612e40ad94960225e55533ae85011.zip
Do not use OCP\Util anymore - API not avaiable in Nextcloud 14.
Resolves: https://github.com/cweiske/grauphel/pull/66 Resolves: https://github.com/cweiske/grauphel/issues/57
-rwxr-xr-xappinfo/app.php4
-rw-r--r--templates/appnavigation.php6
-rw-r--r--templates/error.php2
-rw-r--r--templates/gui-database.php6
-rw-r--r--templates/gui-note.php4
-rw-r--r--templates/index.php2
-rw-r--r--templates/indexStats.php4
-rw-r--r--templates/oauthAuthorize.php2
-rw-r--r--templates/tag.php4
-rw-r--r--templates/tokens.php6
10 files changed, 20 insertions, 20 deletions
diff --git a/appinfo/app.php b/appinfo/app.php
index afbc787..1fb5551 100755
--- a/appinfo/app.php
+++ b/appinfo/app.php
@@ -3,8 +3,8 @@
array(
'id' => 'grauphel',
'order' => 2342,
- 'href' => \OCP\Util::linkToRoute('grauphel.gui.index'),
- 'icon' => \OCP\Util::imagePath('grauphel', 'app.svg'),
+ 'href' => \OC::$server->getURLGenerator()->linkToRoute('grauphel.gui.index'),
+ 'icon' => \OC::$server->getURLGenerator()->imagePath('grauphel', 'app.svg'),
'name' => 'Tomboy notes'
)
);
diff --git a/templates/appnavigation.php b/templates/appnavigation.php
index 04eb86c..7d51049 100644
--- a/templates/appnavigation.php
+++ b/templates/appnavigation.php
@@ -11,10 +11,10 @@
</div>
<div id="app-settings-content" style="display: none;">
<ul>
- <li><a href="<?php p(OCP\Util::linkToRoute('grauphel.gui.index')); ?>">Info and stats</a></li>
+ <li><a href="<?php p(OC::$server->getURLGenerator()->linkToRoute('grauphel.gui.index')); ?>">Info and stats</a></li>
<?php if (OCP\User::isLoggedIn()) { ?>
- <li><a href="<?php p(OCP\Util::linkToRoute('grauphel.gui.tokens')); ?>">Manage access tokens</a></li>
- <li><a href="<?php p(OCP\Util::linkToRoute('grauphel.gui.database')); ?>">Manage database</a></li>
+ <li><a href="<?php p(OC::$server->getURLGenerator()->linkToRoute('grauphel.gui.tokens')); ?>">Manage access tokens</a></li>
+ <li><a href="<?php p(OC::$server->getURLGenerator()->linkToRoute('grauphel.gui.database')); ?>">Manage database</a></li>
<?php } ?>
</ul>
</div>
diff --git a/templates/error.php b/templates/error.php
index 9ea4c33..6ca821b 100644
--- a/templates/error.php
+++ b/templates/error.php
@@ -1,4 +1,4 @@
-<link rel="stylesheet" href="<?php p(OCP\Util::linkTo('grauphel','grauphel.css')); ?>" type="text/css"/>
+<link rel="stylesheet" href="<?php p(OC::$server->getURLGenerator()->linkTo('grauphel','grauphel.css')); ?>" type="text/css"/>
<div id="app-content" class="content">
<div id="searchresults" class="hidden"></div>
diff --git a/templates/gui-database.php b/templates/gui-database.php
index 95c70d6..dd3c713 100644
--- a/templates/gui-database.php
+++ b/templates/gui-database.php
@@ -1,9 +1,9 @@
-<link rel="stylesheet" href="<?php p(OCP\Util::linkTo('grauphel','grauphel.css')); ?>" type="text/css"/>
+<link rel="stylesheet" href="<?php p(OC::$server->getURLGenerator()->linkTo('grauphel','grauphel.css')); ?>" type="text/css"/>
<?php /** @var $l OC_L10N */ ?>
<?php $_['appNavigation']->printPage(); ?>
-<script type="text/javascript" src="<?php p(OCP\Util::linkTo('grauphel','js/grauphel.js')); ?>"></script>
+<script type="text/javascript" src="<?php p(OC::$server->getURLGenerator()->linkTo('grauphel','js/grauphel.js')); ?>"></script>
<div id="app-content" class="content">
<div id="searchresults" class="hidden"></div>
@@ -31,7 +31,7 @@
<p>
To reset the database, enter your user name and click "reset database":
</p>
- <form method="POST" action="<?php p(OCP\Util::linkToRoute('grauphel.gui.databaseReset')); ?>">
+ <form method="POST" action="<?php p(OC::$server->getURLGenerator()->linkToRoute('grauphel.gui.databaseReset')); ?>">
<input type="hidden" name="requesttoken" value="<?php p($_['requesttoken']) ?>"/>
<p>
<label>Username: <input type="text" name="username" value="" autocomplete="off" /></label>
diff --git a/templates/gui-note.php b/templates/gui-note.php
index 8061a50..a182f5f 100644
--- a/templates/gui-note.php
+++ b/templates/gui-note.php
@@ -1,9 +1,9 @@
-<link rel="stylesheet" href="<?php p(OCP\Util::linkTo('grauphel','grauphel.css')); ?>" type="text/css"/>
+<link rel="stylesheet" href="<?php p(OC::$server->getURLGenerator()->linkTo('grauphel','grauphel.css')); ?>" type="text/css"/>
<?php /** @var $l OC_L10N */ ?>
<?php $_['appNavigation']->printPage(); ?>
-<script type="text/javascript" src="<?php p(OCP\Util::linkTo('grauphel','js/grauphel.js')); ?>"></script>
+<script type="text/javascript" src="<?php p(OC::$server->getURLGenerator()->linkTo('grauphel','js/grauphel.js')); ?>"></script>
<div id="app-content" class="content">
<div id="searchresults" class="hidden"></div>
diff --git a/templates/index.php b/templates/index.php
index 6eb2905..4edb7d9 100644
--- a/templates/index.php
+++ b/templates/index.php
@@ -1,4 +1,4 @@
-<link rel="stylesheet" href="<?php p(OCP\Util::linkTo('grauphel','grauphel.css')); ?>" type="text/css"/>
+<link rel="stylesheet" href="<?php p(OC::$server->getURLGenerator()->linkTo('grauphel','grauphel.css')); ?>" type="text/css"/>
<?php /** @var $l OC_L10N */ ?>
<?php $_['appNavigation']->printPage(); ?>
diff --git a/templates/indexStats.php b/templates/indexStats.php
index a238c8c..74c1abb 100644
--- a/templates/indexStats.php
+++ b/templates/indexStats.php
@@ -1,9 +1,9 @@
<h2>Statistics</h2>
<dl>
- <dt>Number of <a class="lined" href="<?php p(OCP\Util::linkToRoute('grauphel.gui.tag', array('rawtag' => 'grauphel:special:all'))); ?>">notes</a></dt>
+ <dt>Number of <a class="lined" href="<?php p(OC::$server->getURLGenerator()->linkToRoute('grauphel.gui.tag', array('rawtag' => 'grauphel:special:all'))); ?>">notes</a></dt>
<dd><?php p($_['notes']); ?></dd>
- <dt>Number of <a class="lined" href="<?php p(OCP\Util::linkToRoute('grauphel.gui.tokens')); ?>">registered apps</a></dt>
+ <dt>Number of <a class="lined" href="<?php p(OC::$server->getURLGenerator()->linkToRoute('grauphel.gui.tokens')); ?>">registered apps</a></dt>
<dd><?php p($_['tokens']); ?></dd>
<dt>Sync revision</dt>
diff --git a/templates/oauthAuthorize.php b/templates/oauthAuthorize.php
index 46a1918..5c7cf4a 100644
--- a/templates/oauthAuthorize.php
+++ b/templates/oauthAuthorize.php
@@ -1,4 +1,4 @@
-<link rel="stylesheet" href="<?php p(OCP\Util::linkTo('grauphel','grauphel.css')); ?>" type="text/css"/>
+<link rel="stylesheet" href="<?php p(OC::$server->getURLGenerator()->linkTo('grauphel','grauphel.css')); ?>" type="text/css"/>
<form method="post" action="<?php p($_['formaction']); ?>" class="oauth-authorize">
<input type="hidden" value="<?php p($_['requesttoken']); ?>" name="requesttoken" />
<input type="hidden" value="<?php p($_['oauth_token']); ?>" name="oauth_token" />
diff --git a/templates/tag.php b/templates/tag.php
index 7d5cab1..4a9501c 100644
--- a/templates/tag.php
+++ b/templates/tag.php
@@ -1,4 +1,4 @@
-<link rel="stylesheet" href="<?php p(OCP\Util::linkTo('grauphel','grauphel.css')); ?>" type="text/css"/>
+<link rel="stylesheet" href="<?php p(OC::$server->getURLGenerator()->linkTo('grauphel','grauphel.css')); ?>" type="text/css"/>
<?php /** @var $l OC_L10N */ ?>
<?php $_['appNavigation']->printPage(); ?>
@@ -19,7 +19,7 @@
<?php foreach ($_['notes'] as $note) { ?>
<tr id="note-<?php p($note['guid']); ?>">
<td>
- <a class="cellclick" href="<?php p(OCP\Util::linkToRoute('grauphel.gui.note', array('guid' => $note['guid']))); ?>"><?php echo ($note['title']); ?></a>
+ <a class="cellclick" href="<?php p(OC::$server->getURLGenerator()->linkToRoute('grauphel.gui.note', array('guid' => $note['guid']))); ?>"><?php echo ($note['title']); ?></a>
</td>
<td style="color: <?php echo p($note['dateColor']); ?>">
<?php p(\OCP\Util::formatDate(strtotime($note['last-change-date']))); ?>
diff --git a/templates/tokens.php b/templates/tokens.php
index c79ba7d..3e1f54b 100644
--- a/templates/tokens.php
+++ b/templates/tokens.php
@@ -1,9 +1,9 @@
-<link rel="stylesheet" href="<?php p(OCP\Util::linkTo('grauphel','grauphel.css')); ?>" type="text/css"/>
+<link rel="stylesheet" href="<?php p(OC::$server->getURLGenerator()->linkTo('grauphel','grauphel.css')); ?>" type="text/css"/>
<?php /** @var $l OC_L10N */ ?>
<?php $_['appNavigation']->printPage(); ?>
-<script type="text/javascript" src="<?php p(OCP\Util::linkTo('grauphel','js/grauphel.js')); ?>"></script>
+<script type="text/javascript" src="<?php p(OC::$server->getURLGenerator()->linkTo('grauphel','js/grauphel.js')); ?>"></script>
<div id="app-content" class="list">
<div id="searchresults" class="hidden"></div>
@@ -28,7 +28,7 @@
<td title="<?php p($token->client); ?>"><?php p($_['client']->getNiceName($token->client)); ?></td>
<td>
<?php p(\OCP\Util::formatDate($token->lastuse)); ?>
- <form method="POST" action="<?php p(OCP\Util::linkToRoute('grauphel.token.delete', array('username' => $_['username'], 'tokenKey' => $token->tokenKey))); ?>">
+ <form method="POST" action="<?php p(OC::$server->getURLGenerator()->linkToRoute('grauphel.token.delete', array('username' => $_['username'], 'tokenKey' => $token->tokenKey))); ?>">
<input type="hidden" name="delete" value="1" />
<button type="submit" class="icon-delete delete action"
original-title="Delete"