r104179 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r104178‎ | r104179 | r104180 >
Date:16:27, 24 November 2011
Author:reedy
Status:ok
Tags:
Comment:
Modified paths:
  • /branches/REL1_18/phase3 (modified) (history)
  • /branches/REL1_18/phase3/includes (modified) (history)
  • /branches/REL1_18/phase3/includes/api (modified) (history)
  • /branches/REL1_18/phase3/includes/api/ApiQueryExtLinksUsage.php (modified) (history)
  • /branches/REL1_18/phase3/includes/installer/DatabaseUpdater.php (modified) (history)
  • /branches/REL1_18/phase3/includes/installer/MysqlUpdater.php (modified) (history)
  • /branches/REL1_18/phase3/includes/installer/OracleUpdater.php (modified) (history)
  • /branches/REL1_18/phase3/includes/installer/SqliteUpdater.php (modified) (history)
  • /branches/REL1_18/phase3/includes/specials (modified) (history)
  • /branches/REL1_18/phase3/includes/specials/SpecialLinkSearch.php (modified) (history)
  • /branches/REL1_18/phase3/skins/CologneBlue.php (modified) (history)
  • /branches/REL1_18/phase3/skins/cologneblue/screen.css (modified) (history)

Diff [purge]

Index: branches/REL1_18/phase3/skins/CologneBlue.php
@@ -29,23 +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; }";
 33+ $rules[] = "/* @noflip */#footer { margin-right: 152px; }";
3434 } elseif ( 1 == $qb ) {
3535 $rules[] = "/* @noflip */#quickbar { position: absolute; left: 4px; }";
3636 $rules[] = "/* @noflip */#article { margin-left: 148px; margin-right: 4px; }";
37 - $rules[] = "/* @noflip */#topbar, #footer { margin-left: 152px; }";
 37+ $rules[] = "/* @noflip */#footer { margin-left: 152px; }";
3838 } elseif ( 3 == $qb ) { # Floating left
3939 $rules[] = "/* @noflip */#quickbar { position:absolute; left:4px }";
4040 $rules[] = "/* @noflip */#topbar { margin-left: 148px }";
4141 $rules[] = "/* @noflip */#article { margin-left:148px; margin-right: 4px; }";
4242 $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; }";
 43+ $rules[] = "/* @noflip */#footer { margin-left: 152px; }";
4444 } elseif ( 4 == $qb ) { # Floating right
4545 $rules[] = "/* @noflip */#quickbar { position: fixed; right: 4px; }";
4646 $rules[] = "/* @noflip */#topbar { margin-right: 148px }";
4747 $rules[] = "/* @noflip */#article { margin-right: 148px; margin-left: 4px; }";
4848 $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; }";
 49+ $rules[] = "/* @noflip */#footer { margin-right: 152px; }";
5050 }
5151 $style = implode( "\n", $rules );
5252 $out->addInlineStyle( $style, 'flip' );
@@ -67,7 +67,7 @@
6868
6969 $s .= '</td><td class="top" id="top-syslinks" width="100%">';
7070 $s .= $this->sysLinks();
71 - $s .= '</td></tr><tr><td class="top-linkcollection">';
 71+ $s .= '</td></tr><tr><td class="top-subheader">';
7272
7373 $s .= '<font size="-1"><span id="sitesub">';
7474 $s .= htmlspecialchars( wfMsg( 'sitesubtitle' ) ) . '</span></font>';
Index: branches/REL1_18/phase3/skins/cologneblue/screen.css
@@ -103,6 +103,9 @@
104104 td.top-linkcollection {
105105 text-align: right;
106106 }
 107+td.top-subheader {
 108+ vertical-align: top;
 109+}
107110
108111 /**
109112 * Overrides text justification (user preference)
Index: branches/REL1_18/phase3/includes/installer/DatabaseUpdater.php
@@ -190,7 +190,7 @@
191191 * @param $what Array: what updates to perform
192192 */
193193 public function doUpdates( $what = array( 'core', 'extensions', 'purge', 'stats' ) ) {
194 - global $wgVersion;
 194+ global $wgLocalisationCacheConf, $wgVersion;
195195
196196 $what = array_flip( $what );
197197 if ( isset( $what['core'] ) ) {
@@ -203,8 +203,12 @@
204204
205205 $this->setAppliedUpdates( $wgVersion, $this->updates );
206206
207 - if( isset( $what['purge'] ) ) {
 207+ if ( isset( $what['purge'] ) ) {
208208 $this->purgeCache();
 209+
 210+ if ( $wgLocalisationCacheConf['manualRecache'] ) {
 211+ $this->rebuildLocalisationCache();
 212+ }
209213 }
210214 if ( isset( $what['stats'] ) ) {
211215 $this->checkStats();
@@ -575,7 +579,7 @@
576580 $task->execute();
577581 }
578582
579 - protected function doRebuildLocalisationCache() {
 583+ protected function rebuildLocalisationCache() {
580584 /**
581585 * @var $cl RebuildLocalisationCache
582586 */
Index: branches/REL1_18/phase3/includes/installer/MysqlUpdater.php
@@ -182,7 +182,6 @@
183183 array( 'modifyField', 'user_properties', 'up_property', 'patch-up_property.sql' ),
184184 array( 'addTable', 'uploadstash', 'patch-uploadstash.sql' ),
185185 array( 'addTable', 'user_former_groups', 'patch-user_former_groups.sql'),
186 - array( 'doRebuildLocalisationCache' ),
187186 );
188187 }
189188
Index: branches/REL1_18/phase3/includes/installer/OracleUpdater.php
@@ -36,7 +36,6 @@
3737 array( 'addIndex', 'user', 'i02', 'patch-user_email_index.sql' ),
3838 array( 'modifyField', 'user_properties', 'up_property', 'patch-up_property.sql' ),
3939 array( 'addTable', 'uploadstash', 'patch-uploadstash.sql' ),
40 - array( 'doRebuildLocalisationCache' ),
4140 array( 'doRebuildDuplicateFunction' ),
4241
4342 );
Index: branches/REL1_18/phase3/includes/installer/SqliteUpdater.php
@@ -59,7 +59,6 @@
6060 array( 'addIndex', 'user', 'user_email', 'patch-user_email_index.sql' ),
6161 array( 'addTable', 'uploadstash', 'patch-uploadstash.sql' ),
6262 array( 'addTable', 'user_former_groups', 'patch-user_former_groups.sql'),
63 - array( 'doRebuildLocalisationCache' ),
6463 );
6564 }
6665
Index: branches/REL1_18/phase3/includes/api/ApiQueryExtLinksUsage.php
@@ -182,7 +182,9 @@
183183 global $wgUrlProtocols;
184184 $protocols = array( '' );
185185 foreach ( $wgUrlProtocols as $p ) {
186 - $protocols[] = substr( $p, 0, strpos( $p, ':' ) );
 186+ if ( $p !== '//' ) {
 187+ $protocols[] = substr( $p, 0, strpos( $p, ':' ) );
 188+ }
187189 }
188190 return $protocols;
189191 }
Property changes on: branches/REL1_18/phase3/includes/api
___________________________________________________________________
Modified: svn:mergeinfo
190192 Merged /trunk/phase3/includes/api:r104033
Index: branches/REL1_18/phase3/includes/specials/SpecialLinkSearch.php
@@ -50,9 +50,11 @@
5151 $target = $wgRequest->getVal( 'target', $par );
5252 $namespace = $wgRequest->getIntorNull( 'namespace', null );
5353
54 - $protocols_list[] = '';
 54+ $protocols_list = array();
5555 foreach( $wgUrlProtocols as $prot ) {
56 - $protocols_list[] = $prot;
 56+ if ( $prot !== '//' ) {
 57+ $protocols_list[] = $prot;
 58+ }
5759 }
5860
5961 $target2 = $target;
@@ -71,15 +73,13 @@
7274 // default
7375 $protocol = 'http://';
7476 }
75 - if ( !in_array( $protocol, $protocols_list ) ) {
 77+ if ( $protocol != '' && !in_array( $protocol, $protocols_list ) ) {
7678 // unsupported protocol, show original search request
7779 $target2 = $target;
7880 $protocol = '';
7981 }
8082
81 - $self = $this->getTitle();
82 -
83 - $wgOut->addWikiMsg( 'linksearch-text', '<nowiki>' . $wgLang->commaList( $wgUrlProtocols ) . '</nowiki>' );
 83+ $out->addWikiMsg( 'linksearch-text', '<nowiki>' . $this->getLanguage()->commaList( $protocols_list ) . '</nowiki>' );
8484 $s = Xml::openElement( 'form', array( 'id' => 'mw-linksearch-form', 'method' => 'get', 'action' => $GLOBALS['wgScript'] ) ) .
8585 Html::hidden( 'title', $self->getPrefixedDbKey() ) .
8686 '<fieldset>' .
Property changes on: branches/REL1_18/phase3/includes/specials
___________________________________________________________________
Modified: svn:mergeinfo
8787 Merged /trunk/phase3/includes/specials:r104033
Property changes on: branches/REL1_18/phase3/includes
___________________________________________________________________
Modified: svn:mergeinfo
8888 Merged /trunk/phase3/includes:r103328,103634,103672,103677,104033
Property changes on: branches/REL1_18/phase3
___________________________________________________________________
Modified: svn:mergeinfo
8989 Merged /trunk/phase3:r103328,103634,103672,103677,104033

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r103328Follow-up r101449 and friends: no need to consider LC rebuild a database upda...maxsem15:21, 16 November 2011
r103634Don't force a localization cache rebuild if it will be handled automatically.gicode02:53, 19 November 2011
r103672Fix an issue with the header of CologneBlue. Introduced in r97657...hartman13:48, 19 November 2011
r103677Fix the sitesub of cologneblue. Follow up to r80785hartman14:09, 19 November 2011
r104033Followup r102951: per CR, remove duplicated empty string from API extlinks mo...catrope13:41, 23 November 2011

Status & tagging log