diff --git a/quickbase.php b/quickbase.php index e5dda82..4113c78 100644 --- a/quickbase.php +++ b/quickbase.php @@ -635,9 +635,7 @@ public function gen_results_table($queries = 0, $qid = 0, $qname=0, $clist = 0, /* API_GetDBPage: http://www.quickbase.com/api-guide/index.html#get_db_page.html */ public function get_db_page($page_id) { if($this->xml) { - $xml_packet = ' -'.$page_id.' - '; + $xml_packet = ''.$page_id.''; $response = $this->transmit($xml_packet, 'API_GetDBPage'); } else { @@ -717,31 +715,26 @@ public function get_schema () { } return false; } - /* API_GetUserRole: http://www.quickbase.com/api-guide/index.html#getuserrole.html */ - public function get_user_role () { - if($this->xml) { - $xml_packet = new SimpleXMLElement(''); - $xml_packet->addChild('ticket',$this->ticket); - - if ($this->app_token) - $xml_packet->addChild('apptoken', $this->app_token); - $xml_packet->addChild('uid', $this->user_id); - $xml_packet = $xml_packet->asXML(); - $response = $this->transmit($xml_packet, 'API_GetUserRole'); - } - else { - $url_string = $this->qb_ssl . $this->db_id. "?act=API_GetUserRole&ticket=". $this->ticket; - - $response = $this->transmit($url_string); - } - - if($response) { - return $response; - } - return false; - } - + public function get_user_role () { + if($this->xml) { + $xml_packet = new SimpleXMLElement(''); + $xml_packet->addChild('ticket',$this->ticket); + if ($this->app_token) + $xml_packet->addChild('apptoken', $this->app_token); + $xml_packet->addChild('uid', $this->user_id); + $xml_packet = $xml_packet->asXML(); + $response = $this->transmit($xml_packet, 'API_GetUserRole'); + } + else { + $url_string = $this->qb_ssl . $this->db_id. "?act=API_GetUserRole&ticket=". $this->ticket; + $response = $this->transmit($url_string); + } + if($response) { + return $response; + } + return false; + } /* API_GrantedDB's: http://www.quickbase.com/api-guide/index.html */ public function granted_dbs () { if($this->xml) { @@ -893,4 +886,4 @@ public function api_run_import($id) { return false; } } -?> \ No newline at end of file +?>