XMLRPC: extended listPages()
darcs-hash:20080824090633-23886-57dd768012053858ec86eab235698b7f297661ea.gz
This commit is contained in:
parent
fc80ed598f
commit
dfd13e55ad
1 changed files with 21 additions and 2 deletions
|
@ -222,8 +222,27 @@ class dokuwiki_xmlrpc_server extends IXR_IntrospectionServer {
|
|||
* List all pages - we use the indexer list here
|
||||
*/
|
||||
function listPages(){
|
||||
require_once(DOKU_INC.'inc/fulltext.php');
|
||||
return ft_pageLookup('');
|
||||
global $conf;
|
||||
|
||||
$list = array();
|
||||
$pages = file($conf['indexdir'] . '/page.idx');
|
||||
$pages = array_filter($pages, 'isVisiblePage');
|
||||
|
||||
foreach(array_keys($pages) as $idx) {
|
||||
if(page_exists($pages[$idx])) {
|
||||
$perm = auth_quickaclcheck($pages[$idx]);
|
||||
if($perm >= AUTH_READ) {
|
||||
$page = array();
|
||||
$page['id'] = trim($pages[$idx]);
|
||||
$page['perms'] = $perm;
|
||||
$page['size'] = @filesize(wikiFN($pages[$idx]));
|
||||
$page['lastModified'] = new IXR_Date(@filemtime($pages[$idx]));
|
||||
$list[] = $page;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $list;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue