return to default page on empty search

This commit is contained in:
Robin Appelman 2011-06-23 12:06:46 +02:00
parent 51b2557470
commit 01471d3e2a
1 changed files with 3 additions and 0 deletions

View File

@ -38,6 +38,9 @@ OC_UTIL::addStyle( 'search', 'search' );
$query=(isset($_POST['query']))?$_POST['query']:'';
if($query){
$results=OC_SEARCH::search($query);
}else{
header("Location: ".$WEBROOT.'/'.OC_APPCONFIG::getValue("core", "defaultpage", "files/index.php"));
exit();
}
$resultTypes=array();