r112585 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r112584‎ | r112585 | r112586 >
Date:11:05, 28 February 2012
Author:hashar
Status:deferred (Comments)
Tags:
Comment:
Bug 34767 : static.wikipedia.org show useless browsing link

HTML Dump are no more generated so there is no point in having links
to non existant places.
Modified paths:
  • /trunk/extensions/DumpHTML/wm-scripts/index.inc (modified) (history)

Diff [purge]

Index: trunk/extensions/DumpHTML/wm-scripts/index.inc
@@ -6,6 +6,10 @@
77 $inProgressDir = @readlink( '/a/static/downloads/in_progress' );
88 $inProgressText = $inProgressDir ?
99 htmlspecialchars( date( 'F Y', strtotime( basename( $inProgressDir ) . '-01' ) ) ) : false;
 10+
 11+ # Show browsing link to the HTML dumps.
 12+ # Disable them when they are not generated
 13+ $enableBrowsing = false;
1014 ?>
1115 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
1216 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
@@ -126,6 +130,7 @@
127131 <ul>
128132 <li><strong><a href="https://www.mediawiki.org/downloads/<?php echo $encCurrentBase; ?>">Downloads</a></strong></li>
129133 </ul>
 134+<?php if( $enableBrowsing ) { ?>
130135 <h2>Browse</h2>
131136 <p>Try before you download, click on a language code below.</p>
132137
@@ -148,6 +153,7 @@
149154 }
150155 ?>
151156 </p>
 157+<?php } // enableBrowsings ?>
152158 <div class="visualClear"></div>
153159 </div>
154160 </div>

Comments

#Comment by Hashar (talk | contribs)   11:10, 28 February 2012

needs dumpHTML to be shipped with 1.19wmf1

#Comment by Reedy (talk | contribs)   20:38, 28 February 2012

Where is $enableBrowsing set to true?

#Comment by Hashar (talk | contribs)   20:40, 28 February 2012

It is never enabled. But that would let anyone easily reestablish the browsing link by just looking at the very first lines of the script. Kind of a live hack :-/

#Comment by Hashar (talk | contribs)   20:40, 28 February 2012

Note: we probably want to disable static.wikipedia.org

#Comment by Hashar (talk | contribs)   22:01, 6 March 2012

no more needed static.wikipedia.org is now redirecting to dumps.wikimedia.org

Status & tagging log