phpgwapi/atualizar24: caldav-PUT-vcalendar.php.diff

File caldav-PUT-vcalendar.php.diff, 1.1 KB (added by cristiano, 8 years ago)
  • caldav-PUT-vcalendar.php

    old new  
    9191$put_action_type = ($dav_resource->Exists() ? 'UPDATE' : 'INSERT'); 
    9292$collection = $dav_resource->GetParentContainer(); 
    9393 
     94/////Expresso 
     95if(strpos($request->user_agent, 'ExpressoLivre') === false) //Ignorar eventos do expresso 
     96{ 
     97   $expresso = 'PATH_DO_SEU_EXPRESSO'; 
     98   include_once($expresso.'/prototype/api/controller.php'); 
     99   include_once($expresso.'/prototype/modules/calendar/interceptors/DAViCalAdapter.php'); 
     100 
     101   $params = array(); 
     102   $dav_name = explode('/', $dav_resource->GetProperty('dav_name')); 
     103   $params['calendarName'] = $dav_name[ (count($dav_name)-3) ] .'/'. $dav_name[ (count($dav_name)-2) ]; 
     104   $params['owner'] =  $session->username; 
     105   $params['action'] = $put_action_type; 
     106 
     107   DAViCalAdapter::import($request->raw_post , $params); 
     108} 
     109///////////////////////////////////////////////////////////////////////////// 
     110 
    94111write_resource( $dav_resource, $request->raw_post, $collection, $session->user_no, $etag, 
    95112                                $put_action_type, true, true ); 
    96113