From 7d1ae5e244b820e5c98558ef3bac0a764f63e692 Mon Sep 17 00:00:00 2001 From: Guillaume Turri Date: Mon, 24 Dec 2012 23:47:46 +0100 Subject: Made xmlrpc putPage and appendPage consistent with documentation According to dokuwiki's documentation (https://www.dokuwiki.org/devel:xmlrpc#wikiputpage), those methods should return booleans, not int. --- inc/RemoteAPICore.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc/RemoteAPICore.php') diff --git a/inc/RemoteAPICore.php b/inc/RemoteAPICore.php index 36c518881..fbbb7b48b 100644 --- a/inc/RemoteAPICore.php +++ b/inc/RemoteAPICore.php @@ -440,7 +440,7 @@ class RemoteAPICore { // run the indexer if page wasn't indexed yet idx_addPage($id); - return 0; + return true; } /** -- cgit v1.2.3 From e47e9c10c754a8b04f2f5fb07877e55863ffdea5 Mon Sep 17 00:00:00 2001 From: Guillaume Turri Date: Sun, 6 Jan 2013 11:36:45 +0100 Subject: Fixed declared returned type --- inc/RemoteAPICore.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'inc/RemoteAPICore.php') diff --git a/inc/RemoteAPICore.php b/inc/RemoteAPICore.php index fbbb7b48b..c04a14f5c 100644 --- a/inc/RemoteAPICore.php +++ b/inc/RemoteAPICore.php @@ -48,7 +48,7 @@ class RemoteAPICore { 'public' => '1' ), 'dokuwiki.appendPage' => array( 'args' => array('string', 'string', 'array'), - 'return' => 'int', + 'return' => 'bool', 'doc' => 'Append text to a wiki page.' ), 'wiki.getPage' => array( 'args' => array('string'), @@ -102,7 +102,7 @@ class RemoteAPICore { 'name' => 'pageVersions' ), 'wiki.putPage' => array( 'args' => array('string', 'string', 'array'), - 'return' => 'int', + 'return' => 'bool', 'doc' => 'Saves a wiki page.' ), 'wiki.listLinks' => array( 'args' => array('string'), -- cgit v1.2.3 From f8591821bac23569788706524f8d6b14bd73775c Mon Sep 17 00:00:00 2001 From: Guillaume Turri Date: Thu, 10 Jan 2013 08:02:26 +0100 Subject: Don't remove page version from result if uneeded It may happen when the page has few versions --- inc/RemoteAPICore.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'inc/RemoteAPICore.php') diff --git a/inc/RemoteAPICore.php b/inc/RemoteAPICore.php index c04a14f5c..fef0b81dd 100644 --- a/inc/RemoteAPICore.php +++ b/inc/RemoteAPICore.php @@ -654,7 +654,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']) { -- cgit v1.2.3 From 77e5adb1a4bff9e9dd43f7c10beaa235c6eb5398 Mon Sep 17 00:00:00 2001 From: Guillaume Turri Date: Sat, 19 Jan 2013 12:18:36 +0100 Subject: wiki.getAttachments returns 'perms' according to documentation --- inc/RemoteAPICore.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'inc/RemoteAPICore.php') diff --git a/inc/RemoteAPICore.php b/inc/RemoteAPICore.php index c04a14f5c..72af65329 100644 --- a/inc/RemoteAPICore.php +++ b/inc/RemoteAPICore.php @@ -344,6 +344,8 @@ class RemoteAPICore { for($i=0; $i<$len; $i++) { unset($data[$i]['meta']); + $data[$i]['perms'] = $data[$i]['perm']; + unset($data[$i]['perm']); $data[$i]['lastModified'] = $this->api->toDate($data[$i]['mtime']); } return $data; -- cgit v1.2.3 From 45c1b04dfbc6014555d58bc561e6c277a2c2dc79 Mon Sep 17 00:00:00 2001 From: Guillaume Turri Date: Mon, 21 Jan 2013 09:46:12 +0100 Subject: Increment DOKU_API_VERSION Because wiki.getAttachments now returns 'perms' instead of 'perm' --- inc/RemoteAPICore.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc/RemoteAPICore.php') diff --git a/inc/RemoteAPICore.php b/inc/RemoteAPICore.php index 72af65329..07e6aa090 100644 --- a/inc/RemoteAPICore.php +++ b/inc/RemoteAPICore.php @@ -3,7 +3,7 @@ /** * Increased whenever the API is changed */ -define('DOKU_API_VERSION', 7); +define('DOKU_API_VERSION', 8); class RemoteAPICore { -- cgit v1.2.3