Skip to content

Commit

Permalink
required filter on elements was not stopping query from being run
Browse files Browse the repository at this point in the history
  • Loading branch information
pollen8 committed Aug 29, 2011
1 parent 68f309d commit 51206ac
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,9 @@ function preflight($type, $parent)

function postflight($type, $parent)
{
$db = JFactory::getDbo();
$db->setQuery("UPDATE #__extensions SET enabled = 1 WHERE type = 'plugin' AND (folder LIKE 'fabrik_%' OR (folder='system' AND element = 'fabrik'))");
$db->query();
$this->fixmMenuComponentId();
if ($type !== 'update') {
if (!$this->setConnection()) {
Expand All @@ -214,9 +217,7 @@ function postflight($type, $parent)
here to install sample data</a></p>
';

$db = JFactory::getDbo();
$db->setQuery("UPDATE #__extensions SET enabled = 1 WHERE type = 'plugin' AND (folder LIKE 'fabrik_%' OR (folder='system' AND element = 'fabrik'))");
$db->query();

// An example of setting a redirect to a new location after the install is completed
//$parent->getParent()->set('redirect_url', 'http://www.google.com');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ COM_FABRIK_DATABASE_UPDATED="Database updated"
COM_FABRIK_DB_TABLE_ALREADY_EXISTS="A database table of that name already exists"
COM_FABRIK_DB_TABLE_NAME="Db table"
COM_FABRIK_DEBUGGING="Debugging"
COM_FABRIK_DEFAULT="Default"
COM_FABRIK_DEFAULT="Default"
COM_FABRIK_DEFAULT_TO_GLOBAL="Use global"
COM_FABRIK_DELETE="Delete"
COM_FABRIK_DELETE_FROM="For these lists:"
COM_FABRIK_DELETE_JOINED_ROWS_DESC="When deleting a record from the table, should joined records also be deleted?"
Expand Down
3 changes: 3 additions & 0 deletions components/com_fabrik/models/list.php
Original file line number Diff line number Diff line change
Expand Up @@ -1596,6 +1596,9 @@ protected function filtersRequired()
{
$app =& JFactory::getApplication();
$params =& $this->getParams();
if (!$this->getRequiredFiltersFound()) {
return true;
}
switch ($params->get('require-filter', 0)) {
case 0:
default:
Expand Down

0 comments on commit 51206ac

Please sign in to comment.