/[drupal]/contributions/modules/node_type_filter/node_type_filter.module
ViewVC logotype

Diff of /contributions/modules/node_type_filter/node_type_filter.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.2.2.1.2.2.2.1, Fri Jan 25 19:32:14 2008 UTC revision 1.2.2.1.2.2.2.2, Fri Mar 21 11:47:02 2008 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: node_type_filter.module,v 1.2.2.1.2.2 2008/01/21 00:51:29 nancyw Exp $  // $Id: node_type_filter.module,v 1.2.2.1.2.2.2.1 2008/01/25 19:32:14 nancyw Exp $
3  /**  /**
4   * @file   * @file
5   * Lets you filter node listing pages simply by &type=story,blog to the URL (for example)   * Lets you filter node listing pages simply by &type=story,blog to the URL (for example)
# Line 20  function node_type_filter_help($path, $a Line 20  function node_type_filter_help($path, $a
20   */   */
21  function node_type_filter_db_rewrite_sql($query, $primary_table, $primary_field, $args) {  function node_type_filter_db_rewrite_sql($query, $primary_table, $primary_field, $args) {
22    if ($primary_field == 'nid' && $primary_table=='n') {    if ($primary_field == 'nid' && $primary_table=='n') {
23      if (isset($_REQUEST['type']) && $str_types = $_REQUEST['type']) {      if (isset($_GET['type']) && $str_types = $_GET['type']) {
24        $types = explode(',', $str_types);        $types = explode(',', $str_types);
25        foreach ($types as $type) {        foreach ($types as $type) {
26          $ctypes[] = db_escape_string($type);          $ctypes[] = db_escape_string($type);

Legend:
Removed from v.1.2.2.1.2.2.2.1  
changed lines
  Added in v.1.2.2.1.2.2.2.2

  ViewVC Help
Powered by ViewVC 1.1.2