XOOPS  2.6.0
movabletypeapi.php
Go to the documentation of this file.
1 <?php
2 /*
3  You may not change or alter any portion of this comment or credits
4  of supporting developers from this source code or any supporting source code
5  which is considered copyrighted (c) material of the original comment or credit authors.
6 
7  This program is distributed in the hope that it will be useful,
8  but WITHOUT ANY WARRANTY; without even the implied warranty of
9  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10 */
11 
23 {
25  {
27  }
28 
29  function getCategoryList()
30  {
31  if (!$this->_checkUser($this->params[1], $this->params[2])) {
32  $this->response->add(new XoopsXmlRpcFault(104));
33  } else {
34  $xoopsapi = $this->_getXoopsApi($this->params);
35  $xoopsapi->_setUser($this->user, $this->isadmin);
36  $ret = $xoopsapi->getCategories(false);
37  if (is_array($ret)) {
38  $arr = new XoopsXmlRpcArray();
39  foreach ($ret as $id => $name) {
40  $struct = new XoopsXmlRpcStruct();
41  $struct->add('categoryId', new XoopsXmlRpcString($id));
42  $struct->add('categoryName', new XoopsXmlRpcString($name['title']));
43  $arr->add($struct);
44  unset($struct);
45  }
46  $this->response->add($arr);
47  } else {
48  $this->response->add(new XoopsXmlRpcFault(106));
49  }
50  }
51  }
52 
53  function getPostCategories()
54  {
55  $this->response->add(new XoopsXmlRpcFault(107));
56  }
57 
58  function setPostCategories()
59  {
60  $this->response->add(new XoopsXmlRpcFault(107));
61  }
62 
63  function supportedMethods()
64  {
65  $this->response->add(new XoopsXmlRpcFault(107));
66  }
67 }
68 ?>
MovableTypeApi(&$params, &$response, &$module)
_getXoopsApi(&$params)
Definition: xmlrpcapi.php:154
XoopsXmlRpcApi(array &$params, XoopsXmlRpcResponse &$response, XoopsModule &$module)
Definition: xmlrpcapi.php:49
$id
Definition: admin_menu.php:36
_checkUser($username, $password)
Definition: xmlrpcapi.php:64