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

Diff of /contributions/modules/flexinode/flexinode.module

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

revision 1.40, Sat Oct 16 06:54:30 2004 UTC revision 1.41, Wed Nov 24 22:03:32 2004 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: flexinode.module,v 1.39 2004/10/10 18:07:05 killes Exp $  // $Id: flexinode.module,v 1.40 2004/10/16 06:54:30 tdobes Exp $
3    
4  // Copyright 2003-2004 Jonathan Chaffer. See LICENSE for redistribution allowances.  // Copyright 2003-2004 Jonathan Chaffer. See LICENSE for redistribution allowances.
5    
# Line 184  function flexinode_page_list($ctype_id = Line 184  function flexinode_page_list($ctype_id =
184    $ctype = flexinode_load_content_type($ctype_id);    $ctype = flexinode_load_content_type($ctype_id);
185    
186    if ($ctype_id) {    if ($ctype_id) {
187      $type = 'flexinode-' . check_query($ctype_id);      $type = 'flexinode-' . db_escape_string($ctype_id);
188    }    }
189    else {    else {
190      $type = 'flexinode-%';      $type = 'flexinode-%';
# Line 248  function flexinode_page_table($ctype_id Line 248  function flexinode_page_table($ctype_id
248      $where_clauses[] = $fieldname .'.field_id = '. $field->field_id;      $where_clauses[] = $fieldname .'.field_id = '. $field->field_id;
249    }    }
250    
251    $type = 'flexinode-' . check_query($ctype_id);    $type = 'flexinode-' . db_escape_string($ctype_id);
252    $extra_fields = count($fields_to_select) > 0 ? ', ' . implode(', ', $fields_to_select) : '';    $extra_fields = count($fields_to_select) > 0 ? ', ' . implode(', ', $fields_to_select) : '';
253    $extra_where = count($where_clauses) > 0 ? ' AND ' . implode(' AND ', $where_clauses) : '';    $extra_where = count($where_clauses) > 0 ? ' AND ' . implode(' AND ', $where_clauses) : '';
254    $sql = 'SELECT n.title, n.nid'. $extra_fields .' FROM {node} n '. node_access_join_sql() .' '. implode(' ', $table_joins) .' WHERE n.status = 1 AND '. node_access_where_sql() ." AND n.type = '$type'". $extra_where;    $sql = 'SELECT n.title, n.nid'. $extra_fields .' FROM {node} n '. node_access_join_sql() .' '. implode(' ', $table_joins) .' WHERE n.status = 1 AND '. node_access_where_sql() ." AND n.type = '$type'". $extra_where;

Legend:
Removed from v.1.40  
changed lines
  Added in v.1.41

  ViewVC Help
Powered by ViewVC 1.1.2