Changeset 16386
- Timestamp:
- 05/15/08 18:08:02 (5 months ago)
- Files:
-
- trunk/midcom/net.nemein.wiki/documentation/CHANGES (modified) (1 diff)
- trunk/midcom/net.nemein.wiki/handler/view.php (modified) (1 diff)
- trunk/midcom/net.nemein.wiki/viewer.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/midcom/net.nemein.wiki/documentation/CHANGES
r13763 r16386 6 6 which might even break existing functionality. 7 7 - All items marked with "+" represent completely new features. 8 9 2008-05-15 xfade 10 + Added source handler to show the raw MarkDown code for a page. 8 11 9 12 2007-12-03 adrenalin trunk/midcom/net.nemein.wiki/handler/view.php
r14773 r16386 362 362 * @param Array $args The argument list. 363 363 * @param Array &$data The local request data. 364 * @return boolean Indicating success. 365 */ 366 function _handler_source($handler_id, $args, &$data, $view_mode = true) 367 { 368 $this->_load_page($args[0]); 369 if (!$this->_page) 370 { 371 return false; 372 } 373 $_MIDCOM->skip_page_style = true; 374 $this->_load_datamanager(); 375 376 return true; 377 } 378 379 /** 380 * 381 * @param mixed $handler_id The ID of the handler. 382 * @param mixed &$data The local request data. 383 */ 384 function _show_source($handler_id, &$data) 385 { 386 $data['wikipage_view'] = $this->_controller->get_content_html(); 387 $data['autogenerate_toc'] = $this->_config->get('autogenerate_toc'); 388 $data['display_related_to'] = $this->_config->get('display_related_to'); 389 $data['wikipage_view']['content'] = $this->_page->content; 390 midcom_show_style('view-wikipage-source'); 391 } 392 393 /** 394 * @param mixed $handler_id The ID of the handler. 395 * @param Array $args The argument list. 396 * @param Array &$data The local request data. 364 397 */ 365 398 function _handler_subscribe($handler_id, $args, &$data) trunk/midcom/net.nemein.wiki/viewer.php
r14773 r16386 31 31 'variable_args' => 1, 32 32 'handler' => Array('net_nemein_wiki_handler_view', 'raw'), 33 ); 34 35 // Match /source/<wikipage> 36 $this->_request_switch[] = array( 37 'fixed_args' => 'source', 38 'variable_args' => 1, 39 'handler' => Array('net_nemein_wiki_handler_view', 'source'), 33 40 ); 34 41
