r25131 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r25130‎ | r25131 | r25132 >
Date:13:05, 25 August 2007
Author:brion
Status:old
Tags:
Comment:
Bug 10006 -- arrange form to pass special page title in the form so it doesn't break on ugly-URLs installations
Modified paths:
  • /trunk/extensions/CategoryTree/CategoryTreePage.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CategoryTree/CategoryTreePage.php
@@ -97,9 +97,11 @@
9898 * Input form for entering a category
9999 */
100100 function makeInputForm() {
 101+ global $wgScript;
101102 $thisTitle = Title::makeTitle( NS_SPECIAL, $this->getName() );
102103 $form = '';
103 - $form .= wfOpenElement( 'form', array( 'name' => 'categorytree', 'method' => 'get', 'action' => $thisTitle->getLocalUrl() ) );
 104+ $form .= wfOpenElement( 'form', array( 'name' => 'categorytree', 'method' => 'get', 'action' => $wgScript ) );
 105+ $form .= wfElement( 'input', array( 'type' => 'hidden', 'name' => 'title', 'value' => $thisTitle->getPrefixedDbKey() ) );
104106 $form .= wfElement( 'label', array( 'for' => 'target' ), wfMsg( 'categorytree-category' ) ) . ' ';
105107 $form .= wfElement( 'input', array( 'type' => 'text', 'name' => 'target', 'id' => 'target', 'value' => $this->target ) ) . ' ';
106108 $form .= wfOpenElement( 'select', array( 'name' => 'mode' ) );

Status & tagging log