Skip to content

Commit

Permalink
fixed: csv export (with include filters option selected) was not taki…
Browse files Browse the repository at this point in the history
…ng into account advanced search values
  • Loading branch information
pollen8 committed Dec 12, 2013
1 parent 169ee99 commit 3a5b411
Show file tree
Hide file tree
Showing 4 changed files with 169 additions and 37 deletions.
30 changes: 23 additions & 7 deletions components/com_fabrik/models/list.php
Expand Up @@ -5985,17 +5985,12 @@ protected function &makeFilters($container = 'listform_1', $type = 'list', $id =
public function getAdvancedSearchLink()
{
$params = $this->getParams();
$app = JFactory::getApplication();
$package = $app->getUserState('com_fabrik.package', 'fabrik');

if ($params->get('advanced-filter', '0'))
{
$table = $this->getTable();
$tmpl = $this->getTmpl();
$url = COM_FABRIK_LIVESITE . 'index.php?option=com_' . $package . '&view=list&layout=_advancedsearch&tmpl=component&listid='
. $table->id . '&nextview=' . JRequest::getVar('view', 'list');

$url .= '&tkn=' . JSession::getFormToken();
$url = $this->getAdvancedSearchURL();
$title = '<span>' . JText::_('COM_FABRIK_ADVANCED_SEARCH') . '</span>';
$opts = array('alt' => JText::_('COM_FABRIK_ADVANCED_SEARCH'), 'class' => 'fabrikTip', 'opts' => "{notice:true}", 'title' => $title);
$img = FabrikHelperHTML::image('find.png', 'list', $tmpl, $opts);
Expand All @@ -6008,6 +6003,27 @@ public function getAdvancedSearchLink()
}
}

/**
* Get the URL used to open the advanced search window
*
* @return string
*/

public function getAdvancedSearchURL()
{
$app = JFactory::getApplication();
$table = $this->getTable();
$package = $app->getUserState('com_fabrik.package', 'fabrik');
$url = COM_FABRIK_LIVESITE . 'index.php?option=com_' . $package . '&amp;view=list&amp;layout=_advancedsearch&amp;tmpl=component&amp;listid='
. $table->id . '&amp;nextview=' . $app->input->get('view', 'list');

// Defines if we are in a module or in the component.
$url .= '&amp;scope=' . $app->scope;
$url .= '&amp;tkn=' . JSession::getFormToken();

return $url;
}

/**
* Called from index.php?option=com_fabrik&view=list&layout=_advancedsearch&tmpl=component&listid=4
* advanced serach popup view
Expand Down Expand Up @@ -6115,7 +6131,7 @@ private function getStatementsOpts()
* @return array advanced filter values
*/

private function getAdvancedFilterValues()
public function getAdvancedFilterValues()
{
$filters = $this->getFilterArray();
$advanced = array();
Expand Down

0 comments on commit 3a5b411

Please sign in to comment.