r98452 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r98451‎ | r98452 | r98453 >
Date:21:10, 29 September 2011
Author:reedy
Status:ok
Tags:
Comment:
1.18: MFT r97403, r97614, r97657, r97661
Modified paths:
  • /branches/REL1_18/phase3/RELEASE-NOTES-1.18 (modified) (history)
  • /branches/REL1_18/phase3/includes/SkinLegacy.php (modified) (history)
  • /branches/REL1_18/phase3/includes/profiler/ProfilerSimple.php (modified) (history)
  • /branches/REL1_18/phase3/includes/specials/SpecialPrefixindex.php (modified) (history)
  • /branches/REL1_18/phase3/resources/mediawiki.special/mediawiki.special.css (modified) (history)
  • /branches/REL1_18/phase3/skins/CologneBlue.php (modified) (history)
  • /branches/REL1_18/phase3/skins/Standard.php (modified) (history)
  • /branches/REL1_18/phase3/skins/monobook/IE60Fixes.css (modified) (history)

Diff [purge]

Index: branches/REL1_18/phase3/skins/monobook/IE60Fixes.css
@@ -11,17 +11,34 @@
1212 margin-top: 3em;
1313 height: 1%;
1414 }
 15+.rtl div#column-content div#content {
 16+ margin-right: 12.2em;
 17+ margin-left: 0;
 18+}
1519 div#column-one {
1620 position: absolute;
1721 top: 0;
1822 left: 0;
1923 z-index: 4;
2024 }
 25+.rtl div#column-one {
 26+ left: auto;
 27+ right: 0;
 28+}
2129 div#footer {
2230 margin-left: 13.6em;
2331 border-left: 1px solid #fabd23;
2432 }
 33+.rtl div#footer {
 34+ margin-left: 0;
 35+ margin-right: 13.6em;
 36+ border-left: none;
 37+ border-right: 1px solid #fabd23;
 38+}
2539
 40+ /* the tabs */
 41+
 42+
2643 /* the tabs */
2744
2845 #p-cactions {
Index: branches/REL1_18/phase3/skins/CologneBlue.php
@@ -29,19 +29,23 @@
3030 if ( 2 == $qb ) { # Right
3131 $rules[] = "/* @noflip */#quickbar { position: absolute; right: 4px; }";
3232 $rules[] = "/* @noflip */#article { margin-left: 4px; margin-right: 148px; }";
 33+ $rules[] = "/* @noflip */#topbar, #footer { margin-right: 152px; }";
3334 } elseif ( 1 == $qb ) {
3435 $rules[] = "/* @noflip */#quickbar { position: absolute; left: 4px; }";
3536 $rules[] = "/* @noflip */#article { margin-left: 148px; margin-right: 4px; }";
 37+ $rules[] = "/* @noflip */#topbar, #footer { margin-left: 152px; }";
3638 } elseif ( 3 == $qb ) { # Floating left
3739 $rules[] = "/* @noflip */#quickbar { position:absolute; left:4px }";
3840 $rules[] = "/* @noflip */#topbar { margin-left: 148px }";
3941 $rules[] = "/* @noflip */#article { margin-left:148px; margin-right: 4px; }";
4042 $rules[] = "/* @noflip */body>#quickbar { position:fixed; left:4px; top:4px; overflow:auto; bottom:4px;}"; # Hides from IE
 43+ $rules[] = "/* @noflip */#topbar, #footer { margin-left: 152px; }";
4144 } elseif ( 4 == $qb ) { # Floating right
4245 $rules[] = "/* @noflip */#quickbar { position: fixed; right: 4px; }";
4346 $rules[] = "/* @noflip */#topbar { margin-right: 148px }";
4447 $rules[] = "/* @noflip */#article { margin-right: 148px; margin-left: 4px; }";
4548 $rules[] = "/* @noflip */body>#quickbar { position: fixed; right: 4px; top: 4px; overflow: auto; bottom:4px;}"; # Hides from IE
 49+ $rules[] = "/* @noflip */#topbar, #footer { margin-left: 152px; }";
4650 }
4751 $style = implode( "\n", $rules );
4852 $out->addInlineStyle( $style, 'flip' );
@@ -99,10 +103,6 @@
100104 $s .= "\n<div id='footer'>";
101105 $s .= '<table width="98%" border="0" cellspacing="0"><tr>';
102106
103 - $qb = $this->getSkin()->qbSetting();
104 - if ( 1 == $qb || 3 == $qb ) { # Left
105 - $s .= $this->getQuickbarCompensator();
106 - }
107107 $s .= '<td class="bottom">';
108108
109109 $s .= $this->bottomLinks();
@@ -121,12 +121,9 @@
122122 $s .= "\n<br />" . $this->pageStats();
123123
124124 $s .= '</td>';
125 - if ( 2 == $qb ) { # Right
126 - $s .= $this->getQuickbarCompensator();
127 - }
128125 $s .= "</tr></table>\n</div>\n</div>\n";
129126
130 - if ( 0 != $qb ) {
 127+ if ( $this->getSkin()->qbSetting() != 0 ) {
131128 $s .= $this->quickBar();
132129 }
133130 return $s;
Index: branches/REL1_18/phase3/skins/Standard.php
@@ -28,9 +28,11 @@
2929 if ( 2 == $qb ) { # Right
3030 $rules[] = "/* @noflip */#quickbar { position: absolute; top: 4px; right: 4px; border-left: 2px solid #000000; }";
3131 $rules[] = "/* @noflip */#article, #mw-data-after-content { margin-left: 4px; margin-right: 152px; }";
 32+ $rules[] = "/* @noflip */#topbar, #footer { margin-right: 152px; }";
3233 } elseif ( 1 == $qb || 3 == $qb ) {
3334 $rules[] = "/* @noflip */#quickbar { position: absolute; top: 4px; left: 4px; border-right: 1px solid gray; }";
3435 $rules[] = "/* @noflip */#article, #mw-data-after-content { margin-left: 152px; margin-right: 4px; }";
 36+ $rules[] = "/* @noflip */#topbar, #footer { margin-left: 152px; }";
3537 if( 3 == $qb ) {
3638 $rules[] = "/* @noflip */#quickbar { position: fixed; padding: 4px; }";
3739 }
@@ -38,6 +40,7 @@
3941 $rules[] = "/* @noflip */#quickbar { position: fixed; right: 0px; top: 0px; padding: 4px;}";
4042 $rules[] = "/* @noflip */#quickbar { border-right: 1px solid gray; }";
4143 $rules[] = "/* @noflip */#article, #mw-data-after-content { margin-right: 152px; margin-left: 4px; }";
 44+ $rules[] = "/* @noflip */#topbar, #footer { margin-right: 152px; }";
4245 }
4346 $style = implode( "\n", $rules );
4447 $out->addInlineStyle( $style, 'flip' );
@@ -58,17 +61,7 @@
5962
6063 wfProfileOut( __METHOD__ . '-1' );
6164 wfProfileIn( __METHOD__ . '-2' );
62 -
63 - $qb = $this->getSkin()->qbSetting();
64 - $shove = ( $qb != 0 );
65 - $left = ( $qb == 1 || $qb == 3 );
66 -
67 - if ( $shove && $left ) { # Left
68 - $s .= $this->getQuickbarCompensator();
69 - }
70 - wfProfileOut( __METHOD__ . '-2' );
71 - wfProfileIn( __METHOD__ . '-3' );
72 - $l = $wgContLang->alignStart();
 65+ $l = $this->getSkin()->getLang()->alignStart();
7366 $s .= "<td class='bottom' align='$l' valign='top'>";
7467
7568 $s .= $this->bottomLinks();
@@ -80,17 +73,14 @@
8174 . '<br /><span id="pagestats">' . $this->pageStats() . '</span>';
8275
8376 $s .= '</td>';
84 - if ( $shove && !$left ) { # Right
85 - $s .= $this->getQuickbarCompensator();
86 - }
8777 $s .= "</tr></table>\n</div>\n</div>\n";
8878
89 - wfProfileOut( __METHOD__ . '-3' );
90 - wfProfileIn( __METHOD__ . '-4' );
91 - if ( 0 != $qb ) {
 79+ wfProfileOut( __METHOD__ . '-2' );
 80+ wfProfileIn( __METHOD__ . '-3' );
 81+ if ( $this->getSkin()->qbSetting() != 0 ) {
9282 $s .= $this->quickBar();
9383 }
94 - wfProfileOut( __METHOD__ . '-4' );
 84+ wfProfileOut( __METHOD__ . '-3' );
9585 wfProfileOut( __METHOD__ );
9686 return $s;
9787 }
Index: branches/REL1_18/phase3/RELEASE-NOTES-1.18
@@ -456,6 +456,8 @@
457457 space (U+20) will sort under an invisible header like in 1.16 rather than a U+6DE
458458 * (bug 30497) Add client-nojs and client-js classes on document element
459459 to let styles easily hide or show things based on general JS availability
 460+* (bug 18424) Special:Prefixindex and Special:Allpages paging links are
 461+ really small, and somewhat inconsistent with each other.
460462
461463 === API changes in 1.18 ===
462464 * BREAKING CHANGE: action=watch now requires POST and token.
Property changes on: branches/REL1_18/phase3/RELEASE-NOTES-1.18
___________________________________________________________________
Modified: svn:mergeinfo
463465 Merged /trunk/phase3/RELEASE-NOTES-1.18:r97403,97614,97657,97661
Index: branches/REL1_18/phase3/includes/profiler/ProfilerSimple.php
@@ -12,10 +12,20 @@
1313 class ProfilerSimple extends Profiler {
1414 var $mMinimumTime = 0;
1515
 16+ var $zeroEntry = array('cpu'=> 0.0, 'cpu_sq' => 0.0, 'real' => 0.0, 'real_sq' => 0.0, 'count' => 0);
 17+ var $errorEntry;
 18+
1619 function __construct( $params ) {
1720 global $wgRequestTime, $wgRUstart;
1821 parent::__construct( $params );
 22+
 23+ $this->errorEntry = $this->zeroEntry;
 24+ $this->errorEntry['count'] = 1;
 25+
1926 if (!empty($wgRequestTime) && !empty($wgRUstart)) {
 27+ # Remove the -total entry from parent::__construct
 28+ $this->mWorkStack = array();
 29+
2030 $this->mWorkStack[] = array( '-total', 0, $wgRequestTime,$this->getCpuTime($wgRUstart));
2131
2232 $elapsedcpu = $this->getCpuTime() - $this->getCpuTime($wgRUstart);
@@ -23,7 +33,7 @@
2434
2535 $entry =& $this->mCollated["-setup"];
2636 if (!is_array($entry)) {
27 - $entry = array('cpu'=> 0.0, 'cpu_sq' => 0.0, 'real' => 0.0, 'real_sq' => 0.0, 'count' => 0);
 37+ $entry = $this->zeroEntry;
2838 $this->mCollated["-setup"] =& $entry;
2939 }
3040 $entry['cpu'] += $elapsedcpu;
@@ -62,20 +72,18 @@
6373 $message = "Profile section ended by close(): {$ofname}";
6474 $functionname = $ofname;
6575 $this->debug( "$message\n" );
66 - $this->mCollated[$message] = array(
67 - 'real' => 0.0, 'count' => 1);
 76+ $this->mCollated[$message] = $this->errorEntry;
6877 }
6978 elseif ($ofname != $functionname) {
7079 $message = "Profiling error: in({$ofname}), out($functionname)";
7180 $this->debug( "$message\n" );
72 - $this->mCollated[$message] = array(
73 - 'real' => 0.0, 'count' => 1);
 81+ $this->mCollated[$message] = $this->errorEntry;
7482 }
7583 $entry =& $this->mCollated[$functionname];
7684 $elapsedcpu = $this->getCpuTime() - $octime;
7785 $elapsedreal = microtime(true) - $ortime;
7886 if (!is_array($entry)) {
79 - $entry = array('cpu'=> 0.0, 'cpu_sq' => 0.0, 'real' => 0.0, 'real_sq' => 0.0, 'count' => 0);
 87+ $entry = $this->zeroEntry;
8088 $this->mCollated[$functionname] =& $entry;
8189 }
8290 $entry['cpu'] += $elapsedcpu;
Index: branches/REL1_18/phase3/includes/SkinLegacy.php
@@ -90,11 +90,10 @@
9191 }
9292
9393 function doBeforeContent() {
94 - global $wgContLang;
 94+ global $wgLang;
9595 wfProfileIn( __METHOD__ );
9696
9797 $s = '';
98 - $qb = $this->getSkin()->qbSetting();
9998
10099 $langlinks = $this->otherLanguages();
101100 if ( $langlinks ) {
@@ -107,25 +106,20 @@
108107 }
109108
110109 $s .= "\n<div id='content'>\n<div id='topbar'>\n" .
111 - "<table border='0' cellspacing='0' width='98%'>\n<tr>\n";
 110+ "<table border='0' cellspacing='0' width='100%'>\n<tr>\n";
112111
113 - $shove = ( $qb != 0 );
114 - $left = ( $qb == 1 || $qb == 3 );
115 -
116 - if ( !$shove ) {
 112+ if ( $this->getSkin()->qbSetting() == 0 ) {
117113 $s .= "<td class='top' align='left' valign='top' rowspan='{$rows}'>\n" .
118 - $this->getSkin()->logoText() . '</td>';
119 - } elseif ( $left ) {
120 - $s .= $this->getQuickbarCompensator( $rows );
 114+ $this->getSkin()->logoText( $wgLang->alignStart() ) . '</td>';
121115 }
122116
123 - $l = $wgContLang->alignStart();
 117+ $l = $wgLang->alignStart();
124118 $s .= "<td {$borderhack} align='$l' valign='top'>\n";
125119
126120 $s .= $this->topLinks();
127121 $s .= '<p class="subtitle">' . $this->pageTitleLinks() . "</p>\n";
128122
129 - $r = $wgContLang->alignEnd();
 123+ $r = $wgLang->alignEnd();
130124 $s .= "</td>\n<td {$borderhack} valign='top' align='$r' nowrap='nowrap'>";
131125 $s .= $this->nameAndLogin();
132126 $s .= "\n<br />" . $this->searchForm() . '</td>';
@@ -134,10 +128,6 @@
135129 $s .= "</tr>\n<tr>\n<td class='top' colspan=\"2\">$langlinks</td>\n";
136130 }
137131
138 - if ( $shove && !$left ) { # Right
139 - $s .= $this->getQuickbarCompensator( $rows );
140 - }
141 -
142132 $s .= "</tr>\n</table>\n</div>\n";
143133 $s .= "\n<div id='article'>\n";
144134
@@ -593,6 +583,9 @@
594584 return $wgLang->pipeList( $s );
595585 }
596586
 587+ /**
 588+ * @deprecated in 1.19
 589+ */
597590 function getQuickbarCompensator( $rows = 1 ) {
598591 return "<td width='152' rowspan='{$rows}'>&#160;</td>";
599592 }
Index: branches/REL1_18/phase3/includes/specials/SpecialPrefixindex.php
@@ -195,6 +195,7 @@
196196 }
197197 }
198198
 199+ $footer = '';
199200 if ( $this->including() ) {
200201 $out2 = '';
201202 } else {
@@ -205,7 +206,7 @@
206207 <td>' .
207208 $nsForm .
208209 '</td>
209 - <td id="mw-prefixindex-nav-form">';
 210+ <td id="mw-prefixindex-nav-form" class="mw-prefixindex-nav">';
210211
211212 if( isset( $res ) && $res && ( $n == $this->maxPerPage ) && ( $s = $res->fetchObject() ) ) {
212213 $query = array(
@@ -217,20 +218,21 @@
218219 $query['namespace'] = $namespace;
219220 }
220221
221 - $out2 = $wgLang->pipeList( array(
222 - $out2,
223 - $sk->linkKnown(
 222+ $nextLink = Linker::linkKnown(
224223 $self,
225224 wfMsgHtml( 'nextpage', str_replace( '_',' ', htmlspecialchars( $s->page_title ) ) ),
226225 array(),
227226 $query
228 - )
229 - ) );
 227+ );
 228+ $out2 .= $nextLink;
 229+
 230+ $footer = "\n" . Html::element( "hr" )
 231+ . Html::rawElement( "div", array( "class" => "mw-prefixindex-nav" ), $nextLink );
230232 }
231233 $out2 .= "</td></tr>" .
232234 Xml::closeElement( 'table' );
233235 }
234236
235 - $wgOut->addHTML( $out2 . $out );
 237+ $this->getOutput()->addHTML( $out2 . $out . $footer );
236238 }
237239 }
Index: branches/REL1_18/phase3/resources/mediawiki.special/mediawiki.special.css
@@ -25,7 +25,6 @@
2626 }
2727 .mw-allpages-nav {
2828 text-align: right;
29 - font-size: smaller;
3029 margin-bottom: 1em;
3130 }
3231 table.mw-allpages-table-form tr {
@@ -72,11 +71,12 @@
7372 width: 98%;
7473 }
7574 td#mw-prefixindex-nav-form {
76 - font-size: smaller;
7775 margin-bottom: 1em;
78 - text-align: right;
7976 vertical-align: top;
8077 }
 78+.mw-prefixindex-nav {
 79+ text-align: right;
 80+}
8181
8282
8383 /**** Special:Search ****/

Follow-up revisions

RevisionCommit summaryAuthorDate
r98453Followup r98452, move RELEASE-NOTES from r97403reedy21:11, 29 September 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r97403(bug 18424) Clean up paging links on Special:allpages and special:prefixindex....bawolff04:25, 18 September 2011
r97614* Fixed notices issued from ProfilerSimpleUDP which were due to ProfilerSimpl...tstarling11:06, 20 September 2011
r97657Fix support of legacy skins Standard & CologneBlue for user language directio...robin19:47, 20 September 2011
r97661Fixed IE6 issues in RTL modetparscal20:40, 20 September 2011

Status & tagging log