"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "matomo/plugins/SegmentEditor/API.php" between
matomo-4.1.2-rc2.tar.gz and matomo-4.2.0.tar.gz

About: Matomo is a web analytics platform that aims to be an open source alternative to Google Analytics that let you retain ownership and control over your data (formerly Piwik).

API.php  (matomo-4.1.2-rc2):API.php  (matomo-4.2.0)
skipping to change at line 397 skipping to change at line 397
$segments = $model->getAllSegmentsForSite($idSite, $userLogin); $segments = $model->getAllSegmentsForSite($idSite, $userLogin);
} }
} }
$segments = $this->sortSegmentsCreatedByUserFirst($segments); $segments = $this->sortSegmentsCreatedByUserFirst($segments);
$model = new \Piwik\Plugins\SitesManager\Model(); $model = new \Piwik\Plugins\SitesManager\Model();
$allIdSites = $model->getSitesId(); $allIdSites = $model->getSitesId();
foreach ($segments as &$segmentInfo) { foreach ($segments as &$segmentInfo) {
$idSites = !empty($segmentInfo['enable_only_idsite']) ? [(int) $segm entInfo['enable_only_idsite']] : $allIdSites; $idSites = !empty($segmentInfo['enable_only_idsite']) ? [(int) $segm entInfo['enable_only_idsite']] : $allIdSites;
$segmentObj = new Segment(urlencode($segmentInfo['definition']), $id try {
Sites); $segmentObj = new Segment(urlencode($segmentInfo['definition']),
$segmentInfo['hash'] = $segmentObj->getHash(); $idSites);
$segmentInfo['hash'] = $segmentObj->getHash();
} catch (\Exception $ex) {
$segmentInfo['hash'] = 'INVALID SEGMENT';
}
} }
return $segments; return $segments;
} }
/** /**
* Sorts segment in a particular order: * Sorts segment in a particular order:
* *
* 1) my segments * 1) my segments
* 2) segments created by the super user that were shared with all users * 2) segments created by the super user that were shared with all users
 End of changes. 1 change blocks. 
3 lines changed or deleted 7 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)