summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--inc/RemoteAPICore.php4
-rw-r--r--inc/plugin.php4
-rw-r--r--inc/search.php11
3 files changed, 13 insertions, 6 deletions
diff --git a/inc/RemoteAPICore.php b/inc/RemoteAPICore.php
index 07e6aa090..81b211ec8 100644
--- a/inc/RemoteAPICore.php
+++ b/inc/RemoteAPICore.php
@@ -656,7 +656,9 @@ class RemoteAPICore {
if(count($revisions)>0 && $first==0) {
array_unshift($revisions, ''); // include current revision
- array_pop($revisions); // remove extra log entry
+ if ( count($revisions) > $conf['recent'] ){
+ array_pop($revisions); // remove extra log entry
+ }
}
if(count($revisions) > $conf['recent']) {
diff --git a/inc/plugin.php b/inc/plugin.php
index e4bba989d..153e89407 100644
--- a/inc/plugin.php
+++ b/inc/plugin.php
@@ -81,8 +81,8 @@ class DokuWiki_Plugin {
* retrieve a language dependent file and pass to xhtml renderer for display
* plugin equivalent of p_locale_xhtml()
*
- * @param $id id of language dependent wiki page
- * @return string parsed contents of the wiki page in xhtml format
+ * @param string $id id of language dependent wiki page
+ * @return string parsed contents of the wiki page in xhtml format
*/
function locale_xhtml($id) {
return p_cached_output($this->localFN($id));
diff --git a/inc/search.php b/inc/search.php
index 1cecfd5ec..53bd240e8 100644
--- a/inc/search.php
+++ b/inc/search.php
@@ -247,11 +247,16 @@ function search_pagename(&$data,$base,$file,$type,$lvl,$opts){
* @author Andreas Gohr <andi@splitbrain.org>
*/
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)){
+ return false; // depth reached
+ }
+ }
+
//we do nothing with directories
if($type == 'd'){
- if(!$opts['depth']) return true; // recurse forever
- $parts = explode('/',ltrim($file,'/'));
- if(count($parts) == $opts['depth']) return false; // depth reached
return true;
}