Navigation Menu

Skip to content

Commit

Permalink
Use new exchange body
Browse files Browse the repository at this point in the history
  • Loading branch information
GodMod committed Dec 6, 2017
1 parent 2827056 commit a4d0bbf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
11 changes: 5 additions & 6 deletions exchange/shoutbox_add.php
Expand Up @@ -41,17 +41,16 @@ class exchange_shoutbox_add extends gen_class{
* POST Request to add shoutbox entry
*
* @param array $params Parameters array
* @param string $body XML body of request
* @param string $body body-array of request
*
* @returns array
*/
function post_shoutbox_add($params, $body){
function post_shoutbox_add($params, $arrBody){
// be sure user is logged in
if ($this->user->is_signedin()){
// parse xml request
$xml = simplexml_load_string($body);
$member_id = ($xml && $xml->charid) ? intval($xml->charid) : intval($this->pdh->get('user', 'mainchar', array($this->user->data['user_id'])));
$text = ($xml && $xml->text) ? trim($xml->text) : '';
// parse request
$member_id = (isset($arrBody['charid'])) ? intval($arrBody['charid']) : intval($this->pdh->get('user', 'mainchar', array($this->user->data['user_id'])));
$text = (isset($arrBody['text'])) ? trim($arrBody['text']) : '';

// check if member id is valid for this user
$valid_members = $this->pdh->get('member', 'connection_id', array($this->user->data['user_id']));
Expand Down
4 changes: 2 additions & 2 deletions exchange/shoutbox_list.php
Expand Up @@ -42,11 +42,11 @@ class exchange_shoutbox_list extends gen_class{
* GET Request for shoutbox entries
*
* @param array $params Parameters array
* @param string $body XML body of request
* @param string $body body-array of request
*
* @returns array
*/
public function get_shoutbox_list($params, $body){
public function get_shoutbox_list($params, $arrBody){
// set response
$response = array('entries' => array());

Expand Down

0 comments on commit a4d0bbf

Please sign in to comment.