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
path: root/core
diff options
context:
space:
mode:
authorThomas Steur <tsteur@users.noreply.github.com>2019-05-20 13:59:00 +0300
committerdiosmosis <diosmosis@users.noreply.github.com>2019-05-20 13:59:00 +0300
commitfa3cce28fcd89c527bdfc01eaba1bf2a6d4873a3 (patch)
tree828f94ae5bbacc54f5aa073b6a29f74a01c3af09 /core
parent3edc58745b39793ef9298edd5a81b2fcba8de1fe (diff)
Console: invalidating reports with segment based on custom Dimensions fails (#14347)
* Console: invalidating reports with segment based on custom Dimensions fails refs https://github.com/matomo-org/matomo/issues/14344 When idSite/idSites is used as a parameter, we need to make sure to use `Request::processRequest` otherwise event listeners cannot get the idSite through `Common::getRequestVar`. * Make sure to fetch all segments * Do not use any parameters from original request * update submodule * Update submodule. * Update submodule (test for fix in this PR) + couple doc tweaks.
Diffstat (limited to 'core')
-rw-r--r--core/DataTable/Filter/GroupBy.php2
-rw-r--r--core/Segment.php7
2 files changed, 6 insertions, 3 deletions
diff --git a/core/DataTable/Filter/GroupBy.php b/core/DataTable/Filter/GroupBy.php
index b00c66142b..353007996a 100644
--- a/core/DataTable/Filter/GroupBy.php
+++ b/core/DataTable/Filter/GroupBy.php
@@ -52,7 +52,7 @@ class GroupBy extends BaseFilter
* @param DataTable $table The DataTable to filter.
* @param string $groupByColumn The column name to reduce.
* @param callable $reduceFunction The reduce function. This must alter the `$groupByColumn`
- * columng in some way. If not set then the filter will group by the raw column value.
+ * column in some way. If not set then the filter will group by the raw column value.
* @param array $parameters deprecated - use an [anonymous function](http://php.net/manual/en/functions.anonymous.php)
* instead.
*/
diff --git a/core/Segment.php b/core/Segment.php
index 456172e5d0..1d5bf0a72f 100644
--- a/core/Segment.php
+++ b/core/Segment.php
@@ -9,6 +9,7 @@
namespace Piwik;
use Exception;
+use Piwik\API\Request;
use Piwik\ArchiveProcessor\Rules;
use Piwik\Container\StaticContainer;
use Piwik\DataAccess\LogQueryBuilder;
@@ -121,7 +122,9 @@ class Segment
{
// segment metadata
if (empty($this->availableSegments)) {
- $this->availableSegments = API::getInstance()->getSegmentsMetadata($this->idSites, $_hideImplementationData = false);
+ $this->availableSegments = Request::processRequest('API.getSegmentsMetadata', array(
+ 'idSites' => $this->idSites, '_hideImplementationData' => 0, 'filter_limit' => -1, 'filter_offset' => 0
+ ), []);
}
return $this->availableSegments;
@@ -321,7 +324,7 @@ class Segment
*
* @param string $select The select clause. Should NOT include the **SELECT** just the columns, eg,
* `'t1.col1 as col1, t2.col2 as col2'`.
- * @param array $from Array of table names (without prefix), eg, `array('log_visit', 'log_conversion')`.
+ * @param array|string $from Array of table names (without prefix), eg, `array('log_visit', 'log_conversion')`.
* @param false|string $where (optional) Where clause, eg, `'t1.col1 = ? AND t2.col2 = ?'`.
* @param array|string $bind (optional) Bind parameters, eg, `array($col1Value, $col2Value)`.
* @param false|string $orderBy (optional) Order by clause, eg, `"t1.col1 ASC"`.