diff options
author | Thomas Steur <thomas.steur@gmail.com> | 2015-12-02 01:10:03 +0300 |
---|---|---|
committer | Thomas Steur <thomas.steur@gmail.com> | 2015-12-03 07:18:54 +0300 |
commit | 39f479f8c49c2ed71892ec149be51f2d92b663f4 (patch) | |
tree | dfe9368ebb82732ca64317725eee9031804d4af3 /plugins/SitesManager/Model.php | |
parent | bf377e2c74f606682ddcfdb62d970dc28b625c0c (diff) |
Added support to specify a path in a website URL and Piwik will recognize the path during tracking
Diffstat (limited to 'plugins/SitesManager/Model.php')
-rw-r--r-- | plugins/SitesManager/Model.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/plugins/SitesManager/Model.php b/plugins/SitesManager/Model.php index 93ddb01d8f..96062b608a 100644 --- a/plugins/SitesManager/Model.php +++ b/plugins/SitesManager/Model.php @@ -286,6 +286,22 @@ class Model return $urls; } + /** + * Returns the list of alias URLs registered for the given idSite. + * The website ID must be valid when calling this method! + * + * @param int $idSite + * @return array list of alias URLs + */ + public function getAllKnownUrlsForAllSites() + { + $db = $this->getDb(); + $mainUrls = $db->fetchAll("SELECT idsite, main_url as url FROM " . Common::prefixTable("site")); + $aliasUrls = $db->fetchAll("SELECT idsite, url FROM " . Common::prefixTable("site_url")); + + return array_merge($mainUrls, $aliasUrls); + } + public function updateSite($site, $idSite) { $idSite = (int) $idSite; |