| 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 |
| 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 |
} |
} |
| 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 |
} |
} |