diff options
author | Thomas Steur <thomas.steur@googlemail.com> | 2014-06-12 06:50:58 +0400 |
---|---|---|
committer | Thomas Steur <thomas.steur@googlemail.com> | 2014-06-12 06:50:58 +0400 |
commit | b0ebb61485bdeb362caea645e22fc93ee199a917 (patch) | |
tree | 8968fbec9eb203296bcd9efd59f8af26aae9c358 /core | |
parent | 6ff4094c741d91995288de431b9e8fcaddf6c2e9 (diff) |
this should fix some tests
Diffstat (limited to 'core')
-rw-r--r-- | core/Plugin/ActionDimension.php | 2 | ||||
-rw-r--r-- | core/Plugin/Manager.php | 10 | ||||
-rw-r--r-- | core/Plugin/VisitDimension.php | 2 |
3 files changed, 12 insertions, 2 deletions
diff --git a/core/Plugin/ActionDimension.php b/core/Plugin/ActionDimension.php index 5fc4ed3824..9b871ef58c 100644 --- a/core/Plugin/ActionDimension.php +++ b/core/Plugin/ActionDimension.php @@ -60,7 +60,7 @@ abstract class ActionDimension protected function addSegment(Segment $segment) { $sqlSegment = $segment->getSqlSegment(); - if (!empty($this->fieldName) && !empty($sqlSegment)) { + if (!empty($this->fieldName) && empty($sqlSegment)) { $segment->setSqlSegment('log_link_visit_action.' . $this->fieldName); } diff --git a/core/Plugin/Manager.php b/core/Plugin/Manager.php index 6e9afe423c..c647ba2bd4 100644 --- a/core/Plugin/Manager.php +++ b/core/Plugin/Manager.php @@ -1137,6 +1137,16 @@ class Manager extends Singleton public function isTrackerPlugin(Plugin $plugin) { + $dimensions = VisitDimension::getDimensions($plugin); + if (!empty($dimensions)) { + return true; + } + + $dimensions = ActionDimension::getDimensions($plugin); + if (!empty($dimensions)) { + return true; + } + $hooks = $plugin->getListHooksRegistered(); $hookNames = array_keys($hooks); foreach ($hookNames as $name) { diff --git a/core/Plugin/VisitDimension.php b/core/Plugin/VisitDimension.php index af40274d74..b7b3778a9e 100644 --- a/core/Plugin/VisitDimension.php +++ b/core/Plugin/VisitDimension.php @@ -55,7 +55,7 @@ abstract class VisitDimension protected function addSegment(Segment $segment) { $sqlSegment = $segment->getSqlSegment(); - if (!empty($this->fieldName) && !empty($sqlSegment)) { + if (!empty($this->fieldName) && empty($sqlSegment)) { $segment->setSqlSegment('log_visit.' . $this->fieldName); } |