Index: branches/REL1_17/phase3/maintenance/cleanupRemovedModules.php |
— | — | @@ -37,17 +37,18 @@ |
38 | 38 | public function execute() { |
39 | 39 | $dbw = wfGetDB( DB_MASTER ); |
40 | 40 | $rl = new ResourceLoader(); |
41 | | - $moduleNames = array_keys( $rl->getModules() ); |
| 41 | + $moduleNames = $rl->getModuleNames(); |
42 | 42 | $moduleList = implode( ', ', array_map( array( $dbw, 'addQuotes' ), $moduleNames ) ); |
43 | 43 | $limit = max( 1, intval( $this->getOption( 'batchsize', 500 ) ) ); |
44 | 44 | $maxlag = intval( $this->getOption( 'max-slave-lag', 5 ) ); |
45 | 45 | |
46 | 46 | $this->output( "Cleaning up module_deps table...\n" ); |
47 | 47 | $i = 1; |
| 48 | + $modDeps = $dbw->tableName( 'module_deps' ); |
48 | 49 | do { |
49 | 50 | // $dbw->delete() doesn't support LIMIT :( |
50 | 51 | $where = $moduleList ? "md_module NOT IN ($moduleList)" : '1=1'; |
51 | | - $dbw->query( "DELETE FROM module_deps WHERE $where LIMIT $limit", __METHOD__ ); |
| 52 | + $dbw->query( "DELETE FROM $modDeps WHERE $where LIMIT $limit", __METHOD__ ); |
52 | 53 | $numRows = $dbw->affectedRows(); |
53 | 54 | $this->output( "Batch $i: $numRows rows\n" ); |
54 | 55 | $i++; |
— | — | @@ -57,9 +58,11 @@ |
58 | 59 | |
59 | 60 | $this->output( "Cleaning up msg_resource table...\n" ); |
60 | 61 | $i = 1; |
| 62 | + |
| 63 | + $mrRes = $dbw->tableName( 'msg_resource' ); |
61 | 64 | do { |
62 | 65 | $where = $moduleList ? "mr_resource NOT IN ($moduleList)" : '1=1'; |
63 | | - $dbw->query( "DELETE FROM msg_resource WHERE $where LIMIT $limit", __METHOD__ ); |
| 66 | + $dbw->query( "DELETE FROM $mrRes WHERE $where LIMIT $limit", __METHOD__ ); |
64 | 67 | $numRows = $dbw->affectedRows(); |
65 | 68 | $this->output( "Batch $i: $numRows rows\n" ); |
66 | 69 | $i++; |
— | — | @@ -69,9 +72,10 @@ |
70 | 73 | |
71 | 74 | $this->output( "Cleaning up msg_resource_links table...\n" ); |
72 | 75 | $i = 1; |
| 76 | + $msgResLinks = $dbw->tableName( 'msg_resource_links' ); |
73 | 77 | do { |
74 | 78 | $where = $moduleList ? "mrl_resource NOT IN ($moduleList)" : '1=1'; |
75 | | - $dbw->query( "DELETE FROM msg_resource_links WHERE $where LIMIT $limit", __METHOD__ ); |
| 79 | + $dbw->query( "DELETE FROM $msgResLinks WHERE $where LIMIT $limit", __METHOD__ ); |
76 | 80 | $numRows = $dbw->affectedRows(); |
77 | 81 | $this->output( "Batch $i: $numRows rows\n" ); |
78 | 82 | $i++; |
Index: branches/REL1_17/phase3/skins/CologneBlue.php |
— | — | @@ -106,28 +106,33 @@ |
107 | 107 | return $s; |
108 | 108 | } |
109 | 109 | |
110 | | - function reallyGenerateUserStylesheet() { |
111 | | - $s = parent::reallyGenerateUserStylesheet(); |
| 110 | + function setupSkinUserCss( OutputPage $out ){ |
| 111 | + global $wgContLang; |
112 | 112 | $qb = $this->qbSetting(); |
113 | 113 | |
114 | 114 | if ( 2 == $qb ) { # Right |
115 | | - $s .= "#quickbar { position: absolute; right: 4px; }\n" . |
116 | | - "#article { margin-left: 4px; margin-right: 148px; }\n"; |
| 115 | + $rules[] = "#quickbar { position: absolute; right: 4px; }"; |
| 116 | + $rules[] = "#article { margin-left: 4px; margin-right: 148px; }"; |
117 | 117 | } elseif ( 1 == $qb ) { |
118 | | - $s .= "#quickbar { position: absolute; left: 4px; }\n" . |
119 | | - "#article { margin-left: 148px; margin-right: 4px; }\n"; |
| 118 | + $rules[] = "#quickbar { position: absolute; left: 4px; }"; |
| 119 | + $rules[] = "#article { margin-left: 148px; margin-right: 4px; }"; |
120 | 120 | } elseif ( 3 == $qb ) { # Floating left |
121 | | - $s .= "#quickbar { position:absolute; left:4px } \n" . |
122 | | - "#topbar { margin-left: 148px }\n" . |
123 | | - "#article { margin-left:148px; margin-right: 4px; } \n" . |
124 | | - "body>#quickbar { position:fixed; left:4px; top:4px; overflow:auto ;bottom:4px;} \n"; # Hides from IE |
| 121 | + $rules[] = "#quickbar { position:absolute; left:4px }"; |
| 122 | + $rules[] = "#topbar { margin-left: 148px }"; |
| 123 | + $rules[] = "#article { margin-left:148px; margin-right: 4px; }"; |
| 124 | + $rules[] = "body>#quickbar { position:fixed; left:4px; top:4px; overflow:auto ;bottom:4px;}"; # Hides from IE |
125 | 125 | } elseif ( 4 == $qb ) { # Floating right |
126 | | - $s .= "#quickbar { position: fixed; right: 4px; } \n" . |
127 | | - "#topbar { margin-right: 148px }\n" . |
128 | | - "#article { margin-right: 148px; margin-left: 4px; } \n" . |
129 | | - "body>#quickbar { position: fixed; right: 4px; top: 4px; overflow: auto ;bottom:4px;} \n"; # Hides from IE |
| 126 | + $rules[] = "#quickbar { position: fixed; right: 4px; }"; |
| 127 | + $rules[] = "#topbar { margin-right: 148px }"; |
| 128 | + $rules[] = "#article { margin-right: 148px; margin-left: 4px; }"; |
| 129 | + $rules[] = "body>#quickbar { position: fixed; right: 4px; top: 4px; overflow: auto ;bottom:4px;}"; # Hides from IE |
130 | 130 | } |
131 | | - return $s; |
| 131 | + $style = implode( "\n", $rules ); |
| 132 | + if ( $wgContLang->getDir() === 'rtl' ) { |
| 133 | + $style = CSSJanus::transform( $style, true, false ); |
| 134 | + } |
| 135 | + $out->addInlineStyle( $style ); |
| 136 | + parent::setupSkinUserCss( $out ); |
132 | 137 | } |
133 | 138 | |
134 | 139 | function sysLinks() { |
Index: branches/REL1_17/phase3/skins/Standard.php |
— | — | @@ -20,34 +20,28 @@ |
21 | 21 | * |
22 | 22 | */ |
23 | 23 | function setupSkinUserCss( OutputPage $out ){ |
24 | | - if ( 3 == $this->qbSetting() ) { # Floating left |
25 | | - $out->addStyle( 'common/quickbar.css' ); |
26 | | - } elseif ( 4 == $this->qbSetting() ) { # Floating right |
27 | | - $out->addStyle( 'common/quickbar-right.css' ); |
28 | | - } |
29 | | - parent::setupSkinUserCss( $out ); |
30 | | - } |
31 | | - |
32 | | - /** |
33 | | - * |
34 | | - */ |
35 | | - function reallyGenerateUserStylesheet() { |
36 | | - $s = parent::reallyGenerateUserStylesheet(); |
| 24 | + global $wgContLang; |
37 | 25 | $qb = $this->qbSetting(); |
38 | | - |
39 | 26 | if ( 2 == $qb ) { # Right |
40 | | - $s .= "#quickbar { position: absolute; top: 4px; right: 4px; " . |
41 | | - "border-left: 2px solid #000000; }\n" . |
42 | | - "#article, #mw-data-after-content { margin-left: 4px; margin-right: 152px; }\n"; |
| 27 | + $rules[] = "#quickbar { position: absolute; top: 4px; right: 4px; border-left: 2px solid #000000; }"; |
| 28 | + $rules[] = "#article, #mw-data-after-content { margin-left: 4px; margin-right: 152px; }"; |
43 | 29 | } elseif ( 1 == $qb || 3 == $qb ) { |
44 | | - $s .= "#quickbar { position: absolute; top: 4px; left: 4px; " . |
45 | | - "border-right: 1px solid gray; }\n" . |
46 | | - "#article, #mw-data-after-content { margin-left: 152px; margin-right: 4px; }\n"; |
| 30 | + $rules[] = "#quickbar { position: absolute; top: 4px; left: 4px; border-right: 1px solid gray; }"; |
| 31 | + $rules[] = "#article, #mw-data-after-content { margin-left: 152px; margin-right: 4px; }"; |
| 32 | + if( 3 == $qb ) { |
| 33 | + $rules[] = "#quickbar { position: fixed; padding: 4px; }"; |
| 34 | + } |
47 | 35 | } elseif ( 4 == $qb ) { |
48 | | - $s .= "#quickbar { border-right: 1px solid gray; }\n" . |
49 | | - "#article, #mw-data-after-content { margin-right: 152px; margin-left: 4px; }\n"; |
| 36 | + $rules[] = "#quickbar { position: fixed; right: 0px; top: 0px; padding: 4px;}"; |
| 37 | + $rules[] = "#quickbar { border-right: 1px solid gray; }"; |
| 38 | + $rules[] = "#article, #mw-data-after-content { margin-right: 152px; margin-left: 4px; }"; |
50 | 39 | } |
51 | | - return $s; |
| 40 | + $style = implode( "\n", $rules ); |
| 41 | + if ( $wgContLang->getDir() === 'rtl' ) { |
| 42 | + $style = CSSJanus::transform( $style, true, false ); |
| 43 | + } |
| 44 | + $out->addInlineStyle( $style ); |
| 45 | + parent::setupSkinUserCss( $out ); |
52 | 46 | } |
53 | 47 | |
54 | 48 | function doAfterContent() { |
Index: branches/REL1_17/phase3/skins/common/quickbar.css |
— | — | @@ -1 +0,0 @@ |
2 | | -#quickbar { position: fixed; padding: 4px; } |
Index: branches/REL1_17/phase3/skins/common/quickbar-right.css |
— | — | @@ -1 +0,0 @@ |
2 | | -#quickbar { position: fixed; right: 0px; top: 0px; padding: 4px;} |
Index: branches/REL1_17/phase3/skins/Vector.php |
— | — | @@ -27,17 +27,18 @@ |
28 | 28 | * @param $out OutputPage object to initialize |
29 | 29 | */ |
30 | 30 | public function initPage( OutputPage $out ) { |
31 | | - global $wgLocalStylePath; |
| 31 | + global $wgLocalStylePath, $wgRequest; |
32 | 32 | |
33 | 33 | parent::initPage( $out ); |
34 | | - |
| 34 | + |
35 | 35 | // Append CSS which includes IE only behavior fixes for hover support - |
36 | 36 | // this is better than including this in a CSS fille since it doesn't |
37 | 37 | // wait for the CSS file to load before fetching the HTC file. |
38 | | - $out->addScript( |
| 38 | + $min = $wgRequest->getFuzzyBool( 'debug' ) ? '' : '.min'; |
| 39 | + $out->addHeadItem( 'csshover', |
39 | 40 | '<!--[if lt IE 7]><style type="text/css">body{behavior:url("' . |
40 | 41 | htmlspecialchars( $wgLocalStylePath ) . |
41 | | - "/{$this->stylename}/csshover.htc\")}</style><![endif]-->" |
| 42 | + "/{$this->stylename}/csshover{$min}.htc\")}</style><![endif]-->" |
42 | 43 | ); |
43 | 44 | } |
44 | 45 | |
Property changes on: branches/REL1_17/phase3/skins/Vector.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
45 | 46 | Merged /trunk/phase3/skins/Vector.php:r79960,80034,80036,80043-80044,80050,80053,80074-80077,80104,80112,80116,80119-80120 |
Index: branches/REL1_17/phase3/skins/vector/csshover.min.htc |
— | — | @@ -0,0 +1,12 @@ |
| 2 | +<public:attach event="ondocumentready" onevent="CSSHover()" /> |
| 3 | +<script> |
| 4 | +/** |
| 5 | + * Whatever:hover - V3.11 |
| 6 | + * http://www.xs4all.nl/~peterned/ |
| 7 | + * |
| 8 | + * Copyright (c) 2009 Peter Nederlof |
| 9 | + * Licensed under the LGPL license |
| 10 | + * http://creativecommons.org/licenses/LGPL/2.1 |
| 11 | + */ |
| 12 | +window.CSSHover=(function(){var m=/(^|\s)((([^a]([^ ]+)?)|(a([^#.][^ ]+)+)):(hover|active|focus))/i;var n=/(.*?)\:(hover|active|focus)/i;var o=/[^:]+:([a-z\-]+).*/i;var p=/(\.([a-z0-9_\-]+):[a-z]+)|(:[a-z]+)/gi;var q=/\.([a-z0-9_\-]*on(hover|active|focus))/i;var s=/msie (5|6|7)/i;var t=/backcompat/i;var u={index:0,list:['text-kashida','text-kashida-space','text-justify'],get:function(){return this.list[(this.index++)%this.list.length]}};var v=function(c){return c.replace(/-(.)/mg,function(a,b){return b.toUpperCase()})};var w={elements:[],callbacks:{},init:function(){if(!s.test(navigator.userAgent)&&!t.test(window.document.compatMode)){return}var a=window.document.styleSheets,l=a.length;for(var i=0;i<l;i++){this.parseStylesheet(a[i])}},parseStylesheet:function(a){if(a.imports){try{var b=a.imports;var l=b.length;for(var i=0;i<l;i++){this.parseStylesheet(a.imports[i])}}catch(securityException){}}try{var c=a.rules;var r=c.length;for(var j=0;j<r;j++){this.parseCSSRule(c[j],a)}}catch(someException){}},parseCSSRule:function(a,b){var c=a.selectorText;if(m.test(c)){var d=a.style.cssText;var e=n.exec(c)[1];var f=c.replace(o,'on$1');var g=c.replace(p,'.$2'+f);var h=q.exec(g)[1];var i=e+h;if(!this.callbacks[i]){var j=u.get();var k=v(j);b.addRule(e,j+':expression(CSSHover(this, "'+f+'", "'+h+'", "'+k+'"))');this.callbacks[i]=true}b.addRule(g,d)}},patch:function(a,b,c,d){try{var f=a.parentNode.currentStyle[d];a.style[d]=f}catch(e){a.runtimeStyle[d]=''}if(!a.csshover){a.csshover=[]}if(!a.csshover[c]){a.csshover[c]=true;var g=new CSSHoverElement(a,b,c);this.elements.push(g)}return b},unload:function(){try{var l=this.elements.length;for(var i=0;i<l;i++){this.elements[i].unload()}this.elements=[];this.callbacks={}}catch(e){}}};var x={onhover:{activator:'onmouseenter',deactivator:'onmouseleave'},onactive:{activator:'onmousedown',deactivator:'onmouseup'},onfocus:{activator:'onfocus',deactivator:'onblur'}};function CSSHoverElement(a,b,c){this.node=a;this.type=b;var d=new RegExp('(^|\\s)'+c+'(\\s|$)','g');this.activator=function(){a.className+=' '+c};this.deactivator=function(){a.className=a.className.replace(d,' ')};a.attachEvent(x[b].activator,this.activator);a.attachEvent(x[b].deactivator,this.deactivator)}CSSHoverElement.prototype={unload:function(){this.node.detachEvent(x[this.type].activator,this.activator);this.node.detachEvent(x[this.type].deactivator,this.deactivator);this.activator=null;this.deactivator=null;this.node=null;this.type=null}};window.attachEvent('onbeforeunload',function(){w.unload()});return function(a,b,c,d){if(a){return w.patch(a,b,c,d)}else{w.init()}}})(); |
| 13 | +</script> |
Property changes on: branches/REL1_17/phase3/skins/vector/csshover.min.htc |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 14 | + native |
Index: branches/REL1_17/phase3/includes/Linker.php |
— | — | @@ -159,6 +159,7 @@ |
160 | 160 | public function link( $target, $text = null, $customAttribs = array(), $query = array(), $options = array() ) { |
161 | 161 | wfProfileIn( __METHOD__ ); |
162 | 162 | if ( !$target instanceof Title ) { |
| 163 | + wfProfileOut( __METHOD__ ); |
163 | 164 | return "<!-- ERROR -->$text"; |
164 | 165 | } |
165 | 166 | $options = (array)$options; |
Index: branches/REL1_17/phase3/includes/resourceloader/ResourceLoaderStartUpModule.php |
— | — | @@ -75,7 +75,7 @@ |
76 | 76 | 'wgFormattedNamespaces' => $wgContLang->getFormattedNamespaces(), |
77 | 77 | 'wgNamespaceIds' => $wgContLang->getNamespaceIds(), |
78 | 78 | 'wgSiteName' => $wgSitename, |
79 | | - 'wgFileExtensions' => $wgFileExtensions, |
| 79 | + 'wgFileExtensions' => array_values( $wgFileExtensions ), |
80 | 80 | 'wgDBname' => $wgDBname, |
81 | 81 | ); |
82 | 82 | if ( $wgContLang->hasVariants() ) { |
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\([\'"]?(?P<file>[^\?\)\:\'"]*)\??[^\)\'"]*[\'"]?\)'; |
| 40 | + const URL_REGEX = 'url\(\s*[\'"]?(?P<file>[^\?\)\:\'"]*)\??[^\)\'"]*[\'"]?\s*\)'; |
41 | 41 | |
42 | 42 | /* Protected Static Members */ |
43 | 43 | |
Index: branches/REL1_17/phase3/resources/jquery/jquery.localize.js |
— | — | @@ -6,13 +6,15 @@ |
7 | 7 | * with localized text, elements with title-msg and alt-msg attributes will receive localized title |
8 | 8 | * and alt attributes. |
9 | 9 | * |
| 10 | + * Note that "msg" elements must have html namespacing such as "<html:msg />" to be compatible with |
| 11 | + * Internet Explorer. |
| 12 | + * |
10 | 13 | * Example: |
11 | | - * |
12 | | - * <p class="somethingCool"> |
13 | | - * <msg key="my-message" /> |
14 | | - * <img src="something.jpg" title-msg="my-title-message" alt-msg="my-alt-message" /> |
15 | | - * </p> |
16 | | - * |
| 14 | + * <p class="somethingCool"> |
| 15 | + * <html:msg key="my-message" /> |
| 16 | + * <img src="something.jpg" title-msg="my-title-message" alt-msg="my-alt-message" /> |
| 17 | + * </p> |
| 18 | + * |
17 | 19 | * Localizes to... |
18 | 20 | * |
19 | 21 | * <p class="somethingCool"> |
— | — | @@ -30,10 +32,11 @@ |
31 | 33 | * @param Object: options Map of options |
32 | 34 | * * prefix: Message prefix to use when localizing elements and attributes |
33 | 35 | */ |
| 36 | + |
34 | 37 | $.fn.localize = function( options ) { |
35 | 38 | options = $.extend( { 'prefix': '' }, options ); |
36 | 39 | return $(this) |
37 | | - .find( 'msg' ) |
| 40 | + .find( 'msg,html\\:msg' ) |
38 | 41 | .each( function() { |
39 | 42 | $(this) |
40 | 43 | .text( mediaWiki.msg( options.prefix + $(this).attr( 'key' ) ) ) |
— | — | @@ -56,3 +59,6 @@ |
57 | 60 | .end(); |
58 | 61 | }; |
59 | 62 | } )( jQuery, mediaWiki ); |
| 63 | + |
| 64 | +// Let IE know about the msg tag before it's used... |
| 65 | +document.createElement( 'msg' ); |
Index: branches/REL1_17/phase3/resources/jquery/jquery.client.js |
— | — | @@ -169,7 +169,7 @@ |
170 | 170 | var profile = jQuery.client.profile(); |
171 | 171 | var dir = jQuery( 'body' ).is( '.rtl' ) ? 'rtl' : 'ltr'; |
172 | 172 | // Check over each browser condition to determine if we are running in a compatible client |
173 | | - if ( typeof map[dir] !== 'object' || map[dir][profile.name] !== 'object' ) { |
| 173 | + if ( typeof map[dir] !== 'object' || typeof map[dir][profile.name] === 'undefined' ) { |
174 | 174 | // Unknown, so we assume it's working |
175 | 175 | return true; |
176 | 176 | } |
— | — | @@ -191,4 +191,13 @@ |
192 | 192 | } |
193 | 193 | return true; |
194 | 194 | } |
195 | | -} )(); |
\ No newline at end of file |
| 195 | +} )(); |
| 196 | + |
| 197 | +$( document ).ready( function() { |
| 198 | + var profile = $.client.profile(); |
| 199 | + $( 'html' ) |
| 200 | + .addClass( 'client-' + profile.name ) |
| 201 | + .addClass( 'client-' + profile.name + '-' + profile.versionBase ) |
| 202 | + .addClass( 'client-' + profile.layout ) |
| 203 | + .addClass( 'client-' + profile.platform ); |
| 204 | +} ); |
Property changes on: branches/REL1_17/phase3/resources/mediawiki/mediawiki.js |
___________________________________________________________________ |
Modified: svn:mergeinfo |
196 | 205 | Merged /trunk/phase3/resources/mediawiki/mediawiki.js:r79960,80034,80036,80043-80044,80050,80053,80074-80077,80104,80112,80116,80119-80120 |