r80529 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r80528‎ | r80529 | r80530 >
Date:23:00, 18 January 2011
Author:catrope
Status:ok
Tags:
Comment:
Modified paths:
  • /branches/REL1_17/extensions/CodeReview/ui/SpecialRepoAdmin.php (modified) (history)
  • /branches/REL1_17/extensions/wikihiero/wikihiero.php (modified) (history)
  • /branches/REL1_17/phase3/RELEASE-NOTES (modified) (history)
  • /branches/REL1_17/phase3/includes/MessageCache.php (modified) (history)
  • /branches/REL1_17/phase3/includes/installer/DatabaseInstaller.php (modified) (history)
  • /branches/REL1_17/phase3/languages/Language.php (modified) (history)
  • /branches/REL1_17/phase3/skins/CologneBlue.php (modified) (history)
  • /branches/REL1_17/phase3/skins/Simple.php (modified) (history)
  • /branches/REL1_17/phase3/skins/Standard.php (modified) (history)
  • /branches/REL1_17/phase3/skins/simple/rtl.css (deleted) (history)
  • /branches/REL1_17/phase3/skins/vector/screen.css (modified) (history)

Diff [purge]

Index: branches/REL1_17/extensions/wikihiero/wikihiero.php
@@ -49,7 +49,7 @@
5050 }
5151
5252 // MediaWiki entry point
53 -function WikiHieroLoader( $text, $attribs, &$parser ) {
 53+function WikiHieroLoader( $text, $attribs, $parser ) {
5454 WikiHieroLoad();
5555 $parser->setHook( 'hiero', 'WikiHieroHook' );
5656 return WikiHieroHook( $text, $attribs, $parser );
Index: branches/REL1_17/extensions/CodeReview/ui/SpecialRepoAdmin.php
@@ -124,7 +124,7 @@
125125 'repo_viewvc' => $viewPath,
126126 'repo_bugzilla' => $bugPath
127127 ),
128 - array( 'repo_id' => $this->mRepo->getId() ),
 128+ array( 'repo_id' => $this->repo->getId() ),
129129 __METHOD__
130130 );
131131 } else {
Index: branches/REL1_17/phase3/skins/CologneBlue.php
@@ -109,6 +109,7 @@
110110 function setupSkinUserCss( OutputPage $out ){
111111 global $wgContLang;
112112 $qb = $this->qbSetting();
 113+ $rules = array();
113114
114115 if ( 2 == $qb ) { # Right
115116 $rules[] = "#quickbar { position: absolute; right: 4px; }";
Index: branches/REL1_17/phase3/skins/Standard.php
@@ -22,6 +22,8 @@
2323 function setupSkinUserCss( OutputPage $out ){
2424 global $wgContLang;
2525 $qb = $this->qbSetting();
 26+ $rules = array();
 27+
2628 if ( 2 == $qb ) { # Right
2729 $rules[] = "#quickbar { position: absolute; top: 4px; right: 4px; border-left: 2px solid #000000; }";
2830 $rules[] = "#article, #mw-data-after-content { margin-left: 4px; margin-right: 152px; }";
Index: branches/REL1_17/phase3/skins/simple/rtl.css
@@ -1,186 +0,0 @@
2 -/*
3 -Right-to-left fixes for Simple.
4 -Places sidebar on right, tweaks various alignment issues.
5 -
6 -Works mostly ok nicely on Safari 1.2.1; fine in Mozilla.
7 -
8 -Safari bugs (1.2.1):
9 -* Tabs are still appearing in left-to-right order. (Try after localizing)
10 -
11 -Opera bugs (7.23 linux):
12 -* Some bits of ltr text (sidebar box titles) have forward and backward versions overlapping each other
13 -
14 -IE/mac bugs:
15 -* The thing barfs on Hebrew and Arabic anyway, so no point testing.
16 -
17 -Missing features due to lack of support:
18 -* external link icons
19 -
20 -To test:
21 -* Opera6
22 -* IE 5.0
23 -* etc
24 -
25 -*/
26 -body {
27 - direction: rtl;
28 - unicode-bidi: embed;
29 -}
30 -#column-content {
31 - margin: 0 -12.2em 0 0;
32 - float: left;
33 -}
34 -#column-content #content{
35 - margin-left: 0;
36 - margin-right: 12.2em;
37 - border-right: 1px solid #aaaaaa;
38 - border-left: none;
39 -}
40 -html>body .portlet {
41 - float: right;
42 - clear: right;
43 -}
44 -.editsection {
45 - float: left;
46 - margin-right: 5px;
47 - margin-left: 0; /* bug 9122: undo default LTR */
48 -}
49 -/* recover IEMac (might be fine with the float, but usually it's close to IE */
50 -*>body .portlet {
51 - float: none;
52 - clear: none;
53 -}
54 -.pBody {
55 - padding: 0 0.5em 0.3em 0.8em;
56 -}
57 -
58 -/* Fix alignment */
59 -.documentByLine,
60 -.portletDetails,
61 -.portletMore {
62 - text-align: left;
63 -}
64 -
65 -div div.thumbcaption {
66 - text-align: right;
67 -}
68 -
69 -div.magnify,
70 -#p-logo {
71 - left: auto;
72 - right: 0;
73 -}
74 -
75 -/* Fix margins for non-css2 browsers */
76 -/* top right bottom left */
77 -
78 -dd {
79 - margin-left: 0;
80 - margin-right: 1.6em;
81 -}
82 -#contentSub {
83 - margin-right: 1em;
84 - margin-left: 0;
85 -}
86 -.tocindent {
87 - margin-left: 0;
88 - margin-right: 2em;
89 -}
90 -div.tright, div.floatright, table.floatright {
91 - clear: none;
92 -}
93 -div.tleft, div.floatleft, table.floatleft {
94 - clear: left;
95 -}
96 -
97 -/* Fix link icons */
98 -.external, a.feedlink {
99 - padding: 0 !important;
100 - background: none !important;
101 -}
102 -#footer {
103 - clear: both;
104 -}
105 -* html #footer {
106 - margin-left: 0;
107 - margin-right: 13.6em;
108 - border-left: 0;
109 - border-right: 1px solid #fabd23;
110 -}
111 -* html #column-content {
112 - float: none;
113 - margin-left: 0;
114 - margin-right: 0;
115 -}
116 -* html #column-content #content {
117 - margin-left: 0;
118 - margin-top: 3em;
119 -}
120 -* html #column-one { right: 0; }
121 -
122 -/* js pref toc */
123 -
124 -#preftoc {
125 - margin-right: 1em;
126 -}
127 -
128 -.errorbox, .successbox, #preftoc li, .prefsection fieldset {
129 - float: right;
130 -}
131 -
132 -.prefsection {
133 - padding-right: 2em;
134 -}
135 -
136 -/* workaround for moz bug, displayed bullets on left side */
137 -
138 -#toc ul {
139 - text-align: right;
140 -}
141 -
142 -#toc ul ul {
143 - margin: 0 2em 0 0;
144 -}
145 -
146 -input#wpSave, input#wpDiff {
147 - margin-right: 0;
148 - margin-left: .33em;
149 -}
150 -
151 -#userlogin {
152 - margin: 0 0 1em 3em;
153 -}
154 -/* Convenience links to edit block, delete and protect reasons */
155 -p.mw-ipb-conveniencelinks, p.mw-protect-editreasons,
156 -p.mw-filedelete-editreasons, p.mw-delete-editreasons {
157 - float: left;
158 -}
159 -
160 -.toggle {
161 - margin-left: 0em;
162 - margin-right: 2em;
163 -}
164 -table.filehistory th {
165 - text-align: right;
166 -}
167 -
168 -/**
169 - * Lists:
170 - * The following lines don't have a visible effect on non-Gecko browsers
171 - * They fix a problem ith Gecko browsers rendering lists to the right of
172 - * left-floated objects in an RTL layout.
173 - */
174 -html > body div#bodyContent ul {
175 - display: table;
176 -}
177 -
178 -/* Special:Allpages styling */
179 -td.mw-allpages-nav, p.mw-allpages-nav, td.mw-allpages-alphaindexline {
180 - text-align: left;
181 -}
182 -
183 -/* Special:Prefixindex styling */
184 -td#mw-prefixindex-nav-form {
185 - text-align: left;
186 -}
187 -
Index: branches/REL1_17/phase3/skins/vector/screen.css
@@ -1,8 +1,16 @@
22 /*
3 - * Any rules which should not be flipped automatically in right-to-left situations should be prepended with @noflip in
4 - * a comment block. Images that should be embedded as base64 data-URLs should be prepended with @embed in a comment
5 - * block.
 3+ * Any rules which should not be flipped automatically in right-to-left situations should be
 4+ * prepended with @noflip in a comment block. Images that should be embedded as base64 data-URLs
 5+ * should be prepended with @embed in a comment block.
 6+ *
 7+ * This style-sheet employs a few CSS trick to accomplish compatibility with a wide range of web
 8+ * browsers. The most common trick is to use some styles in IE6 only. This is accomplished by using
 9+ * a rule that makes things work in IE6, and then following it with a rule that begins with
 10+ * "html > body" or use a child selector ">", which is ignored by IE6 because it does not support
 11+ * the child selector. You can spot this by looking for the "OVERRIDDEN BY COMPLIANT BROWSERS" and
 12+ * "IGNORED BY IE6" comments.
613 */
 14+
715 /* Framework */
816 html,
917 body {
@@ -162,12 +170,8 @@
163171 background-image: url(images/tab-break.png);
164172 background-position: bottom right;
165173 background-repeat: no-repeat;
166 - }
167 - div.vectorTabs li a{
168174 color: #0645ad;
169175 cursor: pointer;
170 - }
171 - div.vectorTabs li a {
172176 font-size: 0.8em;
173177 }
174178 /* IGNORED BY IE6 */
@@ -217,14 +221,15 @@
218222 background-image: url(images/tab-break.png);
219223 background-repeat: no-repeat;
220224 }
 225+ /* This will be flipped - unlike the one above it */
 226+ div#mw-head div.vectorMenu h5 {
 227+ background-position: bottom left;
 228+ margin-left: -1px;
 229+ }
221230 /* IGNORED BY IE6 */
222231 div#mw-head div.vectorMenu > h5 {
223232 background-image: none;
224233 }
225 - div#mw-head div.vectorMenu h5 {
226 - background-position: bottom left;
227 - margin-left: -1px;
228 - }
229234 div#mw-head div.vectorMenu h4 {
230235 display: inline-block;
231236 float: left;
@@ -245,7 +250,8 @@
246251 background-image: url(images/tab-break.png);
247252 background-repeat: no-repeat;
248253 }
249 - div.vectorMenu h5 a{
 254+ /* This will be flipped - unlike the one above it */
 255+ div.vectorMenu h5 a {
250256 background-position: bottom right;
251257 }
252258 /* IGNORED BY IE6 */
@@ -268,7 +274,8 @@
269275 body.rtl div.vectorMenu > div.menu {
270276 margin-left: auto;
271277 }
272 - /* Fixes old versions of FireFox */
 278+ /* IGNORED BY IE6 */
 279+ /* Also fixes old versions of FireFox */
273280 /* @noflip */
274281 body.rtl div.vectorMenu > div.menu,
275282 x:-moz-any-link {
@@ -312,16 +319,14 @@
313320 display: inline-block;
314321 padding: 0.5em;
315322 white-space: nowrap;
 323+ color: #0645ad;
 324+ cursor: pointer;
 325+ font-size: 0.8em;
316326 }
317327 /* IGNORED BY IE6 */
318328 div.vectorMenu li > a {
319329 display: block;
320330 }
321 - div.vectorMenu li a {
322 - color: #0645ad;
323 - cursor: pointer;
324 - font-size: 0.8em;
325 - }
326331 div.vectorMenu li.selected a,
327332 div.vectorMenu li.selected a:visited {
328333 color: #333333;
@@ -390,7 +395,6 @@
391396 background-color: transparent;
392397 direction: ltr;
393398 }
394 - /* OVERRIDDEN BY COMPLIANT BROWSERS */
395399 div#simpleSearch button#searchButton {
396400 padding: 0;
397401 margin: 0 5px;
@@ -399,6 +403,7 @@
400404 background-color: transparent;
401405 font-size: x-small;
402406 }
 407+ /* OVERRIDDEN BY COMPLIANT BROWSERS */
403408 div#simpleSearch button#searchButton img {
404409 border: none;
405410 margin: 0;
@@ -555,7 +560,7 @@
556561 background-position: bottom right;
557562 background-repeat: no-repeat;
558563 }
559 - /* IGNORED BY IE6 */
 564+ /* Sadly, IE6 won't understand this */
560565 #preftoc li:first-child {
561566 margin-left: 1px;
562567 }
@@ -1136,6 +1141,7 @@
11371142 #ca-watch.icon {
11381143 margin-right:1px;
11391144 }
 1145+/* OVERRIDDEN BY COMPLIANT BROWSERS */
11401146 #ca-unwatch.icon a,
11411147 #ca-watch.icon a {
11421148 margin: 0;
Index: branches/REL1_17/phase3/skins/Simple.php
@@ -25,16 +25,11 @@
2626 parent::setupSkinUserCss( $out );
2727
2828 $out->addStyle( 'simple/main.css', 'screen' );
29 - $out->addStyle( 'simple/rtl.css', '', '', 'rtl' );
3029 }
3130
3231 function reallyGenerateUserStylesheet() {
3332 global $wgUser;
3433 $s = '';
35 - if( ( $undopt = $wgUser->getOption( 'underline' ) ) != 2 ) {
36 - $underline = $undopt ? 'underline' : 'none';
37 - $s .= "a { text-decoration: $underline; }\n";
38 - }
3934 if( $wgUser->getOption( 'highlightbroken' ) ) {
4035 $s .= "a.new, #quickbar a.new { text-decoration: line-through; }\n";
4136 } else {
@@ -56,15 +51,6 @@
5752 }
5853 CSS;
5954 }
60 - if( $wgUser->getOption( 'justify' ) ) {
61 - $s .= "#article, #bodyContent { text-align: justify; }\n";
62 - }
63 - if( !$wgUser->getOption( 'showtoc' ) ) {
64 - $s .= "#toc { display: none; }\n";
65 - }
66 - if( !$wgUser->getOption( 'editsection' ) ) {
67 - $s .= ".editsection { display: none; }\n";
68 - }
6955 return $s;
7056 }
7157 }
Index: branches/REL1_17/phase3/languages/Language.php
@@ -1545,11 +1545,21 @@
15461546 }
15471547
15481548 function getMessage( $key ) {
1549 - return self::$dataCache->getSubitem( $this->getCodeForMessage(), 'messages', $key );
 1549+ // Don't change getPreferredVariant() to getCode() / mCode, because:
 1550+
 1551+ // 1. Some language like Chinese has multiple variant languages. Only
 1552+ // getPreferredVariant() (in LanguageConverter) could return a
 1553+ // sub-language which would be more suitable for the user.
 1554+ // 2. To languages without multiple variants, getPreferredVariant()
 1555+ // (in FakeConverter) functions exactly same as getCode() / mCode,
 1556+ // it won't break anything.
 1557+
 1558+ // The same below.
 1559+ return self::$dataCache->getSubitem( $this->getPreferredVariant(), 'messages', $key );
15501560 }
15511561
15521562 function getAllMessages() {
1553 - return self::$dataCache->getItem( $this->getCodeForMessage(), 'messages' );
 1563+ return self::$dataCache->getItem( $this->getPreferredVariant(), 'messages' );
15541564 }
15551565
15561566 function iconv( $in, $out, $string ) {
@@ -2766,18 +2776,6 @@
27672777 function getCode() {
27682778 return $this->mCode;
27692779 }
2770 -
2771 - /**
2772 - * Get langcode for message
2773 - * Some language, like Chinese (zh, without any suffix), has multiple
2774 - * interface languages, we could choose a better one for user.
2775 - * Inherit class can override this function if necessary.
2776 - *
2777 - * @return string
2778 - */
2779 - function getCodeForMessage() {
2780 - return $this->getPreferredVariant();
2781 - }
27822780
27832781 function setCode( $code ) {
27842782 $this->mCode = $code;
Index: branches/REL1_17/phase3/includes/installer/DatabaseInstaller.php
@@ -129,10 +129,15 @@
130130 return $status;
131131 }
132132
 133+ $this->db->begin( __METHOD__ );
 134+
133135 $error = $this->db->sourceFile( $this->db->getSchema() );
134136 if( $error !== true ) {
135137 $this->db->reportQueryError( $error, 0, '', __METHOD__ );
 138+ $this->db->rollback( __METHOD__ );
136139 $status->fatal( 'config-install-tables-failed', $error );
 140+ } else {
 141+ $this->db->commit( __METHOD__ );
137142 }
138143 return $status;
139144 }
Property changes on: branches/REL1_17/phase3/includes/installer/DatabaseInstaller.php
___________________________________________________________________
Modified: svn:mergeinfo
140145 Merged /trunk/phase3/includes/installer/DatabaseInstaller.php:r80163,80222,80322,80492
Index: branches/REL1_17/phase3/includes/MessageCache.php
@@ -550,7 +550,9 @@
551551 throw new MWException( "Bad lang code $langcode given" );
552552 }
553553
554 - $langcode = $lang->getCodeForMessage();
 554+ // Don't change getPreferredVariant() to getCode() / mCode, for
 555+ // more details, see the comment in Language::getMessage().
 556+ $langcode = $lang->getPreferredVariant();
555557
556558 $message = false;
557559
Index: branches/REL1_17/phase3/RELEASE-NOTES
@@ -488,6 +488,7 @@
489489 * (bug 26540) Fixed wrong call to applyPatch in MysqlUpdater
490490 * (bug 26034) Make the "View / Read" tab in content_navigation style tabs remain
491491 selected when the action is "purge".
 492+* (bug 26733) Wrap initial table creation in transaction
492493
493494 === API changes in 1.17 ===
494495 * BREAKING CHANGE: action=patrol now requires POST
Property changes on: branches/REL1_17/phase3/RELEASE-NOTES
___________________________________________________________________
Modified: svn:mergeinfo
495496 Merged /trunk/phase3/RELEASE-NOTES:r80163,80222,80322,80492

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r80163Convert simple skin to Resource loader....hartman11:28, 13 January 2011
r80222Cleaned up some comments that were in the wrong places, missing, or misleadin...tparscal00:55, 14 January 2011
r80223Removed redundant padding rule added in r80106.tparscal00:56, 14 January 2011
r80319* (bug 26713) Wikihiero not rendering with PHP 5.3.4reedy20:35, 14 January 2011
r80322* (bug 26733) Wrap initial table creation in transactionreedy20:43, 14 January 2011
r80472Followup r80034. Make sure that $rules actually exists, otherwise we might ge...hartman23:05, 17 January 2011
r80481(bug 26780) Fix fatal from refactoring in r76214demon01:00, 18 January 2011
r80492Follow up r77452. Follow mark's suggest to remove getCodeForMessage() and exp...philip07:59, 18 January 2011

Status & tagging log