Index: trunk/extensions/InputBox/InputBox.classes.php |
— | — | @@ -287,15 +287,16 @@ |
288 | 288 | 'style' => 'background-color:' . $this->mBGColor |
289 | 289 | ) |
290 | 290 | ); |
291 | | - $htmlOut .= Xml::openElement( 'form', |
292 | | - array( |
293 | | - 'name' => 'createbox', |
294 | | - 'id' => 'createbox', |
295 | | - 'class' => 'createbox', |
296 | | - 'action' => $wgScript, |
297 | | - 'method' => 'get' |
298 | | - ) |
| 291 | + $createBoxParams = array( |
| 292 | + 'name' => 'createbox', |
| 293 | + 'class' => 'createbox', |
| 294 | + 'action' => $wgScript, |
| 295 | + 'method' => 'get' |
299 | 296 | ); |
| 297 | + if( isset( $this->mId ) ) { |
| 298 | + $createBoxParams['id'] = Sanitizer::escapeId( $this->mId ); |
| 299 | + } |
| 300 | + $htmlOut .= Xml::openElement( 'form', $createBoxParams ); |
300 | 301 | $htmlOut .= Xml::openElement( 'input', |
301 | 302 | array( |
302 | 303 | 'type' => 'hidden', |
— | — | @@ -381,15 +382,16 @@ |
382 | 383 | 'style' => 'background-color:' . $this->mBGColor |
383 | 384 | ) |
384 | 385 | ); |
385 | | - $htmlOut .= Xml::openElement( 'form', |
386 | | - array( |
387 | | - 'name' => 'commentbox', |
388 | | - 'id' => 'commentbox', |
389 | | - 'class' => 'commentbox', |
390 | | - 'action' => $wgScript, |
391 | | - 'method' => 'get' |
392 | | - ) |
| 386 | + $commentFormParams = array( |
| 387 | + 'name' => 'commentbox', |
| 388 | + 'class' => 'commentbox', |
| 389 | + 'action' => $wgScript, |
| 390 | + 'method' => 'get' |
393 | 391 | ); |
| 392 | + if( isset( $this->mId ) ) { |
| 393 | + $commentFormParams['id'] = Sanitizer::escapeId( $this->mId ); |
| 394 | + } |
| 395 | + $htmlOut .= Xml::openElement( 'form', $commentFormParams ); |
394 | 396 | $htmlOut .= Xml::openElement( 'input', |
395 | 397 | array( |
396 | 398 | 'type' => 'hidden', |