diff options
author | Michael Hamann <michael@content-space.de> | 2013-02-20 20:18:59 +0100 |
---|---|---|
committer | Christopher Smith <chris@jalakai.co.uk> | 2013-02-24 12:39:02 +0000 |
commit | e8baa2279f46cfaaf18a54d75c1329d266a4ca47 (patch) | |
tree | 81f8532f2bb745b05940d18ad1b2c9c5c2de0625 /inc | |
parent | b6235013d0c936d6852299af46d0f6a7eb907665 (diff) | |
download | rpg-e8baa2279f46cfaaf18a54d75c1329d266a4ca47.tar.gz rpg-e8baa2279f46cfaaf18a54d75c1329d266a4ca47.tar.bz2 |
Revert the search depth behavior changes from #154
This reverts parts of the changes from #154: Before merging the pull
request, a depth of 1 returned just the pages in the root namespace.
With the changes in the pull request, a depth of 1 also returned pages
in subnamespaces of the root namespace (as it was also tested in the test case).
This reverts this part of the changes and a depth of 1 returns just the
pages in the root namespace again.
Diffstat (limited to 'inc')
-rw-r--r-- | inc/search.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/inc/search.php b/inc/search.php index e4aa3b9eb..6927fff5f 100644 --- a/inc/search.php +++ b/inc/search.php @@ -243,8 +243,8 @@ function search_pagename(&$data,$base,$file,$type,$lvl,$opts){ function search_allpages(&$data,$base,$file,$type,$lvl,$opts){ if(isset($opts['depth']) && $opts['depth']){ $parts = explode('/',ltrim($file,'/')); - if(($type == 'd' && count($parts) > $opts['depth']) - || ($type != 'd' && count($parts) > $opts['depth'] + 1)){ + if(($type == 'd' && count($parts) >= $opts['depth']) + || ($type != 'd' && count($parts) > $opts['depth'])){ return false; // depth reached } } |