diff --git a/config/global.ini.php b/config/global.ini.php index 7c9d9e1bc0f..8abd6c5225b 100644 --- a/config/global.ini.php +++ b/config/global.ini.php @@ -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 diff --git a/plugins/ScheduledReports/API.php b/plugins/ScheduledReports/API.php index df0f230c71b..66eb55a2350 100644 --- a/plugins/ScheduledReports/API.php +++ b/plugins/ScheduledReports/API.php @@ -10,6 +10,7 @@ use Exception; use Piwik\Common; +use Piwik\Config; use Piwik\Date; use Piwik\Db; use Piwik\Log; @@ -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(); @@ -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();