From: vincent@cubedesigners.com Date: Mon, 1 Mar 2021 09:50:26 +0000 (+0000) Subject: wait #4308 @0.25 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=2c9e718f03bd448665d4f419b3dfc00a766b2ad6;p=cubeextranet.git wait #4308 @0.25 --- diff --git a/inc/ws/Controlleur/class.ws.services.php b/inc/ws/Controlleur/class.ws.services.php index 260992045..b96b95567 100644 --- a/inc/ws/Controlleur/class.ws.services.php +++ b/inc/ws/Controlleur/class.ws.services.php @@ -839,8 +839,9 @@ class wsServices extends cubeFlashGateway $type = trim($e[0]); $ref = trim($e[1]); $nzref = ltrim($e[1], '0'); + $nospaceref = str_replace(' ', '', $ref); - $r = $core->con->select("SELECT * FROM wsref WHERE (ref='" . $core->con->escape($ref) . "' OR ref='" . $core->con->escape($nzref) . "') AND type='" . $core->con->escape($type) . "'"); + $r = $core->con->select("SELECT * FROM wsref WHERE (ref='" . $core->con->escape($ref) . "' OR ref='" . $core->con->escape($nzref) . "' OR ref='" . $core->con->escape($nospaceref) . "') AND type='" . $core->con->escape($type) . "'"); if ($r->count()) { header('Location: ' . $r->url); } diff --git a/inc/ws/Util/html5/master/class.ws.html5.links.php b/inc/ws/Util/html5/master/class.ws.html5.links.php index a6b4c4e08..7ec52c1fc 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.links.php +++ b/inc/ws/Util/html5/master/class.ws.html5.links.php @@ -2006,7 +2006,8 @@ class wescoLink extends normalLink protected static function _getURLOfType($type, $ref) { global $core; - $r = $core->con->select("SELECT * FROM wsref WHERE ref='" . $core->con->escape($ref) . "' AND type='" . $core->con->escape($type) . "'"); + $nospaceref = str_replace(' ', '', $ref); + $r = $core->con->select("SELECT * FROM wsref WHERE (ref='" . $core->con->escape($ref) . "' OR ref='" . $core->con->escape($nospaceref) . "') AND type='" . $core->con->escape($type) . "'"); if ($r->count()) { return $r->url; }