Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <213943+nickvergessen@users.noreply.github.com>2018-08-06 16:41:54 +0300
committerGitHub <noreply@github.com>2018-08-06 16:41:54 +0300
commitf67d942fad1035d98e2ff53ec74eea28ab44e9f6 (patch)
tree519ae69e71cc3d90e0c0fcb4b7389ba484646efc /core/templates
parent49662f3def66d44d5876c30e8e1b2bd34d497002 (diff)
parent4f2013bd4084b8b08fb739fe2196ed5c8d0e4a48 (diff)
Merge pull request #10530 from nextcloud/bugfix/10528/public-template
Fix issues when using the public layout without a PublicTemplateResponse
Diffstat (limited to 'core/templates')
-rw-r--r--core/templates/layout.base.php2
-rw-r--r--core/templates/layout.public.php14
2 files changed, 8 insertions, 8 deletions
diff --git a/core/templates/layout.base.php b/core/templates/layout.base.php
index d38bd114c3e..bad504c97cc 100644
--- a/core/templates/layout.base.php
+++ b/core/templates/layout.base.php
@@ -16,7 +16,7 @@
<?php emit_script_loading_tags($_); ?>
<?php print_unescaped($_['headers']); ?>
</head>
- <body id="body-public">
+ <body id="body-public" class="layout-base">
<?php include 'layout.noscript.warning.php'; ?>
<div id="content" class="app-public" role="main">
<?php print_unescaped($_['content']); ?>
diff --git a/core/templates/layout.public.php b/core/templates/layout.public.php
index 57491697a2e..74ce43d4f88 100644
--- a/core/templates/layout.public.php
+++ b/core/templates/layout.public.php
@@ -1,6 +1,6 @@
<!DOCTYPE html>
<html class="ng-csp" data-placeholder-focus="false" lang="<?php p($_['language']); ?>" data-locale="<?php p($_['locale']); ?>" >
-<head data-user="<?php p($_['user_uid']); ?>" data-user-displayname="<?php p($_['user_displayname']); ?>" data-requesttoken="<?php p($_['requesttoken']); ?>">
+<head data-requesttoken="<?php p($_['requesttoken']); ?>">
<meta charset="utf-8">
<title>
<?php
@@ -14,7 +14,7 @@
<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']:$theme->getTitle()); ?>">
+ <meta name="apple-mobile-web-app-title" content="<?php p((!empty($_['application']) && $_['appid']!=='files')? $_['application']:$theme->getTitle()); ?>">
<meta name="mobile-web-app-capable" content="yes">
<meta name="theme-color" content="<?php p($theme->getColorPrimary()); ?>">
<link rel="icon" href="<?php print_unescaped(image_path($_['appid'], 'favicon.ico')); /* IE11+ supports png */ ?>">
@@ -30,22 +30,22 @@
<div id="notification-container">
<div id="notification"></div>
</div>
- <header id="header" class="<?php p($_['header-classes']); ?>">
+ <header id="header">
<div class="header-left">
<span id="nextcloud">
<div class="logo logo-icon svg"></div>
<h1 class="header-appname">
- <?php p($template->getHeaderTitle()); ?>
+ <?php if (isset($template)) { p($template->getHeaderTitle()); } else { p($theme->getName());} ?>
</h1>
<div class="header-shared-by">
- <?php p($template->getHeaderDetails()) ?>
+ <?php if (isset($template)) { p($template->getHeaderDetails()); } ?>
</div>
</span>
</div>
<?php
/** @var \OCP\AppFramework\Http\Template\PublicTemplateResponse $template */
- if($template->getActionCount() !== 0) {
+ if(isset($template) && $template->getActionCount() !== 0) {
$primary = $template->getPrimaryAction();
$others = $template->getOtherActions();
?>
@@ -76,7 +76,7 @@
<div id="content" class="app-<?php p($_['appid']) ?>" role="main">
<?php print_unescaped($_['content']); ?>
</div>
- <?php if($template->getFooterVisible()) { ?>
+ <?php if(isset($template) && $template->getFooterVisible()) { ?>
<footer>
<p class="info"><?php print_unescaped($theme->getLongFooter()); ?></p>
</footer>