]> source.dussan.org Git - nextcloud-server.git/commitdiff
return to default page on empty search
authorRobin Appelman <icewind1991@gmail.com>
Thu, 23 Jun 2011 10:06:46 +0000 (12:06 +0200)
committerRobin Appelman <icewind1991@gmail.com>
Thu, 23 Jun 2011 10:17:03 +0000 (12:17 +0200)
search/index.php

index e6f41528ea31eedec6f546ddf324dc0ab9e2fb27..b348b22387f8a05104b20c013c6a8373d319c9e5 100644 (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();