r107647 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r107646‎ | r107647 | r107648 >
Date:19:03, 30 December 2011
Author:yaron
Status:ok
Tags:
Comment:
There is only one class for now upload window - SFUploadWindow
Modified paths:
  • /trunk/extensions/SemanticForms/SemanticForms.php (modified) (history)
  • /trunk/extensions/SemanticForms/specials/SF_UploadWindow.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/SemanticForms.php
@@ -127,14 +127,8 @@
128128 $wgSpecialPages['RunQuery'] = 'SFRunQuery';
129129 $wgAutoloadClasses['SFRunQuery'] = $sfgIP . '/specials/SF_RunQuery.php';
130130 $wgSpecialPageGroups['RunQuery'] = 'sf_group';
131 -// different upload-window class for MW 1.16+
132 -if ( class_exists( 'HTMLTextField' ) ) { // added in MW 1.16
133 - $wgSpecialPages['UploadWindow'] = 'SFUploadWindow2';
134 - $wgAutoloadClasses['SFUploadWindow2'] = $sfgIP . '/specials/SF_UploadWindow2.php';
135 -} else {
136 - $wgSpecialPages['UploadWindow'] = 'SFUploadWindow';
137 - $wgAutoloadClasses['SFUploadWindow'] = $sfgIP . '/specials/SF_UploadWindow.php';
138 -}
 131+$wgSpecialPages['UploadWindow'] = 'SFUploadWindow';
 132+$wgAutoloadClasses['SFUploadWindow'] = $sfgIP . '/specials/SF_UploadWindow.php';
139133 $wgAutoloadClasses['SFTemplateField'] = $sfgIP . '/includes/SF_TemplateField.php';
140134 $wgAutoloadClasses['SFForm'] = $sfgIP . '/includes/SF_Form.php';
141135 $wgAutoloadClasses['SFTemplateInForm'] = $sfgIP . '/includes/SF_TemplateInForm.php';
Index: trunk/extensions/SemanticForms/specials/SF_UploadWindow.php
@@ -1,7 +1,6 @@
22 <?php
33 /**
4 - * SFUploadWindow2 - used for uploading files from within a form, for
5 - * MediaWiki version 1.16+.
 4+ * SFUploadWindow - used for uploading files from within a form.
65 * This class is nearly identical to MediaWiki's SpecialUpload class, with
76 * a few changes to remove skin CSS and HTML, and to populate the relevant
87 * field in the form with the name of the uploaded form.
@@ -14,7 +13,7 @@
1514 /**
1615 * @ingroup SFSpecialPages
1716 */
18 -class SFUploadWindow2Proto extends UnlistedSpecialPage {
 17+class SFUploadWindowProto extends UnlistedSpecialPage {
1918 /**
2019 * Constructor : initialise object
2120 * Get data POSTed through the form and assign them to the object
@@ -1114,7 +1113,7 @@
11151114 /**
11161115 * Class variant for MW 1.18+
11171116 */
1118 - class SFUploadWindow2 extends SFUploadWindow2Proto {
 1117+ class SFUploadWindow extends SFUploadWindowProto {
11191118 /**
11201119 * This page can be shown if uploading is enabled.
11211120 * Handle permission checking elsewhere in order to be able to show
@@ -1135,7 +1134,7 @@
11361135 /**
11371136 * Class variant for MW up to 1.17
11381137 */
1139 - class SFUploadWindow2 extends SFUploadWindow2Proto {
 1138+ class SFUploadWindow extends SFUploadWindowProto {
11401139 /**
11411140 * This page can be shown if uploading is enabled.
11421141 * Handle permission checking elsewhere in order to be able to show

Status & tagging log