aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/defaults.php
diff options
context:
space:
mode:
authorscolebrook <scolebrook@mac.com>2014-07-08 09:51:05 -0400
committerMorris Jobke <hey@morrisjobke.de>2014-08-05 13:16:51 +0200
commit2e127d2c5ea82089f74a5a33549cd42db9d1bb5e (patch)
tree9dfb82374f1934e7aa2c9c0875edfd477243889e /lib/private/defaults.php
parent7fd770654246e5ca481df65b9f00ef448ac280f0 (diff)
downloadnextcloud-server-2e127d2c5ea82089f74a5a33549cd42db9d1bb5e.tar.gz
nextcloud-server-2e127d2c5ea82089f74a5a33549cd42db9d1bb5e.zip
Add ability to theme iOS and Android client URLs just like desktop URLs.
Diffstat (limited to 'lib/private/defaults.php')
-rw-r--r--lib/private/defaults.php54
1 files changed, 41 insertions, 13 deletions
diff --git a/lib/private/defaults.php b/lib/private/defaults.php
index a439bf0d6db..7b53a003c81 100644
--- a/lib/private/defaults.php
+++ b/lib/private/defaults.php
@@ -18,6 +18,8 @@ class OC_Defaults {
private $defaultTitle;
private $defaultBaseUrl;
private $defaultSyncClientUrl;
+ private $defaultiOSClientURL;
+ private $defaultAndroidClientURL;
private $defaultDocBaseUrl;
private $defaultDocVersion;
private $defaultSlogan;
@@ -28,18 +30,20 @@ class OC_Defaults {
$this->l = OC_L10N::get('lib');
$version = OC_Util::getVersion();
- $this->defaultEntity = "ownCloud"; /* e.g. company name, used for footers and copyright notices */
- $this->defaultName = "ownCloud"; /* short name, used when referring to the software */
- $this->defaultTitle = "ownCloud"; /* can be a longer name, for titles */
- $this->defaultBaseUrl = "https://owncloud.org";
- $this->defaultSyncClientUrl = "https://owncloud.org/sync-clients/";
- $this->defaultDocBaseUrl = "http://doc.owncloud.org";
- $this->defaultDocVersion = $version[0] . ".0"; // used to generate doc links
- $this->defaultSlogan = $this->l->t("web services under your control");
- $this->defaultLogoClaim = "";
- $this->defaultMailHeaderColor = "#1d2d44"; /* header color of mail notifications */
-
- if (class_exists("OC_Theme")) {
+ $this->defaultEntity = 'ownCloud'; /* e.g. company name, used for footers and copyright notices */
+ $this->defaultName = 'ownCloud'; /* short name, used when referring to the software */
+ $this->defaultTitle = 'ownCloud'; /* can be a longer name, for titles */
+ $this->defaultBaseUrl = 'https://owncloud.org';
+ $this->defaultSyncClientUrl = 'https://owncloud.org/sync-clients/';
+ $this->defaultiOSClientURL = 'https://itunes.apple.com/us/app/owncloud/id543672169?mt=8';
+ $this->defaultAndroidClientURL = 'https://play.google.com/store/apps/details?id=com.owncloud.android';
+ $this->defaultDocBaseUrl = 'http://doc.owncloud.org';
+ $this->defaultDocVersion = $version[0] . '.0'; // used to generate doc links
+ $this->defaultSlogan = $this->l->t('web services under your control');
+ $this->defaultLogoClaim = '';
+ $this->defaultMailHeaderColor = '#1d2d44'; /* header color of mail notifications */
+
+ if (class_exists('OC_Theme')) {
$this->theme = new OC_Theme();
}
}
@@ -79,6 +83,30 @@ class OC_Defaults {
}
/**
+ * Returns the URL to the App Store for the iOS Client
+ * @return string URL
+ */
+ public function getiOSClientUrl() {
+ if ($this->themeExist('getiOSClientUrl')) {
+ return $this->theme->getiOSClientUrl();
+ } else {
+ return $this->defaultiOSClientUrl;
+ }
+ }
+
+ /**
+ * Returns the URL to Google Play for the Android Client
+ * @return string URL
+ */
+ public function getAndroidClientUrl() {
+ if ($this->themeExist('getAndroidClientUrl')) {
+ return $this->theme->getAndroidClientUrl();
+ } else {
+ return $this->defaultAndroidClientUrl;
+ }
+ }
+
+ /**
* Returns the documentation URL
* @return string URL
*/
@@ -158,7 +186,7 @@ class OC_Defaults {
if ($this->themeExist('getShortFooter')) {
$footer = $this->theme->getShortFooter();
} else {
- $footer = "<a href=\"". $this->getBaseUrl() . "\" target=\"_blank\">" .$this->getEntity() . "</a>".
+ $footer = '<a href=\"'. $this->getBaseUrl() . '\" target=\"_blank\">' .$this->getEntity() . '</a>'.
' – ' . $this->getSlogan();
}