aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2021-07-13 08:49:59 +0200
committerGitHub <noreply@github.com>2021-07-13 08:49:59 +0200
commit3860dad9eaac937288d125c75e7f58cfbe44848a (patch)
tree0514e607be6a642aa26614c475a47ac1c3a178d7 /lib
parent0031152de1c416932759d7ad6af445b895358734 (diff)
parent0ba01892603e17e8663a51fb3723e484c4bdce7e (diff)
downloadnextcloud-server-3860dad9eaac937288d125c75e7f58cfbe44848a.tar.gz
nextcloud-server-3860dad9eaac937288d125c75e7f58cfbe44848a.zip
Merge pull request #26481 from ghost/fdroid
Diffstat (limited to 'lib')
-rw-r--r--lib/private/legacy/OC_Defaults.php14
-rw-r--r--lib/public/Defaults.php9
2 files changed, 23 insertions, 0 deletions
diff --git a/lib/private/legacy/OC_Defaults.php b/lib/private/legacy/OC_Defaults.php
index fa90dff2edf..707df7279bb 100644
--- a/lib/private/legacy/OC_Defaults.php
+++ b/lib/private/legacy/OC_Defaults.php
@@ -48,6 +48,7 @@ class OC_Defaults {
private $defaultiOSClientUrl;
private $defaultiTunesAppId;
private $defaultAndroidClientUrl;
+ private $defaultFDroidClientUrl;
private $defaultDocBaseUrl;
private $defaultDocVersion;
private $defaultSlogan;
@@ -66,6 +67,7 @@ class OC_Defaults {
$this->defaultiOSClientUrl = $config->getSystemValue('customclient_ios', 'https://geo.itunes.apple.com/us/app/nextcloud/id1125420102?mt=8');
$this->defaultiTunesAppId = $config->getSystemValue('customclient_ios_appid', '1125420102');
$this->defaultAndroidClientUrl = $config->getSystemValue('customclient_android', 'https://play.google.com/store/apps/details?id=com.nextcloud.client');
+ $this->defaultFDroidClientUrl = $config->getSystemValue('customclient_fdroid', 'https://f-droid.org/packages/com.nextcloud.client/');
$this->defaultDocBaseUrl = 'https://docs.nextcloud.com';
$this->defaultDocVersion = \OC_Util::getVersion()[0]; // used to generate doc links
$this->defaultColorPrimary = '#0082c9';
@@ -155,6 +157,18 @@ class OC_Defaults {
}
/**
+ * Returns the URL to Google Play for the Android Client
+ * @return string URL
+ */
+ public function getFDroidClientUrl() {
+ if ($this->themeExist('getFDroidClientUrl')) {
+ return $this->theme->getFDroidClientUrl();
+ } else {
+ return $this->defaultFDroidClientUrl;
+ }
+ }
+
+ /**
* Returns the documentation URL
* @return string URL
*/
diff --git a/lib/public/Defaults.php b/lib/public/Defaults.php
index 7d74134cf48..7c6d73bcaea 100644
--- a/lib/public/Defaults.php
+++ b/lib/public/Defaults.php
@@ -95,6 +95,15 @@ class Defaults {
}
/**
+ * link to the Android client on F-Droid
+ * @return string
+ * @since 23.0.0
+ */
+ public function getFDroidClientUrl() {
+ return $this->defaults->getFDroidClientUrl();
+ }
+
+ /**
* base URL to the documentation of your ownCloud instance
* @return string
* @since 6.0.0