summaryrefslogtreecommitdiff
path: root/inc/RemoteAPICore.php
diff options
context:
space:
mode:
authorAnika Henke <anika@selfthinker.org>2014-01-26 17:38:22 +0000
committerAnika Henke <anika@selfthinker.org>2014-01-26 17:38:22 +0000
commit8fe276f7d4bf70c4a798e1c5e7bb3da72a33877d (patch)
tree1e3ce9edacc852741af07c070176bd04fb61c4b4 /inc/RemoteAPICore.php
parentc5393ecb1aa570830d21e9dc95b4c21cd9aa9c01 (diff)
parentca605ff6763b98b580278988791dc5e57fc05a74 (diff)
downloadrpg-8fe276f7d4bf70c4a798e1c5e7bb3da72a33877d.tar.gz
rpg-8fe276f7d4bf70c4a798e1c5e7bb3da72a33877d.tar.bz2
Merge remote-tracking branch 'origin/master' into video-audio
Diffstat (limited to 'inc/RemoteAPICore.php')
-rw-r--r--inc/RemoteAPICore.php23
1 files changed, 19 insertions, 4 deletions
diff --git a/inc/RemoteAPICore.php b/inc/RemoteAPICore.php
index 74c6689ac..a26c2d0de 100644
--- a/inc/RemoteAPICore.php
+++ b/inc/RemoteAPICore.php
@@ -3,7 +3,7 @@
/**
* Increased whenever the API is changed
*/
-define('DOKU_API_VERSION', 8);
+define('DOKU_API_VERSION', 9);
class RemoteAPICore {
@@ -24,6 +24,10 @@ class RemoteAPICore {
'return' => 'int',
'doc' => 'Tries to login with the given credentials and sets auth cookies.',
'public' => '1'
+ ), 'dokuwiki.logoff' => array(
+ 'args' => array(),
+ 'return' => 'int',
+ 'doc' => 'Tries to logoff by expiring auth cookies and the associated PHP session.'
), 'dokuwiki.getPagelist' => array(
'args' => array('string', 'array'),
'return' => 'array',
@@ -88,12 +92,12 @@ class RemoteAPICore {
), 'wiki.getPageInfo' => array(
'args' => array('string'),
'return' => 'array',
- 'doc' => 'Returns a struct with infos about the page.',
+ 'doc' => 'Returns a struct with info about the page.',
'name' => 'pageInfo'
), 'wiki.getPageInfoVersion' => array(
'args' => array('string', 'int'),
'return' => 'array',
- 'doc' => 'Returns a struct with infos about the page.',
+ 'doc' => 'Returns a struct with info about the page.',
'name' => 'pageInfo'
), 'wiki.getPageVersions' => array(
'args' => array('string', 'int'),
@@ -136,7 +140,7 @@ class RemoteAPICore {
), 'wiki.getAttachmentInfo' => array(
'args' => array('string'),
'return' => 'array',
- 'doc' => 'Returns a struct with infos about the attachment.'
+ 'doc' => 'Returns a struct with info about the attachment.'
), 'dokuwiki.getXMLRPCAPIVersion' => array(
'args' => array(),
'name' => 'getAPIVersion',
@@ -767,6 +771,17 @@ class RemoteAPICore {
return $ok;
}
+ function logoff(){
+ global $conf;
+ global $auth;
+ if(!$conf['useacl']) return 0;
+ if(!$auth) return 0;
+
+ auth_logoff();
+
+ return 1;
+ }
+
private function resolvePageId($id) {
$id = cleanID($id);
if(empty($id)) {