phpgwapi/atualizar24: caldav-DELETE.php.diff

File caldav-DELETE.php.diff, 1.4 KB (added by cristiano, 8 years ago)
  • caldav-DELETE.php

    old new  
    8181  $myLock = $cache->acquireLock('collection-'.$dav_resource->parent_path()); 
    8282 
    8383  $params = array( ':dav_id' => $dav_resource->resource_id() ); 
     84 
     85/////Expresso 
     86  if(strpos($request->user_agent, 'ExpressoLivre') === false) //Ignorar eventos do expresso 
     87  { 
     88     $expresso = 'PATH_DO_SEU_EXPRESSO'; 
     89     include_once($expresso.'/prototype/api/controller.php'); 
     90     include_once($expresso.'/prototype/modules/calendar/interceptors/DAViCalAdapter.php'); 
     91 
     92     $dav_name = explode('/', $dav_resource->GetProperty('dav_name')); 
     93 
     94     DAViCalAdapter::delete($dav_resource->GetProperty('caldav_data') ,array('owner' => $dav_resource->GetProperty('username') , 'calendarName' => $dav_name[ (count($dav_name)-3) ]) .'/'. $dav_name[ (count($dav_name)-2) ]); 
     95  } 
     96/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 
     97 
    8498  if ( $qry->QDo("SELECT write_sync_change(collection_id, 404, caldav_data.dav_name) FROM caldav_data WHERE dav_id = :dav_id", $params ) 
    8599    && $qry->QDo("DELETE FROM property WHERE dav_name = (SELECT dav_name FROM caldav_data WHERE dav_id = :dav_id)", $params ) 
    86100    && $qry->QDo("DELETE FROM locks WHERE dav_name = (SELECT dav_name FROM caldav_data WHERE dav_id = :dav_id)", $params )