Index: trunk/extensions/gis/maparea.php |
— | — | @@ -41,24 +41,34 @@ |
42 | 42 | $this->attr = $this->p->get_attr(); |
43 | 43 | } |
44 | 44 | |
45 | | - function show() |
| 45 | + function show($action) |
46 | 46 | { |
47 | 47 | global $wgOut, $wgUser, $wgContLang; |
48 | 48 | |
49 | | - /* No reason for robots to follow map links */ |
50 | | - $wgOut->setRobotpolicy( 'noindex,nofollow' ); |
| 49 | + if ($action != 'raw') { |
| 50 | + /* No reason for robots to follow map links */ |
| 51 | + $wgOut->setRobotpolicy( 'noindex,nofollow' ); |
51 | 52 | |
52 | | - $wgOut->setPagetitle( "Maparea" ); |
| 53 | + $wgOut->setPagetitle( "Maparea" ); |
53 | 54 | |
54 | | - if (($e = $this->p->get_error()) != "") { |
55 | | - $wgOut->addHTML( |
56 | | - "<p>" . htmlspecialchars( $e ) . "</p>"); |
57 | | - $wgOut->output(); |
58 | | - wfErrorExit(); |
59 | | - return; |
| 55 | + if (($e = $this->p->get_error()) != "") { |
| 56 | + $wgOut->addHTML( |
| 57 | + "<p>" . htmlspecialchars( $e ) . "</p>"); |
| 58 | + $wgOut->output(); |
| 59 | + wfErrorExit(); |
| 60 | + return; |
| 61 | + } |
| 62 | + |
| 63 | + $wgOut->addWikiText( $this->make_output() ); |
| 64 | + } else { |
| 65 | + global $wgInputEncoding; |
| 66 | + $ContentType = 'text/x-wiki'; |
| 67 | + header( "Content-type: ".$ContentType.'; charset='.$wgInputEncoding); |
| 68 | + |
| 69 | + echo( $this->make_output() ); |
| 70 | + |
| 71 | + $wgOut->disable(); |
60 | 72 | } |
61 | | - |
62 | | - $wgOut->addWikiText( $this->make_output() ); |
63 | 73 | } |
64 | 74 | |
65 | 75 | function make_output() |
Index: trunk/extensions/gis/index.php |
— | — | @@ -31,7 +31,7 @@ |
32 | 32 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
33 | 33 | */ |
34 | 34 | |
35 | | -$wgGisVersion = '0.1alpha'; |
| 35 | +$wgGisVersion = '0.2alpha'; |
36 | 36 | |
37 | 37 | include_once ( "gissettings.php" ) ; |
38 | 38 | |
— | — | @@ -63,8 +63,9 @@ |
64 | 64 | $bsl->show(); |
65 | 65 | } else if ( isset ( $_GET['maparea'] ) ) { |
66 | 66 | $maparea = urldecode ( $_GET['maparea'] ) ; |
| 67 | + $action = urldecode ( $_GET['action'] ) ; |
67 | 68 | $bsl = new maparea( $maparea ); |
68 | | - $bsl->show(); |
| 69 | + $bsl->show( $action ); |
69 | 70 | } else if ( isset ( $_GET['version'] ) ) { |
70 | 71 | $bsl = new gis_version( ); |
71 | 72 | $bsl->show(); |