Property changes on: branches/wmf/1.17wmf1/skins/common/shared.css |
___________________________________________________________________ |
Modified: svn:mergeinfo |
1 | 1 | Merged /trunk/phase3/skins/common/shared.css:r83586-83587,83817,83876,83979,84118,84228 |
Index: branches/wmf/1.17wmf1/extensions/LiquidThreads/classes/Dispatch.php |
— | — | @@ -74,7 +74,7 @@ |
75 | 75 | $viewname = 'ThreadHistoricalRevisionView'; |
76 | 76 | } else if ( $action == 'watch' || $action == 'unwatch' ) { |
77 | 77 | $viewname = 'ThreadWatchView'; |
78 | | - } elseif ( $action == 'delete' ) { |
| 78 | + } elseif ( $action == 'delete' || $action == 'rollback' || $action == 'markpatrolled' ) { |
79 | 79 | return true; |
80 | 80 | } else { |
81 | 81 | $viewname = 'ThreadPermalinkView'; |
Index: branches/wmf/1.17wmf1/extensions/LiquidThreads/classes/Hooks.php |
— | — | @@ -452,16 +452,13 @@ |
453 | 453 | return true; |
454 | 454 | } |
455 | 455 | |
456 | | - LqtView::postEditUpdates( |
457 | | - 'editExisting', |
458 | | - null, |
459 | | - $article, |
460 | | - $thread->article(), |
461 | | - $thread->article(), |
462 | | - $summary, |
463 | | - $thread, |
464 | | - $text |
465 | | - ); |
| 456 | + LqtView::editMetadataUpdates( |
| 457 | + array( |
| 458 | + 'root' => $article, |
| 459 | + 'thread' => $thread, |
| 460 | + 'summary' => $summary, |
| 461 | + 'text' => $text, |
| 462 | + ) ); |
466 | 463 | |
467 | 464 | return true; |
468 | 465 | } |
Index: branches/wmf/1.17wmf1/extensions/WikiEditor/WikiEditor.php |
— | — | @@ -60,6 +60,7 @@ |
61 | 61 | $wgHooks['EditPage::showEditForm:initial'][] = 'WikiEditorHooks::editPageShowEditFormInitial'; |
62 | 62 | $wgHooks['GetPreferences'][] = 'WikiEditorHooks::getPreferences'; |
63 | 63 | $wgHooks['MakeGlobalVariablesScript'][] = 'WikiEditorHooks::makeGlobalVariablesScript'; |
| 64 | +$wgHooks['MakeGlobalVariablesScript'][] = 'WikiEditorHooks::makeGlobalVariablesScript'; |
64 | 65 | |
65 | 66 | $wikiEditorTpl = array( |
66 | 67 | 'localBasePath' => dirname( __FILE__ ) . '/modules', |
Index: branches/wmf/1.17wmf1/extensions/WikiEditor/WikiEditor.hooks.php |
— | — | @@ -253,4 +253,17 @@ |
254 | 254 | } |
255 | 255 | return true; |
256 | 256 | } |
| 257 | + |
| 258 | + public static function makeGlobalVariablesScript( &$vars ) { |
| 259 | + global $wgWikiEditorFeatures; |
| 260 | + |
| 261 | + // Build and export old-style wgWikiEditorEnabledModules object for back compat |
| 262 | + $enabledModules = array(); |
| 263 | + foreach ( self::$features as $name => $feature ) { |
| 264 | + $enabledModules[$name] = self::isEnabled( $name ); |
| 265 | + } |
| 266 | + |
| 267 | + $vars['wgWikiEditorEnabledModules'] = $enabledModules; |
| 268 | + return true; |
| 269 | + } |
257 | 270 | } |
Property changes on: branches/wmf/1.17wmf1/extensions/WikiEditor/WikiEditor.hooks.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
258 | 271 | Merged /trunk/phase3/extensions/WikiEditor/WikiEditor.hooks.php:r83586-83587,83817,83876,83979,84118,84228 |
259 | 272 | Merged /trunk/extensions/WikiEditor/WikiEditor.hooks.php:r76372,76377,82181,83586-83587,83817,83876,83979,84118,84228 |
Index: branches/wmf/1.17wmf1/extensions/Vector/Vector.php |
— | — | @@ -59,6 +59,7 @@ |
60 | 60 | $wgHooks['BeforePageDisplay'][] = 'VectorHooks::beforePageDisplay'; |
61 | 61 | $wgHooks['GetPreferences'][] = 'VectorHooks::getPreferences'; |
62 | 62 | $wgHooks['ResourceLoaderGetConfigVars'][] = 'VectorHooks::resourceLoaderGetConfigVars'; |
| 63 | +$wgHooks['MakeGlobalVariablesScript'][] = 'VectorHooks::makeGlobalVariablesScript'; |
63 | 64 | |
64 | 65 | $vectorResourceTemplate = array( |
65 | 66 | 'localBasePath' => dirname( __FILE__ ) . '/modules', |
Property changes on: branches/wmf/1.17wmf1/extensions/Vector/Vector.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
66 | 67 | Merged /trunk/extensions/Vector/Vector.php:r76372,76377,82181,83586-83587,83817,83876,83979,84118,84228 |
67 | 68 | Merged /trunk/phase3/extensions/Vector/Vector.php:r83586-83587,83817,83876,83979,84118,84228 |
Index: branches/wmf/1.17wmf1/extensions/Vector/modules/ext.vector.simpleSearch.js |
— | — | @@ -78,8 +78,9 @@ |
79 | 79 | positionFromLeft: $( 'body' ).is( '.rtl' ), |
80 | 80 | highlightInput: true |
81 | 81 | } ) |
82 | | - .bind( 'paste cut', function( e ) { |
83 | | - // make sure paste and cut events from the mouse trigger the keypress handler and cause the suggestions to update |
| 82 | + .bind( 'paste cut drop', function( e ) { |
| 83 | + // make sure paste and cut events from the mouse and drag&drop events |
| 84 | + // trigger the keypress handler and cause the suggestions to update |
84 | 85 | $( this ).trigger( 'keypress' ); |
85 | 86 | } ); |
86 | 87 | // Special suggestions functionality for skin-provided search box |
Property changes on: branches/wmf/1.17wmf1/extensions/Vector/modules/ext.vector.simpleSearch.js |
___________________________________________________________________ |
Modified: svn:mergeinfo |
87 | 88 | Merged /trunk/extensions/Vector/modules/ext.vector.simpleSearch.js:r76372,76377,82181,83586-83587,83817,83876,83979,84118,84228 |
Index: branches/wmf/1.17wmf1/extensions/Vector/Vector.hooks.php |
— | — | @@ -174,4 +174,17 @@ |
175 | 175 | } |
176 | 176 | return true; |
177 | 177 | } |
| 178 | + |
| 179 | + public static function makeGlobalVariablesScript( &$vars ) { |
| 180 | + global $wgVectorFeatures; |
| 181 | + |
| 182 | + // Build and export old-style wgVectorEnabledModules object for back compat |
| 183 | + $enabledModules = array(); |
| 184 | + foreach ( self::$features as $name => $feature ) { |
| 185 | + $enabledModules[$name] = self::isEnabled( $name ); |
| 186 | + } |
| 187 | + |
| 188 | + $vars['wgVectorEnabledModules'] = $enabledModules; |
| 189 | + return true; |
| 190 | + } |
178 | 191 | } |
Index: branches/wmf/1.17wmf1/extensions/Renameuser/Renameuser_body.php |
— | — | @@ -544,13 +544,12 @@ |
545 | 545 | } |
546 | 546 | $dbw->freeResult( $res ); |
547 | 547 | } |
548 | | - // @FIXME: batchInsert() commits per 50 jobs, |
549 | | - // which sucks if the DB is rolled-back... |
| 548 | + |
550 | 549 | if ( count( $jobs ) > 0 ) { |
551 | | - Job::batchInsert( $jobs ); |
| 550 | + Job::safeBatchInsert( $jobs ); // don't commit yet |
552 | 551 | } |
553 | 552 | |
554 | | - // Commit the transaction (though batchInsert() above commits) |
| 553 | + // Commit the transaction |
555 | 554 | $dbw->commit(); |
556 | 555 | |
557 | 556 | // Delete from memcached again to make sure |
Index: branches/wmf/1.17wmf1/includes/upload/UploadBase.php |
— | — | @@ -415,7 +415,7 @@ |
416 | 416 | |
417 | 417 | $overwriteError = $this->checkOverwrite( $user ); |
418 | 418 | if ( $overwriteError !== true ) { |
419 | | - return array( array( $overwriteError ) ); |
| 419 | + return array( $overwriteError ); |
420 | 420 | } |
421 | 421 | |
422 | 422 | return true; |
— | — | @@ -1016,14 +1016,14 @@ |
1017 | 1017 | * Check if there's an overwrite conflict and, if so, if restrictions |
1018 | 1018 | * forbid this user from performing the upload. |
1019 | 1019 | * |
1020 | | - * @return mixed true on success, error string on failure |
| 1020 | + * @return mixed true on success, array on failure |
1021 | 1021 | */ |
1022 | 1022 | private function checkOverwrite( $user ) { |
1023 | 1023 | // First check whether the local file can be overwritten |
1024 | 1024 | $file = $this->getLocalFile(); |
1025 | 1025 | if( $file->exists() ) { |
1026 | 1026 | if( !self::userCanReUpload( $user, $file ) ) { |
1027 | | - return 'fileexists-forbidden'; |
| 1027 | + return array( 'fileexists-forbidden', $file->getName() ); |
1028 | 1028 | } else { |
1029 | 1029 | return true; |
1030 | 1030 | } |
— | — | @@ -1034,7 +1034,7 @@ |
1035 | 1035 | */ |
1036 | 1036 | $file = wfFindFile( $this->getTitle() ); |
1037 | 1037 | if ( $file && !$user->isAllowed( 'reupload-shared' ) ) { |
1038 | | - return 'fileexists-shared-forbidden'; |
| 1038 | + return array( 'fileexists-shared-forbidden', $file->getName() ); |
1039 | 1039 | } |
1040 | 1040 | |
1041 | 1041 | return true; |
Property changes on: branches/wmf/1.17wmf1/includes/upload/UploadBase.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
1042 | 1042 | Merged /trunk/phase3/includes/upload/UploadBase.php:r83586-83587,83817,83876,83979,84118,84228 |
Index: branches/wmf/1.17wmf1/includes/PrefixSearch.php |
— | — | @@ -107,7 +107,11 @@ |
108 | 108 | foreach( $keys as $pageKey => $page ) { |
109 | 109 | if( $searchKey === '' || strpos( $pageKey, $searchKey ) === 0 ) { |
110 | 110 | wfSuppressWarnings(); |
111 | | - $srchres[] = SpecialPage::getTitleFor( $page )->getPrefixedText(); |
| 111 | + // bug 27671: Don't use SpecialPage::getTitleFor() here because it |
| 112 | + // localizes its input leading to searches for e.g. Special:All |
| 113 | + // returning Spezial:MediaWiki-Systemnachrichten and returning |
| 114 | + // Spezial:Alle_Seiten twice when $wgLanguageCode == 'de' |
| 115 | + $srchres[] = Title::makeTitleSafe( NS_SPECIAL, $page )->getPrefixedText(); |
112 | 116 | wfRestoreWarnings(); |
113 | 117 | } |
114 | 118 | |
Index: branches/wmf/1.17wmf1/includes/job/JobQueue.php |
— | — | @@ -216,12 +216,12 @@ |
217 | 217 | * @param $jobs array of Job objects |
218 | 218 | */ |
219 | 219 | static function batchInsert( $jobs ) { |
220 | | - if( !count( $jobs ) ) { |
| 220 | + if ( !count( $jobs ) ) { |
221 | 221 | return; |
222 | 222 | } |
223 | 223 | $dbw = wfGetDB( DB_MASTER ); |
224 | 224 | $rows = array(); |
225 | | - foreach( $jobs as $job ) { |
| 225 | + foreach ( $jobs as $job ) { |
226 | 226 | $rows[] = $job->insertFields(); |
227 | 227 | if ( count( $rows ) >= 50 ) { |
228 | 228 | # Do a small transaction to avoid slave lag |
— | — | @@ -231,14 +231,42 @@ |
232 | 232 | $rows = array(); |
233 | 233 | } |
234 | 234 | } |
235 | | - if ( $rows ) { |
236 | | - wfIncrStats( 'job-insert', count( $rows ) ); |
| 235 | + if ( $rows ) { // last chunk |
237 | 236 | $dbw->begin(); |
238 | 237 | $dbw->insert( 'job', $rows, __METHOD__, 'IGNORE' ); |
239 | 238 | $dbw->commit(); |
240 | 239 | } |
| 240 | + wfIncrStats( 'job-insert', count( $jobs ) ); |
241 | 241 | } |
242 | 242 | |
| 243 | + /** |
| 244 | + * Insert a group of jobs into the queue. |
| 245 | + * |
| 246 | + * Same as batchInsert() but does not commit and can thus |
| 247 | + * be rolled-back as part of a larger transaction. However, |
| 248 | + * large batches of jobs can cause slave lag. |
| 249 | + * |
| 250 | + * @param $jobs array of Job objects |
| 251 | + */ |
| 252 | + static function safeBatchInsert( $jobs ) { |
| 253 | + if ( !count( $jobs ) ) { |
| 254 | + return; |
| 255 | + } |
| 256 | + $dbw = wfGetDB( DB_MASTER ); |
| 257 | + $rows = array(); |
| 258 | + foreach ( $jobs as $job ) { |
| 259 | + $rows[] = $job->insertFields(); |
| 260 | + if ( count( $rows ) >= 500 ) { |
| 261 | + $dbw->insert( 'job', $rows, __METHOD__, 'IGNORE' ); |
| 262 | + $rows = array(); |
| 263 | + } |
| 264 | + } |
| 265 | + if ( $rows ) { // last chunk |
| 266 | + $dbw->insert( 'job', $rows, __METHOD__, 'IGNORE' ); |
| 267 | + } |
| 268 | + wfIncrStats( 'job-insert', count( $jobs ) ); |
| 269 | + } |
| 270 | + |
243 | 271 | /*------------------------------------------------------------------------- |
244 | 272 | * Non-static functions |
245 | 273 | *------------------------------------------------------------------------*/ |
Property changes on: branches/wmf/1.17wmf1/includes/job/JobQueue.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
246 | 274 | Merged /trunk/phase3/includes/job/JobQueue.php:r83586-83587,83817,83876,83979,84118,84228 |
Index: branches/wmf/1.17wmf1/includes/specials/SpecialListfiles.php |
— | — | @@ -235,9 +235,19 @@ |
236 | 236 | if ( !is_null( $this->mUserName ) ) { |
237 | 237 | # Append the username to the query string |
238 | 238 | foreach ( $queries as &$query ) { |
239 | | - $query['username'] = $this->mUserName; |
| 239 | + $query['user'] = $this->mUserName; |
240 | 240 | } |
241 | 241 | } |
242 | 242 | return $queries; |
243 | 243 | } |
| 244 | + |
| 245 | + function getDefaultQuery() { |
| 246 | + $queries = parent::getDefaultQuery(); |
| 247 | + if ( !isset( $queries['user'] ) |
| 248 | + && !is_null( $this->mUserName ) ) |
| 249 | + { |
| 250 | + $queries['user'] = $this->mUserName; |
| 251 | + } |
| 252 | + return $queries; |
| 253 | + } |
244 | 254 | } |
Index: branches/wmf/1.17wmf1/includes/specials/SpecialUpload.php |
— | — | @@ -448,8 +448,8 @@ |
449 | 449 | $permErrors = $this->mUpload->verifyPermissions( $wgUser ); |
450 | 450 | if( $permErrors !== true ) { |
451 | 451 | $code = array_shift( $permErrors[0] ); |
452 | | - $this->showRecoverableUploadError( wfMsgExt( $code, |
453 | | - 'parseinline', $permErrors[0] ) ); |
| 452 | + $this->showRecoverableUploadError( wfMsgExt( $code[0], |
| 453 | + 'parseinline', $code[1] ) ); |
454 | 454 | return; |
455 | 455 | } |
456 | 456 | |
Property changes on: branches/wmf/1.17wmf1/includes/specials/SpecialUpload.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
457 | 457 | Merged /trunk/phase3/includes/specials/SpecialUpload.php:r83586-83587,83817,83876,83979,84118,84228 |
Index: branches/wmf/1.17wmf1/RELEASE-NOTES |
— | — | @@ -493,7 +493,9 @@ |
494 | 494 | * (bug 27560) Search queries no longer fail in walloon language |
495 | 495 | * (bug 27700) The upload protection can now also be set for files that do not |
496 | 496 | exist. |
497 | | - |
| 497 | +* (bug 28034) uploading file to local wiki when file exists on shared repository |
| 498 | + (commons) gives spurious info in the warning message |
| 499 | + |
498 | 500 | === API changes in 1.17 === |
499 | 501 | * BREAKING CHANGE: action=patrol now requires POST |
500 | 502 | * BREAKING CHANGE: patrol token is no longer the same as edit token |
Property changes on: branches/wmf/1.17wmf1/RELEASE-NOTES |
___________________________________________________________________ |
Modified: svn:mergeinfo |
501 | 503 | Merged /trunk/phase3/RELEASE-NOTES:r83586-83587,83817,83876,83979,84118,84228 |
Index: branches/wmf/1.17wmf1/resources/jquery/jquery.placeholder.js |
— | — | @@ -37,9 +37,33 @@ |
38 | 38 | } ) |
39 | 39 | |
40 | 40 | // Hide on focus |
41 | | - .focus( function() { |
| 41 | + // Also listen for other events in case $input was |
| 42 | + // already focused when the events were bound |
| 43 | + .bind( 'focus drop keydown paste', function( e ) { |
42 | 44 | if ($input.hasClass('placeholder')) { |
43 | | - this.value = ''; |
| 45 | + if ( e.type == 'drop' && e.originalEvent.dataTransfer ) { |
| 46 | + // Support for drag&drop. Instead of inserting the dropped |
| 47 | + // text somewhere in the middle of the placeholder string, |
| 48 | + // we want to set the contents of the search box to the |
| 49 | + // dropped text. |
| 50 | + |
| 51 | + // IE wants getData( 'text' ) but Firefox wants getData( 'text/plain' ) |
| 52 | + // Firefox fails gracefully with an empty string, IE barfs with an error |
| 53 | + try { |
| 54 | + // Try the Firefox way |
| 55 | + this.value = e.originalEvent.dataTransfer.getData( 'text/plain' ); |
| 56 | + } catch ( exception ) { |
| 57 | + // Got an exception, so use the IE way |
| 58 | + this.value = e.originalEvent.dataTransfer.getData( 'text' ); |
| 59 | + } |
| 60 | + |
| 61 | + // On Firefox, drop fires after the dropped text has been inserted, |
| 62 | + // but on IE it fires before. If we don't prevent the default action, |
| 63 | + // IE will insert the dropped text twice. |
| 64 | + e.preventDefault(); |
| 65 | + } else { |
| 66 | + this.value = ''; |
| 67 | + } |
44 | 68 | $input.removeClass( 'placeholder' ); |
45 | 69 | } |
46 | 70 | } ); |