r79673 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r79672‎ | r79673 | r79674 >
Date:21:51, 5 January 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Improved error message and updated release notes
Modified paths:
  • /trunk/extensions/Push/Push.i18n.php (modified) (history)
  • /trunk/extensions/Push/Push.php (modified) (history)
  • /trunk/extensions/Push/RELEASE-NOTES (modified) (history)
  • /trunk/extensions/Push/includes/ext.push.tab.js (modified) (history)

Diff [purge]

Index: trunk/extensions/Push/Push.i18n.php
@@ -58,6 +58,7 @@
5959 'push-tab-no-embedded-files' => '(No files are embedded in this page.)',
6060 'push-tab-files-override' => 'These files already exist: $1',
6161 'push-tab-template-override' => 'These templates already exist: $1',
 62+ 'push-tab-err-uploaddisabled' => 'Uploads are not enabled. Make sure $wgEnableUploads and $wgAllowCopyUploads are set to true in LocalSettings.php of the target wiki.',
6263
6364 // Special page
6465 'special-push' => 'Push pages',
Index: trunk/extensions/Push/Push.php
@@ -94,6 +94,7 @@
9595 'push-tab-no-embedded-files',
9696 'push-tab-files-override',
9797 'push-tab-template-override',
 98+ 'push-tab-err-uploaddisabled'
9899 );
99100
100101 // For backward compatibility with MW < 1.17.
Index: trunk/extensions/Push/RELEASE-NOTES
@@ -4,6 +4,12 @@
55 Latest version of the release notes: http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/Push/RELEASE-NOTES?view=co
66
77
 8+=== Version 0.7 ===
 9+2011-01-xx
 10+
 11+* Fixed issue with non-existing, but embedded, images.
 12+* Added 2 hooks that allows modifying push requests before they are executed.
 13+
814 === Version 0.6 ===
915 2010-12-19
1016
Index: trunk/extensions/Push/includes/ext.push.tab.js
@@ -303,12 +303,14 @@
304304
305305 for ( i in data ) {
306306 if ( data[i].error ) {
307 - handleError( sender, targetUrl, { info: mediaWiki.msg( 'push-tab-err-filepush', data[i].error.info ) } );
 307+ data[i].error.info = mediaWiki.msg( 'push-tab-err-filepush', data[i].error.info );
 308+ handleError( sender, targetUrl, data[i].error );
308309 fail = true;
309310 break;
310311 }
311312 else if ( !data[i].upload ) {
312 - handleError( sender, targetUrl, { info: mediaWiki.msg( 'push-tab-err-filepush-unknown' ) } );
 313+ data[i].error.info = mediaWiki.msg( 'push-tab-err-filepush-unknown' );
 314+ handleError( sender, targetUrl, data[i].error );
313315 fail = true;
314316 break;
315317 }
@@ -351,6 +353,10 @@
352354 function handleError( sender, targetUrl, error ) {
353355 var errorDiv = $( '#targeterrors' + $(sender).attr( 'targetid' ) );
354356
 357+ if ( error.code && error.code == 'uploaddisabled' ) {
 358+ error.info = mediaWiki.msg( 'push-tab-err-uploaddisabled' );
 359+ }
 360+
355361 errorDiv.text( error.info );
356362 errorDiv.fadeIn( 'slow' );
357363

Follow-up revisions

RevisionCommit summaryAuthorDate
r79680Follow up to r79673jeroendedauw22:53, 5 January 2011

Status & tagging log