Пример #1
0
  function updateEvent($id, &$vevent) {

    $data = $this->parseEventData($vevent);
    if(!$this->lazyWrite) {
      //TODO : Hard working update.
    }
    if(!$this->haveAccess($data['event']['owner'])) {
      $data['event']['owner'] = $GLOBALS['obm']['uid'];
    }    
    $data['event']['calendar_id'] = $id;
    run_query_calendar_event_update($data['event'], $data['entities'], $id, true);
    $this->updateStates($data['states'], $id);
    $alert = $vevent->get('x-obm-alert');
    $this->updateAlerts($alert, $id);
  }
Пример #2
0
      } else {
        // Insert "others attendees" as private contacts
        if ($params['others_attendees'] != "") {
          $others_attendees = run_query_insert_others_attendees($params);
          $entities['contact'] = array_merge($entities['contact'], $others_attendees);
        }
        // Insert "other files" as private documents
        if (count($params['other_files']) > 0) {
          $other_files = run_query_insert_other_files($params);
          if (!$other_files) {
            $display['msg'] .= display_warn_msg("$l_event : $l_warn_file_upload");
          } else {
            $entities['document'] = array_merge($entities['document'], $other_files);
          }
        }
        run_query_calendar_event_update($params, $entities, $event_id, $mail_data['reset_state']);

        if ($params['show_user_calendar']) $current_view->set_users($params['sel_user_id']);
        if ($params['show_resource_calendar'])  $current_view->set_resources($params['sel_resource_id']);
        $detailurl = basename($_SERVER['SCRIPT_NAME'])."?action=detailconsult&calendar_id=".$params["calendar_id"];
        $detail = "<a class='B' href='$detailurl'>".phpStringToJsString($GLOBALS[l_details])."</a>";
        if($GLOBALS['display']['warm_add_organizer'] == true){
          redirect_warn($params, "$l_event: $l_update_ok - $l_event_add_organizer - $detail"); 
        } else {
          redirect_ok($params, "$l_event: $l_update_ok - $detail");
        }
      }
    } catch (OverQuotaDocumentException $e) {
      $extra_js_include[] = 'inplaceeditor.js';
      $extra_js_include[] = 'mootools/plugins/mooRainbow.1.2b2.js' ;
      $extra_js_include[] = 'freebusy.js';