r25331 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r25330‎ | r25331 | r25332 >
Date:00:57, 31 August 2007
Author:yaron
Status:old
Tags:
Comment:
Fix for URLs in default style, removed failed attempt at backward compatibility
Modified paths:
  • /trunk/extensions/SemanticForms/includes/SF_ParserFunctions.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/includes/SF_ParserFunctions.php
@@ -35,8 +35,6 @@
3636 switch ( $langCode ) {
3737 default:
3838 $magicWords['forminput'] = array ( 0, 'forminput' );
39 - // for backward compatibility
40 - $magicWords['sf_forminput'] = array ( 0, 'forminput' );
4139 }
4240 return true;
4341 }
@@ -49,6 +47,12 @@
5048 <p><input type="text" name="page_name" size="$inSize" value="$inValue">
5149
5250 END;
 51+ // if the add page URL looks like "index.php?title=Special:AddPage"
 52+ // (i.e., it's in the default URL style), add in the title as a
 53+ // hidden value
 54+ if (($pos = strpos($ap_url, "title=")) > -1) {
 55+ $str .= ' <input type="hidden" name="title" value="' . substr($ap_url, $pos + 6) . '">' . "\n";
 56+ }
5357 if ($inFormName == '') {
5458 $str .= sffFormDropdownHTML();
5559 } else {

Status & tagging log