@@ 69-72 (lines=4) @@ | ||
66 | $this->response->add(new XoopsXmlRpcFault(109, $msg)); |
|
67 | } else { |
|
68 | // will be removed... don't worry if this looks bad |
|
69 | if (!XoopsLoad::loadFile(\XoopsBaseConfig::get('root-path').'/modules/news/class/class.newsstory.php', true)) { |
|
70 | $this->response->add(new XoopsXmlRpcFault(103)); |
|
71 | return; |
|
72 | } |
|
73 | $story = new NewsStory(); |
|
74 | $error = false; |
|
75 | if ((int)$this->params[4] > 0) { |
|
@@ 159-162 (lines=4) @@ | ||
156 | $this->response->add(new XoopsXmlRpcFault(109, $msg)); |
|
157 | } else { |
|
158 | // will be removed... don't worry if this looks bad |
|
159 | if (!XoopsLoad::loadFile(\XoopsBaseConfig::get('root-path').'/modules/news/class/class.newsstory.php', true)) { |
|
160 | $this->response->add(new XoopsXmlRpcFault(103)); |
|
161 | return; |
|
162 | } |
|
163 | $story = new NewsStory($this->params[0]); |
|
164 | $storyid = $story->storyid(); |
|
165 | if (empty($storyid)) { |
|
@@ 204-207 (lines=4) @@ | ||
201 | $this->response->add(new XoopsXmlRpcFault(111)); |
|
202 | } else { |
|
203 | // will be removed... don't worry if this looks bad |
|
204 | if (!XoopsLoad::loadFile(\XoopsBaseConfig::get('root-path').'/modules/news/class/class.newsstory.php', true)) { |
|
205 | $this->response->add(new XoopsXmlRpcFault(103)); |
|
206 | return; |
|
207 | } |
|
208 | $story = new NewsStory($this->params[0]); |
|
209 | if (!$story->delete()) { |
|
210 | $this->response->add(new XoopsXmlRpcFault(106)); |
|
@@ 230-233 (lines=4) @@ | ||
227 | $this->response->add(new XoopsXmlRpcFault(104)); |
|
228 | } else { |
|
229 | // will be removed... don't worry if this looks bad |
|
230 | if (!XoopsLoad::loadFile(\XoopsBaseConfig::get('root-path').'/modules/news/class/class.newsstory.php', true)) { |
|
231 | $this->response->add(new XoopsXmlRpcFault(103)); |
|
232 | return; |
|
233 | } |
|
234 | $story = new NewsStory($this->params[0]); |
|
235 | $ret = array( |
|
236 | 'uid' => $story->uid(), |
|
@@ 290-293 (lines=4) @@ | ||
287 | if (!$this->_checkUser($this->params[1], $this->params[2])) { |
|
288 | $this->response->add(new XoopsXmlRpcFault(104)); |
|
289 | } else { |
|
290 | if (!XoopsLoad::loadFile(\XoopsBaseConfig::get('root-path').'/modules/news/class/class.newsstory.php', true)) { |
|
291 | $this->response->add(new XoopsXmlRpcFault(103)); |
|
292 | return; |
|
293 | } |
|
294 | if (isset($this->params[4]) && (int)($this->params[4]) > 0) { |
|
295 | $stories = NewsStory::getAllPublished((int)($this->params[3]), 0, $this->params[4]); |
|
296 | } else { |
|
@@ 360-363 (lines=4) @@ | ||
357 | if (!$this->_checkUser($this->params[1], $this->params[2])) { |
|
358 | $this->response->add(new XoopsXmlRpcFault(104)); |
|
359 | } else { |
|
360 | if (!XoopsLoad::loadFile(\XoopsBaseConfig::get('root-path').'/class/xoopstopic.php', true)) { |
|
361 | $this->response->add(new XoopsXmlRpcFault(103)); |
|
362 | return; |
|
363 | } |
|
364 | //$this->db = xoopsDB; |
|
365 | $xt = new XoopsTopic($xoopsDB->prefix('topics')); |
|
366 | $ret = $xt->getTopicsList(); |