summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/oauth2/l10n/nb.js1
-rw-r--r--apps/oauth2/l10n/nb.json1
-rw-r--r--apps/theming/lib/ThemingDefaults.php11
-rw-r--r--apps/theming/tests/ThemingDefaultsTest.php29
4 files changed, 32 insertions, 10 deletions
diff --git a/apps/oauth2/l10n/nb.js b/apps/oauth2/l10n/nb.js
index ea1d7a57de8..8a7040fecd6 100644
--- a/apps/oauth2/l10n/nb.js
+++ b/apps/oauth2/l10n/nb.js
@@ -1,6 +1,7 @@
OC.L10N.register(
"oauth2",
{
+ "Your redirect URL needs to be a full URL for example: https://yourdomain.com/path" : "URL for videresending må være en fullstendig URL. For eksempel https://yourdomain.com/path",
"OAuth 2.0" : "OAuth 2.0",
"OAuth 2.0 clients" : "OAuth 2.0-klienter",
"Name" : "Navn",
diff --git a/apps/oauth2/l10n/nb.json b/apps/oauth2/l10n/nb.json
index 0aec1d3727c..0fa1155655d 100644
--- a/apps/oauth2/l10n/nb.json
+++ b/apps/oauth2/l10n/nb.json
@@ -1,4 +1,5 @@
{ "translations": {
+ "Your redirect URL needs to be a full URL for example: https://yourdomain.com/path" : "URL for videresending må være en fullstendig URL. For eksempel https://yourdomain.com/path",
"OAuth 2.0" : "OAuth 2.0",
"OAuth 2.0 clients" : "OAuth 2.0-klienter",
"Name" : "Navn",
diff --git a/apps/theming/lib/ThemingDefaults.php b/apps/theming/lib/ThemingDefaults.php
index 72286ece4b8..fe1b1d4c17f 100644
--- a/apps/theming/lib/ThemingDefaults.php
+++ b/apps/theming/lib/ThemingDefaults.php
@@ -151,9 +151,14 @@ class ThemingDefaults extends \OC_Defaults {
public function getShortFooter() {
$slogan = $this->getSlogan();
- $footer = '<a href="'. $this->getBaseUrl() . '" target="_blank"' .
- ' rel="noreferrer noopener">' .$this->getEntity() . '</a>'.
- ($slogan !== '' ? ' – ' . $slogan : '');
+ $baseUrl = $this->getBaseUrl();
+ if ($baseUrl !== '') {
+ $footer = '<a href="' . $baseUrl . '" target="_blank"' .
+ ' rel="noreferrer noopener" class="entity-name">' . $this->getEntity() . '</a>';
+ } else {
+ $footer = '<span class="entity-name">' .$this->getEntity() . '</span>';
+ }
+ $footer .= ($slogan !== '' ? ' – ' . $slogan : '');
$links = [
[
diff --git a/apps/theming/tests/ThemingDefaultsTest.php b/apps/theming/tests/ThemingDefaultsTest.php
index 87b2003ded2..5d075709dc5 100644
--- a/apps/theming/tests/ThemingDefaultsTest.php
+++ b/apps/theming/tests/ThemingDefaultsTest.php
@@ -262,7 +262,22 @@ class ThemingDefaultsTest extends TestCase {
['theming', 'privacyUrl', '', ''],
]);
- $this->assertEquals('<a href="url" target="_blank" rel="noreferrer noopener">Name</a> – Slogan', $this->template->getShortFooter());
+ $this->assertEquals('<a href="url" target="_blank" rel="noreferrer noopener" class="entity-name">Name</a> – Slogan', $this->template->getShortFooter());
+ }
+
+ public function testGetShortFooterEmptyUrl() {
+ $this->config
+ ->expects($this->exactly(5))
+ ->method('getAppValue')
+ ->willReturnMap([
+ ['theming', 'url', $this->defaults->getBaseUrl(), ''],
+ ['theming', 'name', 'Nextcloud', 'Name'],
+ ['theming', 'slogan', $this->defaults->getSlogan(), 'Slogan'],
+ ['theming', 'imprintUrl', '', ''],
+ ['theming', 'privacyUrl', '', ''],
+ ]);
+
+ $this->assertEquals('<span class="entity-name">Name</span> – Slogan', $this->template->getShortFooter());
}
public function testGetShortFooterEmptySlogan() {
@@ -277,7 +292,7 @@ class ThemingDefaultsTest extends TestCase {
['theming', 'privacyUrl', '', ''],
]);
- $this->assertEquals('<a href="url" target="_blank" rel="noreferrer noopener">Name</a>', $this->template->getShortFooter());
+ $this->assertEquals('<a href="url" target="_blank" rel="noreferrer noopener" class="entity-name">Name</a>', $this->template->getShortFooter());
}
public function testGetShortFooterImprint() {
@@ -297,7 +312,7 @@ class ThemingDefaultsTest extends TestCase {
->method('t')
->willReturnArgument(0);
- $this->assertEquals('<a href="url" target="_blank" rel="noreferrer noopener">Name</a> – Slogan<br/><a href="https://example.com/imprint" class="legal" target="_blank" rel="noreferrer noopener">Legal notice</a>', $this->template->getShortFooter());
+ $this->assertEquals('<a href="url" target="_blank" rel="noreferrer noopener" class="entity-name">Name</a> – Slogan<br/><a href="https://example.com/imprint" class="legal" target="_blank" rel="noreferrer noopener">Legal notice</a>', $this->template->getShortFooter());
}
public function testGetShortFooterPrivacy() {
@@ -317,7 +332,7 @@ class ThemingDefaultsTest extends TestCase {
->method('t')
->willReturnArgument(0);
- $this->assertEquals('<a href="url" target="_blank" rel="noreferrer noopener">Name</a> – Slogan<br/><a href="https://example.com/privacy" class="legal" target="_blank" rel="noreferrer noopener">Privacy policy</a>', $this->template->getShortFooter());
+ $this->assertEquals('<a href="url" target="_blank" rel="noreferrer noopener" class="entity-name">Name</a> – Slogan<br/><a href="https://example.com/privacy" class="legal" target="_blank" rel="noreferrer noopener">Privacy policy</a>', $this->template->getShortFooter());
}
public function testGetShortFooterAllLegalLinks() {
@@ -337,7 +352,7 @@ class ThemingDefaultsTest extends TestCase {
->method('t')
->willReturnArgument(0);
- $this->assertEquals('<a href="url" target="_blank" rel="noreferrer noopener">Name</a> – Slogan<br/><a href="https://example.com/imprint" class="legal" target="_blank" rel="noreferrer noopener">Legal notice</a> · <a href="https://example.com/privacy" class="legal" target="_blank" rel="noreferrer noopener">Privacy policy</a>', $this->template->getShortFooter());
+ $this->assertEquals('<a href="url" target="_blank" rel="noreferrer noopener" class="entity-name">Name</a> – Slogan<br/><a href="https://example.com/imprint" class="legal" target="_blank" rel="noreferrer noopener">Legal notice</a> · <a href="https://example.com/privacy" class="legal" target="_blank" rel="noreferrer noopener">Privacy policy</a>', $this->template->getShortFooter());
}
public function invalidLegalUrlProvider() {
@@ -363,7 +378,7 @@ class ThemingDefaultsTest extends TestCase {
['theming', 'privacyUrl', '', ''],
]);
- $this->assertEquals('<a href="url" target="_blank" rel="noreferrer noopener">Name</a> – Slogan', $this->template->getShortFooter());
+ $this->assertEquals('<a href="url" target="_blank" rel="noreferrer noopener" class="entity-name">Name</a> – Slogan', $this->template->getShortFooter());
}
/**
@@ -382,7 +397,7 @@ class ThemingDefaultsTest extends TestCase {
['theming', 'privacyUrl', '', $invalidPrivacyUrl],
]);
- $this->assertEquals('<a href="url" target="_blank" rel="noreferrer noopener">Name</a> – Slogan', $this->template->getShortFooter());
+ $this->assertEquals('<a href="url" target="_blank" rel="noreferrer noopener" class="entity-name">Name</a> – Slogan', $this->template->getShortFooter());
}
public function testgetColorPrimaryWithDefault() {