Skip to content

Commit

Permalink
Merge pull request matomo-org#6607 from czolnowski/change-scheduled-r…
Browse files Browse the repository at this point in the history
…eports-truncate-limit-into-config

Let user specify how many rows will be displayed in Scheduled Reports.
  • Loading branch information
Matthieu Aubry committed Nov 8, 2014
2 parents bb45dce + 33a09c1 commit 3e81595
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
5 changes: 5 additions & 0 deletions config/global.ini.php
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,11 @@
; using to set reply_to in reports e-mail to login of report creator
scheduled_reports_replyto_is_user_email_and_alias = 0

; scheduled reports truncate limit
; the report will be rendered with the first 23 rows and will aggregate other rows in a summary row
; 23 rows table fits in one portrait page
scheduled_reports_truncate = 23

; during archiving, Piwik will limit the number of results recorded, for performance reasons
; maximum number of rows for any of the Referrers tables (keywords, search engines, campaigns, etc.)
datatable_archiving_maximum_rows_referrers = 1000
Expand Down
5 changes: 2 additions & 3 deletions plugins/ScheduledReports/API.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

use Exception;
use Piwik\Common;
use Piwik\Config;
use Piwik\Date;
use Piwik\Db;
use Piwik\Log;
Expand Down Expand Up @@ -52,8 +53,6 @@ class API extends \Piwik\Plugin\API
const OUTPUT_INLINE = 3;
const OUTPUT_RETURN = 4;

const REPORT_TRUNCATE = 23;

// static cache storing reports
public static $cache = array();

Expand Down Expand Up @@ -314,7 +313,7 @@ public function generateReport($idReport, $date, $language = false, $outputType
// the report will be rendered with the first 23 rows and will aggregate other rows in a summary row
// 23 rows table fits in one portrait page
$initialFilterTruncate = Common::getRequestVar('filter_truncate', false);
$_GET['filter_truncate'] = self::REPORT_TRUNCATE;
$_GET['filter_truncate'] = Config::getInstance()->General['scheduled_reports_truncate'];

$prettyDate = null;
$processedReports = array();
Expand Down

0 comments on commit 3e81595

Please sign in to comment.