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

Diff of /contributions/modules/rsvp/rsvp.module

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

revision 1.22.2.39, Wed Oct 14 01:11:26 2009 UTC revision 1.22.2.40, Thu Nov 5 22:36:47 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: rsvp.module,v 1.22.2.38 2009/08/23 05:53:51 ulf1 Exp $  // $Id: rsvp.module,v 1.22.2.39 2009/10/14 01:11:26 ulf1 Exp $
3    
4  /**  /**
5   * @module rsvp   * @module rsvp
# Line 706  function rsvp_overview_created_form(&$fo Line 706  function rsvp_overview_created_form(&$fo
706    //check if there is at least one date that has not been expired.    //check if there is at least one date that has not been expired.
707    if (!$allNodes) {    if (!$allNodes) {
708      $allExpired = rsvp_function_is_expired($node);      $allExpired = rsvp_function_is_expired($node);
   
     if (variable_get('rsvp_for_expired_event', RSVP_OPTION_NO) == RSVP_OPTION_YES)  
       $allExpired = false;  
709    }    }
710    
711    //fill array with invitations    //fill array with invitations
# Line 1439  function rsvp_overview_form_access($conn Line 1436  function rsvp_overview_form_access($conn
1436    if ($perm_create == true)    if ($perm_create == true)
1437      return true;      return true;
1438    
1439    //check if user has been invited to any invitation for this node. If we have more then 2 invitations, show the form    //check if user has been invited to any invitation for this node.
1440    $nid2inviteslist = rsvp_load_invited($node, $usr);    $nid2inviteslist = rsvp_load_invited($node, $usr);
1441    $counter = 0;    $counter = 0;
1442    foreach ($nid2inviteslist as $nid => $inviteslist) {    foreach ($nid2inviteslist as $nid => $inviteslist) {
# Line 1449  function rsvp_overview_form_access($conn Line 1446  function rsvp_overview_form_access($conn
1446      return true;      return true;
1447    
1448    
1449    //check if user has view permissions to invitations for this node. If we have more then 2 invitations, show the form    //check if user has view permissions to invitations for this node.
1450    $nid2rsvplist = rsvp_load_visibleinvitations($node, $usr);    $nid2rsvplist = rsvp_load_visibleinvitations($node, $usr);
1451    $counter = 0;    $counter = 0;
1452    foreach ($nid2rsvplist as $nid => $rsvplist) {    foreach ($nid2rsvplist as $nid => $rsvplist) {
# Line 2748  function rsvp_reply_form(&$form_state, $ Line 2745  function rsvp_reply_form(&$form_state, $
2745    $first_reply = false;    $first_reply = false;
2746    
2747    $responses = array(RSVP_ATT_YES => t('Yes'), RSVP_ATT_NO => t('No'));    $responses = array(RSVP_ATT_YES => t('Yes'), RSVP_ATT_NO => t('No'));
2748    if ($rsvp->disable_maybe == RSVP_OPTION_NO) {    if (_rsvp_function_checkbit($rsvp->option_enabled, RSVP_OPTION_DISABLE_MAYBE) == RSVP_OPTION_NO) {
2749      $responses[RSVP_ATT_MAYBE] = t('Maybe');      $responses[RSVP_ATT_MAYBE] = t('Maybe');
2750    }    }
2751    if ($invite_target->response == RSVP_ATT_NONE) {    if ($invite_target->response == RSVP_ATT_NONE) {
# Line 2797  function rsvp_reply_form(&$form_state, $ Line 2794  function rsvp_reply_form(&$form_state, $
2794        );        );
2795    
2796    if ($disabled == true) {    if ($disabled == true) {
2797        $reply_start = false;
2798        $reply_end = false;
2799    
2800        $msg = t('You can not change your response at this time.');
2801        $dt_start = format_date($rsvp->reply_startdate, 'custom', 'm/d/Y');
2802        $dt_end = format_date($rsvp->reply_enddate, 'custom', 'm/d/Y');
2803    
2804        if (_rsvp_function_checkbit($rsvp->option_enabled, RSVP_OPTION_REPLY_STARTDATE_ENABLED) == RSVP_OPTION_YES)
2805          $reply_start = true;
2806    
2807        if (_rsvp_function_checkbit($rsvp->option_enabled, RSVP_OPTION_REPLY_ENDDATE_ENABLED) == RSVP_OPTION_YES)
2808          $reply_end = true;
2809    
2810    
2811        if (($reply_start == true) && ($reply_end == true))
2812          $msg = t('You can not change your response at this time.<br />You can reply to the invitation only between !start and !end.', array('!start' => $dt_start,'!end' => $dt_end));
2813        else if (($reply_start == true) && ($reply_end == false))
2814          $msg = t('You can not change your response at this time.<br />You can reply to the invitation only after !start.', array('!start' => $dt_start));
2815        else if (($reply_start == false) && ($reply_end == true))
2816          $msg = t('You can not change your response at this time.<br />You can reply to the invitation only before !end.', array('!end' => $dt_end));
2817    
2818    
2819      $form['reply_text1'] = array(      $form['reply_text1'] = array(
2820        '#prefix' => '<b><div class="rsvp_form_content rsvp_reply_form_content rsvp_color_inner">',        '#prefix' => '<b><div class="rsvp_form_content rsvp_reply_form_content rsvp_color_inner">',
2821        '#value' => t('You can not change your response at this time.<br />You can reply to the invitation only between !start and !end.', array('!start' => format_date($rsvp->reply_startdate, 'custom', 'm/d/Y'),'!end' => format_date($rsvp->reply_enddate, 'custom', 'm/d/Y'))),        '#value' => $msg,
2822        '#suffix' => '</b><br /><br /></div>',        '#suffix' => '</b><br /><br /></div>',
2823      );      );
2824    }    }
# Line 2934  function rsvp_reply_form_submit($form, & Line 2953  function rsvp_reply_form_submit($form, &
2953    //send confirmation emails    //send confirmation emails
2954    if ($is_own_invitation == true) {    if ($is_own_invitation == true) {
2955          // send confirmations only if guest himself makes the changes.          // send confirmations only if guest himself makes the changes.
2956          if ($rsvp->send_conf_guest == RSVP_OPTION_YES) {      if (_rsvp_function_checkbit($rsvp->option_enabled, RSVP_OPTION_SEND_CONF_GUEST) == RSVP_OPTION_YES) {
2957                  $subject = t('Your response to the invitation has been changed');        $subject = t('Your response to the invitation has been changed');
2958        $body = t('This is a confirmation email that your response to the invitation has been updated.<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />');        $body = t('This is a confirmation email that your response to the invitation has been updated.<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />');
2959        $body .= rsvp_function_guest_status($rsvp, $invite_target);        $body .= rsvp_function_guest_status($rsvp, $invite_target);
2960    
# Line 2943  function rsvp_reply_form_submit($form, & Line 2962  function rsvp_reply_form_submit($form, &
2962        rsvp_function_send_message_guest($rsvp, $invite_target->hash, 'notification_guest', $subject, $body, NULL);        rsvp_function_send_message_guest($rsvp, $invite_target->hash, 'notification_guest', $subject, $body, NULL);
2963          }          }
2964    
2965      if ($rsvp->send_conf_owner == RSVP_OPTION_YES) {      if (_rsvp_function_checkbit($rsvp->option_enabled, RSVP_OPTION_SEND_CONF_OWNER) == RSVP_OPTION_YES) {
2966        //send confirmation but do not update "send status" on screen.        //send confirmation but do not update "send status" on screen.
2967        $subject = t('!name has changed his response to the invitation', array('!name' => $target_name));        $subject = t('!name has changed his response to the invitation', array('!name' => $target_name));
2968        $body = t('This is a confirmation email that the user updated the response to his invitation.<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />');        $body = t('This is a confirmation email that the user updated the response to his invitation.<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />');
# Line 3026  function rsvp_addedit_form(&$form_state, Line 3045  function rsvp_addedit_form(&$form_state,
3045    //first set the stylesheet based on the setting.    //first set the stylesheet based on the setting.
3046    $stylesheet_file = rsvp_function_getStylesheet($rsvp->theme, $rsvp->stylesheet);    $stylesheet_file = rsvp_function_getStylesheet($rsvp->theme, $rsvp->stylesheet);
3047    drupal_add_css($stylesheet_file, 'module', 'all', TRUE);    drupal_add_css($stylesheet_file, 'module', 'all', TRUE);
3048    
3049      //add javascript to support expandable selections
3050      drupal_add_js(drupal_get_path('module', 'rsvp') .'/rsvp_edit.js');
3051    
3052    $form = array();    $form = array();
3053    $fields = array();    $fields = array();
# Line 3079  function rsvp_addedit_form(&$form_state, Line 3101  function rsvp_addedit_form(&$form_state,
3101      $count = $connector->get_datecount($node, $field);      $count = $connector->get_datecount($node, $field);
3102      //iterate through all specified startdates (in case of repeating dates)      //iterate through all specified startdates (in case of repeating dates)
3103      for ($i = 0; $i < $count; $i++) {      for ($i = 0; $i < $count; $i++) {
3104          $key = $connector->get_startdate($node, $field, $i);          $key = $connector->get_startdateAsHash($node, $field, $i);
3105          $value = $connector->get_startdateAsString($node, $field, $i);          $value = $connector->get_startdateAsString($node, $field, $i);
3106          //only add dates to the select box that can be selected (are not expired          //only add dates to the select box that can be selected (not expired events)
3107          if (variable_get('rsvp_for_expired_event', RSVP_OPTION_NO) == RSVP_OPTION_YES) {          if (variable_get('rsvp_for_expired_event', RSVP_OPTION_NO) == RSVP_OPTION_YES ||
3108            $fields[$key] = $value . ' - ' .$key;                $connector->has_enddate($node, $field, $i) == false)
3109            {
3110              //debug: $fields[$key] = $value . ' - ' .$key;
3111              $fields[$key] = $value;
3112          }          }
3113          else {          else {
3114            $enddate = $connector->get_enddate($node, $field, $i);            $enddate = $connector->get_enddateAsUTC($node, $field, $i);
3115            if ($enddate > $now) {            if ($enddate > $now) {
3116              $fields[$key] = $value;              $fields[$key] = $value;
3117            }            }
# Line 3216  function rsvp_addedit_form(&$form_state, Line 3241  function rsvp_addedit_form(&$form_state,
3241      );      );
3242    
3243      $form['rsvp_addedit_form']['rsvp_field_4']['disable_maybe'] = rsvp_form_element_disable_maybe($rsvp, $inside_fieldset);      $form['rsvp_addedit_form']['rsvp_field_4']['disable_maybe'] = rsvp_form_element_disable_maybe($rsvp, $inside_fieldset);
3244        $form['rsvp_addedit_form']['rsvp_field_4']['reply_startdate_option'] = rsvp_form_element_reply_startdate_option($rsvp, $inside_fieldset);
3245      $form['rsvp_addedit_form']['rsvp_field_4']['reply_startdate'] = rsvp_form_element_reply_startdate($rsvp, $inside_fieldset);      $form['rsvp_addedit_form']['rsvp_field_4']['reply_startdate'] = rsvp_form_element_reply_startdate($rsvp, $inside_fieldset);
3246        $form['rsvp_addedit_form']['rsvp_field_4']['reply_enddate_option'] = rsvp_form_element_reply_enddate_option($rsvp, $inside_fieldset);
3247      $form['rsvp_addedit_form']['rsvp_field_4']['reply_enddate'] = rsvp_form_element_reply_enddate($rsvp, $inside_fieldset);      $form['rsvp_addedit_form']['rsvp_field_4']['reply_enddate'] = rsvp_form_element_reply_enddate($rsvp, $inside_fieldset);
3248      $form['rsvp_addedit_form']['rsvp_field_4']['reply_blind_node'] = rsvp_form_element_reply_blind_node($rsvp, $inside_fieldset);      $form['rsvp_addedit_form']['rsvp_field_4']['reply_blind_node'] = rsvp_form_element_reply_blind_node($rsvp, $inside_fieldset);
3249    }    }
# Line 3239  function rsvp_addedit_form(&$form_state, Line 3266  function rsvp_addedit_form(&$form_state,
3266    }    }
3267    $form['rsvp_addedit_form']['buttons_end'] = array('#value' => '</div>');    $form['rsvp_addedit_form']['buttons_end'] = array('#value' => '</div>');
3268    
3269      //$form['#validate'][] = 'rsvp_addedit_form_validate';
3270    
3271    return $form;    return $form;
3272    
3273  }  }
3274    
3275    /**
3276     * Special validate handler for the addedit form
3277     */
3278    /*
3279    function rsvp_addedit_form_validate($form, &$form_state) {
3280      // If a reply start date is specified, it needs to be validated.
3281      if ($form_state['values']['rsvp_addedit_form']['rsvp_field_4']['reply_startdate_option']) {
3282        $form['rsvp_addedit_form']['rsvp_field_4']['reply_startdate']['#skip_validate'] = FALSE;
3283    //    event_validate($form['event']['end_exploded']);
3284      }
3285      // We set the end date to the start date.
3286      else {
3287        $form_item['#parents'] = array('rsvp_addedit_form', 'rsvp_field_4', 'reply_startdate');
3288        form_set_value($form_item, $form_state['rsvp_addedit_form']['rsvp_field_4']['reply_startdate_expand'], $form_state);
3289      }
3290    }
3291    */
3292    
3293    
3294  /**  /**
3295  * Handles submitting of the rsvp edit form  * Handles submitting of the rsvp edit form
# Line 3283  function rsvp_addedit_form_submit($form, Line 3330  function rsvp_addedit_form_submit($form,
3330        //array_diff removes all '0' values from the returned selection        //array_diff removes all '0' values from the returned selection
3331        $rsvp->rsvp_view_roles = implode(";", array_diff($form_state['values']['rsvp_view_roles'], array('0')));        $rsvp->rsvp_view_roles = implode(";", array_diff($form_state['values']['rsvp_view_roles'], array('0')));
3332      }      }
   
     if (isset($form_state['values']['reply_startdate'])) {  
   
         $dt = $form_state['values']['reply_startdate'];  
       $date_local = mktime(0,0,0,(int)$dt['month'],(int)$dt['day'],(int)$dt['year']);  
       $rsvp->reply_startdate = $date_local;  
3333    
3334        if (isset($form_state['values']['reply_startdate_option'])) {
3335          _rsvp_function_setbit($rsvp->option_enabled, RSVP_OPTION_REPLY_STARTDATE_ENABLED, $form_state['values']['reply_startdate_option']);
3336    
3337          if ($form_state['values']['reply_startdate_option'] == true) {
3338            $dt = $form_state['values']['reply_startdate'];
3339            $date_local = (int)mktime(0,0,0,(int)$dt['month'],(int)$dt['day'],(int)$dt['year']);
3340            $rsvp->reply_startdate = $date_local;
3341          }
3342          else {
3343            //for a new rsvp, set reply_startdate to now
3344            $rsvp->reply_startdate = time();
3345          }
3346      }      }
3347      else {      else {
3348        //for a new rsvp, set reply_startdate to now        _rsvp_function_setbit($rsvp->option_enabled, RSVP_OPTION_REPLY_STARTDATE_ENABLED, RSVP_OPTION_NO);
       $rsvp->reply_startdate = time();  
3349      }      }
3350    
3351      if (isset($form_state['values']['reply_enddate'])) {      if (isset($form_state['values']['reply_enddate_option']))
3352        $dt = $form_state['values']['reply_enddate'];      {
3353        $date_local = mktime(0,0,0,(int)$dt['month'],(int)$dt['day'],(int)$dt['year']);        _rsvp_function_setbit($rsvp->option_enabled, RSVP_OPTION_REPLY_ENDDATE_ENABLED, $form_state['values']['reply_enddate_option']);
3354        $rsvp->reply_enddate = $date_local;  
3355          if ($form_state['values']['reply_enddate_option'] == true) {
3356            $dt = $form_state['values']['reply_enddate'];
3357            $date_local = (int)mktime(0,0,0,(int)$dt['month'],(int)$dt['day'],(int)$dt['year']);
3358            $rsvp->reply_enddate = $date_local;
3359          }
3360          else {
3361            //for a new rsvp, set reply_enddate to enddate of event. If we have no enddate, use start date.
3362            $field = $connector->get_event_field($node->type);
3363            $pos = $connector->get_posByHash($node, $field, $form_state['values']['startdate']);
3364            if ($pos >= 0) {
3365              if ($connector->has_enddate($node, $field, $pos) == true) {
3366                $rsvp->reply_enddate = $connector->get_enddateAsUTC($node, $field, $pos);
3367              }
3368              else {
3369                $rsvp->reply_enddate = $connector->get_startdateAsUTC($node, $field, $pos);
3370              }
3371            }
3372            else {
3373              drupal_set_message(t('UNKNOWN STARTDATE: %startdate', array('%startdate' => $form_state['values']['startdate'])));
3374            }
3375          }
3376      }      }
3377      else {      else {
3378        //for a new rsvp, set reply_enddate to enddate of event        _rsvp_function_setbit($rsvp->option_enabled, RSVP_OPTION_REPLY_ENDDATE_ENABLED, RSVP_OPTION_NO);
       $field = $connector->get_event_field($node->type);  
       $pos = $connector->get_posByHash($node, $field, $form_state['values']['startdate']);  
       if ($pos >= 0)  
         $rsvp->reply_enddate = $connector->get_enddate($node, $field, $pos);  
       else  
         drupal_set_message(t('UNKNOWN STARTDATE: %startdate', array('%startdate' => $form_state['values']['startdate'])));  
3379      }      }
3380    
3381      $rsvp->invite_filterformat = $form_state['values']['format'];      $rsvp->invite_filterformat = $form_state['values']['format'];
# Line 3316  function rsvp_addedit_form_submit($form, Line 3383  function rsvp_addedit_form_submit($form,
3383      $rsvp->invite_text = $form_state['values']['invite_text'];      $rsvp->invite_text = $form_state['values']['invite_text'];
3384    
3385    
3386      foreach (array('name', 'nid', 'startdate', 'theme', 'stylesheet', 'iconset', 'backgroundimage', 'image', 'response_blind', 'response_blind_node', 'reply_blind_node', 'attendees_visible', 'list_email', 'allow_invite', 'text_whoiscoming', 'text_yes', 'text_no', 'text_maybe', 'max_guests', 'open_invitation', 'disable_maybe', 'send_privatemsg', 'send_conf_guest', 'send_conf_owner') as $key) {      if (isset($form_state['values']['open_invitation']))
3387          _rsvp_function_setbit($rsvp->option_enabled, RSVP_OPTION_OPENINVITATION, $form_state['values']['open_invitation']);
3388    
3389        if (isset($form_state['values']['disable_maybe']))
3390          _rsvp_function_setbit($rsvp->option_enabled, RSVP_OPTION_DISABLE_MAYBE, $form_state['values']['disable_maybe']);
3391    
3392        if (isset($form_state['values']['send_privatemsg']))
3393          _rsvp_function_setbit($rsvp->option_enabled, RSVP_OPTION_SEND_PRIVATEMSG, $form_state['values']['send_privatemsg']);
3394    
3395        if (isset($form_state['values']['send_conf_owner']))
3396          _rsvp_function_setbit($rsvp->option_enabled, RSVP_OPTION_SEND_CONF_OWNER, $form_state['values']['send_conf_owner']);
3397    
3398        if (isset($form_state['values']['send_conf_guest']))
3399          _rsvp_function_setbit($rsvp->option_enabled, RSVP_OPTION_SEND_CONF_GUEST, $form_state['values']['send_conf_guest']);
3400    
3401    
3402        foreach (array('name', 'nid', 'startdate', 'theme', 'stylesheet', 'iconset', 'backgroundimage', 'image',
3403                       'response_blind', 'response_blind_node', 'reply_blind_node', 'attendees_visible', 'list_email',
3404                       'allow_invite', 'text_whoiscoming', 'text_yes', 'text_no', 'text_maybe', 'max_guests', 'option_enabled') as $key) {
3405        if (isset($form_state['values'][$key]))        if (isset($form_state['values'][$key]))
3406          $rsvp->$key = $form_state['values'][$key];          $rsvp->$key = $form_state['values'][$key];
3407    
# Line 3672  function rsvp_msg_moderator_form(&$form_ Line 3757  function rsvp_msg_moderator_form(&$form_
3757    
3758          $form = array();          $form = array();
3759    
3760    $rsvp->send_conf_owner = RSVP_OPTION_YES;    _rsvp_function_setbit($rsvp->option_enabled, RSVP_OPTION_SEND_CONF_OWNER, RSVP_OPTION_YES);
3761    
3762    rsvp_function_update_rsvp($rsvp);    rsvp_function_update_rsvp($rsvp);
3763    drupal_set_message(t('The organizer will now receive messages about guests responses.'));    drupal_set_message(t('The organizer will now receive messages about guests responses.'));
# Line 3821  function rsvp_register_form_access($conn Line 3906  function rsvp_register_form_access($conn
3906          if (!is_null($rsvp)) {          if (!is_null($rsvp)) {
3907      $perm_byrole = rsvp_function_invitation_by_invite_access($connector, $rsvp, NULL, NULL, RSVP_ACCESS_BYROLE);      $perm_byrole = rsvp_function_invitation_by_invite_access($connector, $rsvp, NULL, NULL, RSVP_ACCESS_BYROLE);
3908    
3909      if (($perm_byrole == true) && ($rsvp->open_invitation == RSVP_OPTION_YES)) {      if (($perm_byrole == true) && (_rsvp_function_checkbit($rsvp->option_enabled, RSVP_OPTION_OPENINVITATION) == RSVP_OPTION_YES)) {
3910        return true;        return true;
3911      }      }
3912    
# Line 4164  function template_preprocess_rsvp_invita Line 4249  function template_preprocess_rsvp_invita
4249    $variables['totalsarray'][RSVP_ATT_NONE]  = array(check_plain($params['totalsarray'][RSVP_ATT_NONE]),   'not.gif',  t('No response'));    $variables['totalsarray'][RSVP_ATT_NONE]  = array(check_plain($params['totalsarray'][RSVP_ATT_NONE]),   'not.gif',  t('No response'));
4250    
4251    $variables['max_guests'] = $rsvp->max_guests;    $variables['max_guests'] = $rsvp->max_guests;
4252    $variables['is_openinvitation'] = ($rsvp->open_invitation == RSVP_OPTION_YES);    $variables['is_openinvitation'] = (_rsvp_function_checkbit($rsvp->option_enabled, RSVP_OPTION_OPENINVITATION) == RSVP_OPTION_YES);
4253    $variables['event_subject'] = check_plain($node->title);    $variables['event_subject'] = check_plain($node->title);
4254    $variables['event_startdate'] = check_plain($startdate);    $variables['event_startdate'] = check_plain($startdate);
4255    $variables['event_link'] = l($node->title, 'node/'. $node->nid);    $variables['event_link'] = l($node->title, 'node/'. $node->nid);
# Line 4282  function template_preprocess_rsvp_guestl Line 4367  function template_preprocess_rsvp_guestl
4367    $variables['is_moderator']      = $params['is_moderator'];    $variables['is_moderator']      = $params['is_moderator'];
4368    $variables['is_anonymous']      = $params['is_anonymous'];    $variables['is_anonymous']      = $params['is_anonymous'];
4369    $variables['show_responses']    = $params['show_responses'];    $variables['show_responses']    = $params['show_responses'];
4370    $variables['show_maybe']        = !$rsvp->disable_maybe;    $variables['show_maybe']        = !_rsvp_function_checkbit($rsvp->option_enabled, RSVP_OPTION_DISABLE_MAYBE);
4371    $variables['rid']               = $rsvp->rid;    $variables['rid']               = $rsvp->rid;
4372    
4373    
# Line 4443  class RsvpConnectorImpl { Line 4528  class RsvpConnectorImpl {
4528    }    }
4529    
4530    //returns startdate as is to use it as a hash when working with reocurring dates.    //returns startdate as is to use it as a hash when working with reocurring dates.
4531    function get_startdate($node, $field, $pos) {    function get_startdateAsHash($node, $field, $pos) {
4532        return NULL;
4533      }
4534    
4535      //returns startdate as unix timestamp in utc.
4536      function get_startdateAsUTC($node, $field, $pos) {
4537      return NULL;      return NULL;
4538    }    }
4539    
# Line 4453  class RsvpConnectorImpl { Line 4543  class RsvpConnectorImpl {
4543    }    }
4544    
4545    //returns enddate as unix timestamp in utc    //returns enddate as unix timestamp in utc
4546    function get_enddate($node, $field, $pos) {    function get_enddateAsUTC($node, $field, $pos) {
4547      return NULL;      return NULL;
4548    }    }
4549    
4550      //returns if event has a valid enddate
4551      function has_enddate($node, $field, $pos) {
4552        return NULL;
4553      }
4554    
4555    function format_date($node, $field, $pos, $include_to_date = FALSE) {    function format_date($node, $field, $pos, $include_to_date = FALSE) {
4556      return NULL;      return NULL;
4557    }    }
# Line 4510  class RsvpConnector { Line 4605  class RsvpConnector {
4605    }    }
4606    
4607    //returns startdate as is to use it as a hash when working with reocurring dates.    //returns startdate as is to use it as a hash when working with reocurring dates.
4608    function get_startdate($node, $field, $pos) {    function get_startdateAsHash($node, $field, $pos) {
4609          return $this->connector->get_startdate($node, $field, $pos);          return $this->connector->get_startdateAsHash($node, $field, $pos);
4610      }
4611    
4612      //returns startdate as unix timestamp in utc.
4613        function get_startdateAsUTC($node, $field, $pos) {
4614        return $this->connector->get_startdateAsUTC($node, $field, $pos);
4615    }    }
4616    
4617    //returns startdate as string in local timezone    //returns startdate as string in local timezone
# Line 4524  class RsvpConnector { Line 4624  class RsvpConnector {
4624    }    }
4625    
4626      //returns enddate in utc form      //returns enddate in utc form
4627    function get_enddate($node, $field, $pos) {    function get_enddateAsUTC($node, $field, $pos) {
4628      return $this->connector->get_enddate($node, $field, $pos);      return $this->connector->get_enddateAsUTC($node, $field, $pos);
4629    }    }
4630    
4631      //returns if event has a valid enddate
4632      function has_enddate($node, $field, $pos) {
4633        return $this->connector->has_enddate($node, $field, $pos);
4634      }
4635    
4636    function format_date($node, $field, $pos, $include_to_date = FALSE) {    function format_date($node, $field, $pos, $include_to_date = FALSE) {
4637      return $this->connector->format_date($node, $field, $pos, $include_to_date);      return $this->connector->format_date($node, $field, $pos, $include_to_date);
4638    }    }

Legend:
Removed from v.1.22.2.39  
changed lines
  Added in v.1.22.2.40

  ViewVC Help
Powered by ViewVC 1.1.2