opensim-www – Diff between revs 12 and 13

Subversion Repositories:
Rev:
Show entire fileIgnore whitespace
Rev 12 Rev 13
Line 33... Line 33...
33 require_once 'XML/Serializer.php'; 33 require_once 'XML/Serializer.php';
Line 34... Line 34...
34   34  
Line 35... Line 35...
35 class wasRemoteAdmin { 35 class wasRemoteAdmin {
36   36  
37 var $url; 37 var $url;
Line 38... Line 38...
38 var $pwd; 38 var $raPassword;
39 var $options; 39 var $options;
40   40  
41 function wasRemoteAdmin($url,$pwd) { 41 function wasRemoteAdmin($url,$raPassword) {
42 $this->url = $url; 42 $this->url = $url;
43 $this->pwd = $pwd; 43 $this->raPassword = $raPassword;
44 $this->options = 44 $this->options =
45 array ( 45 array (
Line 66... Line 66...
66 array( 66 array(
67 "member" => 67 "member" =>
68 array( 68 array(
69 "name" => 'password', 69 "name" => 'password',
70 "value" => array( 70 "value" => array(
71 "string" => htmlspecialchars($this->pwd) 71 "string" => htmlspecialchars($this->raPassword)
72 ), 72 ),
73 ), 73 ),
74 array( 74 array(
75 "name" => 'command', 75 "name" => 'command',
76 "value" => array( 76 "value" => array(
Line 102... Line 102...
102 array( 102 array(
103 "member" => 103 "member" =>
104 array( 104 array(
105 "name" => 'password', 105 "name" => 'password',
106 "value" => array( 106 "value" => array(
107 "string" => htmlspecialchars($this->pwd) 107 "string" => htmlspecialchars($this->raPassword)
108 ), 108 ),
109 ), 109 ),
110 array( 110 array(
111 "name" => 'user_firstname', 111 "name" => 'user_firstname',
112 "value" => htmlspecialchars($firstname) 112 "value" => htmlspecialchars($firstname)
Line 125... Line 125...
125 ), 125 ),
126 ), 126 ),
127 ), 127 ),
128 ), 128 ),
129 ), 129 ),
-   130 );
-   131
-   132 $serializer->serialize($xml);
-   133 $xml_load = $serializer->getSerializedData();
-   134 $request->setBody($xml_load);
-   135 return $request->send()->getBody();
-   136 }
-   137  
-   138 function admin_create_user($firstname, $lastname, $password, $region_x, $region_y) {
-   139 $request = new HTTP_Request2($this->url, HTTP_Request2::METHOD_POST);
-   140
-   141 $serializer = new XML_Serializer($this->options);
-   142 $xml = array(
-   143 "methodName" => htmlspecialchars('admin_create_user'),
-   144 "params" =>
-   145 array( "param" =>
-   146 array( "value" =>
-   147 array("struct" =>
-   148 array(
-   149 "member" =>
-   150 array(
-   151 "name" => 'password',
-   152 "value" => array(
-   153 "string" => htmlspecialchars($this->raPassword)
-   154 ),
-   155 ),
-   156 array(
-   157 "name" => 'user_firstname',
-   158 "value" => htmlspecialchars($firstname)
-   159 ),
-   160 array(
-   161 "name" => 'user_lastname',
-   162 "value" => htmlspecialchars($lastname)
-   163 ),
-   164 array(
-   165 "name" => 'user_password',
-   166 "value" => htmlspecialchars($password)
-   167 ),
-   168 array(
-   169 "name" => 'start_region_x',
-   170 "value" => htmlspecialchars($region_x)
-   171 ),
-   172 array(
-   173 "name" => 'start_region_y',
-   174 "value" => htmlspecialchars($region_y)
-   175 ),
-   176 ),
-   177 ),
-   178 ),
-   179 ),
130 ); 180 );
Line 131... Line 181...
131 181
132 $serializer->serialize($xml); 182 $serializer->serialize($xml);
133 $xml_load = $serializer->getSerializedData(); 183 $xml_load = $serializer->getSerializedData();