| 1 |
<?php |
<?php |
| 2 |
// $Id: rsvp.api.inc,v 1.2.2.4 2009/03/01 22:26:13 ulf1 Exp $ |
// $Id: rsvp.api.inc,v 1.2.2.5 2009/10/14 07:01:32 ulf1 Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @module rsvp_api |
* @module rsvp_api |
| 58 |
$count = $connector->get_datecount($node, $field); |
$count = $connector->get_datecount($node, $field); |
| 59 |
if ($count == 1) { |
if ($count == 1) { |
| 60 |
//if count = 1 ignore parameter startdate completely because there is only one startdate |
//if count = 1 ignore parameter startdate completely because there is only one startdate |
| 61 |
$rsvp->startdate = $connector->get_startdate($node, $field, 0); |
$rsvp->startdate = $connector->get_startdateAsHash($node, $field, 0); |
| 62 |
} |
} |
| 63 |
else { |
else { |
| 64 |
$do_create = false; |
$do_create = false; |
| 65 |
//iterate through all specified startdates (in case of repeating dates) |
//iterate through all specified startdates (in case of repeating dates) |
| 66 |
for ($i = 0; $i < $count; $i++) { |
for ($i = 0; $i < $count; $i++) { |
| 67 |
$key = $connector->get_startdate($node, $field, $i); |
$key = $connector->get_startdateAsHash($node, $field, $i); |
| 68 |
|
|
| 69 |
if ($key == $startdate) { |
if ($key == $startdate) { |
| 70 |
$rsvp->startdate = $key; |
$rsvp->startdate = $key; |