summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorBjörn Schießle <schiessle@owncloud.com>2013-07-24 11:51:21 +0200
committerBjörn Schießle <schiessle@owncloud.com>2013-07-24 11:51:21 +0200
commit75fd6d4fde4cd6d9eda5e6b944739f1f2798447d (patch)
tree2d04d64bcdeb2ea13de68b9606307ebf799aeb87 /core
parent2622839fcfb360eafc6d670885ca265ebed1433c (diff)
downloadnextcloud-server-75fd6d4fde4cd6d9eda5e6b944739f1f2798447d.tar.gz
nextcloud-server-75fd6d4fde4cd6d9eda5e6b944739f1f2798447d.zip
initialize OC_Defaults in template constructorX
Diffstat (limited to 'core')
-rw-r--r--core/templates/altmail.php6
-rw-r--r--core/templates/layout.base.php4
-rw-r--r--core/templates/layout.guest.php10
-rw-r--r--core/templates/layout.user.php8
-rw-r--r--core/templates/mail.php9
5 files changed, 14 insertions, 23 deletions
diff --git a/core/templates/altmail.php b/core/templates/altmail.php
index a7df29a2446..2551473c6f0 100644
--- a/core/templates/altmail.php
+++ b/core/templates/altmail.php
@@ -1,9 +1,7 @@
<?php
-$defaults = new OC_Defaults();
-
print_unescaped($l->t("Hey there,\n\njust letting you know that %s shared %s with you.\nView it: %s\n\nCheers!", array($_['user_displayname'], $_['filename'], $_['link'])));
?>
--
-<?php p($defaults->getName() . ' - ' . $defaults->getSlogan()); ?>
-<?php print_unescaped("\n".$defaults->getBaseUrl());
+<?php p($theme->getName() . ' - ' . $theme->getSlogan()); ?>
+<?php print_unescaped("\n".$theme->getBaseUrl());
diff --git a/core/templates/layout.base.php b/core/templates/layout.base.php
index 2399512eacd..ea10c3042b5 100644
--- a/core/templates/layout.base.php
+++ b/core/templates/layout.base.php
@@ -6,11 +6,9 @@
<!--[if gt IE 9]><html class="ng-csp ie"><![endif]-->
<!--[if !IE]><!--><html class="ng-csp"><!--<![endif]-->
- <?php $defaults = new OC_Defaults(); // initialize themable default strings and urls ?>
-
<head>
<title>
- <?php p($defaults->getTitle()); ?>
+ <?php p($theme->getTitle()); ?>
</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="shortcut icon" href="<?php print_unescaped(image_path('', 'favicon.png')); ?>" />
diff --git a/core/templates/layout.guest.php b/core/templates/layout.guest.php
index e20d28970a5..9f645b6500d 100644
--- a/core/templates/layout.guest.php
+++ b/core/templates/layout.guest.php
@@ -6,11 +6,9 @@
<!--[if gt IE 9]><html class="ng-csp ie"><![endif]-->
<!--[if !IE]><!--><html class="ng-csp"><!--<![endif]-->
- <?php $defaults = new OC_Defaults(); // initialize themable default strings and urls ?>
-
<head data-requesttoken="<?php p($_['requesttoken']); ?>">
<title>
- <?php p($defaults->getTitle()); ?>
+ <?php p($theme->getTitle()); ?>
</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="apple-itunes-app" content="app-id=543672169">
@@ -37,14 +35,14 @@
<body id="body-login">
<div id="login">
<header><div id="header">
- <img src="<?php print_unescaped(image_path('', 'logo.svg')); ?>" class="svg" alt="<?php p($defaults->getName()); ?>" />
- <div id="logo-claim" style="display:none;"><?php p($defaults->getLogoClaim()); ?></div>
+ <img src="<?php print_unescaped(image_path('', 'logo.svg')); ?>" class="svg" alt="<?php p($theme->getName()); ?>" />
+ <div id="logo-claim" style="display:none;"><?php p($theme->getLogoClaim()); ?></div>
</div></header>
<?php print_unescaped($_['content']); ?>
</div>
<footer>
<p class="info">
- <?php print_unescaped($defaults->getLongFooter()); ?>
+ <?php print_unescaped($theme->getLongFooter()); ?>
</p></footer>
</body>
</html>
diff --git a/core/templates/layout.user.php b/core/templates/layout.user.php
index 87c02a83d3b..b7405ea273b 100644
--- a/core/templates/layout.user.php
+++ b/core/templates/layout.user.php
@@ -6,12 +6,10 @@
<!--[if gt IE 9]><html class="ng-csp ie"><![endif]-->
<!--[if !IE]><!--><html class="ng-csp"><!--<![endif]-->
- <?php $defaults = new OC_Defaults(); // initialize themable default strings and urls ?>
-
<head data-user="<?php p($_['user_uid']); ?>" data-requesttoken="<?php p($_['requesttoken']); ?>">
<title>
<?php p(!empty($_['application'])?$_['application'].' | ':'');
- p($defaults->getTitle());
+ p($theme->getTitle());
p(trim($_['user_displayname']) != '' ?' ('.$_['user_displayname'].') ':'') ?>
</title>
<meta charset="utf-8">
@@ -45,8 +43,8 @@
</div>
<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="<?php p($defaults->getName()); ?>" /></a>
- <div id="logo-claim" style="display:none;"><?php p($defaults->getLogoClaim()); ?></div>
+ src="<?php print_unescaped(image_path('', 'logo-wide.svg')); ?>" alt="<?php p($theme->getName()); ?>" /></a>
+ <div id="logo-claim" style="display:none;"><?php p($theme->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/core/templates/mail.php b/core/templates/mail.php
index a9fdff06067..de72b136b13 100644
--- a/core/templates/mail.php
+++ b/core/templates/mail.php
@@ -1,11 +1,10 @@
-<?php $defaults = new OC_Defaults() // initialize themable default strings and urls ?>
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<tr><td>
<table cellspacing="0" cellpadding="0" border="0" width="600px">
<tr>
<td bgcolor="#1d2d44" width="20px">&nbsp;</td>
<td bgcolor="#1d2d44">
-<img src="<?php print_unescaped(OC_Helper::makeURLAbsolute(image_path('', 'logo-mail.gif'))); ?>" alt="<?php p($defaults->getName()); ?>"/>
+<img src="<?php print_unescaped(OC_Helper::makeURLAbsolute(image_path('', 'logo-mail.gif'))); ?>" alt="<?php p($theme->getName()); ?>"/>
</td>
</tr>
<tr><td bgcolor="#f8f8f8" colspan="2">&nbsp;</td></tr>
@@ -21,9 +20,9 @@ print_unescaped($l->t('Hey there,<br><br>just letting you know that %s shared »
<tr>
<td bgcolor="#f8f8f8" width="20px">&nbsp;</td>
<td bgcolor="#f8f8f8" style="font-weight:normal; font-size:0.8em; line-height:1.2em; font-family:verdana,'arial',sans;">--<br>
-<?php p($defaults->getName()); ?> -
-<?php p($defaults->getSlogan()); ?>
-<br><a href="<?php print_unescaped($defaults->getBaseUrl()); ?>"><?php print_unescaped($defaults->getBaseUrl());?></a></td>
+<?php p($theme->getName()); ?> -
+<?php p($theme->getSlogan()); ?>
+<br><a href="<?php print_unescaped($theme->getBaseUrl()); ?>"><?php print_unescaped($theme->getBaseUrl());?></a></td>
</tr>
<tr>
<td bgcolor="#f8f8f8" colspan="2">&nbsp;</td>