In the db_rewrite_sql we have this code:

  // In any of the following cases, do not enforce any rules.
  if (!$admin_force || empty($query) || $primary_field != 'nid' || !user_access('administer nodes') || domain_grant_all()) {
    return;
  }

The empty($query) was a safeguard against, well, empty queries, but node searching invokes db_rewrite_sql() without passing a $query, so we have to remove that if searching is to work properly.

Testing needed to see if this introduces any errors.

Comments

agentrickard’s picture

StatusFileSize
new858 bytes

Patch for D5.

agentrickard’s picture

StatusFileSize
new889 bytes

D6 version.

agentrickard’s picture

Committed to D6 and HEAD.

agentrickard’s picture

Status: Needs review » Fixed

Committed to D5.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.