Changeset 2230 for trunk/calendar/inc/class.bocalendar.inc.php
- Timestamp:
- 03/11/10 18:18:26 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/calendar/inc/class.bocalendar.inc.php
r1949 r2230 384 384 $this->so->cal->stream->lock(array("phpgw_cal_user")); 385 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 386 387 if($idDelegado != '') 388 { 389 $this->so->cal->stream->query($sql,__LINE__,__FILE__); 390 if($this->so->cal->stream->next_record()) 391 { 392 throw new Exception("The selected User is already included in this event"); 393 }else{ 394 $sql = "update phpgw_cal_user set cal_login = $idDelegado,cal_status='U' where cal_id=$idEvento 393 395 and cal_login=$idDelegador"; 394 396 395 $this->so->cal->stream->query($sql,__LINE__,__FILE__,0,-1,true);397 $this->so->cal->stream->query($sql,__LINE__,__FILE__,0,-1,true); 396 398 397 $event = $this->so->read_entry($idEvento); 398 399 $this->send_update(MSG_ADDED,array($idDelegado => 'U'),$event,$event); 400 } 399 $event = $this->so->read_entry($idEvento); 400 401 $this->send_update(MSG_ADDED,array($idDelegado => 'U'),$event,$event); 402 } 403 }else { 404 throw new Exception('999'); 405 } 406 401 407 $this->so->cal->stream->unlock(); 402 408 }
Note: See TracChangeset
for help on using the changeset viewer.