Index: branches/REL1_19/phase3/RELEASE-NOTES-1.19 |
— | — | @@ -271,8 +271,13 @@ |
272 | 272 | * (bug 28936, bug 5280) Broken or invalid titles can't be removed from watchlist. |
273 | 273 | * (bug 34600) Older skins using useHeadElement=false were broken in 1.18. |
274 | 274 | * (bug 34604) [mw.config] wgActionPaths should be an object instead of a numeral |
275 | | - array. |
276 | | -* (bug 12262) Indents and lists are now aligned |
| 275 | + array.* (bug 12262) Indents and lists are now aligned |
| 276 | +* (bug 29753) mw.util.tooltipAccessKeyPrefix should be alt-shift for Chrome |
| 277 | + on Windows |
| 278 | +* (bug 25095) Special:Categories should also include the first relevant item |
| 279 | + when "from" is filled. |
| 280 | +* (bug 34972) An error occurred while changing your watchlist settings for |
| 281 | + [[Special:WhatLinksHere/Example]] |
277 | 282 | |
278 | 283 | === API changes in 1.19 === |
279 | 284 | * Made action=edit less likely to return "unknownerror", by returning the actual error |
— | — | @@ -309,6 +314,8 @@ |
310 | 315 | calling action=purge&forcelinkupdate. |
311 | 316 | * (bug 34377) action=watch now parses messages using the correct title instead |
312 | 317 | of "API". |
| 318 | +* (bug 35036) WikiLove messages were not automatically updated in JavaScript |
| 319 | + after having been changed on-wiki due to a bug in core |
313 | 320 | |
314 | 321 | === Languages updated in 1.19 === |
315 | 322 | |
Index: branches/REL1_19/phase3/includes/filerepo/file/LocalFile.php |
— | — | @@ -907,7 +907,10 @@ |
908 | 908 | $this->lock(); // begin |
909 | 909 | $status = $this->publish( $srcPath, $flags ); |
910 | 910 | |
911 | | - if ( $status->ok ) { |
| 911 | + if ( $status->successCount > 0 ) { |
| 912 | + # Essentially we are displacing any existing current file and saving |
| 913 | + # a new current file at the old location. If just the first succeeded, |
| 914 | + # we still need to displace the current DB entry and put in a new one. |
912 | 915 | if ( !$this->recordUpload2( $status->value, $comment, $pageText, $props, $timestamp, $user ) ) { |
913 | 916 | $status->fatal( 'filenotfound', $srcPath ); |
914 | 917 | } |
— | — | @@ -1004,8 +1007,12 @@ |
1005 | 1008 | ); |
1006 | 1009 | |
1007 | 1010 | if ( $dbw->affectedRows() == 0 ) { |
1008 | | - if ( $oldver == '' ) { |
1009 | | - throw new MWException( "Empty oi_archive_name. Database and storage out of sync?" ); |
| 1011 | + if ( $oldver == '' ) { // XXX |
| 1012 | + # (bug 34993) publish() can displace the current file and yet fail to save |
| 1013 | + # a new one. The next publish attempt will treat the file as a brand new file |
| 1014 | + # and pass an empty $oldver. Allow this bogus value so we can displace the |
| 1015 | + # `image` row to `oldimage`, leaving room for the new current file `image` row. |
| 1016 | + #throw new MWException( "Empty oi_archive_name. Database and storage out of sync?" ); |
1010 | 1017 | } |
1011 | 1018 | $reupload = true; |
1012 | 1019 | # Collision, this is an update of a file |
Index: branches/REL1_19/phase3/includes/OutputPage.php |
— | — | @@ -2839,6 +2839,10 @@ |
2840 | 2840 | $ns = $title->getNamespace(); |
2841 | 2841 | $nsname = MWNamespace::exists( $ns ) ? MWNamespace::getCanonicalName( $ns ) : $title->getNsText(); |
2842 | 2842 | |
| 2843 | + // Get the relevant title so that AJAX features can use the correct page name |
| 2844 | + // when making API requests from certain special pages (bug 34972). |
| 2845 | + $relevantTitle = $this->getSkin()->getRelevantTitle(); |
| 2846 | + |
2843 | 2847 | if ( $ns == NS_SPECIAL ) { |
2844 | 2848 | list( $canonicalName, /*...*/ ) = SpecialPageFactory::resolveAlias( $title->getDBkey() ); |
2845 | 2849 | } elseif ( $this->canUseWikiPage() ) { |
— | — | @@ -2880,6 +2884,7 @@ |
2881 | 2885 | 'wgPageContentLanguage' => $lang->getCode(), |
2882 | 2886 | 'wgSeparatorTransformTable' => $compactSeparatorTransTable, |
2883 | 2887 | 'wgDigitTransformTable' => $compactDigitTransTable, |
| 2888 | + 'wgRelevantPageName' => $relevantTitle->getPrefixedDBKey(), |
2884 | 2889 | ); |
2885 | 2890 | if ( $lang->hasVariants() ) { |
2886 | 2891 | $vars['wgUserVariant'] = $lang->getPreferredVariant(); |
Property changes on: branches/REL1_19/phase3/includes/OutputPage.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
2887 | 2892 | Merged /trunk/phase3/includes/OutputPage.php:r113737,113758 |
Index: branches/REL1_19/phase3/includes/resourceloader/ResourceLoaderModule.php |
— | — | @@ -357,6 +357,10 @@ |
358 | 358 | * timestamps. Whenever anything happens that changes the module's |
359 | 359 | * contents for these parameters, the mtime should increase. |
360 | 360 | * |
| 361 | + * NOTE: The mtime of the module's messages is NOT automatically included. |
| 362 | + * If you want this to happen, you'll need to call getMsgBlobMtime() |
| 363 | + * yourself and take its result into consideration. |
| 364 | + * |
361 | 365 | * @param $context ResourceLoaderContext: Context object |
362 | 366 | * @return Integer: UNIX timestamp |
363 | 367 | */ |
Index: branches/REL1_19/phase3/includes/resourceloader/ResourceLoaderWikiModule.php |
— | — | @@ -157,6 +157,7 @@ |
158 | 158 | if ( count( $mtimes ) ) { |
159 | 159 | $modifiedTime = max( $modifiedTime, max( $mtimes ) ); |
160 | 160 | } |
| 161 | + $modifiedTime = max( $modifiedTime, $this->getMsgBlobMtime( $context->getLanguage() ) ); |
161 | 162 | return $modifiedTime; |
162 | 163 | } |
163 | 164 | |
Index: branches/REL1_19/phase3/includes/specials/SpecialUndelete.php |
— | — | @@ -405,13 +405,12 @@ |
406 | 406 | $article->loadPageData( 'fromdbmaster' ); |
407 | 407 | $oldcountable = $article->isCountable(); |
408 | 408 | |
409 | | - $options = 'FOR UPDATE'; // lock page |
410 | 409 | $page = $dbw->selectRow( 'page', |
411 | 410 | array( 'page_id', 'page_latest' ), |
412 | 411 | array( 'page_namespace' => $this->title->getNamespace(), |
413 | 412 | 'page_title' => $this->title->getDBkey() ), |
414 | 413 | __METHOD__, |
415 | | - $options |
| 414 | + array( 'FOR UPDATE' ) // lock page |
416 | 415 | ); |
417 | 416 | if( $page ) { |
418 | 417 | $makepage = false; |
Index: branches/REL1_19/phase3/includes/specials/SpecialNewpages.php |
— | — | @@ -356,7 +356,14 @@ |
357 | 357 | |
358 | 358 | $css = count( $classes ) ? ' class="' . implode( ' ', $classes ) . '"' : ''; |
359 | 359 | |
360 | | - return "<li{$css}>{$time} {$dm}{$plink} {$hist} {$dm}{$length} {$dm}{$ulink} {$comment} {$tagDisplay}</li>\n"; |
| 360 | + # Display the old title if the namespace has been changed |
| 361 | + $oldTitleText = ''; |
| 362 | + if ( $result->page_namespace !== $result->rc_namespace ) { |
| 363 | + $oldTitleText = wfMessage( 'rc-old-title' )->params( Title::makeTitle( $result->rc_namespace, $result->rc_title ) |
| 364 | + ->getPrefixedText() )->escaped(); |
| 365 | + } |
| 366 | + |
| 367 | + return "<li{$css}>{$time} {$dm}{$plink} {$hist} {$dm}{$length} {$dm}{$ulink} {$comment} {$tagDisplay} {$oldTitleText}</li>\n"; |
361 | 368 | } |
362 | 369 | |
363 | 370 | /** |
Index: branches/REL1_19/phase3/includes/specials/SpecialCategories.php |
— | — | @@ -59,12 +59,16 @@ |
60 | 60 | * @ingroup SpecialPage Pager |
61 | 61 | */ |
62 | 62 | class CategoryPager extends AlphabeticPager { |
| 63 | + private $conds = array( 'cat_pages > 0' ); |
| 64 | + |
63 | 65 | function __construct( IContextSource $context, $from ) { |
64 | 66 | parent::__construct( $context ); |
65 | 67 | $from = str_replace( ' ', '_', $from ); |
66 | 68 | if( $from !== '' ) { |
67 | 69 | $from = Title::capitalize( $from, NS_CATEGORY ); |
68 | | - $this->mOffset = $from; |
| 70 | + $dbr = wfGetDB( DB_SLAVE ); |
| 71 | + $this->conds[] = 'cat_title >= ' . $dbr->addQuotes( $from ); |
| 72 | + $this->setOffset( '' ); |
69 | 73 | } |
70 | 74 | } |
71 | 75 | |
— | — | @@ -72,7 +76,7 @@ |
73 | 77 | return array( |
74 | 78 | 'tables' => array( 'category' ), |
75 | 79 | 'fields' => array( 'cat_title','cat_pages' ), |
76 | | - 'conds' => array( 'cat_pages > 0' ), |
| 80 | + 'conds' => $this->conds, |
77 | 81 | 'options' => array( 'USE INDEX' => 'cat_title' ), |
78 | 82 | ); |
79 | 83 | } |
Property changes on: branches/REL1_19/phase3/includes/specials |
___________________________________________________________________ |
Modified: svn:mergeinfo |
80 | 84 | Merged /trunk/phase3/includes/specials:r112918,113214,113268,113277,113312,113415,113454,113737,113758,113892 |
Property changes on: branches/REL1_19/phase3/includes |
___________________________________________________________________ |
Modified: svn:mergeinfo |
81 | 85 | Merged /trunk/phase3/includes:r112918,113214,113268,113277,113312,113415,113454,113737,113758,113892 |
Index: branches/REL1_19/phase3/languages/messages/MessagesQqq.php |
— | — | @@ -1790,6 +1790,7 @@ |
1791 | 1791 | Does not work under $wgMiserMode ([[mwr:48986|r48986]]).', |
1792 | 1792 | 'rc-change-size-new' => 'Tooltip when hovering a change list diff size. The tooltip shows the resulting new size in bytes.', |
1793 | 1793 | 'newsectionsummary' => 'Default summary when adding a new section to a page.', |
| 1794 | +'rc-old-title' => 'Text that shows the original title of a page, $1 is the original title text', |
1794 | 1795 | |
1795 | 1796 | # Recent changes linked |
1796 | 1797 | 'recentchangeslinked' => 'Title of [[Special:RecentChangesLinked]] and display name of page on [[Special:SpecialPages]].', |
Index: branches/REL1_19/phase3/languages/messages/MessagesEn.php |
— | — | @@ -2066,6 +2066,7 @@ |
2067 | 2067 | 'newsectionsummary' => '/* $1 */ new section', |
2068 | 2068 | 'rc-enhanced-expand' => 'Show details (requires JavaScript)', |
2069 | 2069 | 'rc-enhanced-hide' => 'Hide details', |
| 2070 | +'rc-old-title' => 'originally created as "$1"', |
2070 | 2071 | |
2071 | 2072 | # Recent changes linked |
2072 | 2073 | 'recentchangeslinked' => 'Related changes', |
Property changes on: branches/REL1_19/phase3/languages |
___________________________________________________________________ |
Modified: svn:mergeinfo |
2073 | 2074 | Merged /trunk/phase3/languages:r112918,113214,113268,113277,113312,113415,113454,113737,113758 |
Index: branches/REL1_19/phase3/resources/jquery/jquery.textSelection.js |
— | — | @@ -131,8 +131,58 @@ |
132 | 132 | var isSample = false; |
133 | 133 | if ( this.style.display == 'none' ) { |
134 | 134 | // Do nothing |
| 135 | + } else if ( document.selection && document.selection.createRange ) { |
| 136 | + // IE |
| 137 | + |
| 138 | + // Note that IE9 will trigger the next section unless we check this first. |
| 139 | + // See bug 35201. |
| 140 | + |
| 141 | + activateElementOnIE( this ); |
| 142 | + if ( context ) { |
| 143 | + context.fn.restoreCursorAndScrollTop(); |
| 144 | + } |
| 145 | + if ( options.selectionStart !== undefined ) { |
| 146 | + $(this).textSelection( 'setSelection', { 'start': options.selectionStart, 'end': options.selectionEnd } ); |
| 147 | + } |
| 148 | + |
| 149 | + var selText = $(this).textSelection( 'getSelection' ); |
| 150 | + var scrollTop = this.scrollTop; |
| 151 | + var range = document.selection.createRange(); |
| 152 | + |
| 153 | + checkSelectedText(); |
| 154 | + var insertText = pre + selText + post; |
| 155 | + if ( options.splitlines ) { |
| 156 | + insertText = doSplitLines( selText, pre, post ); |
| 157 | + } |
| 158 | + if ( options.ownline && range.moveStart ) { |
| 159 | + var range2 = document.selection.createRange(); |
| 160 | + range2.collapse(); |
| 161 | + range2.moveStart( 'character', -1 ); |
| 162 | + // FIXME: Which check is correct? |
| 163 | + if ( range2.text != "\r" && range2.text != "\n" && range2.text != "" ) { |
| 164 | + insertText = "\n" + insertText; |
| 165 | + pre += "\n"; |
| 166 | + } |
| 167 | + var range3 = document.selection.createRange(); |
| 168 | + range3.collapse( false ); |
| 169 | + range3.moveEnd( 'character', 1 ); |
| 170 | + if ( range3.text != "\r" && range3.text != "\n" && range3.text != "" ) { |
| 171 | + insertText += "\n"; |
| 172 | + post += "\n"; |
| 173 | + } |
| 174 | + } |
| 175 | + |
| 176 | + range.text = insertText; |
| 177 | + if ( isSample && options.selectPeri && range.moveStart ) { |
| 178 | + range.moveStart( 'character', - post.length - selText.length ); |
| 179 | + range.moveEnd( 'character', - post.length ); |
| 180 | + } |
| 181 | + range.select(); |
| 182 | + // Restore the scroll position |
| 183 | + this.scrollTop = scrollTop; |
135 | 184 | } else if ( this.selectionStart || this.selectionStart == '0' ) { |
136 | 185 | // Mozilla/Opera |
| 186 | + |
137 | 187 | $(this).focus(); |
138 | 188 | if ( options.selectionStart !== undefined ) { |
139 | 189 | $(this).textSelection( 'setSelection', { 'start': options.selectionStart, 'end': options.selectionEnd } ); |
— | — | @@ -182,51 +232,6 @@ |
183 | 233 | this.selectionStart = startPos + insertText.length; |
184 | 234 | this.selectionEnd = this.selectionStart; |
185 | 235 | } |
186 | | - } else if ( document.selection && document.selection.createRange ) { |
187 | | - // IE |
188 | | - activateElementOnIE( this ); |
189 | | - if ( context ) { |
190 | | - context.fn.restoreCursorAndScrollTop(); |
191 | | - } |
192 | | - if ( options.selectionStart !== undefined ) { |
193 | | - $(this).textSelection( 'setSelection', { 'start': options.selectionStart, 'end': options.selectionEnd } ); |
194 | | - } |
195 | | - |
196 | | - var selText = $(this).textSelection( 'getSelection' ); |
197 | | - var scrollTop = this.scrollTop; |
198 | | - var range = document.selection.createRange(); |
199 | | - |
200 | | - checkSelectedText(); |
201 | | - var insertText = pre + selText + post; |
202 | | - if ( options.splitlines ) { |
203 | | - insertText = doSplitLines( selText, pre, post ); |
204 | | - } |
205 | | - if ( options.ownline && range.moveStart ) { |
206 | | - var range2 = document.selection.createRange(); |
207 | | - range2.collapse(); |
208 | | - range2.moveStart( 'character', -1 ); |
209 | | - // FIXME: Which check is correct? |
210 | | - if ( range2.text != "\r" && range2.text != "\n" && range2.text != "" ) { |
211 | | - insertText = "\n" + insertText; |
212 | | - pre += "\n"; |
213 | | - } |
214 | | - var range3 = document.selection.createRange(); |
215 | | - range3.collapse( false ); |
216 | | - range3.moveEnd( 'character', 1 ); |
217 | | - if ( range3.text != "\r" && range3.text != "\n" && range3.text != "" ) { |
218 | | - insertText += "\n"; |
219 | | - post += "\n"; |
220 | | - } |
221 | | - } |
222 | | - |
223 | | - range.text = insertText; |
224 | | - if ( isSample && options.selectPeri && range.moveStart ) { |
225 | | - range.moveStart( 'character', - post.length - selText.length ); |
226 | | - range.moveEnd( 'character', - post.length ); |
227 | | - } |
228 | | - range.select(); |
229 | | - // Restore the scroll position |
230 | | - this.scrollTop = scrollTop; |
231 | 236 | } |
232 | 237 | $(this).trigger( 'encapsulateSelection', [ options.pre, options.peri, options.post, options.ownline, |
233 | 238 | options.replace, options.spitlines ] ); |
Index: branches/REL1_19/phase3/resources/mediawiki.action/mediawiki.action.watch.ajax.js |
— | — | @@ -5,6 +5,11 @@ |
6 | 6 | ( function ( $, mw, undefined ) { |
7 | 7 | |
8 | 8 | /** |
| 9 | + * The name of the page to watch or unwatch. |
| 10 | + */ |
| 11 | +var title = mw.config.get( 'wgRelevantPageName', mw.config.get( 'wgPageName' ) ); |
| 12 | + |
| 13 | +/** |
9 | 14 | * Update the link text, link href attribute and (if applicable) |
10 | 15 | * "loading" class. |
11 | 16 | * |
— | — | @@ -24,7 +29,7 @@ |
25 | 30 | ( accesskeyTip ? ' ' + accesskeyTip[0] : '' ) |
26 | 31 | ) |
27 | 32 | .attr( 'href', mw.util.wikiScript() + '?' + $.param({ |
28 | | - title: mw.config.get( 'wgPageName' ), |
| 33 | + title: title, |
29 | 34 | action: action |
30 | 35 | }) |
31 | 36 | ); |
— | — | @@ -98,7 +103,7 @@ |
99 | 104 | |
100 | 105 | api = new mw.Api(); |
101 | 106 | api[action]( |
102 | | - mw.config.get( 'wgPageName' ), |
| 107 | + title, |
103 | 108 | // Success |
104 | 109 | function( watchResponse ) { |
105 | 110 | var otherAction = action === 'watch' ? 'unwatch' : 'watch', |
— | — | @@ -129,10 +134,10 @@ |
130 | 135 | updateWatchLink( $link, action ); |
131 | 136 | |
132 | 137 | // Format error message |
133 | | - var cleanTitle = mw.config.get( 'wgPageName' ).replace( /_/g, ' ' ); |
| 138 | + var cleanTitle = title.replace( /_/g, ' ' ); |
134 | 139 | var link = mw.html.element( |
135 | 140 | 'a', { |
136 | | - 'href': mw.util.wikiGetlink( mw.config.get( 'wgPageName' ) ), |
| 141 | + 'href': mw.util.wikiGetlink( title ), |
137 | 142 | 'title': cleanTitle |
138 | 143 | }, cleanTitle |
139 | 144 | ); |
Index: branches/REL1_19/phase3/resources/mediawiki/mediawiki.util.js |
— | — | @@ -29,10 +29,20 @@ |
30 | 30 | |
31 | 31 | // Chrome on any platform |
32 | 32 | } else if ( profile.name === 'chrome' ) { |
33 | | - // Chrome on Mac or Chrome on other platform ? |
34 | | - util.tooltipAccessKeyPrefix = ( profile.platform === 'mac' |
35 | | - ? 'ctrl-option-' : 'alt-' ); |
36 | 33 | |
| 34 | + util.tooltipAccessKeyPrefix = ( |
| 35 | + profile.platform === 'mac' |
| 36 | + // Chrome on Mac |
| 37 | + ? 'ctrl-option-' |
| 38 | + : profile.platform === 'win' |
| 39 | + // Chrome on Windows |
| 40 | + // (both alt- and alt-shift work, but alt-f triggers Chrome wrench menu |
| 41 | + // which alt-shift-f does not) |
| 42 | + ? 'alt-shift-' |
| 43 | + // Chrome on other (Ubuntu?) |
| 44 | + : 'alt-' |
| 45 | + ); |
| 46 | + |
37 | 47 | // Non-Windows Safari with webkit_version > 526 |
38 | 48 | } else if ( profile.platform !== 'win' |
39 | 49 | && profile.name === 'safari' |
Property changes on: branches/REL1_19/phase3 |
___________________________________________________________________ |
Modified: svn:mergeinfo |
40 | 50 | Merged /trunk/phase3:r112918,113214,113268,113277,113312,113415,113454,113737,113758,113775,113892 |