1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
===================================================================
RCS file: /cvsroot/tikiwiki/tiki/commxmlrpc.php,v
retrieving revision 1.10.2.4
retrieving revision 1.10.2.5
diff -u -r1.10.2.4 -r1.10.2.5
--- tikiwiki/tiki/commxmlrpc.php 2005/01/01 00:04:43 1.10.2.4
+++ tikiwiki/tiki/commxmlrpc.php 2005/08/18 21:39:19 1.10.2.5
@@ -1,19 +1,18 @@
<?php
-// $Header: /var/cvsroot/gentoo-x86/www-apps/tikiwiki/files/xmlrpc2-1.8.5.patch,v 1.1 2005/08/21 16:40:31 rl03 Exp $
+// $Header: /var/cvsroot/gentoo-x86/www-apps/tikiwiki/files/xmlrpc2-1.8.5.patch,v 1.1 2005/08/21 16:40:31 rl03 Exp $
// Copyright (c) 2002-2005, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
-# $Header: /var/cvsroot/gentoo-x86/www-apps/tikiwiki/files/xmlrpc2-1.8.5.patch,v 1.1 2005/08/21 16:40:31 rl03 Exp $
+# $Header: /var/cvsroot/gentoo-x86/www-apps/tikiwiki/files/xmlrpc2-1.8.5.patch,v 1.1 2005/08/21 16:40:31 rl03 Exp $
include_once("lib/init/initlib.php");
include_once ('db/tiki-db.php');
include_once ('lib/tikilib.php');
include_once ('lib/userslib.php');
-include_once ("lib/xmlrpc.inc");
-include_once ("lib/xmlrpcs.inc");
+include_once ("XML/Server.php");
include_once ('lib/commcenter/commlib.php');
$tikilib = new Tikilib($dbTiki);
@@ -28,7 +27,7 @@
"sendArticle" => array("function" => "sendArticle")
);
-$s = new xmlrpc_server($map);
+$s = new XML_RPC_Server($map);
/* Validates the user and returns user information */
function sendPage($params) {
@@ -51,18 +50,18 @@
$description = $pp->scalarval();
//
if (!$userlib->validate_user($username, $password, '', '')) {
- return new xmlrpcresp(0, 101, "Invalid username or password");
+ return new XML_RPC_Response(0, 101, "Invalid username or password");
}
// Verify if the user has tiki_p_sendme_pages
if (!$userlib->user_has_permission($username, 'tiki_p_sendme_pages')) {
- return new xmlrpcresp(0, 101, "Permissions denied user $username cannot send pages to this site");
+ return new XML_RPC_Response(0, 101, "Permissions denied user $username cannot send pages to this site");
}
// Store the page in the tiki_received_pages_table
$data = base64_decode($data);
$commlib->receive_page($pageName, $data, $comment, $site, $username, $description);
- return new xmlrpcresp(new xmlrpcval(1, "boolean"));
+ return new XML_RPC_Response(new XML_RPC_Value(1, "boolean"));
}
function sendArticle($params) {
@@ -116,12 +115,12 @@
//
if (!$userlib->validate_user($username, $password, '', '')) {
- return new xmlrpcresp(0, 101, "Invalid username or password");
+ return new XML_RPC_Response(0, 101, "Invalid username or password");
}
// Verify if the user has tiki_p_sendme_pages
if (!$userlib->user_has_permission($username, 'tiki_p_sendme_articles')) {
- return new xmlrpcresp(0, 101, "Permissions denied user $username cannot send articles to this site");
+ return new XML_RPC_Response(0, 101, "Permissions denied user $username cannot send articles to this site");
}
// Store the page in the tiki_received_pages_table
@@ -134,7 +133,7 @@
$commlib->receive_article($site, $username, $title, $authorName, $size, $use_image, $image_name, $image_type, $image_size,
$image_x, $image_y, $image_data, $publishDate, $expireDate, $created, $heading, $body, $hash, $author, $type, $rating);
- return new xmlrpcresp(new xmlrpcval(1, "boolean"));
+ return new XML_RPC_Response(new XML_RPC_Value(1, "boolean"));
}
?>
|