diff --git a/library/NGNPro/Records/Carriers.php b/library/NGNPro/Records/Carriers.php index 4015925..4c5bb85 100644 --- a/library/NGNPro/Records/Carriers.php +++ b/library/NGNPro/Records/Carriers.php @@ -1,416 +1,397 @@ array('type'=>'integer', 'readonly' => true), 'name' => array('type'=>'string') ); var $sortElements=array( 'changeDate' => 'Change date', 'name' => 'Carrier' ); public function __construct($SoapEngine) { $this->filters = array( 'id' => trim($_REQUEST['id_filter']), 'name' => trim($_REQUEST['name_filter']) ); parent::__construct($SoapEngine); } function showCustomerTextBox () { print "Reseller"; print ""; $this->showResellerForm('reseller'); print ""; } function listRecords() { $this->showSeachForm(); // Insert credetials $this->SoapEngine->soapclient->addHeader($this->SoapEngine->SoapAuth); // Filter $filter=array( 'id' => intval($this->filters['id']), 'name' => $this->filters['name'], 'reseller' => intval($this->filters['reseller']) ); // Range $range=array('start' => intval($this->next), 'count' => intval($this->maxrowsperpage) ); // Order if (!$this->sorting['sortBy']) $this->sorting['sortBy'] = 'changeDate'; if (!$this->sorting['sortOrder']) $this->sorting['sortOrder'] = 'DESC'; $orderBy = array('attribute' => $this->sorting['sortBy'], 'direction' => $this->sorting['sortOrder'] ); // Compose query $Query=array('filter' => $filter, 'orderBy' => $orderBy, 'range' => $range ); // Call function $this->log_action('getCarriers'); - $result = $this->SoapEngine->soapclient->getCarriers($Query); - - if ((new PEAR)->isError($result)) { - $error_msg = $result->getMessage(); - $error_fault= $result->getFault(); - $error_code = $result->getCode(); - $log=sprintf("SOAP request error from %s: %s (%s): %s",$this->SoapEngine->SOAPurl,$error_msg, $error_fault->detail->exception->errorcode,$error_fault->detail->exception->errorstring); - syslog(LOG_NOTICE, $log); + $result = $this->SoapEngine->soapclient->getCarriers($Query); + + if ($this->checkLogSoapError($result, true)) { return false; } else { $this->rows = $result->total; print "
Id | Owner | Carrier | Name | Gateways | Change date | Actions |
---|---|---|---|---|---|---|
%s | %s | %s | %s | Gateways | %s | %s |