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

rel #33756 : fix implementation

parent 5e6dedb0
Branches
Tags
7 merge requests!1553Master,!1502Master,!1501Stable,!1312Master,!1304Master,!1303Hotline master,!1300Hotline#33756 cosmogramme ne gere pas https avec koha
...@@ -37,10 +37,18 @@ abstract class Class_WebService_SIGB_AbstractRESTService extends Class_WebServic ...@@ -37,10 +37,18 @@ abstract class Class_WebService_SIGB_AbstractRESTService extends Class_WebServic
* @return Class_WebService_SIGB_AbstractRESTService * @return Class_WebService_SIGB_AbstractRESTService
*/ */
public function setServerRoot($server_root) { public function setServerRoot($server_root) {
$this->_server_root = $server_root; $this->_server_root = $this->_withProtocol($server_root);
return $this; return $this;
} }
protected function _withProtocol($url) {
return ('http://' == substr($url, 0, 7) || 'https://' == substr($url, 0, 8)
? '' : 'http://')
. $url;
}
/** /**
* @return string * @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