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:
Diffstat (limited to 'plugins/Goals/Model.php')
-rw-r--r--plugins/Goals/Model.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/plugins/Goals/Model.php b/plugins/Goals/Model.php
index 2b35f7947d..66f0d91fea 100644
--- a/plugins/Goals/Model.php
+++ b/plugins/Goals/Model.php
@@ -64,6 +64,17 @@ class Model
Db::deleteAllRows($table, "WHERE idgoal = ? AND idsite = ?", "idvisit", 100000, array($idGoal, $idSite));
}
+ public function getActiveGoal($idSite, $idGoal)
+ {
+ $idSite = (int) $idSite;
+ $idGoal = (int) $idGoal;
+ $goals = Db::fetchRow("SELECT * FROM " . $this->table . "
+ WHERE idsite = $idSite AND idgoal = $idGoal
+ AND deleted = 0 LIMIT 1");
+
+ return $goals;
+ }
+
public function getActiveGoals($idSite)
{
$idSite = array_map('intval', $idSite);