Changeset 1720 for trunk/calendar/inc
- Timestamp:
- 11/27/09 15:43:28 (15 years ago)
- Location:
- trunk/calendar/inc
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/calendar/inc/class.bocalendar.inc.php
r1576 r1720 383 383 384 384 $this->so->cal->stream->lock(array("phpgw_cal_user")); 385 $sql = "update phpgw_cal_user set cal_login = $idDelegado,cal_status='U' where cal_id=$idEvento 386 and cal_login=$idDelegador"; 387 388 $this->so->cal->stream->query($sql,__LINE__,__FILE__,0,-1,true); 389 385 $sql = "SELECT * FROM phpgw_cal_user where cal_id=$idEvento and cal_login=$idDelegado"; 386 387 $this->so->cal->stream->query($sql,__LINE__,__FILE__); 388 if($this->so->cal->stream->next_record()) 389 { 390 throw new Exception("The selected User is already included in this event"); 391 }else{ 392 $sql = "update phpgw_cal_user set cal_login = $idDelegado,cal_status='U' where cal_id=$idEvento 393 and cal_login=$idDelegador"; 394 395 $this->so->cal->stream->query($sql,__LINE__,__FILE__,0,-1,true); 396 397 $event = $this->so->read_entry($idEvento); 398 399 $this->send_update(MSG_ADDED,array($idDelegado => 'U'),$event,$event); 400 } 390 401 $this->so->cal->stream->unlock(); 391 $event = $this->so->read_entry($idEvento);392 /*foreach($event as $id=>$value)393 echo "<br>".$id." -- ".$value;394 exit(0);*/395 $this->send_update(MSG_ADDED,array($idDelegado => 'U'),$event,$event);396 402 } 397 403 -
trunk/calendar/inc/class.uicalendar.inc.php
r1670 r1720 232 232 233 233 function delegate_event($params=NULL) { 234 //$ldap = CreateObject('expressoMail1_2.ldap_functions');235 //$delegated = $ldap->uid2uidnumber($_REQUEST['delegated']);236 system('echo "request[date]: '.$_REQUEST['date'].'" >>/tmp/controle'); 234 $ldap = CreateObject('expressoMail1_2.ldap_functions'); 235 $delegated = $ldap->uid2uidnumber($_REQUEST['delegated']); 236 237 237 try { 238 $this->bo->delegar($_REQUEST['delegator'],$ _REQUEST['delegated']/*$delegated*/,$_REQUEST['event']);238 $this->bo->delegar($_REQUEST['delegator'],$ldap->uid2uidnumber($_REQUEST['delegated'])/*$delegated*/,$_REQUEST['event']); 239 239 header("Location: index.php?menuaction=calendar.uicalendar.day&date=".$_REQUEST['date']); 240 240 }catch(Exception $e) { 241 241 header("Location: index.php?menuaction=calendar.uicalendar.screen_delegate_event&id_event=". $_REQUEST["event"]."&delegator=".$_REQUEST["delegator"]."&date=".$_REQUEST["date"]."&error=1"); 242 242 } 243 244 245 243 } 246 244
Note: See TracChangeset
for help on using the changeset viewer.