Implement $wgWrReportEnableIntermaps configuration.
[philipp/winterrodeln/mediawiki_extensions/wrreport.git] / wrreport_body.php
index 00c9e785f28804241a6981afacada336e65fe8c3..0bcafa2ad8f1cae989ae77741a1876daf4e2a359 100644 (file)
@@ -8,6 +8,7 @@
 //     $wgWrReportBlackListStrangers = array(); // array of page names where reports are disallowed for not logged in users
 //     $wgWrReportDeleteMode = 'loggedin'; // 'allow', 'loggedin', 'deny'
 //     $wgWrReportFeedRoot = 'http://www.winterrodeln.org/feed'; // root URL of the Winterrodeln feed without trailing slash
+//     $wgWrReportEnableIntermaps = true; // show Intermaps sledrun information column
 //
 //
 // The following tags are supported:
@@ -773,6 +774,7 @@ class WrReport {
                global $wgWrReportMode; // e.g. 'summer'
                global $wgWrReportBlackListAll;
                global $wgWrReportBlackListStrangers;
+               global $wgWrReportEnableIntermaps;
 
                // Determine, whether the user is allowed to make a new report
                $userMayReport = ($wgWrReportMode == 'allow' || ($wgWrReportMode == 'loggedin' && $wgUser->isLoggedIn()));
@@ -788,7 +790,7 @@ class WrReport {
                $tr->appendElement('th')->appendElement('img', array('src' => '/vorlagen/s_lift.png', 'alt' => wfMessage('wrreport-icon-lift')->text(), 'title' => wfMessage('wrreport-icon-lift')->text()));
                $tr->appendElement('th')->appendElement('img', array('src' => '/vorlagen/s_walk.png', 'alt' => wfMessage('wrreport-icon-walkupseparate')->text(), 'title' => wfMessage('wrreport-icon-walkupseparate')->text()));
                $tr->appendElement('th')->appendElement('img', array('src' => '/vorlagen/s_bus.png', 'alt' => wfMessage('wrreport-icon-publictransport')->text(), 'title' => wfMessage('wrreport-icon-publictransport')->text()));
-               if ($wgWrReportMode != 'summer') $tr->appendElement('th')->appendElement('img', array('src' => '/vorlagen/s_open.png', 'alt' => wfMessage('wrreport-icon-intermaps-status')->text(), 'title' => wfMessage('wrreport-icon-intermaps-status')->text()));
+               if ($wgWrReportMode != 'summer' && $wgWrReportEnableIntermaps) $tr->appendElement('th')->appendElement('img', array('src' => '/vorlagen/s_open.png', 'alt' => wfMessage('wrreport-icon-intermaps-status')->text(), 'title' => wfMessage('wrreport-icon-intermaps-status')->text()));
                $tr->appendElement('th')->appendText(wfMessage('wrreport-sledrun')->text());
                if ($wgWrReportMode != 'summer') $tr->appendElement('th')->appendText(wfMessage('wrreport-newreport-condition')->text());
                $tr->appendElement('th')->appendText(wfMessage('wrreport-sledrun-information')->text());
@@ -820,7 +822,7 @@ class WrReport {
                        $td = $tr->appendElement('td');
                        if ($row->public_transport and $row->public_transport != 5) $td->appendElement('img', array('src' => '/vorlagen/s_bus.png', 'alt' => wfMessage('wrreport-icon-publictransport')->text(), 'title' => wfMessage('wrreport-icon-publictransport')->text()));
 
-                       if ($wgWrReportMode != 'summer') {
+                       if ($wgWrReportMode != 'summer' && $wgWrReportEnableIntermaps) {
                                $td = $tr->appendElement('td');
                                if ($row->show_status) {
                                        if ($row->status == 'open') {