Changeset 14841
- Timestamp:
- 02/11/08 12:44:27 (10 months ago)
- Files:
-
- branches/MidCOM_2_8/net.nemein.calendar/config/schemadb_config.inc (modified) (1 diff)
- branches/MidCOM_2_8/net.nemein.calendar/config/schemadb_default.inc (modified) (1 diff)
- branches/MidCOM_2_8/net.nemein.calendar/functions.php (modified) (6 diffs)
- branches/MidCOM_2_8/net.nemein.calendar/handler/archive.php (modified) (20 diffs)
- branches/MidCOM_2_8/net.nemein.calendar/handler/create.php (modified) (10 diffs)
- branches/MidCOM_2_8/net.nemein.calendar/handler/delete.php (modified) (10 diffs)
- branches/MidCOM_2_8/net.nemein.calendar/handler/edit.php (modified) (3 diffs)
- branches/MidCOM_2_8/net.nemein.calendar/handler/feed.php (modified) (8 diffs)
- branches/MidCOM_2_8/net.nemein.calendar/handler/list.php (modified) (38 diffs)
- branches/MidCOM_2_8/net.nemein.calendar/handler/view.php (modified) (12 diffs)
- branches/MidCOM_2_8/net.nemein.calendar/midcom/interfaces.php (modified) (1 diff)
- branches/MidCOM_2_8/net.nemein.calendar/navigation.php (modified) (2 diffs)
- branches/MidCOM_2_8/net.nemein.calendar/style/archive-start.php (modified) (1 diff)
- branches/MidCOM_2_8/net.nemein.calendar/style/show_event.php (modified) (1 diff)
- branches/MidCOM_2_8/net.nemein.calendar/viewer.php (modified) (27 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/MidCOM_2_8/net.nemein.calendar/config/schemadb_config.inc
r14589 r14841 389 389 ( 390 390 'name' => 'extra', 391 'title' => 'title', 392 ), 393 array 394 ( 395 'name' => 'name', 391 396 'title' => 'name', 397 ), 398 array 399 ( 400 'name' => 'component', 401 'title' => 'component', 392 402 ), 393 403 ), branches/MidCOM_2_8/net.nemein.calendar/config/schemadb_default.inc
r12953 r14841 58 58 'title' => 'location', 59 59 'storage' => 'location', 60 'type' => ' text',61 'widget' => ' text',60 'type' => 'position', 61 'widget' => 'position', 62 62 ), 63 63 'categories' => Array branches/MidCOM_2_8/net.nemein.calendar/functions.php
r14775 r14841 2 2 /** 3 3 * @package net.nemein.calendar 4 * @author The Midgard Project, http://www.midgard-project.org 4 * @author The Midgard Project, http://www.midgard-project.org 5 5 * @version $Id$ 6 6 * @copyright The Midgard Project, http://www.midgard-project.org … … 10 10 /** 11 11 * Calendar DayLabel function 12 * @ var $label string'start' if it's the startdate or 'end' if it's the end date.13 * @ var$start unixtimestamp14 * @ var $end unix timestamp15 * @ var $add_time booleantrue if you want to add hour:minute to the date12 * @param string $label 'start' if it's the startdate or 'end' if it's the end date. 13 * @param timestamp $start unixtimestamp 14 * @param timestamp $end unix timestamp 15 * @param boolean $add_time true if you want to add hour:minute to the date 16 16 */ 17 17 function net_nemein_calendar_functions_daylabel($label='start', $start, $end , $add_time = true, $add_year = false) 18 18 { 19 /** 19 /** 20 20 * If mucking about with locales at least have the courtesy to return 21 21 * the value to what it used to be, here we read the current value, … … 46 46 // We want to output the label for start time 47 47 $daylabel .= strftime('%A %d. %B ', $start); 48 48 49 49 if (date('Y', $start) != date('Y', $end)) 50 50 { 51 51 $daylabel .= date('Y ', $start); 52 52 } 53 54 if ($add_time) 53 54 if ($add_time) 55 55 { 56 56 $daylabel .= date('H:i', $start); … … 70 70 elseif (date('d', $start) != date('d', $end)) 71 71 { 72 $daylabel .= strftime('%A %d. %B ', $end); 72 $daylabel .= strftime('%A %d. %B ', $end); 73 73 } 74 75 if ($add_time) 74 75 if ($add_time) 76 76 { 77 $daylabel .= date('H:i', $end); 77 $daylabel .= date('H:i', $end); 78 78 } 79 79 } … … 88 88 * Transforms an event object into a valid MidCOM Indexer 89 89 * Document, using the midcom document base class. 90 * 90 * 91 91 * @param NemeinCalendar_event $event The event to transform. 92 92 * @return midcom_services_indexer_document_midcom Transformed Event or false on failure. … … 99 99 $event->revisor = 1; 100 100 $event->created = 0; 101 101 102 102 $document = new midcom_services_indexer_document_midcom($event); 103 103 $document->content = "{$event->description} {$event->title}"; branches/MidCOM_2_8/net.nemein.calendar/handler/archive.php
r14775 r14841 20 20 * Calendar Archive pages handler. 21 21 * 22 * Shows a n monthly archive index using the between method to display the months.23 * Note, that the code is optimized to not use any TREE methods when querying 22 * Shows a monthly archive index using the between method to display the months. 23 * Note, that the code is optimized to not use any TREE methods when querying 24 24 * events (since there are plenty of queries run until the index is complete). Instead, 25 * in case of a list_from_master topic, the immediate subevents of the master event 26 * are queried once and then reused. This archive does < em>not</em> support event27 * hi rarchies any deeper then this one level.25 * in case of a list_from_master topic, the immediate subevents of the master event 26 * are queried once and then reused. This archive does <i>not</i> support event 27 * hierarchies any deeper then this one level. 28 28 * 29 29 * <b>Requirements:</b> 30 * 30 * 31 31 * - PEAR Calendar 32 32 * - Midgard 1.8 … … 38 38 /** 39 39 * The master event to use in case we list from a common master or the root event 40 * in case we don't. 40 * in case we don't. 41 41 * 42 42 * @var net_nemein_calendar_event_dba … … 62 62 63 63 /** 64 * Returns a n QB initialized to query all events matching the current topic64 * Returns a QB initialized to query all events matching the current topic 65 65 * constraints. 66 * 66 * 67 67 * @return midcom_core_querybuilder The initialized QB instance. 68 68 */ … … 70 70 { 71 71 $qb = net_nemein_calendar_event_dba::new_query_builder(); 72 72 73 73 if ($this->_config->get('list_from_master')) 74 74 { … … 79 79 $qb->add_constraint('node', '=', $this->_request_data['content_topic']->id); 80 80 } 81 81 82 82 $type_filter = $this->_config->get('type_filter_upcoming'); 83 83 if (!is_null($type_filter)) … … 85 85 $qb->add_constraint('type', '=', (int) $type_filter); 86 86 } 87 87 88 88 return $qb; 89 89 } … … 94 94 * 95 95 * The handler computes all necessary data and populates the request array accordingly. 96 * 97 * @param mixed $handler_id The ID of the handler. 98 * @param Array $args The argument list. 99 * @param Array &$data The local request data. 100 * @return boolean Indicating success. 96 101 */ 97 102 function _handler_welcome ($handler_id, $args, &$data) … … 101 106 return false; 102 107 } 103 108 104 109 $this->_compute_welcome_data(); 105 110 $_MIDCOM->set_26_request_metadata($this->get_last_modified(), $this->_topic->guid); 106 111 107 112 $this->_component_data['active_leaf'] = "{$this->_topic->id}_ARCHIVE"; 108 113 109 114 return true; 110 115 } … … 194 199 } 195 200 } 196 197 /** 198 * Computes the last modified timestamp of the entire event tree. 199 * 201 202 /** 203 * Computes the last modified timestamp of the entire event tree. 204 * 200 205 * This is done under sudo if possible, to avoid problems arising if the last posting 201 206 * is hidden. This keeps up performance, as an execute_unchecked() can be made in this case. 202 207 * If sudo cannot be acquired, the system falls back to excute(). 203 * 208 * 204 209 * @return int Last Modified timestamp 205 210 */ … … 209 214 $qb->add_order('metadata.revised', 'DESC'); 210 215 $qb->set_limit(1); 211 216 212 217 if ($_MIDCOM->auth->request_sudo()) 213 218 { … … 219 224 $result = $qb->execute(); 220 225 } 221 226 222 227 if (! $result) 223 228 { … … 229 234 } 230 235 } 231 232 /** 233 * Computes the number of events active in a given timeframe. 234 * 236 237 /** 238 * Computes the number of events active in a given timeframe. 239 * 235 240 * Note, that active not starting events are counted here, thus it is quite possible 236 241 * that the same event is listed more then once in case it spans several months. … … 247 252 return $qb->count_unchecked(); 248 253 } 249 250 /** 251 * Computes the total number of events. 254 255 /** 256 * Computes the total number of events. 252 257 * 253 258 * @return int Event count … … 258 263 return $qb->count_unchecked(); 259 264 } 260 265 261 266 /** 262 267 * Constructs a Link for a calendar to the given month. 263 * 268 * 264 269 * @param Calendar_Month $month The calendar month to link to. 265 270 */ … … 274 279 /** 275 280 * Constructs a Link for a calendar to the given Year. 276 * 281 * 277 282 * @param Calendar_Year $year The calendar year to link to. 278 283 */ … … 305 310 } 306 311 307 // Second step of req eust data: Years and months.312 // Second step of request data: Years and months. 308 313 $first_year = $first_month->thisYear(); 309 314 $last_year = $last_month->thisYear(); 310 315 311 316 for ($year_nr = $first_year; $year_nr <= $last_year; $year_nr++) 312 317 { … … 314 319 $year->build(); 315 320 $year_url = $this->_get_calendar_yearlink($year); 316 321 317 322 $year_count = $this->_compute_events_count_between( 318 323 $year->thisYear('timestamp'), $year->nextYear('timestamp')); … … 321 326 // Loop over the months, start month is either first posting month 322 327 // or January in all other cases. 323 $month = null; 328 $month = null; 324 329 if ($year_nr == $first_year) 325 330 { … … 343 348 'count' => $month_count, 344 349 ); 345 350 346 351 // Check for end month in end year 347 352 if ( $year_nr == $last_year … … 396 401 * - string 'name' => The localized name of the month. 397 402 * - int 'count' => The number of postings in that month. 403 * 404 * @param mixed $handler_id The ID of the handler. 405 * @param mixed &$data The local request data. 398 406 */ 399 407 function _show_welcome($handler_id, &$data) 400 408 { 401 409 midcom_show_style('archive-start'); 402 410 403 411 //reversing array to get descenting order in view 404 412 if ($this->_config->get('archive_year_order') == 'DESC') branches/MidCOM_2_8/net.nemein.calendar/handler/create.php
r14775 r14841 39 39 $this->_request_data['event'] = new net_nemein_calendar_event_dba(); 40 40 $this->_request_data['event']->node = $this->_request_data['content_topic']->id; 41 41 42 42 if ($this->_request_data['master_event']) 43 43 { … … 83 83 * 84 84 * ?defaults[title]=Kaljakellunta&defaults[start]=20070911T123001&defaults[categories]=|foo| 85 * 86 * @param mixed $handler_id The ID of the handler. 87 * @param Array $args The argument list. 88 * @param Array &$data The local request data. 89 * @return boolean Indicating success. 85 90 */ 86 91 function _handler_create($handler_id, $args, &$data) … … 96 101 97 102 $data['defaults'] = Array(); 98 99 // Allow setting defaults from query string, useful for things like "create event for today" and chooser 103 104 // Allow setting defaults from query string, useful for things like "create event for today" and chooser 100 105 if (isset($_GET['defaults']) 101 106 && is_array($_GET['defaults'])) … … 108 113 continue; 109 114 } 110 115 111 116 $data['defaults'][$key] = $value; 112 117 } 113 118 } 114 119 115 120 $this->_load_controller(); 116 121 … … 121 126 $indexer =& $_MIDCOM->get_service('indexer'); 122 127 net_nemein_calendar_viewer::index($this->_controller->datamanager, $indexer, $this->_topic); 123 128 124 129 // Generate URL name 125 130 if ($data['event']->name == '') … … 160 165 $title = sprintf($this->_l10n_midcom->get('create %s'), $this->_l10n->get($this->_request_data['schemadb'][$this->_request_data['schema']]->description)); 161 166 $_MIDCOM->set_pagetitle("{$this->_topic->extra}: {$title}"); 162 167 163 168 if ($handler_id == 'create_chooser') 164 169 { … … 173 178 ); 174 179 $_MIDCOM->set_custom_context_data('midcom.helper.nav.breadcrumb', $breadcrumb); 175 180 176 181 return true; 177 182 } … … 180 185 /** 181 186 * Shows the loaded article. 187 * 188 * @param mixed $handler_id The ID of the handler. 189 * @param mixed &$data The local request data. 182 190 */ 183 191 function _show_create ($handler_id, &$data) 184 192 { 185 $data['controller'] =& $this->_controller; 186 193 $data['controller'] =& $this->_controller; 194 187 195 if ($handler_id == 'create_chooser') 188 196 { 189 197 midcom_show_style('popup_header'); 190 198 191 199 if ( $data['event'] 192 200 || isset($data['cancelled'])) … … 200 208 } 201 209 midcom_show_style('popup_footer'); 202 210 203 211 return; 204 } 205 212 } 213 206 214 midcom_show_style('admin_create'); 207 215 } 208 216 209 217 function _object_to_jsdata(&$object) 210 { 218 { 211 219 $id = @$object->id; 212 220 $guid = @$object->guid; 213 221 214 222 $jsdata = "{"; 215 223 216 224 $jsdata .= "id: '{$id}',"; 217 225 $jsdata .= "guid: '{$guid}',"; 218 226 $jsdata .= "pre_selected: true,"; 219 227 220 228 $hi_count = count($this->_request_data['schemadb'][$this->_request_data['schema']]->fields); 221 229 $i = 1; … … 225 233 $value = rawurlencode($value); 226 234 $jsdata .= "{$field}: '{$value}'"; 227 235 228 236 if ($i < $hi_count) 229 237 { 230 238 $jsdata .= ", "; 231 239 } 232 240 233 241 $i++; 234 } 242 } 235 243 236 244 $jsdata .= "}"; 237 245 238 246 return $jsdata; 239 247 } branches/MidCOM_2_8/net.nemein.calendar/handler/delete.php
r14775 r14841 2 2 /** 3 3 * @package net.nemein.calendar 4 * @author The Midgard Project, http://www.midgard-project.org 4 * @author The Midgard Project, http://www.midgard-project.org 5 5 * @version $Id: delete.php 4125 2006-09-19 17:02:52Z bergie $ 6 6 * @copyright The Midgard Project, http://www.midgard-project.org … … 10 10 /** 11 11 * calendar event delete handler 12 * 12 * 13 13 * @package net.nemein.calendar 14 14 */ … … 22 22 */ 23 23 var $_event = null; 24 24 25 25 /** 26 26 * The Datamanager of the article to display … … 30 30 */ 31 31 var $_datamanager = null; 32 33 function net_nemein_calendar_handler_delete() 32 33 function net_nemein_calendar_handler_delete() 34 34 { 35 35 parent::midcom_baseclasses_components_handler(); 36 36 } 37 37 38 38 /** 39 39 * Internal helper, loads the datamanager for the current calendar event. Any error triggers a 500. … … 52 52 } 53 53 } 54 54 55 /** 56 * @param mixed $handler_id The ID of the handler. 57 * @param Array $args The argument list. 58 * @param Array &$data The local request data. 59 * @return boolean Indicating success. 60 */ 55 61 function _handler_delete($handler_id, $args, &$data, $delete_mode = true) 56 62 { … … 60 66 return false; 61 67 } 62 68 63 69 $this->_event->require_do('midgard:delete'); 64 70 65 71 if (array_key_exists('net_nemein_calendar_deleteok', $_POST)) 66 72 { … … 69 75 { 70 76 $_MIDCOM->uimessages->add($this->_request_data['l10n']->get('net.nemein.calendar'), sprintf($this->_request_data['l10n']->get('page %s deleted'), $calendarword), 'ok'); 71 77 72 78 // Update the index 73 79 $indexer =& $_MIDCOM->get_service('indexer'); 74 80 $indexer->delete($this->_event->guid); 75 81 76 82 $_MIDCOM->relocate(''); 77 83 } … … 88 94 89 95 $this->_load_datamanager(); 90 96 91 97 $_MIDCOM->bind_view_to_object($this->_event); 92 98 93 99 $tmp = Array(); 94 100 $tmp[] = Array … … 103 109 ); 104 110 $_MIDCOM->set_custom_context_data('midcom.helper.nav.breadcrumb', $tmp); 105 111 106 112 $_MIDCOM->set_pagetitle($this->_event->title); 107 113 108 114 // Set the breadcrumb 109 115 $breadcrumb[] = array … … 117 123 MIDCOM_NAV_NAME => sprintf($this->_l10n_midcom->get('delete')), 118 124 ); 119 125 120 126 $_MIDCOM->set_custom_context_data('midcom.helper.nav.breadcrumb', $breadcrumb); 121 127 return true; 122 128 } 123 129 130 /** 131 * 132 * @param mixed $handler_id The ID of the handler. 133 * @param mixed &$data The local request data. 134 */ 124 135 function _show_delete($handler_id, &$data) 125 136 { 126 137 $this->_request_data['datamanager'] = $this->_datamanager; 127 138 128 139 midcom_show_style('admin_deletecheck'); 129 140 } branches/MidCOM_2_8/net.nemein.calendar/handler/edit.php
r14775 r14841 54 54 * in can_handle already, otherwise we would hide all subtopics as the request switch 55 55 * accepts all argument count matches unconditionally. 56 * 57 * @param mixed $handler_id The ID of the handler. 58 * @param Array $args The argument list. 59 * @param Array &$data The local request data. 60 * @return boolean True if the request can be handled, false otherwise. 56 61 */ 57 62 function _can_handle_edit($handler_id, $args, &$data) 58 63 { 59 64 debug_push_class(__CLASS__, __FUNCTION__); 60 65 61 66 $this->_request_data['event'] = new net_nemein_calendar_event_dba($args[0]); 62 67 63 68 if ($this->_request_data['event']) 64 69 { … … 82 87 } 83 88 84 89 /** 90 * @param mixed $handler_id The ID of the handler. 91 * @param Array $args The argument list. 92 * @param Array &$data The local request data. 93 * @return boolean Indicating success. 94 */ 85 95 function _handler_edit($handler_id, $args, &$data) 86 96 { 87 97 88 98 $this->_load_controller(); 89 99 … … 117 127 MIDCOM_NAV_NAME => sprintf($this->_l10n_midcom->get('edit')), 118 128 ); 119 129 120 130 $_MIDCOM->set_custom_context_data('midcom.helper.nav.breadcrumb', $breadcrumb); 121 131 122 132 return true; 123 133 } 124 134 135 /** 136 * 137 * @param mixed $handler_id The ID of the handler. 138 * @param mixed &$data The local request data. 139 */ 125 140 function _show_edit($handler_id, &$data) 126 141 { branches/MidCOM_2_8/net.nemein.calendar/handler/feed.php
r12953 r14841 25 25 */ 26 26 var $_events = null; 27 27 28 28 /** 29 29 * GET field filters set for this view … … 80 80 * Shows the autoindex list. Nothing to do in the handle phase except setting last modified 81 81 * dates. 82 * 83 * @param mixed $handler_id The ID of the handler. 84 * @param Array $args The argument list. 85 * @param Array &$data The local request data. 86 * @return boolean Indicating success. 82 87 */ 83 88 function _handler_rss($handler_id, $args, &$data) … … 96 101 // Filter the upcoming list by a type if required 97 102 $type_filter = $this->_config->get('type_filter_upcoming'); 98 103 99 104 $qb = net_nemein_calendar_event_dba::new_query_builder(); 100 105 … … 108 113 $qb->add_constraint('node', '=', $data['content_topic']->id); 109 114 } 110 115 111 116 // Add filtering constraints 112 117 if (!is_null($type_filter)) … … 116 121 foreach ($this->_filters as $field => $filter) 117 122 { 118 $qb->add_constraint($field, '=', $filter); 123 $qb->add_constraint($field, '=', $filter); 119 124 } 120 125 // QnD category filter (only in 1.8) … … 133 138 134 139 $qb->set_limit($this->_config->get('rss_count')); 135 140 136 141 $qb->add_order('closeregistration'); 137 142 138 143 $this->_events = $qb->execute(); 139 144 140 145 // Prepare the feed (this will also validate the handler_id) 141 146 $this->_create_feed($handler_id); 142 147 143 148 return true; 144 149 } … … 174 179 /** 175 180 * Displays the feed 181 * 182 * @param mixed $handler_id The ID of the handler. 183 * @param mixed &$data The local request data. 176 184 */ 177 185 function _show_rss($handler_id, &$data) 178 186 { 179 187 $data['feedcreator'] =& $this->_feed; 180 188 181 189 // Add each event now. 182 190 if ($this->_events) … … 190 198 } 191 199 } 192 200 193 201 echo $this->_feed->createFeed('RSS2.0'); 194 202 } branches/MidCOM_2_8/net.nemein.calendar/handler/list.php
r14744 r14841 22 22 */ 23 23 var $_filters = Array(); 24 24 25 25 /** 26 26 * Viewed year for calendar view 27 * 27 * 28 28 * @access private 29 29 */ … … 32 32 /** 33 33 * Viewed month for calendar view 34 * 34 * 35 35 * @access private 36 36 */ 37 37 var $_month; 38 38 39 39 /** 40 40 * Calendar display widget … … 44 44 */ 45 45 var $_calendar; 46 46 47 47 /** 48 48 * Switch to determine if past elements should be shown 49 * 49 * 50 50 * @var boolean 51 51 * @access private 52 52 */ 53 53 var $_past = false; 54 54 55 55 /** 56 56 * Switch to determine if the past elements should be shown in the upcoming events … … 61 61 var $_show_past_in_upcoming = false; 62 62 63 /* 63 /** 64 64 * Simple default constructor. 65 65 */ … … 68 68 parent::midcom_baseclasses_components_handler(); 69 69 } 70 70 71 71 function _load_filters() 72 72 { … … 91 91 $this->_load_datamanager(); 92 92 $this->_request_data['archive_mode'] = false; 93 94 $this->_request_data['index_count'] = $args[0]; 95 93 94 $this->_request_data['index_count'] = $args[0]; 95 96 96 $this->_request_data['events'] = array(); 97 97 … … 100 100 // Filter the upcoming list by a type if required 101 101 $type_filter = $this->_config->get('type_filter_upcoming'); 102 102 103 103 $qb = net_nemein_calendar_event_dba::new_query_builder(); 104 104 … … 112 112 $qb->add_constraint('node', '=', $data['content_topic']->id); 113 113 } 114 114 115 115 // Add filtering constraints 116 116 if (!is_null($type_filter)) … … 120 120 foreach ($this->_filters as $field => $filter) 121 121 { 122 $qb->add_constraint($field, '=', $filter); 122 $qb->add_constraint($field, '=', $filter); 123 123 } 124 124 // QnD category filter (only in 1.8) … … 135 135 // Show only events that haven't started 136 136 $qb->add_constraint('start', '>', gmdate('Y-m-d H:i:s', time())); 137 137 138 138 // Show only open events 139 139 $qb->add_constraint('closeregistration', '>', gmdate('Y-m-d H:i:s', time())); … … 141 141 142 142 $qb->set_limit($this->_request_data['index_count']); 143 143 144 144 $qb->add_order('closeregistration'); 145 145 146 146 $this->_request_data['events'] = $qb->execute(); 147 147 … … 169 169 $this->_load_datamanager(); 170 170 $this->_request_data['archive_mode'] = false; 171 171 172 172 if (count($args) > 0) 173 173 { … … 177 177 { 178 178 $this->_request_data['index_count'] = $this->_config->get('index_count'); 179 } 180 179 } 180 181 181 // Filter the upcoming list by a type if required 182 182 if (!is_null($this->_config->get('type_filter_upcoming'))) … … 215 215 $this->_load_datamanager(); 216 216 $this->_request_data['archive_mode'] = false; 217 217 218 218 if (count($args) > 0) 219 219 { … … 223 223 { 224 224 $this->_request_data['index_count'] = $this->_config->get('index_count'); 225 } 226 225 } 226 227 227 $this->_request_data['events'] = array(); 228 228 229 229 $this->_past = true; 230 230 $this->_load_filters(); … … 256 256 $this->_load_datamanager(); 257 257 $this->_request_data['archive_mode'] = false; 258 258 259 259 // Go to the chosen week instead of current one 260 260 // TODO: Check format as YYYY-MM-DD via regexp … … 284 284 MIDCOM_NAV_NAME => sprintf($this->_l10n->get('week %1$s of year %2$s'), strftime('%W', $requested_time), (string) strftime('%Y', $requested_time)), 285 285 ); 286 286 287 287 $_MIDCOM->set_custom_context_data('midcom.helper.nav.breadcrumb', $breadcrumb); 288 288 289 289 return true; 290 290 } … … 320 320 return false; 321 321 } 322 322 323 323 if ($handler_id == 'archive-between') 324 324 { … … 326 326 { 327 327 return false; 328 } 328 } 329 329 $this->_request_data['archive_mode'] = true; 330 330 331 331 if ($this->_config->get('archive_in_navigation')) 332 332 { … … 340 340 else 341 341 { 342 $this->_request_data['archive_mode'] = false; 343 } 344 342 $this->_request_data['archive_mode'] = false; 343 } 344 345 345 346 346 … … 357 357 358 358 if ($this->_request_data['archive_mode']) 359 { 359 { 360 360 if ($start) 361 361 { … … 377 377 MIDCOM_NAV_NAME => strftime('%x', $start) . ' - ' . strftime('%x', $end), 378 378 ); 379 379 380 380 $_MIDCOM->set_custom_context_data('midcom.helper.nav.breadcrumb', $breadcrumb); 381 381 } 382 382 } 383 383 384 384 return true; 385 385 } … … 425 425 function _get_event_listing($from, $to, $list_all = false) 426 426 { 427 $qb = net_nemein_calendar_event_dba::new_query_builder(); 428 427 429 // Filter the upcoming list by a type if required 428 430 $type_filter = $this->_config->get('type_filter_upcoming'); 429 431 430 $qb = net_nemein_calendar_event_dba::new_query_builder();431 432 432 // Switch for determining if the filters have already been initialized 433 433 $filtered = false; 434 434 435 435 $qb->begin_group('OR'); 436 436 … … 444 444 $qb->add_constraint('node', '=', $this->_request_data['content_topic']->id); 445 445 } 446 446 447 447 // Add all the folders that are configured 448 448 if ($this->_config->get('list_from_folders')) … … 457 457 continue; 458 458 } 459 459 460 460 $qb->add_constraint('node.guid', '=', $guid); 461 461 } 462 462 } 463 463 464 464 $qb->end_group(); 465 466 // Add filtering constraints465 466 // Add filtering constraints 467 467 if ($this->_show_past_in_upcoming) 468 468 { … … 477 477 $filtered = true; 478 478 } 479 elseif (!is_null($type_filter))480 {481 $qb->add_constraint('type', '=', (int) $type_filter);482 }483 479 484 480 foreach ($th
