r113080 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r113079‎ | r113080 | r113081 >
Date:20:40, 5 March 2012
Author:yaron
Status:deferred
Tags:
Comment:
More changes to comments and code now that MW 1.16 is no longer supported
Modified paths:
  • /trunk/extensions/SemanticForms/includes/SF_FormPrinter.php (modified) (history)
  • /trunk/extensions/SemanticForms/includes/forminputs/SF_TextInput.php (modified) (history)
  • /trunk/extensions/SemanticForms/specials/SF_RunQuery.php (modified) (history)
  • /trunk/extensions/SemanticForms/specials/SF_UploadWindow.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/specials/SF_RunQuery.php
@@ -158,8 +158,9 @@
159159 }
160160 }
161161
162 - // Finally, set the page title - for MW 1.16, this has to be
163 - // called after addParserOutputNoText() for it to take effect.
 162+ // Finally, set the page title - previously, this had to be
 163+ // called after addParserOutputNoText() for it to take effect;
 164+ // now the order doesn't matter.
164165 if ( !$embedded ) {
165166 if ( $form_page_title != null ) {
166167 $wgOut->setPageTitle( $form_page_title );
Index: trunk/extensions/SemanticForms/specials/SF_UploadWindow.php
@@ -94,7 +94,7 @@
9595 if ( $this->mSourceType == 'file' && $token == null ) {
9696 // Skip token check for file uploads as that can't be faked via JS...
9797 // Some client-side tools don't expect to need to send wpEditToken
98 - // with their submissions, as that's new in 1.16.
 98+ // with their submissions, as that was new in 1.16.
9999 $this->mTokenOk = true;
100100 } else {
101101 $this->mTokenOk = $wgUser->matchEditToken( $token );
Index: trunk/extensions/SemanticForms/includes/SF_FormPrinter.php
@@ -389,8 +389,8 @@
390390 if ( ! $form_submitted && ( $this->mPageTitle && !$this->mPageTitle->exists() ) ) {
391391 $this->showDeletionLog( $wgOut );
392392 }
393 - // Unfortunately, we can't just call userCan() here because, as of MW 1.16,
394 - // it has a bug in which it ignores a setting of
 393+ // Unfortunately, we can't just call userCan() here because,
 394+ // since MW 1.16, it has a bug in which it ignores a setting of
395395 // "$wgEmailConfirmToEdit = true;". Instead, we'll just get the
396396 // permission errors from the start, and use those to determine whether
397397 // the page is editable.
Index: trunk/extensions/SemanticForms/includes/forminputs/SF_TextInput.php
@@ -104,12 +104,8 @@
105105 }
106106 $upload_window_url = $upload_window_page->getTitle()->getFullURL( $query_string );
107107 $upload_label = wfMsg( 'upload' );
108 - // window needs to be bigger for MediaWiki version 1.16+
109 - if ( class_exists( 'HTMLForm' ) ) {
110 - $style = "width:650 height:500";
111 - } else {
112 - $style = '';
113 - }
 108+ // We need to set the size by default.
 109+ $style = "width:650 height:500";
114110
115111 $cssClasses = array( 'sfFancyBox', 'sfUploadable' );
116112