r101406 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r101405‎ | r101406 | r101407 >
Date:20:52, 31 October 2011
Author:foxtrott
Status:deferred
Tags:
Comment:
missing CSS for wikieditor, bugfix for textarea w autocompletion, bugfix (saving possible without permission)
Modified paths:
  • /trunk/extensions/SemanticForms/includes/forminputs/SF_TextAreaWithAutocompleteInput.php (modified) (history)
  • /trunk/extensions/SemanticForms/skins/SF_wikieditor.css (added) (history)
  • /trunk/extensions/SemanticForms/specials/SF_FormEdit.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/includes/forminputs/SF_TextAreaWithAutocompleteInput.php
@@ -64,7 +64,7 @@
6565 }
6666
6767 $jstext = <<<JAVASCRIPT
68 -jQuery(function(){ jQuery('#$input_id').SemanticForms_registerInputInit( ext.wikieditor.init, null ); });
 68+mediaWiki.loader.using( 'ext.semanticforms.wikieditor', function(){ jQuery('#$input_id').SemanticForms_registerInputInit( ext.wikieditor.init, null ); });
6969 JAVASCRIPT;
7070
7171 // write JS code directly to the page's code
Index: trunk/extensions/SemanticForms/skins/SF_wikieditor.css
@@ -0,0 +1,9 @@
 2+/**
 3+* Style sheet for the wikieditor
 4+*/
 5+
 6+textarea.wikieditor {
 7+ border: none;
 8+ padding: 0;
 9+ line-height: 1.5em;
 10+}
\ No newline at end of file
Property changes on: trunk/extensions/SemanticForms/skins/SF_wikieditor.css
___________________________________________________________________
Added: svn:eol-style
111 + native
Index: trunk/extensions/SemanticForms/specials/SF_FormEdit.php
@@ -277,6 +277,11 @@
278278
279279 if ( $save_page ) {
280280
 281+ $permErrors = $target_title->getUserPermissionsErrors( 'edit', $wgUser );
 282+ if ( $permErrors ) {
 283+ // just return the first error and let them fix it one by one
 284+ return array_shift( $permErrors );
 285+ }
281286 // Set up all the variables for the
282287 // page save.
283288 $data = array(