Index: trunk/extensions/inputbox/inputbox.php |
— | — | @@ -45,7 +45,7 @@ |
46 | 46 | */ |
47 | 47 | function renderInputbox($input, $params, &$parser) |
48 | 48 | { |
49 | | - $inputbox=new Inputbox(); |
| 49 | + $inputbox=new Inputbox( $parser ); |
50 | 50 | getBoxOption($inputbox->type,$input,'type'); |
51 | 51 | getBoxOption($inputbox->width,$input,'width',true); |
52 | 52 | getBoxOption($inputbox->preload,$input,'preload'); |
— | — | @@ -87,6 +87,10 @@ |
88 | 88 | var $type,$width,$preload,$editintro, $br; |
89 | 89 | var $defaulttext,$bgcolor,$buttonlabel,$searchbuttonlabel; |
90 | 90 | |
| 91 | + function InputBox( &$parser ) { |
| 92 | + $this->parser =& $parser; |
| 93 | + } |
| 94 | + |
91 | 95 | function render() { |
92 | 96 | if($this->type=='create' || $this->type=='comment') { |
93 | 97 | return $this->getCreateForm(); |
— | — | @@ -167,7 +171,7 @@ |
168 | 172 | } |
169 | 173 | |
170 | 174 | function getSearchForm2() { |
171 | | - global $wgUser, $wgOut; |
| 175 | + global $wgUser; |
172 | 176 | |
173 | 177 | $sk=$wgUser->getSkin(); |
174 | 178 | $searchpath = $sk->escapeSearchLink(); |
— | — | @@ -175,7 +179,9 @@ |
176 | 180 | $this->buttonlabel = wfMsgHtml( 'tryexact' ); |
177 | 181 | } |
178 | 182 | |
179 | | - $this->labeltext = $wgOut->parse( $this->labeltext, false ); |
| 183 | + $output = $this->parser->parse( $this->labeltext, |
| 184 | + $this->parser->mTitle, $this->parser->mOptions, false, false ); |
| 185 | + $this->labeltext = $output->getText(); |
180 | 186 | $this->labeltext = str_replace('<p>', '', $this->labeltext); |
181 | 187 | $this->labeltext = str_replace('</p>', '', $this->labeltext); |
182 | 188 | |
— | — | @@ -183,7 +189,7 @@ |
184 | 190 | <form action="$searchpath" class="bodySearch" id="bodySearch{$this->id}"><div class="bodySearchWrap"><label for="bodySearchIput{$this->id}">{$this->labeltext}</label><input type="text" name="search" size="{$this->width}" class="bodySearchIput" id="bodySearchIput{$this->id}" /><input type="submit" name="go" value="{$this->buttonlabel}" class="bodySearchBtnGo" /> |
185 | 191 | ENDFORM; |
186 | 192 | |
187 | | - if ( $this->fulltextbtn ) |
| 193 | + if ( !empty( $this->fulltextbtn ) ) // this is wrong... |
188 | 194 | $searchform .= '<input type="submit" name="fulltext" class="bodySearchBtnSearch" value="{$this->searchbuttonlabel}" />'; |
189 | 195 | |
190 | 196 | $searchform .= '</div></form>'; |