summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/files_sharing/templates/public.php6
-rw-r--r--core/templates/layout.guest.php11
-rw-r--r--core/templates/layout.user.php4
-rw-r--r--lib/defaults.php97
-rw-r--r--lib/mail.php7
-rw-r--r--settings/templates/admin.php14
-rw-r--r--settings/templates/personal.php14
7 files changed, 93 insertions, 60 deletions
diff --git a/apps/files_sharing/templates/public.php b/apps/files_sharing/templates/public.php
index 3a1c370b4c0..cbd5ddf7a7d 100644
--- a/apps/files_sharing/templates/public.php
+++ b/apps/files_sharing/templates/public.php
@@ -9,6 +9,7 @@
<header><div id="header">
<a href="<?php print_unescaped(link_to('', 'index.php')); ?>" title="" id="owncloud"><img class="svg"
src="<?php print_unescaped(image_path('', 'logo-wide.svg')); ?>" alt="ownCloud" /></a>
+ <div id="logo-claim" style="display:none;"><?php p(OC_Defaults::getLogoClaim()); ?></div>
<div class="header-right">
<?php if (isset($_['folder'])): ?>
<span id="details"><?php p($l->t('%s shared the folder %s with you',
@@ -87,8 +88,7 @@
<?php endif; ?>
</div>
<footer>
- <p class="info"><a href="<?php p(OC_Defaults::getBaseUrl()); ?>"><?php p(OC_Defaults::getEntity()) ?></a>
- <?php OC_Util::getEditionString() === '' ? print_unescaped(' &ndash; ') : print_unescaped('<br/>'); ?>
- <?php p(OC_Defaults::getSlogan()); ?>
+ <p class="info">
+ <?php print_unescaped(OC_Defaults::getLongFooter()); ?>
</p>
</footer>
diff --git a/core/templates/layout.guest.php b/core/templates/layout.guest.php
index 4173212dfa3..fde970554c6 100644
--- a/core/templates/layout.guest.php
+++ b/core/templates/layout.guest.php
@@ -35,18 +35,13 @@
<div id="login">
<header><div id="header">
<img src="<?php print_unescaped(image_path('', 'logo.svg')); ?>" class="svg" alt="ownCloud" />
- <?php if (OC_Util::getEditionString() !== ''): ?>
- <div id="logo-claim" style="display:none;">Enterprise Edition</div>
- <?php endif; ?>
+ <div id="logo-claim" style="display:none;"><?php p(OC_Defaults::getLogoClaim()); ?></div>
</div></header>
<?php print_unescaped($_['content']); ?>
</div>
<footer>
<p class="info">
- <?php OC_Util::getEditionString() === '' ? '' : p('© 2013 '); ?>
- <a href="<?php p(OC_Defaults::getBaseUrl())?>">
- <?php p(OC_Defaults::getEntity()); ?></a>
- <?php OC_Util::getEditionString() === '' ? print_unescaped(' &ndash; ') : print_unescaped('<br/>'); ?>
- <?php p(OC_Defaults::getSlogan()); ?></p></footer>
+ <?php print_unescaped(OC_Defaults::getLongFooter()); ?>
+ </p></footer>
</body>
</html>
diff --git a/core/templates/layout.user.php b/core/templates/layout.user.php
index 8c82a5c028e..b424669e35a 100644
--- a/core/templates/layout.user.php
+++ b/core/templates/layout.user.php
@@ -43,9 +43,7 @@
<header><div id="header">
<a href="<?php print_unescaped(link_to('', 'index.php')); ?>" title="" id="owncloud"><img class="svg"
src="<?php print_unescaped(image_path('', 'logo-wide.svg')); ?>" alt="ownCloud" /></a>
- <?php if (OC_Util::getEditionString() !== ''): ?>
- <div id="logo-claim" style="display:none;">Enterprise Edition</div>
- <?php endif; ?>
+ <div id="logo-claim" style="display:none;"><?php p(OC_Defaults::getLogoClaim()); ?></div>
<ul id="settings" class="svg">
<span id="expand" tabindex="0" role="link">
<span id="expandDisplayName"><?php p(trim($_['user_displayname']) != '' ? $_['user_displayname'] : $_['user_uid']) ?></span>
diff --git a/lib/defaults.php b/lib/defaults.php
index 7dc6fbd0ada..fa2bc3a43aa 100644
--- a/lib/defaults.php
+++ b/lib/defaults.php
@@ -5,70 +5,103 @@
* community edition. Use the get methods to always get the right strings.
*/
-class OC_Defaults {
+if (file_exists(OC::$SERVERROOT . '/themes/' . OC_Util::getTheme() . '/defaults.php')) {
+ require_once 'themes/' . OC_Util::getTheme() . '/defaults.php';
+}
- private static $communityEntity = "ownCloud";
- private static $communityName = "ownCloud";
- private static $communityBaseUrl = "http://owncloud.org";
- private static $communitySyncClientUrl = " http://owncloud.org/sync-clients/";
- private static $communityDocBaseUrl = "http://doc.owncloud.org";
- private static $communitySlogan = "web services under your control";
+class OC_Defaults {
- private static $enterpriseEntity = "ownCloud Inc.";
- private static $enterpriseName = "ownCloud Enterprise Edition";
- private static $enterpriseBaseUrl = "https://owncloud.com";
- private static $enterpriseDocBaseUrl = "http://doc.owncloud.com";
- private static $enterpiseSyncClientUrl = "https://owncloud.com/products/desktop-clients";
- private static $enterpriseSlogan = "Your Cloud, Your Data, Your Way!";
+ private static $defaultEntity = "ownCloud";
+ private static $defaultName = "ownCloud";
+ private static $defaultBaseUrl = "http://owncloud.org";
+ private static $defaultSyncClientUrl = " http://owncloud.org/sync-clients/";
+ private static $defaultDocBaseUrl = "http://doc.owncloud.org";
+ private static $defaultSlogan = "web services under your control";
+ private static $defaultLogoClaim = "";
+ private function themeExist($method) {
+ if (OC_Util::getTheme() !== '' && method_exists('OC_Theme', $method)) {
+ return true;
+ }
+ return false;
+ }
public static function getBaseUrl() {
- if (OC_Util::getEditionString() === '') {
- return self::$communityBaseUrl;
+ if (self::themeExist('getBaseUrl')) {
+ return OC_Theme::getBaseUrl();
} else {
- return self::$enterpriseBaseUrl;
+ return self::$defaultBaseUrl;
}
}
public static function getSyncClientUrl() {
- if (OC_Util::getEditionString() === '') {
- return self::$communitySyncClientUrl;
+ if (self::themeExist('getSyncClientUrl')) {
+ return OC_Theme::getSyncClientUrl();
} else {
- return self::$enterpiseSyncClientUrl;
+ return self::$defaultSyncClientUrl;
}
}
public static function getDocBaseUrl() {
- if (OC_Util::getEditionString() === '') {
- return self::$communityDocBaseUrl;
+ if (self::themeExist('getDocBaseUrl')) {
+ return OC_Theme::getDocBaseUrl();
} else {
- return self::$enterpriseDocBaseUrl;
+ return self::$defaultDocBaseUrl;
}
}
public static function getName() {
- if (OC_Util::getEditionString() === '') {
- return self::$communityName;
+ if (self::themeExist('getName')) {
+ return OC_Theme::getName();
} else {
- return self::$enterpriseName;
+ return self::$defaultName;
}
}
public static function getEntity() {
- if (OC_Util::getEditionString() === '') {
- return self::$communityEntity;
+ if (self::themeExist('getEntity')) {
+ return OC_Theme::getEntity();
} else {
- return self::$enterpriseEntity;
+ return self::$defaultEntity;
}
}
public static function getSlogan() {
$l = OC_L10N::get('core');
- if (OC_Util::getEditionString() === '') {
- return $l->t(self::$communitySlogan);
+ if (self::themeExist('getSlogan')) {
+ return OC_Theme::getSlogan();
+ } else {
+ return $l->t(self::$defaultSlogan);
+ }
+ }
+
+ public static function getLogoClaim() {
+ if (self::themeExist('getLogoClaim')) {
+ return OC_Theme::getLogoClaim();
+ } else {
+ return self::$defaultLogoClaim;
+ }
+ }
+
+ public static function getShortFooter() {
+ if (self::themeExist('getShortFooter')) {
+ $footer = OC_Theme::getShortFooter();
} else {
- return self::$enterpriseSlogan;
+ $footer = "<a href=\"". self::getBaseUrl() . "\" target=\"_blank\">" .self::getEntity() . "</a>".
+ ' – ' . self::getSlogan();
}
+
+ return $footer;
+ }
+
+ public static function getLongFooter() {
+ if (self::themeExist('getLongFooter')) {
+ $footer = OC_Theme::getLongFooter();
+ } else {
+ $footer = self::getShortFooter();
+ }
+
+ return $footer;
}
-} \ No newline at end of file
+}
diff --git a/lib/mail.php b/lib/mail.php
index e15af277a64..d6a383fe003 100644
--- a/lib/mail.php
+++ b/lib/mail.php
@@ -113,9 +113,10 @@ class OC_Mail {
*/
public static function getfooter() {
- $txt="\n-- \n";
- $txt.="ownCloud\n";
- $txt.="Your Cloud, Your Data, Your Way!\n";
+ $txt="\n--\n";
+ $txt.=OC_Defaults::getName() . "\n";
+ $txt.=OC_Defaults::getSlogan() . "\n";
+
return($txt);
}
diff --git a/settings/templates/admin.php b/settings/templates/admin.php
index 1ed3f6ef47f..68a4cbe0590 100644
--- a/settings/templates/admin.php
+++ b/settings/templates/admin.php
@@ -230,12 +230,16 @@ endfor;?>
</fieldset>
-<fieldset class="personalblock credits-footer">
-<?php if (OC_Util::getEditionString() === ''): ?>
+<fieldset class="personalblock">
<legend><strong><?php p($l->t('Version'));?></strong></legend>
- <strong>ownCloud</strong> <?php p(OC_Util::getVersionString()); ?> <?php p(OC_Util::getEditionString()); ?><br/>
+ <strong><?php p(OC_Defaults::getName()); ?></strong> <?php p(OC_Util::getVersionString()); ?>
+<?php if (OC_Util::getEditionString() === ''): ?>
+ (<?php print_unescaped(OC_Updater::ShowUpdatingHint()); ?>)<br/>
<?php print_unescaped($l->t('Developed by the <a href="http://ownCloud.org/contact" target="_blank">ownCloud community</a>, the <a href="https://github.com/owncloud" target="_blank">source code</a> is licensed under the <a href="http://www.gnu.org/licenses/agpl-3.0.html" target="_blank"><abbr title="Affero General Public License">AGPL</abbr></a>.')); ?>
-<?php else: ?>
- <p>© 2013 <a href="<?php p(OC_Defaults::getBaseUrl()); ?>" target="_blank"><?php p(OC_Defaults::getEntity()); ?></a> – <?php p(OC_Defaults::getSlogan()); ?></p>
<?php endif; ?>
</fieldset>
+<fieldset class="personalblock credits-footer">
+<p>
+ <?php print_unescaped(OC_Defaults::getShortFooter()); ?>
+</p>
+</fieldset>
diff --git a/settings/templates/personal.php b/settings/templates/personal.php
index a9457399d5d..5d0bb77c78e 100644
--- a/settings/templates/personal.php
+++ b/settings/templates/personal.php
@@ -111,13 +111,15 @@ if($_['passwordChangeSupported']) {
print_unescaped($form);
};?>
-<fieldset class="personalblock credits-footer">
-<?php if (OC_Util::getEditionString() === ''): ?>
+<fieldset class="personalblock">
<legend><strong><?php p($l->t('Version'));?></strong></legend>
- <strong>ownCloud</strong> <?php p(OC_Util::getVersionString()); ?>
- <?php p(OC_Util::getEditionString()); ?> <br />
+ <strong><?php p(OC_Defaults::getName()); ?></strong> <?php p(OC_Util::getVersionString()); ?><br/>
+<?php if (OC_Util::getEditionString() === ''): ?>
<?php print_unescaped($l->t('Developed by the <a href="http://ownCloud.org/contact" target="_blank">ownCloud community</a>, the <a href="https://github.com/owncloud" target="_blank">source code</a> is licensed under the <a href="http://www.gnu.org/licenses/agpl-3.0.html" target="_blank"><abbr title="Affero General Public License">AGPL</abbr></a>.')); ?>
-<?php else: ?>
- <p>© 2013 <a href="<?php p(OC_Defaults::getBaseUrl()); ?>" target="_blank"><?php p(OC_Defaults::getEntity()); ?></a> – <?php p(OC_Defaults::getSlogan()); ?></p>
<?php endif; ?>
</fieldset>
+<fieldset class="personalblock credits-footer">
+<p>
+ <?php print_unescaped(OC_Defaults::getShortFooter()); ?>
+</p>
+</fieldset>