r40708 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r40707‎ | r40708 | r40709 >
Date:18:27, 10 September 2008
Author:yaron
Status:old
Tags:
Comment:
Fixed handling of automatic-page-name forms, and forms with preloaded content
Modified paths:
  • /trunk/extensions/SemanticForms/specials/SF_AddData.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/specials/SF_AddData.php
@@ -118,7 +118,7 @@
119119 // get 'preload' query value, if it exists
120120 if (!$form_submitted && $wgRequest->getCheck('preload')) {
121121 $page_is_source = true;
122 - $page_contents = $sfgFormPrinter->getPreloadedText($wgRequest->getVal('preload'));
 122+ $page_contents = SFFormUtils::getPreloadedText($wgRequest->getVal('preload'));
123123 } else {
124124 $page_is_source = false;
125125 $page_contents = null;
@@ -130,6 +130,8 @@
131131 // append a namespace, if one was specified
132132 if ($wgRequest->getCheck('namespace')) {
133133 $target_name = $wgRequest->getVal('namespace') . ':' . $generated_page_name;
 134+ } else {
 135+ $target_name = $generated_page_name;
134136 }
135137 // replace "unique number" tag with one that
136138 // won't get erased by the next line

Status & tagging log