Skip to content
Snippets Groups Projects
Commit 3c5b2b38 authored by Patrick Barroca's avatar Patrick Barroca :grin:
Browse files

Merge branch 'hotline#33756_cosmogramme_ne_gere_pas_https_avec_koha' into 'hotline-master'

Hotline#33756 cosmogramme ne gere pas https avec koha

See merge request !1300
parents 0aeb889f caf47f72
Branches
Tags
6 merge requests!1553Master,!1502Master,!1501Stable,!1312Master,!1304Master,!1303Hotline master
- ticket #33756 : Cosmogramme : correction de la prise en charge de webservices en https
\ No newline at end of file
......@@ -37,10 +37,18 @@ abstract class Class_WebService_SIGB_AbstractRESTService extends Class_WebServic
* @return Class_WebService_SIGB_AbstractRESTService
*/
public function setServerRoot($server_root) {
$this->_server_root = 'http://' . str_replace('http://', '', $server_root);
$this->_server_root = $this->_withProtocol($server_root);
return $this;
}
protected function _withProtocol($url) {
return ('http://' == substr($url, 0, 7) || 'https://' == substr($url, 0, 8)
? '' : 'http://')
. $url;
}
/**
* @return string
*/
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment