Index: trunk/extensions/Push/Push.i18n.php |
— | — | @@ -58,6 +58,7 @@ |
59 | 59 | 'push-tab-no-embedded-files' => '(No files are embedded in this page.)', |
60 | 60 | 'push-tab-files-override' => 'These files already exist: $1', |
61 | 61 | '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.', |
62 | 63 | |
63 | 64 | // Special page |
64 | 65 | 'special-push' => 'Push pages', |
Index: trunk/extensions/Push/Push.php |
— | — | @@ -94,6 +94,7 @@ |
95 | 95 | 'push-tab-no-embedded-files', |
96 | 96 | 'push-tab-files-override', |
97 | 97 | 'push-tab-template-override', |
| 98 | + 'push-tab-err-uploaddisabled' |
98 | 99 | ); |
99 | 100 | |
100 | 101 | // For backward compatibility with MW < 1.17. |
Index: trunk/extensions/Push/RELEASE-NOTES |
— | — | @@ -4,6 +4,12 @@ |
5 | 5 | Latest version of the release notes: http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/Push/RELEASE-NOTES?view=co |
6 | 6 | |
7 | 7 | |
| 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 | + |
8 | 14 | === Version 0.6 === |
9 | 15 | 2010-12-19 |
10 | 16 | |
Index: trunk/extensions/Push/includes/ext.push.tab.js |
— | — | @@ -303,12 +303,14 @@ |
304 | 304 | |
305 | 305 | for ( i in data ) { |
306 | 306 | 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 ); |
308 | 309 | fail = true; |
309 | 310 | break; |
310 | 311 | } |
311 | 312 | 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 ); |
313 | 315 | fail = true; |
314 | 316 | break; |
315 | 317 | } |
— | — | @@ -351,6 +353,10 @@ |
352 | 354 | function handleError( sender, targetUrl, error ) { |
353 | 355 | var errorDiv = $( '#targeterrors' + $(sender).attr( 'targetid' ) ); |
354 | 356 | |
| 357 | + if ( error.code && error.code == 'uploaddisabled' ) { |
| 358 | + error.info = mediaWiki.msg( 'push-tab-err-uploaddisabled' ); |
| 359 | + } |
| 360 | + |
355 | 361 | errorDiv.text( error.info ); |
356 | 362 | errorDiv.fadeIn( 'slow' ); |
357 | 363 | |