summaryrefslogtreecommitdiff
path: root/lib/exe/xmlrpc.php
diff options
context:
space:
mode:
authorChristopher Smith <chris@jalakai.co.uk>2011-04-02 03:36:26 +0100
committerChristopher Smith <chris@jalakai.co.uk>2011-04-02 03:36:26 +0100
commitefb973f8a33b893d0a4d46d6b733530833c4ad41 (patch)
tree9386f06b90a4fc6a5c31183793df17851ca0da26 /lib/exe/xmlrpc.php
parent344763ad4e90e41c8a94b0a69a527ff2d6319ab5 (diff)
parenta3f9f75c2624b73c4a57bf2a346ae71bf6a5fb98 (diff)
downloadrpg-efb973f8a33b893d0a4d46d6b733530833c4ad41.tar.gz
rpg-efb973f8a33b893d0a4d46d6b733530833c4ad41.tar.bz2
Merge branch 'master' of git@github.com:splitbrain/dokuwiki
Diffstat (limited to 'lib/exe/xmlrpc.php')
-rw-r--r--lib/exe/xmlrpc.php29
1 files changed, 4 insertions, 25 deletions
diff --git a/lib/exe/xmlrpc.php b/lib/exe/xmlrpc.php
index 9749a2e16..108dd8fd1 100644
--- a/lib/exe/xmlrpc.php
+++ b/lib/exe/xmlrpc.php
@@ -1,7 +1,7 @@
<?php
if(!defined('DOKU_INC')) define('DOKU_INC',dirname(__FILE__).'/../../');
-// fix when '<?xml' isn't on the very first line
+// fix when '< ?xml' isn't on the very first line
if(isset($HTTP_RAW_POST_DATA)) $HTTP_RAW_POST_DATA = trim($HTTP_RAW_POST_DATA);
/**
@@ -364,9 +364,8 @@ class dokuwiki_xmlrpc_server extends IXR_IntrospectionServer {
*/
function listPages(){
$list = array();
- $pages = array_filter(array_filter(idx_getIndex('page', ''),
- 'isVisiblePage'),
- 'page_exists');
+ $pages = idx_get_indexer()->getPages();
+ $pages = array_filter(array_filter($pages,'isVisiblePage'),'page_exists');
foreach(array_keys($pages) as $idx) {
$perm = auth_quickaclcheck($pages[$idx]);
@@ -562,27 +561,7 @@ class dokuwiki_xmlrpc_server extends IXR_IntrospectionServer {
unlock($id);
// run the indexer if page wasn't indexed yet
- if(!@file_exists(metaFN($id, '.indexed'))) {
- // try to aquire a lock
- $lock = $conf['lockdir'].'/_indexer.lock';
- while(!@mkdir($lock,$conf['dmode'])){
- usleep(50);
- if(time()-@filemtime($lock) > 60*5){
- // looks like a stale lock - remove it
- @rmdir($lock);
- }else{
- return false;
- }
- }
- if($conf['dperm']) chmod($lock, $conf['dperm']);
-
- // do the work
- idx_addPage($id);
-
- // we're finished - save and free lock
- io_saveFile(metaFN($id,'.indexed'),INDEXER_VERSION);
- @rmdir($lock);
- }
+ idx_addPage($id);
return 0;
}