Index: trunk/extensions/Cite/SpecialCite_body.php |
— | — | @@ -52,17 +52,16 @@ |
53 | 53 | } |
54 | 54 | |
55 | 55 | function execute() { |
56 | | - global $wgOut, $wgTitle; |
| 56 | + global $wgOut, $wgScript; |
57 | 57 | |
58 | 58 | $wgOut->addHTML( |
59 | | - Xml::element( 'form', |
| 59 | + Xml::openElement( 'form', |
60 | 60 | array( |
61 | 61 | 'id' => 'specialcite', |
62 | 62 | 'method' => 'get', |
63 | | - 'action' => $wgTitle->escapeLocalUrl() |
64 | | - ), |
65 | | - null |
66 | | - ) . |
| 63 | + 'action' => $wgScript |
| 64 | + ) ) . |
| 65 | + Html::hidden( 'title', SpecialPage::getTitleFor( 'Cite' )->getPrefixedDBkey() ) . |
67 | 66 | Xml::openElement( 'label' ) . |
68 | 67 | wfMsgHtml( 'cite_page' ) . ' ' . |
69 | 68 | Xml::element( 'input', |
— | — | @@ -91,7 +90,7 @@ |
92 | 91 | |
93 | 92 | class CiteOutput { |
94 | 93 | var $mTitle, $mArticle, $mId; |
95 | | - var $mParser, $mParserOptions; |
| 94 | + var $mParser, $mParserOptions, $mSpTitle; |
96 | 95 | |
97 | 96 | function __construct( &$title, &$article, $id ) { |
98 | 97 | global $wgHooks, $wgParser; |
— | — | @@ -131,13 +130,12 @@ |
132 | 131 | |
133 | 132 | function genParser() { |
134 | 133 | $this->mParser = new Parser; |
| 134 | + $this->mSpTitle = SpecialPage::getTitleFor( 'Cite' ); |
135 | 135 | } |
136 | 136 | |
137 | 137 | function CiteParse( $in, $argv ) { |
138 | | - global $wgTitle; |
| 138 | + $ret = $this->mParser->parse( $in, $this->mSpTitle, $this->mParserOptions, false ); |
139 | 139 | |
140 | | - $ret = $this->mParser->parse( $in, $wgTitle, $this->mParserOptions, false ); |
141 | | - |
142 | 140 | return $ret->getText(); |
143 | 141 | } |
144 | 142 | |