Skip to content
Snippets Groups Projects
Commit 45c63471 authored by Michael Klier's avatar Michael Klier
Browse files

XMLRPC: pageVersions() should return the current version too

darcs-hash:20080310233733-23886-79cb51e12374a51ac2595298bf331e1525962a2f.gz
parent 546d3a99
No related branches found
No related tags found
No related merge requests found
......@@ -373,8 +373,13 @@ class dokuwiki_xmlrpc_server extends IXR_IntrospectionServer {
$revisions = getRevisions($id, $first, $conf['recent']+1);
}
if(count($revisions)>0 && $first==0) {
array_unshift($revisions, ''); // include current revision
array_pop($revisions); // remove extra log entry
}
$hasNext = false;
if (count($revisions)>$conf['recent']) {
if(count($revisions)>$conf['recent']) {
$hasNext = true;
array_pop($revisions); // remove extra log entry
}
......@@ -383,6 +388,9 @@ class dokuwiki_xmlrpc_server extends IXR_IntrospectionServer {
foreach($revisions as $rev) {
$file = wikiFN($id,$rev);
$time = @filemtime($file);
// we check if the page actually exists, if this is not the
// case this can lead to less pages being returned than
// specified via $conf['recent']
if($time){
$info = getRevisionInfo($id, $time, 1024);
if(!empty($info)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment