Skip to content

Commit

Permalink
Fixes #6309 Remove "Website" from the Email subject and form the repo…
Browse files Browse the repository at this point in the history
…rt title.
  • Loading branch information
mattab committed Oct 7, 2014
1 parent 41683f9 commit afc07ad
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
3 changes: 1 addition & 2 deletions core/ReportRenderer/Html.php
Original file line number Diff line number Diff line change
Expand Up @@ -189,10 +189,9 @@ protected function getAttachment($report, $processedReport, $prettyDate)

$additionalFile['filename'] =
sprintf(
'%s - %s - %s %d - %s %d%s.png',
'%s - %s - %d - %s %d%s.png',
$processedReportMetadata['name'],
$prettyDate,
Piwik::translate('General_Website'),
$report['idsite'],
Piwik::translate('General_Report'),
$report['idreport'],
Expand Down
2 changes: 1 addition & 1 deletion plugins/ScheduledReports/API.php
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ private function getModel()
private static function getReportSubjectAndReportTitle($websiteName, $reports)
{
// if the only report is "All websites", we don't display the site name
$reportTitle = Piwik::translate('General_Website') . " " . $websiteName;
$reportTitle = $websiteName;
$reportSubject = $websiteName;
if (count($reports) == 1
&& $reports[0] == 'MultiSites_getAll'
Expand Down
5 changes: 3 additions & 2 deletions tests/PHPUnit/Integration/Plugins/ScheduledReportsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
* Class Plugins_ScheduledReportsTest
*
* @group Plugins
* @group ScheduledReportsTest
*/
class Plugins_ScheduledReportsTest extends DatabaseTestCase
{
Expand Down Expand Up @@ -399,8 +400,8 @@ public function testGetScheduledTasks()
public function getGetReportSubjectAndReportTitleTestCases()
{
return array(
array('Piwik.org', 'General_Website Piwik.org', 'Piwik.org', array('UserSettings_getBrowserType')),
array('Piwik.org', 'General_Website Piwik.org', 'Piwik.org', array('MultiSites_getAll', 'UserSettings_getBrowserType')),
array('<Piwik.org>', '<Piwik.org>', '<Piwik.org>', array('UserSettings_getBrowserType')),
array('Piwik.org', 'Piwik.org', 'Piwik.org', array('MultiSites_getAll', 'UserSettings_getBrowserType')),
array('General_MultiSitesSummary', 'General_MultiSitesSummary', 'Piwik.org', array('MultiSites_getAll')),
);
}
Expand Down

0 comments on commit afc07ad

Please sign in to comment.