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

Diff of /contributions/modules/event/event.module

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

revision 1.110, Mon Nov 15 18:17:39 2004 UTC revision 1.111, Wed Nov 24 22:03:32 2004 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: event.module,v 1.109 2004/11/13 16:03:53 killes Exp $  // $Id: event.module,v 1.110 2004/11/15 18:17:39 killes Exp $
3    
4  /**  /**
5   * Retrieves all of the fields from fields.inc.  To add extra fields you might need, add them to the file called   * Retrieves all of the fields from fields.inc.  To add extra fields you might need, add them to the file called
# Line 499  function event_create_query($fields, $no Line 499  function event_create_query($fields, $no
499    
500    foreach ($fields as $field) {    foreach ($fields as $field) {
501      if ($insert) {      if ($insert) {
502        $k[] = check_query($field);        $k[] = db_escape_string($field);
503        $s[] = "'%s'";        $s[] = "'%s'";
504      }      }
505      else {      else {
506        $q[] = check_query($field) ." = '%s'";        $q[] = db_escape_string($field) ." = '%s'";
507      }      }
508      $v[] = $node->$field;      $v[] = $node->$field;
509    }    }
# Line 986  function event_query_parse($edit) { Line 986  function event_query_parse($edit) {
986        if ($def[0] == "select" && $def[10]) { // multi-select        if ($def[0] == "select" && $def[10]) { // multi-select
987          foreach ($edit->$field as $value) {          foreach ($edit->$field as $value) {
988            if ($value) {            if ($value) {
989              $or[] = "e.$field LIKE '%". check_query($value). "%'";              $or[] = "e.$field LIKE '%". db_escape_string($value). "%'";
990            }            }
991          }          }
992        }        }
993        else {        else {
994          $query[] = "e.$field LIKE '%". check_query($edit->$field) ."%'";          $query[] = "e.$field LIKE '%". db_escape_string($edit->$field) ."%'";
995        }        }
996      }      }
997    }    }

Legend:
Removed from v.1.110  
changed lines
  Added in v.1.111

  ViewVC Help
Powered by ViewVC 1.1.2