Skip to content

Commit

Permalink
Fix to CSV export download link to accomodate new J! 3.7 router.
Browse files Browse the repository at this point in the history
  • Loading branch information
cheesegrits committed Aug 2, 2017
1 parent d66c102 commit a0a53b5
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions components/com_fabrik/views/list/view.base.php
Expand Up @@ -48,6 +48,18 @@ protected function csvJS(&$opts, $model)
$csvOpts->incraw = (int) $params->get('csv_include_raw_data');
$csvOpts->inccalcs = (int) $params->get('csv_include_calculations');
$csvOpts->custom_qs = $params->get('csv_custom_qs', '');

$itemId = FabrikWorker::itemId();
$exportUrl = 'index.php?option=com_' . $this->package . '&view=list&listid=' . $this->getModel()->getId();

if (!empty($itemId))
{
$exportUrl .= '&Itemid=' . $itemId;
}

$exportUrl .= '&format=csv';
$csvOpts->exportLink = JRoute::_($exportUrl, false);

$w->replaceRequest($csvOpts->custom_qs);
$csvOpts->incfilters = (int) $params->get('incfilters');
$csvOpts->popupwidth = FabrikWorker::getMenuOrRequestVar('popup_width','340',false,'menu');
Expand Down

0 comments on commit a0a53b5

Please sign in to comment.