From 05f391071851ce5d83d327961535545552e36e52 Mon Sep 17 00:00:00 2001
From: Jan-Christoph Borchardt <JanCBorchardt@fsfe.org>
Date: Wed, 10 Aug 2011 22:56:44 +0200
Subject: [PATCH] moved search box directly to template

---
 core/templates/layout.user.php    | 4 +++-
 core/templates/part.searchbox.php | 3 ---
 lib/template.php                  | 4 +---
 3 files changed, 4 insertions(+), 7 deletions(-)
 delete mode 100644 core/templates/part.searchbox.php

diff --git a/core/templates/layout.user.php b/core/templates/layout.user.php
index f172e894e7..326ead7499 100644
--- a/core/templates/layout.user.php
+++ b/core/templates/layout.user.php
@@ -30,7 +30,9 @@
 	<body id="<?php echo $_['bodyid'];?>">
 		<header><div id="header">
 			<a href="<?php echo link_to('', 'index.php'); ?>" title="" id="owncloud"><img src="<?php echo image_path('', 'owncloud-logo-small-white.png'); ?>" alt="ownCloud" /></a>
-			<?php echo $_['searchbox']?>
+			<form class="searchbox" action="#" method="post">
+				<input id='searchbox' type="search" name="query" value="<?php if(isset($_POST['query'])){echo $_POST['query'];};?>" class="prettybutton" autocomplete="off" />
+			</form>
 			<ul id="metanav">
 				<li><a href="<?php echo link_to('', 'index.php'); ?>?logout=true" title="<?php echo $l->t('Log out');?>"><img class='svg' src="<?php echo image_path('', 'actions/logout.svg'); ?>" /></a></li>
 			</ul>
diff --git a/core/templates/part.searchbox.php b/core/templates/part.searchbox.php
deleted file mode 100644
index f5a62de2c8..0000000000
--- a/core/templates/part.searchbox.php
+++ /dev/null
@@ -1,3 +0,0 @@
-<form class="searchbox" action="#" method="post">
-	<input id='searchbox' type="search" name="query" value="<?php if(isset($_POST['query'])){echo $_POST['query'];};?>" class="prettybutton" autocomplete="off" />
-</form>
diff --git a/lib/template.php b/lib/template.php
index 2ba26eebac..bb225bdd82 100644
--- a/lib/template.php
+++ b/lib/template.php
@@ -230,9 +230,7 @@ class OC_Template{
 			// Decide which page we show
 			if( $this->renderas == "user" ){
 				$page = new OC_Template( "core", "layout.user" );
-				$search=new OC_Template( 'core', 'part.searchbox');
-				$search->assign('searchurl',OC_Helper::linkTo( 'search', 'index.php' ));
-				$page->assign('searchbox', $search->fetchPage());
+				$page->assign('searchurl',OC_Helper::linkTo( 'search', 'index.php' ));
 				if(array_search(OC_APP::getCurrentApp(),array('settings','admin','help'))!==false){
 					$page->assign('bodyid','body-settings');
 				}else{
-- 
GitLab