From 0db5c734bca903701766d20942c9469f8f5f8814 Mon Sep 17 00:00:00 2001
From: Jan-Christoph Borchardt <JanCBorchardt@fsfe.org>
Date: Fri, 19 Aug 2011 22:53:07 +0200
Subject: [PATCH] some header fixes

---
 core/templates/layout.guest.php | 11 ++++-------
 core/templates/layout.user.php  |  6 ++----
 2 files changed, 6 insertions(+), 11 deletions(-)

diff --git a/core/templates/layout.guest.php b/core/templates/layout.guest.php
index 04bb21896f1..35c4378fc98 100644
--- a/core/templates/layout.guest.php
+++ b/core/templates/layout.guest.php
@@ -4,13 +4,13 @@
 		<title>ownCloud</title>
 		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 		<link rel="shortcut icon" href="<?php echo image_path('', 'favicon.png'); ?>" /><link rel="apple-touch-icon-precomposed" href="<?php echo image_path('', 'favicon-touch.png'); ?>" />
-		<?php if(isset($_['cssfiles'])) foreach($_['cssfiles'] as $cssfile): ?>
+		<?php foreach($_['cssfiles'] as $cssfile): ?>
 			<link rel="stylesheet" href="<?php echo $cssfile; ?>" type="text/css" media="screen" />
 		<?php endforeach; ?>
 		<script type="text/javascript">
 			var oc_webroot = '<?php global $WEBROOT; echo $WEBROOT; ?>';
-		// </script>
-		<?php if(isset($_['jsfiles'])) foreach($_['jsfiles'] as $jsfile): ?>
+		</script>
+		<?php foreach($_['jsfiles'] as $jsfile): ?>
 			<script type="text/javascript" src="<?php echo $jsfile; ?>"></script>
 		<?php endforeach; ?>
 	
@@ -20,11 +20,8 @@
 				foreach($header['attributes'] as $name=>$value){
 					echo "$name='$value' ";
 				};
-				echo '>';
-				echo $header['text'];
-				echo '</'.$header['tag'].'>';
+				echo '/>';
 			?>
-			<script type="text/javascript" src="<?php echo $jsfile; ?>"></script>
 		<?php endforeach; ?>
 	</head>
 
diff --git a/core/templates/layout.user.php b/core/templates/layout.user.php
index 2e70fa29389..c8b276bebb6 100644
--- a/core/templates/layout.user.php
+++ b/core/templates/layout.user.php
@@ -10,7 +10,7 @@
 		<script type="text/javascript">
 			var oc_webroot = '<?php global $WEBROOT; echo $WEBROOT; ?>';
 			var oc_current_user = '<?php echo OC_User::getUser() ?>';
-		// </script>
+		</script>
 		<?php foreach($_['jsfiles'] as $jsfile): ?>
 			<script type="text/javascript" src="<?php echo $jsfile; ?>"></script>
 		<?php endforeach; ?>
@@ -20,9 +20,7 @@
 				foreach($header['attributes'] as $name=>$value){
 					echo "$name='$value' ";
 				};
-				echo '>';
-				echo $header['text'];
-				echo '</'.$header['tag'].'>';
+				echo '/>';
 			?>
 		<?php endforeach; ?>
 	</head>
-- 
GitLab