diff options
author | mattab <matthieu.aubry@gmail.com> | 2015-06-09 07:29:34 +0300 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2015-06-09 07:29:34 +0300 |
commit | 69810a07b94ffb9560c5c21be42635a35a42aa6e (patch) | |
tree | 7a8dc909c5b01b8dd94bb43d5da4d83253d878d5 /plugins/SitesManager/Model.php | |
parent | f2db0ad478ebcb33740bdd33fdd7beec4a3a3d5a (diff) |
SitesManager.getSitesIdFromSiteUrl should match both HTTP and HTTPS
fixes #8070
Diffstat (limited to 'plugins/SitesManager/Model.php')
-rw-r--r-- | plugins/SitesManager/Model.php | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/plugins/SitesManager/Model.php b/plugins/SitesManager/Model.php index 632792683f..4b1c6609aa 100644 --- a/plugins/SitesManager/Model.php +++ b/plugins/SitesManager/Model.php @@ -106,18 +106,26 @@ class Model * * @param string $url * @param string $urlBis + * @param string $urlTer + * @param string $urlQuater * @return array list of websites ID */ - public function getAllSitesIdFromSiteUrl($url, $urlBis) + public function getAllSitesIdFromSiteUrl($url, $urlBis, $urlTer, $urlQuater) { $siteUrlTable = Common::prefixTable('site_url'); $ids = $this->getDb()->fetchAll( 'SELECT idsite FROM ' . $this->table . ' - WHERE (main_url = ? OR main_url = ?) ' . + WHERE (main_url = ? OR main_url = ? OR main_url = ? OR main_url = ?) ' . 'UNION SELECT idsite FROM ' . $siteUrlTable . ' - WHERE (url = ? OR url = ?) ', array($url, $urlBis, $url, $urlBis)); + WHERE (url = ? OR url = ? OR url = ? OR url = ?) ', + + // Bind + array( $url, $urlBis, $urlTer, $urlQuater, + $url, $urlBis, $urlTer, $urlQuater + ) + ); return $ids; } |