diff --git a/apps/files_sharing/templates/public.php b/apps/files_sharing/templates/public.php index cbd5ddf7a7da6d24d356953c427d719c3161460e..a3a73f77ab70c3ada5851ec06cc9e5026a856dbd 100644 --- a/apps/files_sharing/templates/public.php +++ b/apps/files_sharing/templates/public.php @@ -2,6 +2,8 @@ <div id="notification" style="display: none;"></div> </div> +<?php OC_Defaults::init(); // initialize themable default strings and urls ?> + <input type="hidden" name="dir" value="<?php p($_['dir']) ?>" id="dir"> <input type="hidden" name="downloadURL" value="<?php p($_['downloadURL']) ?>" id="downloadURL"> <input type="hidden" name="filename" value="<?php p($_['filename']) ?>" id="filename"> diff --git a/core/templates/layout.base.php b/core/templates/layout.base.php index 163e8e3ae7e6aedcd268aba5a0aebad15394aba0..51bac790741624e6348bf916ada7af99398a9a97 100644 --- a/core/templates/layout.base.php +++ b/core/templates/layout.base.php @@ -5,6 +5,9 @@ <!--[if IE 9]><html class="ng-csp ie ie9 lte9"><![endif]--> <!--[if gt IE 9]><html class="ng-csp ie"><![endif]--> <!--[if !IE]><!--><html class="ng-csp"><!--<![endif]--> + + <?php OC_Defaults::init(); // initialize themable default strings and urls ?> + <head> <title> <?php p(OC_Defaults::getName()); ?> diff --git a/core/templates/layout.guest.php b/core/templates/layout.guest.php index fde970554c646312c93966085435afd6dfb220f8..b17e2fc547cf39dfe98864f29ceb1e076c639093 100644 --- a/core/templates/layout.guest.php +++ b/core/templates/layout.guest.php @@ -5,6 +5,9 @@ <!--[if IE 9]><html class="ng-csp ie ie9 lte9"><![endif]--> <!--[if gt IE 9]><html class="ng-csp ie"><![endif]--> <!--[if !IE]><!--><html class="ng-csp"><!--<![endif]--> + + <?php OC_Defaults::init(); // initialize themable default strings and urls ?> + <head data-requesttoken="<?php p($_['requesttoken']); ?>"> <title> <?php p(OC_Defaults::getName()); ?> diff --git a/core/templates/layout.user.php b/core/templates/layout.user.php index b424669e35a8c3d8c6d27ecfbdb1c3187af4de3c..2dd339cef967c9c47c820bf7818992ade6cd3c7d 100644 --- a/core/templates/layout.user.php +++ b/core/templates/layout.user.php @@ -5,6 +5,9 @@ <!--[if IE 9]><html class="ng-csp ie ie9 lte9"><![endif]--> <!--[if gt IE 9]><html class="ng-csp ie"><![endif]--> <!--[if !IE]><!--><html class="ng-csp"><!--<![endif]--> + + <?php OC_Defaults::init(); // initialize themable default strings and urls ?> + <head data-user="<?php p($_['user_uid']); ?>" data-requesttoken="<?php p($_['requesttoken']); ?>"> <title> <?php p(!empty($_['application'])?$_['application'].' | ':''); diff --git a/lib/defaults.php b/lib/defaults.php index 08bf6be43a34d3a2365c7f94410c0078487fc0aa..1c3f8ffd056738ba0ed517fbb2e04592318fc605 100644 --- a/lib/defaults.php +++ b/lib/defaults.php @@ -11,13 +11,29 @@ if (file_exists(OC::$SERVERROOT . '/themes/' . OC_Util::getTheme() . '/defaults. class OC_Defaults { - 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 static $defaultEntity; + private static $defaultName; + private static $defaultBaseUrl; + private static $defaultSyncClientUrl; + private static $defaultDocBaseUrl; + private static $defaultSlogan; + private static $defaultLogoClaim; + + public static function init() { + $l = OC_L10N::get('core'); + + self::$defaultEntity = "ownCloud"; + self::$defaultName = "ownCloud"; + self::$defaultBaseUrl = "http://owncloud.org"; + self::$defaultSyncClientUrl = " http://owncloud.org/sync-clients/"; + self::$defaultDocBaseUrl = "http://doc.owncloud.org"; + self::$defaultSlogan = $l->t("web services under your control"); + self::$defaultLogoClaim = ""; + + if (class_exists("OC_Theme")) { + OC_Theme::init(); + } + } private static function themeExist($method) { if (OC_Util::getTheme() !== '' && method_exists('OC_Theme', $method)) { @@ -67,11 +83,10 @@ class OC_Defaults { } public static function getSlogan() { - $l = OC_L10N::get('core'); if (self::themeExist('getSlogan')) { return OC_Theme::getSlogan(); } else { - return $l->t(self::$defaultSlogan); + return self::$defaultSlogan; } } diff --git a/lib/mail.php b/lib/mail.php index d6a383fe003739928ca45da08f8f7d2c0edd1ef7..7c786ecc290541de48eeceddc9ec0770d26d430d 100644 --- a/lib/mail.php +++ b/lib/mail.php @@ -113,6 +113,8 @@ class OC_Mail { */ public static function getfooter() { + OC_Defaults::init(); + $txt="\n--\n"; $txt.=OC_Defaults::getName() . "\n"; $txt.=OC_Defaults::getSlogan() . "\n"; diff --git a/settings/personal.php b/settings/personal.php index cb411cacc5b218f5c6877cf0c35028a642873af6..d68de4d570a261aed56ed97384c3f0fea6b026f4 100644 --- a/settings/personal.php +++ b/settings/personal.php @@ -8,6 +8,8 @@ OC_Util::checkLoggedIn(); OC_App::loadApps(); +OC_Defaults::init(); // initialize themable default strings and urls + // Highlight navigation entry OC_Util::addScript( 'settings', 'personal' ); OC_Util::addStyle( 'settings', 'settings' ); diff --git a/settings/templates/admin.php b/settings/templates/admin.php index 68a4cbe0590fa82edff1227a1569fea8b5b0c87f..fd79f88af1c7cc729dccbd4e268a01a91de971c8 100644 --- a/settings/templates/admin.php +++ b/settings/templates/admin.php @@ -4,6 +4,8 @@ * See the COPYING-README file. */ $levels = array('Debug', 'Info', 'Warning', 'Error', 'Fatal'); + +OC_Defaults::init(); // initialize themable default strings and urls ?> <?php diff --git a/settings/templates/personal.php b/settings/templates/personal.php index 5d0bb77c78e8516e48b07324eb3ec9523b561115..4cf2b2393b30b313acc631964a3b2cef3cb62b36 100644 --- a/settings/templates/personal.php +++ b/settings/templates/personal.php @@ -4,6 +4,7 @@ * See the COPYING-README file. */?> +<?php OC_Defaults::init(); // initialize themable default strings and urls ?> <div class="clientsbox"> <h2><?php p($l->t('Get the apps to sync your files'));?></h2>