Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/search
diff options
context:
space:
mode:
authorRobin Appelman <icewind1991@gmail.com>2011-06-23 14:06:46 +0400
committerRobin Appelman <icewind1991@gmail.com>2011-06-23 14:17:03 +0400
commit01471d3e2a29268e8f1dfa3c96da53a0bb9e731c (patch)
treec4d5540a0585dbdb5cf68e1c20de533d4a39bc75 /search
parent51b25574700de137f15da880f51bf3a3fb167b4d (diff)
return to default page on empty search
Diffstat (limited to 'search')
-rw-r--r--search/index.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/search/index.php b/search/index.php
index e6f41528ea3..b348b22387f 100644
--- a/search/index.php
+++ b/search/index.php
@@ -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();