Skip to content
Snippets Groups Projects
Commit c252de56 authored by Thomas Müller's avatar Thomas Müller
Browse files

Update search/index.php

respect coding style
parent 409ede09
Branches
No related tags found
No related merge requests found
......@@ -23,7 +23,7 @@
// Init owncloud
require_once('../lib/base.php');
require_once '../lib/base.php';
// Check if we are a user
OC_Util::checkLoggedIn();
......@@ -32,7 +32,7 @@ OC_Util::checkLoggedIn();
OC_Util::addStyle( 'search', 'search' );
$query=(isset($_POST['query']))?$_POST['query']:'';
if($query){
if($query) {
$results=OC_Search::search($query);
}else{
OC_Util::redirectToDefaultPage();
......@@ -40,12 +40,12 @@ if($query){
$resultTypes=array();
foreach($results as $result){
if(!isset($resultTypes[$result->type])){
if(!isset($resultTypes[$result->type])) {
$resultTypes[$result->type]=array();
}
$resultTypes[$result->type][]=$result;
}
$tmpl = new OC_Template( 'search', 'index', 'user' );
$tmpl->assign('resultTypes',$resultTypes);
$tmpl->assign('resultTypes', $resultTypes);
$tmpl->printPage();
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment