MidCOM svn: r16302 - branches/MidCOM_2_8/net.nemein.calendar/handler
adrenalin
midcom-commits at lists.midgard-project.org
Mon May 5 10:31:07 CEST 2008
Author: adrenalin
Date: Mon May 5 10:31:07 2008
New Revision: 16302
URL: http://trac.midgard-project.org/software/changeset/16302
Log:
Backporting r16254.
Modified:
branches/MidCOM_2_8/net.nemein.calendar/handler/archive.php
Modified: branches/MidCOM_2_8/net.nemein.calendar/handler/archive.php
==============================================================================
--- branches/MidCOM_2_8/net.nemein.calendar/handler/archive.php (original)
+++ branches/MidCOM_2_8/net.nemein.calendar/handler/archive.php Mon May 5 10:31:07 2008
@@ -70,6 +70,9 @@
{
$qb = net_nemein_calendar_event_dba::new_query_builder();
+ $qb->begin_group('OR');
+
+ // Add root event constraints
if ($this->_config->get('list_from_master'))
{
$qb->add_constraint('up', 'INTREE', $this->_request_data['master_event']);
@@ -79,6 +82,25 @@
$qb->add_constraint('node', '=', $this->_request_data['content_topic']->id);
}
+ // Add all the folders that are configured
+ if ($this->_config->get('list_from_folders'))
+ {
+ $guids = explode('|', $this->_config->get('list_from_folders'));
+ foreach ($guids as $guid)
+ {
+ // Skip empty and broken guids
+ if ( !$guid
+ || !mgd_is_guid($guid))
+ {
+ continue;
+ }
+
+ $qb->add_constraint('node.guid', '=', $guid);
+ }
+ }
+
+ $qb->end_group();
+
$type_filter = $this->_config->get('type_filter_upcoming');
if (!is_null($type_filter))
{
More information about the midcom-commits
mailing list