Browse Source

defaults: add customizable defaultiTunesAppId

tags/v8.0.0alpha1
Pascal de Bruijn 9 years ago
parent
commit
49da0a7943
3 changed files with 16 additions and 2 deletions
  1. 1
    1
      core/templates/layout.guest.php
  2. 1
    1
      core/templates/layout.user.php
  3. 14
    0
      lib/private/defaults.php

+ 1
- 1
core/templates/layout.guest.php 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 print_unescaped($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): ?>

+ 1
- 1
core/templates/layout.user.php 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 print_unescaped($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'); ?>">

+ 14
- 0
lib/private/defaults.php 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

Loading…
Cancel
Save