Changeset 11890
- Timestamp:
- 08/30/07 17:16:56 (1 year ago)
- Files:
-
- trunk/midcom/net.nemein.calendar/admin.php (deleted)
- trunk/midcom/net.nemein.calendar/handler/archive.php (modified) (1 diff)
- trunk/midcom/net.nemein.calendar/handler/list.php (modified) (2 diffs)
- trunk/midcom/net.nemein.calendar/handler/view.php (modified) (1 diff)
- trunk/midcom/net.nemein.calendar/midcom/interfaces.php (modified) (1 diff)
- trunk/midcom/net.nemein.calendar/viewer.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/midcom/net.nemein.calendar/handler/archive.php
r11661 r11890 92 92 } 93 93 94 $qb = net_nemein_calendar_event::new_query_builder(); 95 $qb->add_constraint('up', '=', $this->_master_event->id); 96 $result = $qb->execute(); 97 if ($result === false) 94 $mc = net_nemein_calendar_event::new_collector('up', $this->_master_event->id); 95 $mc->set_key_property('up'); 96 $mc->add_value_property('id'); 97 $mc->execute(); 98 $events = $mc->list_keys(); 99 100 $this->_root_events = Array(); 101 foreach ($events as $guid => $array) 98 102 { 99 debug_push_class(__CLASS__, __FUNCTION__); 100 debug_add('Failed to query the root events: ' . mgd_errstr(), MIDCOM_LOG_INFO); 101 debug_pop(); 102 return null; 103 } 104 105 $this->_root_events = Array(); 106 foreach ($result as $event) 107 { 108 $this->_root_events[$event->id] = $event; 103 $id = $mc->get_subkey($guid, 'id'); 104 $this->_root_events[$id] = $id; 109 105 } 110 106 } trunk/midcom/net.nemein.calendar/handler/list.php
r11098 r11890 87 87 if ($this->_config->get('list_from_master')) 88 88 { 89 $qb->begin_group('OR'); 90 $rootevents_qb = net_nemein_calendar_event::new_query_builder(); 91 $rootevents_qb->add_constraint('up', '=', $this->_request_data['master_event']); 92 $rootevents = $rootevents_qb->execute(); 93 foreach ($rootevents as $rootevent) 94 { 95 $qb->add_constraint('up', '=', $rootevent->id); 96 } 89 $qb->begin_group('OR'); 90 $mc = net_nemein_calendar_event::new_collector('up', $rootevent->id); 91 $mc->set_key_property('up'); 92 $mc->add_value_property('id'); 93 $mc->execute(); 94 $events = $mc->list_keys(); 95 96 foreach ($events as $guid => $array) 97 { 98 $id = $mc->get_subkey($guid, 'id'); 99 $qb->add_constraint('up', '=', $id); 100 } 97 101 $qb->end_group(); 98 102 } … … 328 332 { 329 333 $qb->begin_group('OR'); 330 $rootevents_qb = net_nemein_calendar_event::new_query_builder(); 331 $rootevents_qb->add_constraint('up', '=', $this->_request_data['master_event']); 332 $rootevents = $rootevents_qb->execute(); 333 foreach ($rootevents as $rootevent) 334 { 335 $qb->add_constraint('up', '=', $rootevent->id); 336 } 334 $mc = net_nemein_calendar_event::new_collector('up', $this->_request_data['root_event']->id); 335 $mc->set_key_property('up'); 336 $mc->add_value_property('id'); 337 $mc->execute(); 338 $events = $mc->list_keys(); 339 340 foreach ($events as $guid => $array) 341 { 342 $id = $mc->get_subkey($guid, 'id'); 343 $ids[] = $id; 344 $qb->add_constraint('up', '=', $id); 345 } 337 346 $qb->end_group(); 338 347 } trunk/midcom/net.nemein.calendar/handler/view.php
r4914 r11890 74 74 $qb->add_constraint('up', '=', $this->_request_data['root_event']->id); 75 75 $qb->add_constraint('extra', '=', $args[0]); 76 $events = $qb->execute();77 if ( count($events)== 0)76 77 if ($qb->count() === 0) 78 78 { 79 79 return false; 80 80 } 81 81 82 $events = $qb->execute(); 82 83 $this->_request_data['event'] = $events[0]; 83 84 trunk/midcom/net.nemein.calendar/midcom/interfaces.php
r5497 r11890 31 31 $this->_autoload_files = Array( 32 32 'viewer.php', 33 'admin.php',34 33 'navigation.php', 35 34 'event.php', trunk/midcom/net.nemein.calendar/viewer.php
r11093 r11890 297 297 && $this->_topic->can_do('midcom:component_config')) 298 298 { 299 $this->_node_toolbar->add_item(Array( 300 MIDCOM_TOOLBAR_URL => 'config.html', 301 MIDCOM_TOOLBAR_LABEL => $this->_l10n_midcom->get('component configuration'), 302 MIDCOM_TOOLBAR_HELPTEXT => $this->_l10n_midcom->get('component configuration helptext'), 303 MIDCOM_TOOLBAR_ICON => 'stock-icons/16x16/stock_folder-properties.png', 304 )); 299 $this->_node_toolbar->add_item( 300 array 301 ( 302 MIDCOM_TOOLBAR_URL => 'config.html', 303 MIDCOM_TOOLBAR_LABEL => $this->_l10n_midcom->get('component configuration'), 304 MIDCOM_TOOLBAR_HELPTEXT => $this->_l10n_midcom->get('component configuration helptext'), 305 MIDCOM_TOOLBAR_ICON => 'stock-icons/16x16/stock_folder-properties.png', 306 ) 307 ); 305 308 } 306 309 } … … 380 383 } 381 384 } 382 383 385 }*/ 384 385 386 } 386 387 ?>
