aboutsummaryrefslogtreecommitdiffstats
path: root/apps/accessibility/lib/AppInfo
diff options
context:
space:
mode:
authorJanis Köhr <janis.koehr@novatec-gmbh.de>2019-09-16 21:14:11 +0200
committerJanis Köhr <janis.koehr@novatec-gmbh.de>2019-09-16 21:14:11 +0200
commitd75fbab5d21cade3174466bf9a80d42da1f42a44 (patch)
tree4e15732e8f925ca7ac1ef9bddf5de8a8854f2d9e /apps/accessibility/lib/AppInfo
parent4a1ce954648d6803bf50a19a3177d6871056dd79 (diff)
downloadnextcloud-server-d75fbab5d21cade3174466bf9a80d42da1f42a44.tar.gz
nextcloud-server-d75fbab5d21cade3174466bf9a80d42da1f42a44.zip
Removed duplicate defintion of app name and rebased/rebuilt.
Signed-off-by: Janis Köhr <janis.koehr@novatec-gmbh.de>
Diffstat (limited to 'apps/accessibility/lib/AppInfo')
-rw-r--r--apps/accessibility/lib/AppInfo/Application.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/accessibility/lib/AppInfo/Application.php b/apps/accessibility/lib/AppInfo/Application.php
index e87341b6c1c..e884acad0af 100644
--- a/apps/accessibility/lib/AppInfo/Application.php
+++ b/apps/accessibility/lib/AppInfo/Application.php
@@ -31,7 +31,7 @@ use OCP\IURLGenerator;
class Application extends App {
/** @var string */
- protected $appName = 'accessibility';
+ public const APP_NAME = 'accessibility';
/** @var IConfig */
private $config;
@@ -43,7 +43,7 @@ class Application extends App {
private $urlGenerator;
public function __construct() {
- parent::__construct($this->appName);
+ parent::__construct(self::APP_NAME);
$this->config = \OC::$server->getConfig();
$this->userSession = \OC::$server->getUserSession();
$this->urlGenerator = \OC::$server->getURLGenerator();
@@ -53,11 +53,11 @@ class Application extends App {
// Inject the fake css on all pages if enabled and user is logged
$loggedUser = $this->userSession->getUser();
if (!is_null($loggedUser)) {
- $userValues = $this->config->getUserKeys($loggedUser->getUID(), $this->appName);
+ $userValues = $this->config->getUserKeys($loggedUser->getUID(), self::APP_NAME);
// we want to check if any theme or font is enabled.
if (count($userValues) > 0) {
- $hash = $this->config->getUserValue($loggedUser->getUID(), $this->appName, 'icons-css', md5(implode('-', $userValues)));
- $linkToCSS = $this->urlGenerator->linkToRoute($this->appName . '.accessibility.getCss', ['md5' => $hash]);
+ $hash = $this->config->getUserValue($loggedUser->getUID(), self::APP_NAME, 'icons-css', md5(implode('-', $userValues)));
+ $linkToCSS = $this->urlGenerator->linkToRoute(self::APP_NAME . '.accessibility.getCss', ['md5' => $hash]);
\OCP\Util::addHeader('link', ['rel' => 'stylesheet', 'href' => $linkToCSS]);
}
}
@@ -65,7 +65,7 @@ class Application extends App {
public function injectJavascript() {
$linkToJs = $this->urlGenerator->linkToRoute(
- $this->appName . '.accessibility.getJavascript',
+ self::APP_NAME . '.accessibility.getJavascript',
[
'v' => \OC::$server->getConfig()->getAppValue('accessibility', 'cachebuster', '0'),
]