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/SegmentEditor/Model.php')
-rw-r--r--plugins/SegmentEditor/Model.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/plugins/SegmentEditor/Model.php b/plugins/SegmentEditor/Model.php
index 8bfcc957ae..2192e3ca58 100644
--- a/plugins/SegmentEditor/Model.php
+++ b/plugins/SegmentEditor/Model.php
@@ -26,6 +26,21 @@ class Model
}
/**
+ * Returns all stored segments that haven't been deleted. Ignores the site the segments are enabled
+ * for and whether to auto archive or not.
+ *
+ * @return array
+ */
+ public function getAllSegmentsAndIgnoreVisibility()
+ {
+ $sql = "SELECT * FROM " . $this->table . " WHERE deleted = 0";
+
+ $segments = $this->getDb()->fetchAll($sql);
+
+ return $segments;
+ }
+
+ /**
* Returns all stored segments.
*
* @param bool|int $idSite Whether to return stored segments for a specific idSite, or segments that are available