Changeset 4362 for contrib/Resources/inc/class.soresources.inc.php
- Timestamp:
- 05/12/11 11:52:50 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
contrib/Resources/inc/class.soresources.inc.php
r3524 r4362 49 49 echo '<!-- SO cat_id : '.$this->cat_id.' -->'."\n"; 50 50 } 51 $this->cal = CreateObject('infolog.soinfolog_'); 51 // $this->cal = CreateObject('infolog.soinfolog_'); 52 $this->cal = CreateObject('calendar.socalendar_'); 52 53 //$this->open_box($this->owner); 53 54 } … … 76 77 } 77 78 79 function read_entry2($id) 80 { 81 return $this->cal->fetch_event($id); 82 } 83 78 84 function list_events($startYear,$startMonth,$startDay,$endYear=0,$endMonth=0,$endDay=0,$owner_id=0) 79 85 { … … 427 433 $this->cal->set_recur_yearly($year,$month,$day,$interval); 428 434 } 435 function list_eventsa($startYear,$startMonth,$startDay,$endYear=0,$endMonth=0,$endDay=0,$owner_id=0,$location='n/a') 436 { 437 438 $extra = ''; 439 $extra .= (strpos($this->filter,'private')?'AND phpgw_cal.is_public=0 ':''); 440 //$extra .= ($this->cat_id?"AND phpgw_cal.category like '%".$this->cat_id."%' ":''); 441 if ($this->cat_id) 442 { 443 if (!is_object($GLOBALS['phpgw']->categories)) 444 { 445 $GLOBALS['phpgw']->categories = CreateObject('phpgwapi.categories'); 446 } 447 $cats = $GLOBALS['phpgw']->categories->return_all_children($this->cat_id); 448 $extra .= "AND (phpgw_cal.category".(count($cats) > 1 ? " IN ('".implode("','",$cats)."')" : '=\''.(int)$this->cat_id."'"); 449 foreach($cats as $cat) 450 { 451 $extra .= " OR phpgw_cal.category LIKE '$cat,%' OR phpgw_cal.category LIKE '%,$cat,%' OR phpgw_cal.category LIKE '%,$cat'"; 452 } 453 $extra .= ') '; 454 } 455 if($owner_id) 456 { 457 return $this->cal->list_events($startYear,$startMonth,$startDay,$endYear,$endMonth,$endDay,$extra,$GLOBALS['phpgw']->datetime->tz_offset,$owner_id,$location); 458 } 459 else 460 { 461 return $this->cal->list_events($startYear,$startMonth,$startDay,$endYear,$endMonth,$endDay,$extra,$GLOBALS['phpgw']->datetime->tz_offset); 462 } 463 } 429 464 430 465 /* End mcal equiv functions */
Note: See TracChangeset
for help on using the changeset viewer.