Changeset 5132 for trunk/calendar/inc/class.socalendar.inc.php
- Timestamp:
- 11/03/11 13:21:19 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/calendar/inc/class.socalendar.inc.php
r4316 r5132 193 193 function find_uid($uid) 194 194 { 195 $sql = " AND (phpgw_cal.uid = '".$uid."') "; 195 $uid_ = substr($uid, strpos($uid,"-")+1); 196 $uid_ = substr($uid_, 0, strpos($uid_,"-")); 197 198 $sql = " AND (phpgw_cal.cal_id = '". (int)$uid_."') "; 196 199 197 200 $found = $this->cal->get_event_ids(False,$sql); … … 210 213 } 211 214 212 function add_entry(&$event) 213 { 214 return $this->cal->save_event($event); 215 216 /* 217 * @abstract: Retorna o email do organizer do evento. 218 */ 219 function get_mail_organizer($cal_id) 220 { 221 $sql = 'SELECT organizer FROM phpgw_cal WHERE cal_id =' . $cal_id; 222 $this->cal->stream->query($sql,__LINE__,__FILE__); 223 224 while($this->cal->stream->next_record()) 225 { 226 $ret[0] = $this->cal->stream->f('organizer'); 227 } 228 229 $return = $ret[0]; 230 $pos = strpos($return, "<"); 231 $return = substr($return, $pos); 232 $return = str_replace('"','',$return); 233 $return = str_replace('>','',$return); 234 $return = str_replace('<','',$return); 235 236 return $return; 237 } 238 239 240 /* 241 * @abstract: Retorna os emails dos participantes do evento. 242 */ 243 function get_mail_participants($cal_id) 244 { 245 246 } 247 248 249 /* 250 * @abstract: busca no banco pra verificar se já existe um compromisso com o mesmo cal_id 251 */ 252 function find_cal_id($cal_id) 253 { 254 255 $uid_ = substr($cal_id, strpos($cal_id,"-")+1); 256 $uid_ = substr($uid_, 0, strpos($uid_,"-")); 257 258 $sql = " AND phpgw_cal.cal_id = '". (int)$uid_."' OR phpgw_cal.uid = '". $cal_id."' "; 259 260 $found = $this->cal->get_event_ids(False,$sql); 261 if(!$found) 262 { 263 $found = $this->cal->get_event_ids(True,$sql); 264 } 265 if(is_array($found)) 266 { 267 return $found[0]; 268 } 269 else 270 { 271 return False; 272 } 273 } 274 275 276 function add_entry(&$event , $sendMail = true, $importAccount = false) 277 { 278 return $this->cal->save_event($event,$sendMail,$importAccount); 215 279 } 216 280 … … 269 333 } 270 334 271 function set_status($id,$status) 272 { 273 $this->cal->set_status($id,$this->owner,$status); 335 function set_status($id,$status,$user = false) 336 { 337 if($user) $this->cal->set_status($id,$user,$status); 338 else $this->cal->set_status($id,$this->owner,$status); 274 339 } 275 340 … … 369 434 $this->cal->set_description($description); 370 435 } 371 372 function set_observations($observations='')373 {374 $this->cal->set_observations($observations);375 }376 377 function set_attachment($attachment='')378 {379 $this->cal->set_attachment($attachment);380 }381 382 function set_notifications_owner($notifications_owner='')383 {384 $this->cal->set_notifications_owner($notifications_owner);385 }386 387 436 function set_ex_participants($ex_participants='') 388 437 {
Note: See TracChangeset
for help on using the changeset viewer.