Index: branches/REL1_17/phase3/maintenance/findhooks.php |
— | — | @@ -63,14 +63,15 @@ |
64 | 64 | $IP . '/includes/installer/', |
65 | 65 | $IP . '/includes/parser/', |
66 | 66 | $IP . '/includes/resourceloader/', |
| 67 | + $IP . '/includes/revisiondelete/', |
67 | 68 | $IP . '/includes/search/', |
68 | 69 | $IP . '/includes/specials/', |
69 | 70 | $IP . '/includes/upload/', |
70 | 71 | $IP . '/languages/', |
71 | 72 | $IP . '/maintenance/', |
72 | | - $IP . '/maintenance/tests/', |
73 | | - $IP . '/maintenance/tests/parser/', |
74 | | - $IP . '/maintenance/tests/phpunit/suites/', |
| 73 | + $IP . '/tests/', |
| 74 | + $IP . '/tests/parser/', |
| 75 | + $IP . '/tests/phpunit/suites/', |
75 | 76 | $IP . '/skins/', |
76 | 77 | ); |
77 | 78 | |
Index: branches/REL1_17/phase3/maintenance/language/messages.inc |
— | — | @@ -2698,6 +2698,7 @@ |
2699 | 2699 | 'exif-gpsareainformation', |
2700 | 2700 | 'exif-gpsdatestamp', |
2701 | 2701 | 'exif-gpsdifferential', |
| 2702 | + 'exif-objectname', |
2702 | 2703 | ), |
2703 | 2704 | 'exif-values' => array( |
2704 | 2705 | 'exif-make-value', |
Index: branches/REL1_17/phase3/maintenance/language/messageTypes.inc |
— | — | @@ -601,4 +601,5 @@ |
602 | 602 | 'exif-gpsdestdistance-n', |
603 | 603 | 'exif-gpsdirection-t', |
604 | 604 | 'exif-gpsdirection-m', |
| 605 | + 'exif-objectname', |
605 | 606 | ); |
Index: branches/REL1_17/phase3/skins/common/preview.js |
— | — | @@ -1,127 +1,128 @@ |
2 | 2 | /** |
3 | 3 | * Live preview script for MediaWiki |
4 | 4 | */ |
| 5 | +(function( $ ) { |
| 6 | + window.doLivePreview = function( e ) { |
| 7 | + e.preventDefault(); |
5 | 8 | |
6 | | -window.doLivePreview = function( e ) { |
7 | | - e.preventDefault(); |
| 9 | + $( mw ).trigger( 'LivePreviewPrepare' ); |
8 | 10 | |
9 | | - $( mw ).trigger( 'LivePreviewPrepare' ); |
| 11 | + var postData = $('#editform').formToArray(); |
| 12 | + postData.push( { 'name' : 'wpPreview', 'value' : '1' } ); |
10 | 13 | |
11 | | - var postData = $('#editform').formToArray(); |
12 | | - postData.push( { 'name' : 'wpPreview', 'value' : '1' } ); |
| 14 | + // Hide active diff, used templates, old preview if shown |
| 15 | + var copyElements = ['#wikiPreview', '.templatesUsed', '.hiddencats', |
| 16 | + '#catlinks']; |
| 17 | + var copySelector = copyElements.join(','); |
13 | 18 | |
14 | | - // Hide active diff, used templates, old preview if shown |
15 | | - var copyElements = ['#wikiPreview', '.templatesUsed', '.hiddencats', |
16 | | - '#catlinks']; |
17 | | - var copySelector = copyElements.join(','); |
| 19 | + $.each( copyElements, function(k,v) { $(v).fadeOut('fast'); } ); |
18 | 20 | |
19 | | - $.each( copyElements, function(k,v) { $(v).fadeOut('fast'); } ); |
| 21 | + // Display a loading graphic |
| 22 | + var loadSpinner = $('<div class="mw-ajax-loader"/>'); |
| 23 | + $('#wikiPreview').before( loadSpinner ); |
20 | 24 | |
21 | | - // Display a loading graphic |
22 | | - var loadSpinner = $('<div class="mw-ajax-loader"/>'); |
23 | | - $('#wikiPreview').before( loadSpinner ); |
| 25 | + var page = $('<div/>'); |
| 26 | + var target = $('#editform').attr('action'); |
24 | 27 | |
25 | | - var page = $('<div/>'); |
26 | | - var target = $('#editform').attr('action'); |
| 28 | + if ( !target ) { |
| 29 | + target = window.location.href; |
| 30 | + } |
27 | 31 | |
28 | | - if ( !target ) { |
29 | | - target = window.location.href; |
30 | | - } |
| 32 | + page.load( target + ' ' + copySelector, postData, |
| 33 | + function() { |
31 | 34 | |
32 | | - page.load( target + ' ' + copySelector, postData, |
33 | | - function() { |
| 35 | + for( var i=0; i<copyElements.length; ++i) { |
| 36 | + // For all the specified elements, find the elements in the loaded page |
| 37 | + // and the real page, empty the element in the real page, and fill it |
| 38 | + // with the content of the loaded page |
| 39 | + var copyContent = page.find( copyElements[i] ).contents(); |
| 40 | + $(copyElements[i]).empty().append( copyContent ); |
| 41 | + var newClasses = page.find( copyElements[i] ).attr('class'); |
| 42 | + $(copyElements[i]).attr( 'class', newClasses ); |
| 43 | + } |
34 | 44 | |
35 | | - for( var i=0; i<copyElements.length; ++i) { |
36 | | - // For all the specified elements, find the elements in the loaded page |
37 | | - // and the real page, empty the element in the real page, and fill it |
38 | | - // with the content of the loaded page |
39 | | - var copyContent = page.find( copyElements[i] ).contents(); |
40 | | - $(copyElements[i]).empty().append( copyContent ); |
41 | | - var newClasses = page.find( copyElements[i] ).attr('class'); |
42 | | - $(copyElements[i]).attr( 'class', newClasses ); |
43 | | - } |
| 45 | + $.each( copyElements, function(k,v) { |
| 46 | + // Don't belligerently show elements that are supposed to be hidden |
| 47 | + $(v).fadeIn( 'fast', function() { $(this).css('display', ''); } ); |
| 48 | + } ); |
44 | 49 | |
45 | | - $.each( copyElements, function(k,v) { |
46 | | - // Don't belligerently show elements that are supposed to be hidden |
47 | | - $(v).fadeIn( 'fast', function() { $(this).css('display', ''); } ); |
| 50 | + loadSpinner.remove(); |
| 51 | + |
| 52 | + $( mw ).trigger( 'LivePreviewDone', [copyElements] ); |
48 | 53 | } ); |
49 | | - |
50 | | - loadSpinner.remove(); |
| 54 | + }; |
51 | 55 | |
52 | | - $( mw ).trigger( 'LivePreviewDone', [copyElements] ); |
53 | | - } ); |
54 | | -}; |
| 56 | + // Shamelessly stolen from the jQuery form plugin, which is licensed under the GPL. |
| 57 | + // http://jquery.malsup.com/form/#download |
| 58 | + $.fn.formToArray = function() { |
| 59 | + var a = []; |
| 60 | + if (this.length == 0) return a; |
55 | 61 | |
56 | | -// Shamelessly stolen from the jQuery form plugin, which is licensed under the GPL. |
57 | | -// http://jquery.malsup.com/form/#download |
58 | | -$.fn.formToArray = function() { |
59 | | - var a = []; |
60 | | - if (this.length == 0) return a; |
| 62 | + var form = this[0]; |
| 63 | + var els = form.elements; |
| 64 | + if (!els) return a; |
| 65 | + for(var i=0, max=els.length; i < max; i++) { |
| 66 | + var el = els[i]; |
| 67 | + var n = el.name; |
| 68 | + if (!n) continue; |
61 | 69 | |
62 | | - var form = this[0]; |
63 | | - var els = form.elements; |
64 | | - if (!els) return a; |
65 | | - for(var i=0, max=els.length; i < max; i++) { |
66 | | - var el = els[i]; |
67 | | - var n = el.name; |
68 | | - if (!n) continue; |
69 | | - |
70 | | - var v = $.fieldValue(el, true); |
71 | | - if (v && v.constructor == Array) { |
72 | | - for(var j=0, jmax=v.length; j < jmax; j++) |
73 | | - a.push({name: n, value: v[j]}); |
| 70 | + var v = $.fieldValue(el, true); |
| 71 | + if (v && v.constructor == Array) { |
| 72 | + for(var j=0, jmax=v.length; j < jmax; j++) |
| 73 | + a.push({name: n, value: v[j]}); |
| 74 | + } |
| 75 | + else if (v !== null && typeof v != 'undefined') |
| 76 | + a.push({name: n, value: v}); |
74 | 77 | } |
75 | | - else if (v !== null && typeof v != 'undefined') |
76 | | - a.push({name: n, value: v}); |
77 | | - } |
78 | 78 | |
79 | | - if (form.clk) { |
80 | | - // input type=='image' are not found in elements array! handle it here |
81 | | - var $input = $(form.clk), input = $input[0], n = input.name; |
82 | | - if (n && !input.disabled && input.type == 'image') { |
83 | | - a.push({name: n, value: $input.val()}); |
84 | | - a.push({name: n+'.x', value: form.clk_x}, {name: n+'.y', value: form.clk_y}); |
| 79 | + if (form.clk) { |
| 80 | + // input type=='image' are not found in elements array! handle it here |
| 81 | + var $input = $(form.clk), input = $input[0], n = input.name; |
| 82 | + if (n && !input.disabled && input.type == 'image') { |
| 83 | + a.push({name: n, value: $input.val()}); |
| 84 | + a.push({name: n+'.x', value: form.clk_x}, {name: n+'.y', value: form.clk_y}); |
| 85 | + } |
85 | 86 | } |
86 | | - } |
87 | | - return a; |
88 | | -}; |
| 87 | + return a; |
| 88 | + }; |
89 | 89 | |
90 | | -/** |
91 | | - * Returns the value of the field element. |
92 | | - */ |
93 | | -$.fieldValue = function(el, successful) { |
94 | | - var n = el.name, t = el.type, tag = el.tagName.toLowerCase(); |
95 | | - if (typeof successful == 'undefined') successful = true; |
| 90 | + /** |
| 91 | + * Returns the value of the field element. |
| 92 | + */ |
| 93 | + $.fieldValue = function(el, successful) { |
| 94 | + var n = el.name, t = el.type, tag = el.tagName.toLowerCase(); |
| 95 | + if (typeof successful == 'undefined') successful = true; |
96 | 96 | |
97 | | - if (successful && (!n || el.disabled || t == 'reset' || t == 'button' || |
98 | | - (t == 'checkbox' || t == 'radio') && !el.checked || |
99 | | - (t == 'submit' || t == 'image') && el.form && el.form.clk != el || |
100 | | - tag == 'select' && el.selectedIndex == -1)) |
101 | | - return null; |
| 97 | + if (successful && (!n || el.disabled || t == 'reset' || t == 'button' || |
| 98 | + (t == 'checkbox' || t == 'radio') && !el.checked || |
| 99 | + (t == 'submit' || t == 'image') && el.form && el.form.clk != el || |
| 100 | + tag == 'select' && el.selectedIndex == -1)) |
| 101 | + return null; |
102 | 102 | |
103 | | - if (tag == 'select') { |
104 | | - var index = el.selectedIndex; |
105 | | - if (index < 0) return null; |
106 | | - var a = [], ops = el.options; |
107 | | - var one = (t == 'select-one'); |
108 | | - var max = (one ? index+1 : ops.length); |
109 | | - for(var i=(one ? index : 0); i < max; i++) { |
110 | | - var op = ops[i]; |
111 | | - if (op.selected) { |
112 | | - var v = op.value; |
113 | | - if (!v) // extra pain for IE... |
114 | | - v = (op.attributes && op.attributes['value'] && |
115 | | - !(op.attributes['value'].specified)) |
116 | | - ? op.text : op.value; |
117 | | - if (one) return v; |
118 | | - a.push(v); |
| 103 | + if (tag == 'select') { |
| 104 | + var index = el.selectedIndex; |
| 105 | + if (index < 0) return null; |
| 106 | + var a = [], ops = el.options; |
| 107 | + var one = (t == 'select-one'); |
| 108 | + var max = (one ? index+1 : ops.length); |
| 109 | + for(var i=(one ? index : 0); i < max; i++) { |
| 110 | + var op = ops[i]; |
| 111 | + if (op.selected) { |
| 112 | + var v = op.value; |
| 113 | + if (!v) // extra pain for IE... |
| 114 | + v = (op.attributes && op.attributes['value'] && |
| 115 | + !(op.attributes['value'].specified)) |
| 116 | + ? op.text : op.value; |
| 117 | + if (one) return v; |
| 118 | + a.push(v); |
| 119 | + } |
119 | 120 | } |
| 121 | + return a; |
120 | 122 | } |
121 | | - return a; |
122 | | - } |
123 | | - return el.value; |
124 | | -}; |
| 123 | + return el.value; |
| 124 | + }; |
125 | 125 | |
126 | | -$(document).ready( function() { |
127 | | - $('#wpPreview').click( doLivePreview ); |
128 | | -} ); |
| 126 | + $(document).ready( function() { |
| 127 | + $('#wpPreview').click( doLivePreview ); |
| 128 | + } ); |
| 129 | +}) ( jQuery ); |
Index: branches/REL1_17/phase3/skins/common/shared.css |
— | — | @@ -9,9 +9,9 @@ |
10 | 10 | .mw-plusminus-neg { color: #8b0000; } /* dark red */ |
11 | 11 | .mw-plusminus-null { color: #aaa; } /* gray */ |
12 | 12 | |
13 | | -/* Links to redirects appear italicized on [[Special:AllPages]], |
14 | | - and in category listings */ |
15 | | -.allpagesredirect, .redirect-in-category { font-style: italic; } |
| 13 | +/* Links to redirects appear italicized on [[Special:AllPages]], [[Special:PrefixIndex]], |
| 14 | + [[Special:Watchlist/edit]] and in category listings */ |
| 15 | +.allpagesredirect, .redirect-in-category, .watchlistredir { font-style: italic; } |
16 | 16 | |
17 | 17 | /* Comment and username portions of RC entries */ |
18 | 18 | span.comment { |
— | — | @@ -780,6 +780,10 @@ |
781 | 781 | margin: 2px; |
782 | 782 | } |
783 | 783 | |
| 784 | +li.gallerybox div.thumb a.image img { |
| 785 | + vertical-align: text-top; |
| 786 | +} |
| 787 | + |
784 | 788 | div.gallerytext { |
785 | 789 | overflow: hidden; |
786 | 790 | font-size: 94%; |
Property changes on: branches/REL1_17/phase3/skins/common/shared.css |
___________________________________________________________________ |
Modified: svn:mergeinfo |
787 | 791 | Merged /trunk/phase3/skins/common/shared.css:r82129,82155-82156,82181,82191,82200,82203,82215,82219,82221,82253 |
Index: branches/REL1_17/phase3/skins/common/mwsuggest.js |
— | — | @@ -7,6 +7,12 @@ |
8 | 8 | * by Robert Stojnic (April 2008) |
9 | 9 | */ |
10 | 10 | |
| 11 | +// Make sure wgMWSuggestTemplate is defined |
| 12 | +if ( !mw.config.exists( 'wgMWSuggestTemplate' ) ) { |
| 13 | + mw.config.set( 'wgMWSuggestTemplate', mw.config.get( 'wgServer' ) + mw.config.get( 'wgScriptPath' ) |
| 14 | + + "/api.php?action=opensearch\x26search={searchTerms}\x26namespace={namespaces}\x26suggest" ); |
| 15 | +} |
| 16 | + |
11 | 17 | // search_box_id -> Results object |
12 | 18 | window.os_map = {}; |
13 | 19 | // cached data, url -> json_text |
— | — | @@ -40,6 +46,9 @@ |
41 | 47 | window.os_container_max_width = 2; |
42 | 48 | // currently active animation timer |
43 | 49 | window.os_animation_timer = null; |
| 50 | +// whether MWSuggest is enabled. Set to false when os_MWSuggestDisable() is called |
| 51 | +window.os_enabled = true; |
| 52 | + |
44 | 53 | /** |
45 | 54 | * <datalist> is a new HTML5 element that allows you to manually supply |
46 | 55 | * suggestion lists and have them rendered according to the right platform |
— | — | @@ -99,7 +108,11 @@ |
100 | 109 | |
101 | 110 | /** Initialization, call upon page onload */ |
102 | 111 | window.os_MWSuggestInit = function() { |
103 | | - for( i = 0; i < os_autoload_inputs.length; i++ ) { |
| 112 | + if ( !window.os_enabled ) { |
| 113 | + return; |
| 114 | + } |
| 115 | + |
| 116 | + for( var i = 0; i < os_autoload_inputs.length; i++ ) { |
104 | 117 | var id = os_autoload_inputs[i]; |
105 | 118 | var form = os_autoload_forms[i]; |
106 | 119 | element = document.getElementById( id ); |
— | — | @@ -109,6 +122,25 @@ |
110 | 123 | } |
111 | 124 | }; |
112 | 125 | |
| 126 | +/* Teardown, called when things like SimpleSearch need to disable MWSuggest */ |
| 127 | +window.os_MWSuggestTeardown = function() { |
| 128 | + for( var i = 0; i < os_autoload_inputs.length; i++ ) { |
| 129 | + var id = os_autoload_inputs[i]; |
| 130 | + var form = os_autoload_forms[i]; |
| 131 | + element = document.getElementById( id ); |
| 132 | + if( element != null ) { |
| 133 | + os_teardownHandlers( id, form, element ); |
| 134 | + } |
| 135 | + } |
| 136 | +}; |
| 137 | + |
| 138 | +/* Call this to disable MWSuggest. Works regardless of whether MWSuggest has been initialized already. */ |
| 139 | +window.os_MWSuggestDisable = function() { |
| 140 | + window.os_MWSuggestTeardown(); |
| 141 | + window.os_enabled = false; |
| 142 | +} |
| 143 | + |
| 144 | + |
113 | 145 | /** Init Result objects and event handlers */ |
114 | 146 | window.os_initHandlers = function( name, formname, element ) { |
115 | 147 | var r = new os_Results( name, formname ); |
— | — | @@ -118,20 +150,20 @@ |
119 | 151 | return; |
120 | 152 | } |
121 | 153 | // event handler |
122 | | - os_hookEvent( element, 'keyup', function( event ) { os_eventKeyup( event ); } ); |
123 | | - os_hookEvent( element, 'keydown', function( event ) { os_eventKeydown( event ); } ); |
124 | | - os_hookEvent( element, 'keypress', function( event ) { os_eventKeypress( event ); } ); |
| 154 | + os_hookEvent( element, 'keyup', os_eventKeyup ); |
| 155 | + os_hookEvent( element, 'keydown', os_eventKeydown ); |
| 156 | + os_hookEvent( element, 'keypress', os_eventKeypress ); |
125 | 157 | if ( !os_use_datalist ) { |
126 | 158 | // These are needed for the div hack to hide it if the user blurs. |
127 | | - os_hookEvent( element, 'blur', function( event ) { os_eventBlur( event ); } ); |
128 | | - os_hookEvent( element, 'focus', function( event ) { os_eventFocus( event ); } ); |
| 159 | + os_hookEvent( element, 'blur', os_eventBlur ); |
| 160 | + os_hookEvent( element, 'focus', os_eventFocus ); |
129 | 161 | // We don't want browser auto-suggestions interfering with our div, but |
130 | 162 | // autocomplete must be on for datalist to work (at least in Opera |
131 | 163 | // 10.10). |
132 | 164 | element.setAttribute( 'autocomplete', 'off' ); |
133 | 165 | } |
134 | 166 | // stopping handler |
135 | | - os_hookEvent( formElement, 'submit', function( event ) { return os_eventOnsubmit( event ); } ); |
| 167 | + os_hookEvent( formElement, 'submit', os_eventOnsubmit ); |
136 | 168 | os_map[name] = r; |
137 | 169 | // toggle link |
138 | 170 | if( document.getElementById( r.toggle ) == null ) { |
— | — | @@ -159,6 +191,30 @@ |
160 | 192 | |
161 | 193 | }; |
162 | 194 | |
| 195 | +window.os_teardownHandlers = function( name, formname, element ) { |
| 196 | + var formElement = document.getElementById( formname ); |
| 197 | + if( !formElement ) { |
| 198 | + // Older browsers (Opera 8) cannot get form elements |
| 199 | + return; |
| 200 | + } |
| 201 | + |
| 202 | + os_unhookEvent( element, 'keyup', os_eventKeyup ); |
| 203 | + os_unhookEvent( element, 'keydown', os_eventKeydown ); |
| 204 | + os_unhookEvent( element, 'keypress', os_eventKeypress ); |
| 205 | + if ( !os_use_datalist ) { |
| 206 | + // These are needed for the div hack to hide it if the user blurs. |
| 207 | + os_unhookEvent( element, 'blur', os_eventBlur ); |
| 208 | + os_unhookEvent( element, 'focus', os_eventFocus ); |
| 209 | + // We don't want browser auto-suggestions interfering with our div, but |
| 210 | + // autocomplete must be on for datalist to work (at least in Opera |
| 211 | + // 10.10). |
| 212 | + element.removeAttribute( 'autocomplete' ); |
| 213 | + } |
| 214 | + // stopping handler |
| 215 | + os_unhookEvent( formElement, 'submit', os_eventOnsubmit ); |
| 216 | +}; |
| 217 | + |
| 218 | + |
163 | 219 | window.os_hookEvent = function( element, hookName, hookFunct ) { |
164 | 220 | if ( element.addEventListener ) { |
165 | 221 | element.addEventListener( hookName, hookFunct, false ); |
— | — | @@ -167,6 +223,14 @@ |
168 | 224 | } |
169 | 225 | }; |
170 | 226 | |
| 227 | +window.os_unhookEvent = function( element, hookName, hookFunct ) { |
| 228 | + if ( element.removeEventListener ) { |
| 229 | + element.removeEventListener( hookName, hookFunct, false ); |
| 230 | + } else if ( element.detachEvent ) { |
| 231 | + element.detachEvent( 'on' + hookName, hookFunct ); |
| 232 | + } |
| 233 | +} |
| 234 | + |
171 | 235 | /******************** |
172 | 236 | * Keyboard events |
173 | 237 | ********************/ |
— | — | @@ -414,7 +478,7 @@ |
415 | 479 | var r = os_timer.r; |
416 | 480 | var query = os_timer.query; |
417 | 481 | os_timer = null; |
418 | | - var path = wgMWSuggestTemplate.replace( "{namespaces}", os_getNamespaces( r ) ) |
| 482 | + var path = mw.config.get( 'wgMWSuggestTemplate' ).replace( "{namespaces}", os_getNamespaces( r ) ) |
419 | 483 | .replace( "{dbname}", wgDBname ) |
420 | 484 | .replace( "{searchTerms}", os_encodeQuery( query ) ); |
421 | 485 | |
Index: branches/REL1_17/phase3/skins/vector/screen.css |
— | — | @@ -350,6 +350,9 @@ |
351 | 351 | margin-top: 0.4em; |
352 | 352 | } |
353 | 353 | div#simpleSearch { |
| 354 | + display: block; |
| 355 | + width: 14em; |
| 356 | + height: 1.4em; |
354 | 357 | margin-top: 0.65em; |
355 | 358 | position: relative; |
356 | 359 | min-height: 1px; /* Gotta trigger hasLayout for IE7 */ |
— | — | @@ -368,9 +371,11 @@ |
369 | 372 | */ |
370 | 373 | font-size: 13px; |
371 | 374 | top: 0.25em; |
| 375 | + direction: ltr; |
372 | 376 | } |
373 | 377 | div#simpleSearch input { |
374 | 378 | color: black; |
| 379 | + direction: ltr; |
375 | 380 | } |
376 | 381 | div#simpleSearch input:focus { |
377 | 382 | outline: none; |
— | — | @@ -382,39 +387,49 @@ |
383 | 388 | color: #999999; |
384 | 389 | } |
385 | 390 | div#simpleSearch input#searchInput { |
| 391 | + position: absolute; |
| 392 | + top: 0; |
| 393 | + left: 0; |
| 394 | + width: 90%; |
386 | 395 | margin: 0; |
387 | | - border-width: 0; |
388 | | - padding: 3px; |
389 | | - vertical-align: top; |
| 396 | + padding: 0; |
| 397 | + padding-left: 0.2em; |
| 398 | + padding-top: 0.2em; |
| 399 | + padding-bottom: 0.2em; |
| 400 | + outline: none; |
| 401 | + border: none; |
390 | 402 | /* |
391 | 403 | * DON'T PANIC! Browsers that won't scale this properly are the same browsers that have JS issues that prevent |
392 | 404 | * this from ever being shown anyways. |
393 | 405 | */ |
394 | 406 | font-size: 13px; |
395 | | - width: 14em; |
396 | 407 | background-color: transparent; |
397 | 408 | direction: ltr; |
398 | 409 | } |
399 | 410 | div#simpleSearch button#searchButton { |
| 411 | + position: absolute; |
| 412 | + width: 10%; |
| 413 | + right: 0; |
| 414 | + top: 0; |
400 | 415 | padding: 0; |
401 | | - margin: 0 5px; |
| 416 | + padding-top: 0.2em; |
| 417 | + padding-bottom: 0.2em; |
| 418 | + padding-right: 0.4em; |
| 419 | + margin: 0; |
402 | 420 | border: none; |
403 | 421 | cursor: pointer; |
404 | 422 | background-color: transparent; |
405 | | - font-size: x-small; |
406 | 423 | } |
407 | 424 | /* OVERRIDDEN BY COMPLIANT BROWSERS */ |
408 | 425 | div#simpleSearch button#searchButton img { |
409 | 426 | border: none; |
410 | 427 | margin: 0; |
| 428 | + margin-top: -3px; |
411 | 429 | padding: 0; |
412 | | - padding-top: 0.5em; |
413 | | - vertical-align: middle; |
414 | 430 | } |
415 | 431 | /* IGNORED BY IE6 */ |
416 | 432 | div#simpleSearch button#searchButton > img { |
417 | | - padding-top: 0; |
418 | | - margin-top: -1px; |
| 433 | + margin: 0; |
419 | 434 | } |
420 | 435 | /* Panel */ |
421 | 436 | div#mw-panel { |
Property changes on: branches/REL1_17/phase3/skins/vector/screen.css |
___________________________________________________________________ |
Modified: svn:mergeinfo |
422 | 437 | Merged /trunk/phase3/skins/vector/screen.css:r82129,82155-82156,82181,82191,82200,82203,82215,82219,82221,82253 |
Index: branches/REL1_17/phase3/docs/hooks.txt |
— | — | @@ -1112,7 +1112,7 @@ |
1113 | 1113 | 'MakeGlobalVariablesScript': called right before Skin::makeVariablesScript |
1114 | 1114 | is executed. Ideally, this hook should only be used to add variables that |
1115 | 1115 | depend on the current page/request; static configuration should be added |
1116 | | -through ResourceLoaderConfigVars instead. |
| 1116 | +through ResourceLoaderGetConfigVars instead. |
1117 | 1117 | &$vars: variable (or multiple variables) to be added into the output |
1118 | 1118 | of Skin::makeVariablesScript |
1119 | 1119 | |
— | — | @@ -1367,7 +1367,7 @@ |
1368 | 1368 | 'RecentChange_save': called at the end of RecentChange::save() |
1369 | 1369 | $recentChange: RecentChange object |
1370 | 1370 | |
1371 | | -'ResourceLoaderConfigVars': called at the end of |
| 1371 | +'ResourceLoaderGetConfigVars': called at the end of |
1372 | 1372 | ResourceLoaderStartUpModule::getConfig(). Use this to export static |
1373 | 1373 | configuration variables to JavaScript. Things that depend on the current |
1374 | 1374 | page/request state must be added through MakeGlobalVariablesScript instead. |
Property changes on: branches/REL1_17/phase3/docs/hooks.txt |
___________________________________________________________________ |
Modified: svn:mergeinfo |
1375 | 1375 | Merged /trunk/phase3/docs/hooks.txt:r82000,82004,82020,82025,82038-82039,82048,82070,82081,82083,82090-82091,82095-82096,82129,82155-82156,82181,82191,82200,82203,82215,82219,82221,82253 |
Index: branches/REL1_17/phase3/includes/Xml.php |
— | — | @@ -583,8 +583,8 @@ |
584 | 584 | $s = $value ? 'true' : 'false'; |
585 | 585 | } elseif ( is_null( $value ) ) { |
586 | 586 | $s = 'null'; |
587 | | - } elseif ( is_int( $value ) ) { |
588 | | - $s = $value; |
| 587 | + } elseif ( is_int( $value ) || is_float( $value ) ) { |
| 588 | + $s = strval($value); |
589 | 589 | } elseif ( is_array( $value ) && // Make sure it's not associative. |
590 | 590 | array_keys($value) === range( 0, count($value) - 1 ) || |
591 | 591 | count($value) == 0 |
Property changes on: branches/REL1_17/phase3/includes/Xml.php |
___________________________________________________________________ |
Added: svn:mergeinfo |
592 | 592 | Merged /branches/sqlite/includes/Xml.php:r58211-58321 |
593 | 593 | Merged /trunk/phase3/includes/Xml.php:r82000,82004,82020,82025,82038-82039,82048,82070,82081,82083,82090-82091,82095-82096,82099,82129,82155-82156,82181,82191,82200,82203,82215,82219,82221,82253,82845,82847-82848 |
594 | 594 | Merged /branches/new-installer/phase3/includes/Xml.php:r43664-66004 |
595 | 595 | Merged /branches/wmf-deployment/includes/Xml.php:r53381 |
596 | 596 | Merged /branches/REL1_15/phase3/includes/Xml.php:r51646 |
Index: branches/REL1_17/phase3/includes/diff/DifferenceEngine.php |
— | — | @@ -590,7 +590,8 @@ |
591 | 591 | */ |
592 | 592 | function showDiffStyle() { |
593 | 593 | global $wgOut; |
594 | | - $wgOut->addModules( 'mediawiki.legacy.diff' ); |
| 594 | + $wgOut->addModuleStyles( 'mediawiki.legacy.diff' ); |
| 595 | + $wgOut->addModuleScripts( 'mediawiki.legacy.diff' ); |
595 | 596 | } |
596 | 597 | |
597 | 598 | /** |
Index: branches/REL1_17/phase3/includes/json/FormatJson.php |
— | — | @@ -44,11 +44,11 @@ |
45 | 45 | */ |
46 | 46 | public static function decode( $value, $assoc = false ) { |
47 | 47 | if ( !function_exists( 'json_decode' ) ) { |
48 | | - $json = new Services_JSON(); |
| 48 | + if( $assoc ) |
| 49 | + $json = new Services_JSON( SERVICES_JSON_LOOSE_TYPE ); |
| 50 | + else |
| 51 | + $json = new Services_JSON(); |
49 | 52 | $jsonDec = $json->decode( $value ); |
50 | | - if( $assoc ) { |
51 | | - $jsonDec = wfObjectToArray( $jsonDec ); |
52 | | - } |
53 | 53 | return $jsonDec; |
54 | 54 | } else { |
55 | 55 | return json_decode( $value, $assoc ); |
Index: branches/REL1_17/phase3/includes/PrefixSearch.php |
— | — | @@ -78,6 +78,9 @@ |
79 | 79 | protected static function specialSearch( $search, $limit ) { |
80 | 80 | global $wgContLang; |
81 | 81 | |
| 82 | + # normalize searchKey, so aliases with spaces can be found - bug 25675 |
| 83 | + $search = str_replace( ' ', '_', $search ); |
| 84 | + |
82 | 85 | $searchKey = $wgContLang->caseFold( $search ); |
83 | 86 | |
84 | 87 | // Unlike SpecialPage itself, we want the canonical forms of both |
Index: branches/REL1_17/phase3/includes/GlobalFunctions.php |
— | — | @@ -3508,10 +3508,13 @@ |
3509 | 3509 | } |
3510 | 3510 | |
3511 | 3511 | /* Recursively converts the parameter (an object) to an array with the same data */ |
3512 | | -function wfObjectToArray( $object, $recursive = true ) { |
| 3512 | +function wfObjectToArray( $objOrArray, $recursive = true ) { |
3513 | 3513 | $array = array(); |
3514 | | - foreach ( get_object_vars( $object ) as $key => $value ) { |
3515 | | - if ( is_object( $value ) && $recursive ) { |
| 3514 | + if( is_object( $objOrArray ) ) { |
| 3515 | + $objOrArray = get_object_vars( $objOrArray ); |
| 3516 | + } |
| 3517 | + foreach ( $objOrArray as $key => $value ) { |
| 3518 | + if ( $recursive && ( is_object( $value ) || is_array( $value ) ) ) { |
3516 | 3519 | $value = wfObjectToArray( $value ); |
3517 | 3520 | } |
3518 | 3521 | |
Property changes on: branches/REL1_17/phase3/includes/GlobalFunctions.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
3519 | 3522 | Merged /trunk/phase3/includes/GlobalFunctions.php:r82000,82004,82020,82025,82038-82039,82048,82070,82081,82083,82090-82091,82095-82096,82129,82155-82156,82181,82191,82200,82203,82215,82219,82221,82253 |
Index: branches/REL1_17/phase3/includes/WatchedItem.php |
— | — | @@ -84,6 +84,8 @@ |
85 | 85 | * @return bool |
86 | 86 | */ |
87 | 87 | public function removeWatch() { |
| 88 | + wfProfileIn( __METHOD__ ); |
| 89 | + |
88 | 90 | $success = false; |
89 | 91 | $dbw = wfGetDB( DB_MASTER ); |
90 | 92 | $dbw->delete( 'watchlist', |
— | — | @@ -112,6 +114,8 @@ |
113 | 115 | if ( $dbw->affectedRows() ) { |
114 | 116 | $success = true; |
115 | 117 | } |
| 118 | + |
| 119 | + wfProfileOut( __METHOD__ ); |
116 | 120 | return $success; |
117 | 121 | } |
118 | 122 | |
Index: branches/REL1_17/phase3/includes/LocalisationCache.php |
— | — | @@ -442,6 +442,20 @@ |
443 | 443 | } |
444 | 444 | } |
445 | 445 | |
| 446 | + protected function mergeMagicWords( &$value, $fallbackValue ) { |
| 447 | + foreach ( $fallbackValue as $magicName => $fallbackInfo ) { |
| 448 | + if ( !isset( $value[$magicName] ) ) { |
| 449 | + $value[$magicName] = $fallbackInfo; |
| 450 | + } else { |
| 451 | + $oldSynonyms = array_slice( $fallbackInfo, 1 ); |
| 452 | + $newSynonyms = array_slice( $value[$magicName], 1 ); |
| 453 | + $synonyms = array_values( array_unique( array_merge( |
| 454 | + $newSynonyms, $oldSynonyms ) ) ); |
| 455 | + $value[$magicName] = array_merge( array( $fallbackInfo[0] ), $synonyms ); |
| 456 | + } |
| 457 | + } |
| 458 | + } |
| 459 | + |
446 | 460 | /** |
447 | 461 | * Given an array mapping language code to localisation value, such as is |
448 | 462 | * found in extension *.i18n.php files, iterate through a fallback sequence |
Index: branches/REL1_17/phase3/includes/MessageCache.php |
— | — | @@ -522,9 +522,7 @@ |
523 | 523 | throw new MWException( "Bad lang code $langcode given" ); |
524 | 524 | } |
525 | 525 | |
526 | | - // Don't change getPreferredVariant() to getCode() / mCode, for |
527 | | - // more details, see the comment in Language::getMessage(). |
528 | | - $langcode = $lang->getPreferredVariant(); |
| 526 | + $langcode = $lang->getCode(); |
529 | 527 | |
530 | 528 | $message = false; |
531 | 529 | |
Index: branches/REL1_17/phase3/includes/OutputPage.php |
— | — | @@ -2415,7 +2415,7 @@ |
2416 | 2416 | $timestamp = max( $timestamp, $module->getModifiedTime( $context ) ); |
2417 | 2417 | } |
2418 | 2418 | // Add a version parameter so cache will break when things change |
2419 | | - $query['version'] = wfTimestamp( TS_ISO_8601_BASIC, round( $timestamp, -2 ) ); |
| 2419 | + $query['version'] = wfTimestamp( TS_ISO_8601_BASIC, $timestamp ); |
2420 | 2420 | } |
2421 | 2421 | // Make queries uniform in order |
2422 | 2422 | ksort( $query ); |
Property changes on: branches/REL1_17/phase3/includes/OutputPage.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
2423 | 2423 | Merged /trunk/phase3/includes/OutputPage.php:r82129,82155-82156,82181,82191,82200,82203,82215,82219,82221,82253 |
Index: branches/REL1_17/phase3/includes/resourceloader/ResourceLoaderFileModule.php |
— | — | @@ -197,6 +197,8 @@ |
198 | 198 | break; |
199 | 199 | } |
200 | 200 | } |
| 201 | + // Make sure the remote base path is a complete valid url |
| 202 | + $this->remoteBasePath = wfExpandUrl( $this->remoteBasePath ); |
201 | 203 | } |
202 | 204 | |
203 | 205 | /** |
Index: branches/REL1_17/phase3/includes/resourceloader/ResourceLoaderWikiModule.php |
— | — | @@ -81,6 +81,7 @@ |
82 | 82 | } |
83 | 83 | |
84 | 84 | public function getStyles( ResourceLoaderContext $context ) { |
| 85 | + global $wgScriptPath; |
85 | 86 | |
86 | 87 | $styles = array(); |
87 | 88 | foreach ( $this->getPages( $context ) as $titleText => $options ) { |
— | — | @@ -99,6 +100,7 @@ |
100 | 101 | if ( $this->getFlip( $context ) ) { |
101 | 102 | $style = CSSJanus::transform( $style, true, false ); |
102 | 103 | } |
| 104 | + $style = CSSMin::remap( $style, false, $wgScriptPath, true ); |
103 | 105 | if ( !isset( $styles[$media] ) ) { |
104 | 106 | $styles[$media] = ''; |
105 | 107 | } |
Index: branches/REL1_17/phase3/includes/media/SVG.php |
— | — | @@ -206,11 +206,22 @@ |
207 | 207 | |
208 | 208 | // Sort fields into visible and collapsed |
209 | 209 | $visibleFields = $this->visibleMetadataFields(); |
| 210 | + |
| 211 | + // Rename fields to be compatible with exif, so that |
| 212 | + // the labels for these fields work. |
| 213 | + $conversion = array( 'width' => 'imagewidth', |
| 214 | + 'height' => 'imagelength', |
| 215 | + 'description' => 'imagedescription', |
| 216 | + 'title' => 'objectname', |
| 217 | + ); |
210 | 218 | foreach ( $metadata as $name => $value ) { |
211 | 219 | $tag = strtolower( $name ); |
| 220 | + if ( isset( $conversion[$tag] ) ) { |
| 221 | + $tag = $conversion[$tag]; |
| 222 | + } |
212 | 223 | self::addMeta( $result, |
213 | 224 | in_array( $tag, $visibleFields ) ? 'visible' : 'collapsed', |
214 | | - 'svg', |
| 225 | + 'exif', |
215 | 226 | $tag, |
216 | 227 | $value |
217 | 228 | ); |
Index: branches/REL1_17/phase3/includes/MagicWord.php |
— | — | @@ -272,13 +272,13 @@ |
273 | 273 | * @private |
274 | 274 | */ |
275 | 275 | function initRegex() { |
276 | | - #$variableClass = Title::legalChars(); |
277 | | - # This was used for matching "$1" variables, but different uses of the feature will have |
278 | | - # different restrictions, which should be checked *after* the MagicWord has been matched, |
279 | | - # not here. - IMSoP |
| 276 | + // Sort the synonyms by length, descending, so that the longest synonym |
| 277 | + // matches in precedence to the shortest |
| 278 | + $synonyms = $this->mSynonyms; |
| 279 | + usort( $synonyms, array( $this, 'compareStringLength' ) ); |
280 | 280 | |
281 | 281 | $escSyn = array(); |
282 | | - foreach ( $this->mSynonyms as $synonym ) |
| 282 | + foreach ( $synonyms as $synonym ) |
283 | 283 | // In case a magic word contains /, like that's going to happen;) |
284 | 284 | $escSyn[] = preg_quote( $synonym, '/' ); |
285 | 285 | $this->mBaseRegex = implode( '|', $escSyn ); |
— | — | @@ -292,6 +292,23 @@ |
293 | 293 | } |
294 | 294 | |
295 | 295 | /** |
| 296 | + * A comparison function that returns -1, 0 or 1 depending on whether the |
| 297 | + * first string is longer, the same length or shorter than the second |
| 298 | + * string. |
| 299 | + */ |
| 300 | + function compareStringLength( $s1, $s2 ) { |
| 301 | + $l1 = strlen( $s1 ); |
| 302 | + $l2 = strlen( $s2 ); |
| 303 | + if ( $l1 < $l2 ) { |
| 304 | + return 1; |
| 305 | + } elseif ( $l1 > $l2 ) { |
| 306 | + return -1; |
| 307 | + } else { |
| 308 | + return 0; |
| 309 | + } |
| 310 | + } |
| 311 | + |
| 312 | + /** |
296 | 313 | * Gets a regex representing matching the word |
297 | 314 | */ |
298 | 315 | function getRegex() { |
Index: branches/REL1_17/phase3/includes/Title.php |
— | — | @@ -3951,7 +3951,8 @@ |
3952 | 3952 | } |
3953 | 3953 | // Check cache first |
3954 | 3954 | $uid = $user->getId(); |
3955 | | - if ( isset( $this->mNotificationTimestamp[$uid] ) ) { |
| 3955 | + // avoid isset here, as it'll return false for null entries |
| 3956 | + if ( array_key_exists( $uid, $this->mNotificationTimestamp ) ) { |
3956 | 3957 | return $this->mNotificationTimestamp[$uid]; |
3957 | 3958 | } |
3958 | 3959 | if ( !$uid || !$wgShowUpdatedMarker ) { |
Property changes on: branches/REL1_17/phase3/includes/Title.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
3959 | 3960 | Merged /trunk/phase3/includes/Title.php:r82000,82004,82020,82025,82038-82039,82048,82070,82081,82083,82090-82091,82095-82096,82129,82155-82156,82181,82191,82200,82203,82215,82219,82221,82253 |
Index: branches/REL1_17/phase3/includes/libs/CSSMin.php |
— | — | @@ -36,7 +36,7 @@ |
37 | 37 | * which when base64 encoded will result in a 1/3 increase in size. |
38 | 38 | */ |
39 | 39 | const EMBED_SIZE_LIMIT = 24576; |
40 | | - const URL_REGEX = 'url\(\s*[\'"]?(?P<file>[^\?\)\:\'"]*)\??[^\)\'"]*[\'"]?\s*\)'; |
| 40 | + const URL_REGEX = 'url\(\s*[\'"]?(?P<file>[^\?\)\'"]*)(?P<query>\??[^\)\'"]*)[\'"]?\s*\)'; |
41 | 41 | |
42 | 42 | /* Protected Static Members */ |
43 | 43 | |
— | — | @@ -79,6 +79,32 @@ |
80 | 80 | return $files; |
81 | 81 | } |
82 | 82 | |
| 83 | + protected static function getMimeType( $file ) { |
| 84 | + $realpath = realpath( $file ); |
| 85 | + // Try a couple of different ways to get the mime-type of a file, in order of |
| 86 | + // preference |
| 87 | + if ( |
| 88 | + $realpath |
| 89 | + && function_exists( 'finfo_file' ) |
| 90 | + && function_exists( 'finfo_open' ) |
| 91 | + && defined( 'FILEINFO_MIME_TYPE' ) |
| 92 | + ) { |
| 93 | + // As of PHP 5.3, this is how you get the mime-type of a file; it uses the Fileinfo |
| 94 | + // PECL extension |
| 95 | + return finfo_file( finfo_open( FILEINFO_MIME_TYPE ), $realpath ); |
| 96 | + } else if ( function_exists( 'mime_content_type' ) ) { |
| 97 | + // Before this was deprecated in PHP 5.3, this was how you got the mime-type of a file |
| 98 | + return mime_content_type( $file ); |
| 99 | + } else { |
| 100 | + // Worst-case scenario has happened, use the file extension to infer the mime-type |
| 101 | + $ext = strtolower( pathinfo( $file, PATHINFO_EXTENSION ) ); |
| 102 | + if ( isset( self::$mimeTypes[$ext] ) ) { |
| 103 | + return self::$mimeTypes[$ext]; |
| 104 | + } |
| 105 | + } |
| 106 | + return false; |
| 107 | + } |
| 108 | + |
83 | 109 | /** |
84 | 110 | * Remaps CSS URL paths and automatically embeds data URIs for URL rules |
85 | 111 | * preceded by an /* @embed * / comment |
— | — | @@ -94,63 +120,57 @@ |
95 | 121 | self::URL_REGEX . '(?P<post>[^;]*)[\;]?/'; |
96 | 122 | $offset = 0; |
97 | 123 | while ( preg_match( $pattern, $source, $match, PREG_OFFSET_CAPTURE, $offset ) ) { |
| 124 | + // Skip absolute URIs |
| 125 | + if ( preg_match( '/^https?:\/\//', $match['file'][0] ) ) { |
| 126 | + // Move the offset to the end of the match, leaving it alone |
| 127 | + $offset = $match[0][1] + strlen( $match[0][0] ); |
| 128 | + continue; |
| 129 | + } |
98 | 130 | // Shortcuts |
99 | 131 | $embed = $match['embed'][0]; |
100 | 132 | $pre = $match['pre'][0]; |
101 | 133 | $post = $match['post'][0]; |
| 134 | + $query = $match['query'][0]; |
| 135 | + $url = "{$remote}/{$match['file'][0]}"; |
102 | 136 | $file = "{$local}/{$match['file'][0]}"; |
103 | | - $url = "{$remote}/{$match['file'][0]}"; |
104 | | - // Only proceed if we can access the file |
105 | | - if ( file_exists( $file ) ) { |
| 137 | + $replacement = false; |
| 138 | + if ( $local !== false && file_exists( $file ) ) { |
106 | 139 | // Add version parameter as a time-stamp in ISO 8601 format, |
107 | 140 | // using Z for the timezone, meaning GMT |
108 | 141 | $url .= '?' . gmdate( 'Y-m-d\TH:i:s\Z', round( filemtime( $file ), -2 ) ); |
109 | | - // If we the mime-type can't be determined, no embedding will take place |
110 | | - $type = false; |
111 | | - $realpath = realpath( $file ); |
112 | | - // Try a couple of different ways to get the mime-type of a file, |
113 | | - // in order of preference |
114 | | - if ( $realpath |
115 | | - && function_exists( 'finfo_file' ) && function_exists( 'finfo_open' ) |
116 | | - && defined( 'FILEINFO_MIME_TYPE' ) ) |
117 | | - { |
118 | | - // As of PHP 5.3, this is how you get the mime-type of a file; |
119 | | - // it uses the Fileinfo PECL extension |
120 | | - $type = finfo_file( finfo_open( FILEINFO_MIME_TYPE ), $realpath ); |
121 | | - } else if ( function_exists( 'mime_content_type' ) ) { |
122 | | - // Before this was deprecated in PHP 5.3, |
123 | | - // this used to be how you get the mime-type of a file |
124 | | - $type = mime_content_type( $file ); |
125 | | - } else { |
126 | | - // Worst-case scenario has happened, |
127 | | - // use the file extension to infer the mime-type |
128 | | - $ext = strtolower( pathinfo( $file, PATHINFO_EXTENSION ) ); |
129 | | - if ( isset( self::$mimeTypes[$ext] ) ) { |
130 | | - $type = self::$mimeTypes[$ext]; |
| 142 | + // Embedding requires a bit of extra processing, so let's skip that if we can |
| 143 | + if ( $embed ) { |
| 144 | + $type = self::getMimeType( $file ); |
| 145 | + // Detect when URLs were preceeded with embed tags, and also verify file size is |
| 146 | + // below the limit |
| 147 | + if ( |
| 148 | + $type |
| 149 | + && $match['embed'][1] > 0 |
| 150 | + && filesize( $file ) < self::EMBED_SIZE_LIMIT |
| 151 | + ) { |
| 152 | + // Strip off any trailing = symbols (makes browsers freak out) |
| 153 | + $data = base64_encode( file_get_contents( $file ) ); |
| 154 | + // Build 2 CSS properties; one which uses a base64 encoded data URI in place |
| 155 | + // of the @embed comment to try and retain line-number integrity, and the |
| 156 | + // other with a remapped an versioned URL and an Internet Explorer hack |
| 157 | + // making it ignored in all browsers that support data URIs |
| 158 | + $replacement = "{$pre}url(data:{$type};base64,{$data}){$post};"; |
| 159 | + $replacement .= "{$pre}url({$url}){$post}!ie;"; |
131 | 160 | } |
132 | 161 | } |
133 | | - // Detect when URLs were preceeded with embed tags, |
134 | | - // and also verify file size is below the limit |
135 | | - if ( $embed && $type && $match['embed'][1] > 0 |
136 | | - && filesize( $file ) < self::EMBED_SIZE_LIMIT ) |
137 | | - { |
138 | | - // Strip off any trailing = symbols (makes browsers freak out) |
139 | | - $data = base64_encode( file_get_contents( $file ) ); |
140 | | - // Build 2 CSS properties; one which uses a base64 encoded data URI |
141 | | - // in place of the @embed comment to try and retain line-number integrity, |
142 | | - // and the other with a remapped an versioned URL and an Internet Explorer |
143 | | - // hack making it ignored in all browsers that support data URIs |
144 | | - $replacement = "{$pre}url(data:{$type};base64,{$data}){$post};"; |
145 | | - $replacement .= "{$pre}url({$url}){$post}!ie;"; |
146 | | - } else { |
147 | | - // Build a CSS property with a remapped and versioned URL, |
148 | | - // preserving comment for debug mode |
149 | | - $replacement = "{$embed}{$pre}url({$url}){$post};"; |
| 162 | + if ( $replacement === false ) { |
| 163 | + // Assume that all paths are relative to $remote, and make them absolute |
| 164 | + $replacement = "{$embed}{$pre}url({$url}){$post};"; |
150 | 165 | } |
151 | | - |
| 166 | + } else if ( $local === false ) { |
| 167 | + // Assume that all paths are relative to $remote, and make them absolute |
| 168 | + $replacement = "{$embed}{$pre}url({$url}{$query}){$post};"; |
| 169 | + } |
| 170 | + if ( $replacement !== false ) { |
152 | 171 | // Perform replacement on the source |
153 | | - $source = substr_replace( $source, |
154 | | - $replacement, $match[0][1], strlen( $match[0][0] ) ); |
| 172 | + $source = substr_replace( |
| 173 | + $source, $replacement, $match[0][1], strlen( $match[0][0] ) |
| 174 | + ); |
155 | 175 | // Move the offset to the end of the replacement in the source |
156 | 176 | $offset = $match[0][1] + strlen( $replacement ); |
157 | 177 | continue; |
— | — | @@ -160,7 +180,7 @@ |
161 | 181 | } |
162 | 182 | return $source; |
163 | 183 | } |
164 | | - |
| 184 | + |
165 | 185 | /** |
166 | 186 | * Removes whitespace from CSS data |
167 | 187 | * |
Index: branches/REL1_17/phase3/includes/specials/SpecialListfiles.php |
— | — | @@ -213,7 +213,7 @@ |
214 | 214 | Xml::fieldset( wfMsg( 'listfiles' ) ) . |
215 | 215 | Html::openElement( 'table', array( 'id' => 'mw-listfiles-table' ) ) . |
216 | 216 | Xml::buildForm( $inputForm, 'table_pager_limit_submit' ) . |
217 | | - $this->getHiddenFields( array( 'limit', 'ilsearch', 'username' ) ) . |
| 217 | + $this->getHiddenFields( array( 'limit', 'ilsearch', 'user' ) ) . |
218 | 218 | Html::closeElement( 'table' ) . |
219 | 219 | Html::closeElement( 'fieldset' ) . |
220 | 220 | Html::closeElement( 'form' ) . "\n"; |
Index: branches/REL1_17/phase3/includes/ImageGallery.php |
— | — | @@ -156,11 +156,11 @@ |
157 | 157 | } |
158 | 158 | |
159 | 159 | /** |
160 | | - * Add an image at the beginning of the gallery. |
161 | | - * |
162 | | - * @param $title Title object of the image that is added to the gallery |
163 | | - * @param $html String: Additional HTML text to be shown. The name and size of the image are always shown. |
164 | | - */ |
| 160 | + * Add an image at the beginning of the gallery. |
| 161 | + * |
| 162 | + * @param $title Title object of the image that is added to the gallery |
| 163 | + * @param $html String: Additional HTML text to be shown. The name and size of the image are always shown. |
| 164 | + */ |
165 | 165 | function insert( $title, $html='' ) { |
166 | 166 | if ( $title instanceof File ) { |
167 | 167 | // Old calling convention |
— | — | @@ -286,14 +286,13 @@ |
287 | 287 | $imageParameters['alt'] = $nt->getText(); |
288 | 288 | } |
289 | 289 | |
290 | | - # Set both fixed width and height. Otherwise we might have problems |
291 | | - # with the vertical centering of images where height<line-size |
| 290 | + # Set both fixed width and min-height. |
292 | 291 | $thumbhtml = "\n\t\t\t". |
293 | 292 | '<div class="thumb" style="width: ' .($this->mWidths+30).'px; height: ' .($this->mHeights+30).'px;">' |
294 | 293 | # Auto-margin centering for block-level elements. Needed now that we have video |
295 | 294 | # handlers since they may emit block-level elements as opposed to simple <img> tags. |
296 | 295 | # ref http://css-discuss.incutio.com/?page=CenteringBlockElement |
297 | | - . '<div style="margin:'.$vpad.'px auto;">' |
| 296 | + . '<div style="margin:'.$vpad.'px auto 0;">' |
298 | 297 | . $thumb->toHtml( $imageParameters ) . '</div></div>'; |
299 | 298 | |
300 | 299 | // Call parser transform hook |
Index: branches/REL1_17/phase3/languages/messages/MessagesQqq.php |
— | — | @@ -3308,6 +3308,7 @@ |
3309 | 3309 | See also Wikipedia on [http://en.wikipedia.org/wiki/Focal_length#In_photography focal length].', |
3310 | 3310 | 'exif-gpslatitude' => '{{Identical|Latitude}}', |
3311 | 3311 | 'exif-gpslongitude' => '{{Identical|Longitude}}', |
| 3312 | +'exif-objectname' => 'This message labels a field in the image metadata table that is a short name or title for the image. (As compared to {{msg-mw|exif-imagedescription}} which is a long description of the image).', |
3312 | 3313 | |
3313 | 3314 | # EXIF attributes |
3314 | 3315 | 'exif-compression-6' => '{{optional}}', |
Index: branches/REL1_17/phase3/languages/messages/MessagesPl.php |
— | — | @@ -60,6 +60,10 @@ |
61 | 61 | 'Dyskusja_grafiki' => NS_FILE_TALK, |
62 | 62 | ); |
63 | 63 | |
| 64 | +$namespaceGenderAliases = array( |
| 65 | + NS_USER => array( 'male' => 'Użytkownik', 'female' => 'Użytkowniczka' ), |
| 66 | + NS_USER_TALK => array( 'male' => 'Dyskusja_użytkownika', 'female' => 'Dyskusja_użytkowniczki' ), |
| 67 | +); |
64 | 68 | |
65 | 69 | $dateFormats = array( |
66 | 70 | 'mdy time' => 'H:i', |
Index: branches/REL1_17/phase3/languages/messages/MessagesEn.php |
— | — | @@ -3771,6 +3771,7 @@ |
3772 | 3772 | 'exif-gpsareainformation' => 'Name of GPS area', |
3773 | 3773 | 'exif-gpsdatestamp' => 'GPS date', |
3774 | 3774 | 'exif-gpsdifferential' => 'GPS differential correction', |
| 3775 | +'exif-objectname' => 'Short title', |
3775 | 3776 | |
3776 | 3777 | # Make & model, can be wikified in order to link to the camera and model name |
3777 | 3778 | 'exif-make-value' => '$1', # do not translate or duplicate this message to other languages |
Index: branches/REL1_17/phase3/resources/Resources.php |
— | — | @@ -330,6 +330,14 @@ |
331 | 331 | 'dependencies' => array( 'jquery.checkboxShiftClick', 'jquery.client', 'jquery.placeholder' ), |
332 | 332 | 'debugScripts' => 'resources/mediawiki.util/mediawiki.util.test.js', |
333 | 333 | ), |
| 334 | + 'mediawiki.util.jpegmeta' => array( |
| 335 | + 'scripts' => 'resources/mediawiki.util/mediawiki.util.jpegmeta.js', |
| 336 | + ), |
| 337 | + 'mediawiki.action.history' => array( |
| 338 | + 'scripts' => 'resources/mediawiki.action/mediawiki.action.history.js', |
| 339 | + 'dependencies' => 'mediawiki.legacy.history', |
| 340 | + 'group' => 'mediawiki.action.history', |
| 341 | + ), |
334 | 342 | 'mediawiki.action.edit' => array( |
335 | 343 | 'scripts' => 'resources/mediawiki.action/mediawiki.action.edit.js', |
336 | 344 | ), |
— | — | @@ -426,8 +434,11 @@ |
427 | 435 | 'dependencies' => 'mediawiki.legacy.wikibits', |
428 | 436 | ), |
429 | 437 | 'mediawiki.legacy.diff' => array( |
430 | | - 'scripts' => 'skins/common/diff.js', |
431 | | - 'styles' => 'skins/common/diff.css', |
| 438 | + 'scripts' => 'common/diff.js', |
| 439 | + 'styles' => 'common/diff.css', |
| 440 | + 'group' => 'mediawiki.action.history', |
| 441 | + 'remoteBasePath' => $GLOBALS['wgStylePath'], |
| 442 | + 'localBasePath' => "{$GLOBALS['IP']}/skins", |
432 | 443 | 'dependencies' => 'mediawiki.legacy.wikibits', |
433 | 444 | ), |
434 | 445 | 'mediawiki.legacy.edit' => array( |
— | — | @@ -439,7 +450,10 @@ |
440 | 451 | 'dependencies' => 'mediawiki.legacy.wikibits', |
441 | 452 | ), |
442 | 453 | 'mediawiki.legacy.history' => array( |
443 | | - 'scripts' => 'skins/common/history.js', |
| 454 | + 'scripts' => 'common/history.js', |
| 455 | + 'group' => 'mediawiki.action.history', |
| 456 | + 'remoteBasePath' => $GLOBALS['wgStylePath'], |
| 457 | + 'localBasePath' => "{$GLOBALS['IP']}/skins", |
444 | 458 | 'dependencies' => 'mediawiki.legacy.wikibits', |
445 | 459 | ), |
446 | 460 | 'mediawiki.legacy.htmlform' => array( |