I included a patch for recent changes which adds the following functionality:

  • A settings page so the admin can configure the module
  • Set default filtering on one specific node type, in case the admin would like to hide the filter

When adding the default filter functionality, I encoutered a problem:

    $where .= " AND n.type = '" . check_plain($node_type) . "'";

resulted in some cases in a SQL query with a bad WHERE statement: " WHERE AND n.type = 'foo' ... ". The solution is also provided in this patch:

    $where .= ($where ? ' AND ' : '') . " n.type = '" . check_plain($node_type) . "'";

Comments

toemaz’s picture

StatusFileSize
new3.46 KB

The previous patch was not good. Here is a fixed one.

duaelfr’s picture

Status: Active » Closed (won't fix)

This version of Recent Changes is not supported anymore. The issue is closed for this reason.
Please upgrade to a supported version and feel free to reopen the issue on the new version if applicable.

This issue has been automagically closed by a script.