Merge pull request #10667 from pmjdebruijn/itunes-appid

defaults: add customizable defaultiTunesAppId
This commit is contained in:
Thomas Müller 2014-09-03 16:26:20 +02:00
commit 954925eaa0
3 changed files with 16 additions and 2 deletions

View File

@ -12,7 +12,7 @@
</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0">
<meta name="apple-itunes-app" content="app-id=543672169">
<meta name="apple-itunes-app" content="app-id=<?php p($theme->getiTunesAppId()); ?>">
<link rel="shortcut icon" type="image/png" href="<?php print_unescaped(image_path('', 'favicon.png')); ?>" />
<link rel="apple-touch-icon-precomposed" href="<?php print_unescaped(image_path('', 'favicon-touch.png')); ?>" />
<?php foreach($_['cssfiles'] as $cssfile): ?>

View File

@ -16,7 +16,7 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0">
<meta name="apple-itunes-app" content="app-id=543672169">
<meta name="apple-itunes-app" content="app-id=<?php p($theme->getiTunesAppId()); ?>">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-title" content="<?php p((!empty($_['application']) && $_['appid']!='files')? $_['application']:'ownCloud'); ?>">

View File

@ -19,6 +19,7 @@ class OC_Defaults {
private $defaultBaseUrl;
private $defaultSyncClientUrl;
private $defaultiOSClientUrl;
private $defaultiTunesAppId;
private $defaultAndroidClientUrl;
private $defaultDocBaseUrl;
private $defaultDocVersion;
@ -36,6 +37,7 @@ class OC_Defaults {
$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->defaultiTunesAppId = '543672169';
$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
@ -94,6 +96,18 @@ class OC_Defaults {
}
}
/**
* Returns the AppId for the App Store for the iOS Client
* @return string AppId
*/
public function getiTunesAppId() {
if ($this->themeExist('getiTunesAppId')) {
return $this->theme->getiTunesAppId();
} else {
return $this->defaultiTunesAppId;
}
}
/**
* Returns the URL to Google Play for the Android Client
* @return string URL