diff options
author | HouraisanNEET <HouraisanNEET@users.noreply.github.com> | 2021-04-10 13:43:22 +0800 |
---|---|---|
committer | HouraisanNEET <HouraisanNEET@users.noreply.github.com> | 2021-07-04 21:44:55 +0800 |
commit | 0ba01892603e17e8663a51fb3723e484c4bdce7e (patch) | |
tree | 1d0d6852a7104871987ece6c601f82bf43dda8ce /lib | |
parent | bbee01117e36fcabf7db8195343d897bc28c619a (diff) | |
download | nextcloud-server-0ba01892603e17e8663a51fb3723e484c4bdce7e.tar.gz nextcloud-server-0ba01892603e17e8663a51fb3723e484c4bdce7e.zip |
Add F-Droid
Signed-off-by: HouraisanNEET <HouraisanNEET@users.noreply.github.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/legacy/OC_Defaults.php | 14 | ||||
-rw-r--r-- | lib/public/Defaults.php | 9 |
2 files changed, 23 insertions, 0 deletions
diff --git a/lib/private/legacy/OC_Defaults.php b/lib/private/legacy/OC_Defaults.php index a9f588eb6e9..e4ca3a2407f 100644 --- a/lib/private/legacy/OC_Defaults.php +++ b/lib/private/legacy/OC_Defaults.php @@ -47,6 +47,7 @@ class OC_Defaults { private $defaultiOSClientUrl; private $defaultiTunesAppId; private $defaultAndroidClientUrl; + private $defaultFDroidClientUrl; private $defaultDocBaseUrl; private $defaultDocVersion; private $defaultSlogan; @@ -64,6 +65,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'; @@ -152,6 +154,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 8f5ed68d189..3d951a4f165 100644 --- a/lib/public/Defaults.php +++ b/lib/public/Defaults.php @@ -97,6 +97,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 |