Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Steur <thomas.steur@gmail.com>2015-12-02 01:10:03 +0300
committerThomas Steur <thomas.steur@gmail.com>2015-12-03 07:18:54 +0300
commit39f479f8c49c2ed71892ec149be51f2d92b663f4 (patch)
treedfe9368ebb82732ca64317725eee9031804d4af3 /plugins/SitesManager/Model.php
parentbf377e2c74f606682ddcfdb62d970dc28b625c0c (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.php16
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;