Index: branches/REL1_18/phase3/maintenance/deleteBatch.php |
— | — | @@ -87,8 +87,10 @@ |
88 | 88 | if ( $page->getNamespace() == NS_FILE ) { |
89 | 89 | $art = new ImagePage( $page ); |
90 | 90 | $img = wfFindFile( $art->mTitle ); |
91 | | - if ( !$img || !$img->delete( $reason ) ) { |
92 | | - $this->output( "FAILED to delete image file... " ); |
| 91 | + if ( !$img |
| 92 | + || !$img->isLocal() |
| 93 | + || !$img->delete( $reason ) ) { |
| 94 | + $this->output( " FAILED to delete image file... " ); |
93 | 95 | } |
94 | 96 | } else { |
95 | 97 | $art = new Article( $page ); |
— | — | @@ -96,7 +98,7 @@ |
97 | 99 | $success = $art->doDeleteArticle( $reason ); |
98 | 100 | $dbw->commit(); |
99 | 101 | if ( $success ) { |
100 | | - $this->output( "\n" ); |
| 102 | + $this->output( " Deleted!\n" ); |
101 | 103 | } else { |
102 | 104 | $this->output( " FAILED to delete article\n" ); |
103 | 105 | } |
Index: branches/REL1_18/phase3/skins/Simple.php |
— | — | @@ -42,7 +42,7 @@ |
43 | 43 | $rules[] = "a.stub:after { $underline; }"; |
44 | 44 | } |
45 | 45 | $style = implode( "\n", $rules ); |
46 | | - $out->addInlineStyle( $style, /* flip css if RTL */true ); |
| 46 | + $out->addInlineStyle( $style, 'flip' ); |
47 | 47 | |
48 | 48 | } |
49 | 49 | } |
Index: branches/REL1_18/phase3/skins/monobook/IE70Fixes.css |
— | — | @@ -9,6 +9,9 @@ |
10 | 10 | height: 1%; |
11 | 11 | } |
12 | 12 | |
| 13 | +.rtl div#column-content div#content { margin-right: 12.2em; margin-left: 0; } |
| 14 | + |
| 15 | + |
13 | 16 | .rtl div#column-one { |
14 | 17 | /* For some reason it tries to inherit the padding-top into every div, |
15 | 18 | * and I can't figure out how to get it back off. |
— | — | @@ -18,9 +21,13 @@ |
19 | 22 | margin-top: 160px; |
20 | 23 | } |
21 | 24 | |
22 | | -.rtl #bodyContent a.external { |
23 | | - background-image: url(external-rtl.png); |
24 | | - padding: 0 13px 0 0; |
| 25 | +/* These elements also have padding-left: 20px; in main.css, but in RTL mode this is flipped. |
| 26 | + * That's good in normal browsers, but in IE7 it needs to not be flipped for some daft reason. |
| 27 | + * Also clear the right margin (originally margin-left: 1em) |
| 28 | + */ |
| 29 | +li#pt-userpage, li#pt-anonuserpage, li#pt-login { |
| 30 | + padding-left: 20px; |
| 31 | + margin-right: 0; |
25 | 32 | } |
26 | 33 | |
27 | 34 | .rtl a.feedlink { |
Index: branches/REL1_18/phase3/skins/CologneBlue.php |
— | — | @@ -44,7 +44,7 @@ |
45 | 45 | $rules[] = "/* @noflip */body>#quickbar { position: fixed; right: 4px; top: 4px; overflow: auto; bottom:4px;}"; # Hides from IE |
46 | 46 | } |
47 | 47 | $style = implode( "\n", $rules ); |
48 | | - $out->addInlineStyle( $style, /* flip css if RTL */true ); |
| 48 | + $out->addInlineStyle( $style, 'flip' ); |
49 | 49 | } |
50 | 50 | |
51 | 51 | } |
Index: branches/REL1_18/phase3/skins/Standard.php |
— | — | @@ -27,20 +27,20 @@ |
28 | 28 | |
29 | 29 | if ( 2 == $qb ) { # Right |
30 | 30 | $rules[] = "/* @noflip */#quickbar { position: absolute; top: 4px; right: 4px; border-left: 2px solid #000000; }"; |
31 | | - $rules[] = "/* @noflip */#article, /* @noflip */#mw-data-after-content { margin-left: 4px; margin-right: 152px; }"; |
| 31 | + $rules[] = "/* @noflip */#article, #mw-data-after-content { margin-left: 4px; margin-right: 152px; }"; |
32 | 32 | } elseif ( 1 == $qb || 3 == $qb ) { |
33 | 33 | $rules[] = "/* @noflip */#quickbar { position: absolute; top: 4px; left: 4px; border-right: 1px solid gray; }"; |
34 | | - $rules[] = "/* @noflip */#article, /* @noflip */#mw-data-after-content { margin-left: 152px; margin-right: 4px; }"; |
| 34 | + $rules[] = "/* @noflip */#article, #mw-data-after-content { margin-left: 152px; margin-right: 4px; }"; |
35 | 35 | if( 3 == $qb ) { |
36 | 36 | $rules[] = "/* @noflip */#quickbar { position: fixed; padding: 4px; }"; |
37 | 37 | } |
38 | 38 | } elseif ( 4 == $qb ) { |
39 | 39 | $rules[] = "/* @noflip */#quickbar { position: fixed; right: 0px; top: 0px; padding: 4px;}"; |
40 | 40 | $rules[] = "/* @noflip */#quickbar { border-right: 1px solid gray; }"; |
41 | | - $rules[] = "/* @noflip */#article, /* @noflip */#mw-data-after-content { margin-right: 152px; margin-left: 4px; }"; |
| 41 | + $rules[] = "/* @noflip */#article, #mw-data-after-content { margin-right: 152px; margin-left: 4px; }"; |
42 | 42 | } |
43 | 43 | $style = implode( "\n", $rules ); |
44 | | - $out->addInlineStyle( $style, /* flip css if RTL */true ); |
| 44 | + $out->addInlineStyle( $style, 'flip' ); |
45 | 45 | } |
46 | 46 | |
47 | 47 | } |
Index: branches/REL1_18/phase3/skins/common/shared.css |
— | — | @@ -732,6 +732,13 @@ |
733 | 733 | margin: 0 2em 0 0; |
734 | 734 | } |
735 | 735 | |
| 736 | +#toc #toctitle, |
| 737 | +.toc #toctitle, |
| 738 | +#toc .toctitle, |
| 739 | +.toc .toctitle { |
| 740 | + direction: ltr; |
| 741 | +} |
| 742 | + |
736 | 743 | /* tooltip styles */ |
737 | 744 | .mw-help-field-hint { |
738 | 745 | display: none; |
Index: branches/REL1_18/phase3/skins/MonoBook.php |
— | — | @@ -36,10 +36,10 @@ |
37 | 37 | } |
38 | 38 | |
39 | 39 | // TODO: Migrate all of these |
40 | | - //$out->addStyle( 'monobook/IE50Fixes.css', 'screen', 'lt IE 5.5000' ); |
41 | | - //$out->addStyle( 'monobook/IE55Fixes.css', 'screen', 'IE 5.5000' ); |
42 | | - //$out->addStyle( 'monobook/IE60Fixes.css', 'screen', 'IE 6' ); |
43 | | - //$out->addStyle( 'monobook/IE70Fixes.css', 'screen', 'IE 7' ); |
| 40 | + $out->addStyle( 'monobook/IE50Fixes.css', 'screen', 'lt IE 5.5000' ); |
| 41 | + $out->addStyle( 'monobook/IE55Fixes.css', 'screen', 'IE 5.5000' ); |
| 42 | + $out->addStyle( 'monobook/IE60Fixes.css', 'screen', 'IE 6' ); |
| 43 | + $out->addStyle( 'monobook/IE70Fixes.css', 'screen', 'IE 7' ); |
44 | 44 | |
45 | 45 | } |
46 | 46 | } |
Index: branches/REL1_18/phase3/RELEASE-NOTES-1.18 |
— | — | @@ -202,14 +202,8 @@ |
203 | 203 | * Introduced $wgVaryOnXFPForAPI which will cause the API to send |
204 | 204 | Vary: X-Forwarded-Proto headers. |
205 | 205 | * New maintenance script to refresh image metadata (maintenance/refreshImageMetadata.php) |
206 | | -* (bug 16428) Include permalink in printable version |
207 | | -* (bug 30940) Add a hook in User:getDefaultOptions. |
208 | | - To give extensions a better and more flexible way of providing default |
209 | | - values for preferences a hook has been introdiced in User:getDefaultOptions(). |
210 | | - Setting preferences in $wgDefaultUserOptions still work fine, but when reading |
211 | | - them (i.e. with array_keys) to get a list of all preferences, then |
212 | | - $wgDefaultUserOptions should no longer be used as it will contain those set via |
213 | | - User:getDefaultOptions(). |
| 206 | +* (bug 30722) Add an identity collation that sorts things based on what the |
| 207 | + unicode code point is (aka pre-1.17 behaviour) |
214 | 208 | |
215 | 209 | === Bug fixes in 1.18 === |
216 | 210 | * mw.util.getScript has been implemented (like wfScript in GlobalFunctions.php) |
Property changes on: branches/REL1_18/phase3/RELEASE-NOTES-1.18 |
___________________________________________________________________ |
Modified: svn:mergeinfo |
217 | 211 | Merged /trunk/phase3/RELEASE-NOTES-1.18:r96760,96765,96810,97551-97552,97575,97607-97608,97622-97623,97625,97634 |
Index: branches/REL1_18/phase3/includes/profiler/Profiler.php |
— | — | @@ -13,7 +13,7 @@ |
14 | 14 | */ |
15 | 15 | function wfProfileIn( $functionname ) { |
16 | 16 | global $wgProfiler; |
17 | | - if ( isset( $wgProfiler['class'] ) ) { |
| 17 | + if ( $wgProfiler instanceof Profiler || isset( $wgProfiler['class'] ) ) { |
18 | 18 | Profiler::instance()->profileIn( $functionname ); |
19 | 19 | } |
20 | 20 | } |
— | — | @@ -24,7 +24,7 @@ |
25 | 25 | */ |
26 | 26 | function wfProfileOut( $functionname = 'missing' ) { |
27 | 27 | global $wgProfiler; |
28 | | - if ( isset( $wgProfiler['class'] ) ) { |
| 28 | + if ( $wgProfiler instanceof Profiler || isset( $wgProfiler['class'] ) ) { |
29 | 29 | Profiler::instance()->profileOut( $functionname ); |
30 | 30 | } |
31 | 31 | } |
Index: branches/REL1_18/phase3/includes/OutputPage.php |
— | — | @@ -2902,10 +2902,10 @@ |
2903 | 2903 | /** |
2904 | 2904 | * Adds inline CSS styles |
2905 | 2905 | * @param $style_css Mixed: inline CSS |
2906 | | - * @param $flip Boolean: Whether to flip the CSS if needed |
| 2906 | + * @param $flip False or String: Set to 'flip' to flip the CSS if needed |
2907 | 2907 | */ |
2908 | 2908 | public function addInlineStyle( $style_css, $flip = false ) { |
2909 | | - if( $flip && $this->getLang()->isRTL() ) { |
| 2909 | + if( $flip === 'flip' && $this->getLang()->isRTL() ) { |
2910 | 2910 | # If wanted, and the interface is right-to-left, flip the CSS |
2911 | 2911 | $style_css = CSSJanus::transform( $style_css, true, false ); |
2912 | 2912 | } |
Property changes on: branches/REL1_18/phase3/includes/OutputPage.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
2913 | 2913 | Merged /trunk/phase3/includes/OutputPage.php:r96760,96765,96810,97551-97552,97575,97607-97608,97622-97623,97625,97634 |
Index: branches/REL1_18/phase3/includes/installer/MysqlUpdater.php |
— | — | @@ -162,7 +162,6 @@ |
163 | 163 | |
164 | 164 | // 1.17 |
165 | 165 | array( 'addTable', 'iwlinks', 'patch-iwlinks.sql' ), |
166 | | - array( 'addTable', 'user_former_groups', 'patch-user_former_groups.sql'), |
167 | 166 | array( 'addIndex', 'iwlinks', 'iwl_prefix_title_from', 'patch-rename-iwl_prefix.sql' ), |
168 | 167 | array( 'addField', 'updatelog', 'ul_value', 'patch-ul_value.sql' ), |
169 | 168 | array( 'addField', 'interwiki', 'iw_api', 'patch-iw_api_and_wikiid.sql' ), |
— | — | @@ -181,7 +180,8 @@ |
182 | 181 | array( 'doUserNewTalkTimestampNotNull' ), |
183 | 182 | array( 'addIndex', 'user', 'user_email', 'patch-user_email_index.sql' ), |
184 | 183 | array( 'modifyField', 'user_properties', 'up_property', 'patch-up_property.sql' ), |
185 | | - array( 'addTable', 'uploadstash', 'patch-uploadstash.sql' ), |
| 184 | + array( 'addTable', 'uploadstash', 'patch-uploadstash.sql' ), |
| 185 | + array( 'addTable', 'user_former_groups', 'patch-user_former_groups.sql'), |
186 | 186 | ); |
187 | 187 | } |
188 | 188 | |
Index: branches/REL1_18/phase3/includes/installer/SqliteUpdater.php |
— | — | @@ -42,8 +42,7 @@ |
43 | 43 | array( 'sqliteSetupSearchindex' ), |
44 | 44 | |
45 | 45 | // 1.17 |
46 | | - array( 'addTable', 'iwlinks', 'patch-iwlinks.sql' ), |
47 | | - array( 'addTable', 'user_former_groups', 'patch-user_former_groups.sql'), |
| 46 | + array( 'addTable', 'user_former_groups', 'patch-user_former_groups.sql'), |
48 | 47 | array( 'addIndex', 'iwlinks', 'iwl_prefix_title_from', 'patch-rename-iwl_prefix.sql' ), |
49 | 48 | array( 'addField', 'updatelog', 'ul_value', 'patch-ul_value.sql' ), |
50 | 49 | array( 'addField', 'interwiki', 'iw_api', 'patch-iw_api_and_wikiid.sql' ), |
— | — | @@ -58,7 +57,8 @@ |
59 | 58 | |
60 | 59 | // 1.18 |
61 | 60 | array( 'addIndex', 'user', 'user_email', 'patch-user_email_index.sql' ), |
62 | | - array( 'addTable', 'uploadstash', 'patch-uploadstash.sql' ), |
| 61 | + array( 'addTable', 'uploadstash', 'patch-uploadstash.sql' ), |
| 62 | + array( 'addTable', 'user_former_groups', 'patch-user_former_groups.sql'), |
63 | 63 | ); |
64 | 64 | } |
65 | 65 | |
Index: branches/REL1_18/phase3/includes/resourceloader/ResourceLoaderContext.php |
— | — | @@ -73,6 +73,8 @@ |
74 | 74 | */ |
75 | 75 | public static function expandModuleNames( $modules ) { |
76 | 76 | $retval = array(); |
| 77 | + // For backwards compatibility with an earlier hack, replace ! with . |
| 78 | + $modules = str_replace( '!', '.', $modules ); |
77 | 79 | $exploded = explode( '|', $modules ); |
78 | 80 | foreach ( $exploded as $group ) { |
79 | 81 | if ( strpos( $group, ',' ) === false ) { |
Index: branches/REL1_18/phase3/includes/AutoLoader.php |
— | — | @@ -116,6 +116,7 @@ |
117 | 117 | 'HttpRequest' => 'includes/HttpFunctions.old.php', |
118 | 118 | 'IContextSource' => 'includes/RequestContext.php', |
119 | 119 | 'IcuCollation' => 'includes/Collation.php', |
| 120 | + 'IdentityCollation' => 'includes/Collation.php', |
120 | 121 | 'ImageGallery' => 'includes/ImageGallery.php', |
121 | 122 | 'ImageHistoryList' => 'includes/ImagePage.php', |
122 | 123 | 'ImageHistoryPseudoPager' => 'includes/ImagePage.php', |
Property changes on: branches/REL1_18/phase3/includes/AutoLoader.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
123 | 124 | Merged /trunk/phase3/includes/AutoLoader.php:r96760,96765,96810,97551-97552,97575,97607-97608,97622-97623,97625,97634 |
Index: branches/REL1_18/phase3/includes/Collation.php |
— | — | @@ -23,6 +23,8 @@ |
24 | 24 | switch( $collationName ) { |
25 | 25 | case 'uppercase': |
26 | 26 | return new UppercaseCollation; |
| 27 | + case 'identity': |
| 28 | + return new IdentityCollation; |
27 | 29 | case 'uca-default': |
28 | 30 | return new IcuCollation( 'root' ); |
29 | 31 | default: |
— | — | @@ -99,6 +101,30 @@ |
100 | 102 | } |
101 | 103 | } |
102 | 104 | |
| 105 | +/** |
| 106 | + * Collation class that's essentially a no-op. |
| 107 | + * |
| 108 | + * Does sorting based on binary value of the string. |
| 109 | + * Like how things were pre 1.17. |
| 110 | + */ |
| 111 | +class IdentityCollation extends Collation { |
| 112 | + |
| 113 | + function getSortKey( $string ) { |
| 114 | + return $string; |
| 115 | + } |
| 116 | + |
| 117 | + function getFirstLetter( $string ) { |
| 118 | + global $wgContLang; |
| 119 | + // Copied from UppercaseCollation. |
| 120 | + // I'm kind of unclear on when this could happen... |
| 121 | + if ( $string[0] == "\0" ) { |
| 122 | + $string = substr( $string, 1 ); |
| 123 | + } |
| 124 | + return $wgContLang->firstChar( $string ); |
| 125 | + } |
| 126 | +} |
| 127 | + |
| 128 | + |
103 | 129 | class IcuCollation extends Collation { |
104 | 130 | var $primaryCollator, $mainCollator, $locale; |
105 | 131 | var $firstLetterData; |
Index: branches/REL1_18/phase3/includes/DefaultSettings.php |
— | — | @@ -4796,6 +4796,8 @@ |
4797 | 4797 | * |
4798 | 4798 | * - uppercase: Converts the category name to upper case, and sorts by that. |
4799 | 4799 | * |
| 4800 | + * - identity: Does no conversion. Sorts by binary value of the string. |
| 4801 | + * |
4800 | 4802 | * - uca-default: Provides access to the Unicode Collation Algorithm with |
4801 | 4803 | * the default element table. This is a compromise collation which sorts |
4802 | 4804 | * all languages in a mediocre way. However, it is better than "uppercase". |
— | — | @@ -4809,7 +4811,7 @@ |
4810 | 4812 | * the sort keys in the database. |
4811 | 4813 | * |
4812 | 4814 | * Extensions can define there own collations by subclassing Collation |
4813 | | - * and using the class name as the value of this variable. |
| 4815 | + * and using the Collation::factory hook. |
4814 | 4816 | */ |
4815 | 4817 | $wgCategoryCollation = 'uppercase'; |
4816 | 4818 | |
Index: branches/REL1_18/phase3/resources/mediawiki/mediawiki.js |
— | — | @@ -1064,6 +1064,23 @@ |
1065 | 1065 | return null; |
1066 | 1066 | }; |
1067 | 1067 | |
| 1068 | + /** |
| 1069 | + * Get names of all registered modules. |
| 1070 | + * |
| 1071 | + * @return {Array} |
| 1072 | + */ |
| 1073 | + this.getModuleNames = function() { |
| 1074 | + var names = $.map( registry, function( i, key ) { |
| 1075 | + return key; |
| 1076 | + } ); |
| 1077 | + return names; |
| 1078 | + }; |
| 1079 | + |
| 1080 | + /** |
| 1081 | + * For backwards-compatibility with Squid-cached pages. Loads mw.user |
| 1082 | + */ |
| 1083 | + this.go = function() { mw.loader.load( 'mediawiki.user' ); }; |
| 1084 | + |
1068 | 1085 | /* Cache document ready status */ |
1069 | 1086 | |
1070 | 1087 | $(document).ready( function() { ready = true; } ); |