Skip to content
Snippets Groups Projects

Hotline 6.55

Merged Ghislain Loas requested to merge hotline_6.55 into hotline_#17249_auto_open_vertical_menu
Viewing commit e1113676
Show latest version
4 files
+ 99
8
Preferences
Compare changes
Files
4
@@ -16,7 +16,7 @@
*
* You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
* along with AFI-OPAC 2.0; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
abstract class Class_WebService_SIGB_AbstractRESTService extends Class_WebService_SIGB_AbstractService {
@@ -82,13 +82,15 @@ abstract class Class_WebService_SIGB_AbstractRESTService extends Class_WebServic
public function httpGet($options) {
$url = $this->buildQueryURL($options);
try {
return $this->getWebClient()->open_url($url);
$response = $this->getWebClient()->open_url($url);
$this->log();
return $response;
} catch (Exception $e) {
return '';
}
}
/**
* @param string $xml
* @param string $tag
@@ -124,7 +126,7 @@ abstract class Class_WebService_SIGB_AbstractRESTService extends Class_WebServic
$reader);
}
/**
* @param array $params
* @param Class_WebService_SIGB_AbstractILSDIPatronInfoReader $reader
@@ -168,7 +170,7 @@ abstract class Class_WebService_SIGB_AbstractRESTService extends Class_WebServic
return false;
}
/**
* @param array $params
@@ -202,7 +204,7 @@ abstract class Class_WebService_SIGB_AbstractRESTService extends Class_WebServic
public function ilsdiRenewLoan($params, $error_tag='error') {
return $this->ilsdiAction('RenewLoan', $params, $error_tag, 'Prolongation impossible');
}
/**
* @param string $xml
@@ -211,12 +213,12 @@ abstract class Class_WebService_SIGB_AbstractRESTService extends Class_WebServic
return $this->ilsdiCheckXml($xml, $error_tag, 'Mise à jour impossible');
}
public function ilsdiAction($name, $params, $error_tag, $error_message) {
$params = array_merge(array('service' => $name), $params);
return $this->ilsdiCheckXml($this->httpGet($params), $error_tag, $error_message);
}
public function ilsdiCheckXml($xml, $error_tag, $error_message) {
if (!$xml)