Now the <bahnenregiontabelle> tag accepts the parameter "region".
authorphilipp <philipp@7aebc617-e5e2-0310-91dc-80fb5f6d2477>
Sun, 24 Nov 2013 20:21:28 +0000 (20:21 +0000)
committerphilipp <philipp@7aebc617-e5e2-0310-91dc-80fb5f6d2477>
Sun, 24 Nov 2013 20:21:28 +0000 (20:21 +0000)
git-svn-id: http://www.winterrodeln.org/svn/servermediawiki/mediawiki_extensions/wrreport/trunk@1829 7aebc617-e5e2-0310-91dc-80fb5f6d2477

wrreport.body.php

index 525a2b8ad5b5c3f54e89a5a89858f9a2622f7ffc..4b8bb9aeb8fefbfc87d31cf1de215b4b6c673ee7 100644 (file)
@@ -815,8 +815,12 @@ class WrReport {
        public static function bahnenregiontabelleParserHook($input, $args, $parser) {
                $parser->getOutput()->addModules('ext.wrreport');
 
+               // git title representing the region the sledrun list should be generated for
+               $title = $parser->getTitle(); // default title: current page
+               if (isset($args['region'])) $title = Title::newFromText($args['region']);
+
                // get border for region
-               list($region_id, $region_name, $region_border_wkb) = WrReport::getPageRegion($parser->getTitle());
+               list($region_id, $region_name, $region_border_wkb) = WrReport::getPageRegion($title);
                if (is_null($region_name)) return; // no region page
 
                // get titles that are in the region