| @@ -1,48 +1,0 @@ | ||
| 1 | -<?php | |
| 2 | - | |
| 3 | -namespace AcyMailing\Controllers\Stats; | |
| 4 | - | |
| 5 | -use AcyMailing\Helpers\ExportHelper; | |
| 6 | - | |
| 7 | -trait LinksDetails | |
| 8 | -{ | |
| 9 | - public function linksDetails(): void | |
| 10 | - { | |
| 11 | - acym_setVar('layout', 'links_details'); | |
| 12 | - | |
| 13 | - $data = []; | |
| 14 | - | |
| 15 | - if (!$this->prepareDefaultPageInfo($data, true)) { | |
| 16 | - return; | |
| 17 | - } | |
| 18 | - | |
| 19 | - $this->prepareLinksDetailsListing($data); | |
| 20 | - if (count($this->selectedMailIds) == 1) { | |
| 21 | - if ($data['isAbTest']) { | |
| 22 | - $this->prepareAbTestMails($data); | |
| 23 | - } elseif (acym_isMultilingual()) { | |
| 24 | - $this->prepareMultilingualMails($data); | |
| 25 | - } | |
| 26 | - } | |
| 27 | - $this->prepareMailFilter($data); | |
| 28 | - | |
| 29 | - parent::display($data); | |
| 30 | - } | |
| 31 | - | |
| 32 | - public function exportLinksDetails(): void | |
| 33 | - { | |
| 34 | - if (!$this->prepareDefaultPageInfo($data, true)) { | |
| 35 | - return; | |
| 36 | - } | |
| 37 | - | |
| 38 | - $this->prepareLinksDetailsListing($data); | |
| 39 | - $exportHelper = new ExportHelper(); | |
| 40 | - | |
| 41 | - $columnsToExport['url.name'] = acym_translation('ACYM_URL'); | |
| 42 | - $columnsToExport['total_click'] = acym_translation('ACYM_TOTAL_CLICKS'); | |
| 43 | - $columnsToExport['unique_click'] = acym_translation('ACYM_UNIQUE_CLICKS'); | |
| 44 | - | |
| 45 | - $exportHelper->exportStatsFullCSV($data['query'], $columnsToExport, 'links_details'); | |
| 46 | - exit; | |
| 47 | - } | |
| 48 | -} | |