r53208 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r53207‎ | r53208 | r53209 >
Date:23:50, 13 July 2009
Author:brion
Status:deferred (Comments)
Tags:
Comment:
Apply live hacks, local merges, and removal of SVN externals -- all copied from live deployment installation today. Whee!
Modified paths:
  • /branches/wmf-deployment/api.php (modified) (history)
  • /branches/wmf-deployment/extensions/AbuseFilter/AbuseFilter.parser.php (modified) (history)
  • /branches/wmf-deployment/extensions/AbuseFilter/Views/AbuseFilterViewEdit.php (modified) (history)
  • /branches/wmf-deployment/extensions/FCKeditor (modified) (history)
  • /branches/wmf-deployment/extensions/MWSearch/MWSearch_body.php (modified) (history)
  • /branches/wmf-deployment/extensions/SecurePoll/includes/Auth.php (modified) (history)
  • /branches/wmf-deployment/extensions/SecurePoll/includes/VotePage.php (modified) (history)
  • /branches/wmf-deployment/extensions/SyntaxHighlight_GeSHi (modified) (history)
  • /branches/wmf-deployment/extensions/UsabilityInitiative/EditToolbar/EditToolbar.hooks.php (modified) (history)
  • /branches/wmf-deployment/extensions/UsabilityInitiative/EditWarning/EditWarning.hooks.php (modified) (history)
  • /branches/wmf-deployment/extensions/UsabilityInitiative/EditWarning/EditWarning.php (modified) (history)
  • /branches/wmf-deployment/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php (modified) (history)
  • /branches/wmf-deployment/extensions/Widgets (modified) (history)
  • /branches/wmf-deployment/includes/ChangeTags.php (modified) (history)
  • /branches/wmf-deployment/includes/DefaultSettings.php (modified) (history)
  • /branches/wmf-deployment/includes/EditPage.php (modified) (history)
  • /branches/wmf-deployment/includes/ImagePage.php (modified) (history)
  • /branches/wmf-deployment/includes/Math.php (modified) (history)
  • /branches/wmf-deployment/includes/SkinTemplate.php (modified) (history)
  • /branches/wmf-deployment/includes/Title.php (modified) (history)
  • /branches/wmf-deployment/includes/User.php (modified) (history)
  • /branches/wmf-deployment/includes/parser/ParserOutput.php (modified) (history)
  • /branches/wmf-deployment/includes/specials/SpecialBlockip.php (modified) (history)
  • /branches/wmf-deployment/includes/specials/SpecialRecentchanges.php (modified) (history)
  • /branches/wmf-deployment/includes/specials/SpecialSearch.php (modified) (history)
  • /branches/wmf-deployment/languages/Language.php (modified) (history)
  • /branches/wmf-deployment/maintenance/archives/patch-categorylinksindex.sql (modified) (history)
  • /branches/wmf-deployment/maintenance/backup.inc (modified) (history)
  • /branches/wmf-deployment/maintenance/gearman/gearmanWorker.php (modified) (history)
  • /branches/wmf-deployment/maintenance/runJobs.php (modified) (history)
  • /branches/wmf-deployment/maintenance/storage/make-blobs (modified) (history)
  • /branches/wmf-deployment/skins/common/htmlform.js (modified) (history)
  • /branches/wmf-deployment/skins/common/mwsuggest.js (modified) (history)
  • /branches/wmf-deployment/skins/common/shared.css (modified) (history)

Diff [purge]

Index: branches/wmf-deployment/maintenance/archives/patch-categorylinksindex.sql
@@ -8,4 +8,5 @@
99
1010 ALTER TABLE /*$wgDBprefix*/categorylinks
1111 DROP INDEX cl_sortkey,
12 - ADD INDEX cl_sortkey(cl_to, cl_sortkey, cl_from);
 12+ ADD INDEX cl_sortkey(cl_to, cl_sortkey, cl_from),
 13+ TYPE=InnoDB;
Index: branches/wmf-deployment/maintenance/storage/make-blobs
@@ -1,11 +1,16 @@
22 #!/bin/bash
33
4 -if [ X$2 == X ];then
5 - echo 'Usage: make-blobs <server> <db>'
 4+if [ -z $2 ];then
 5+ echo 'Usage: make-blobs <server> <db> [<table name>]'
66 exit 1
77 fi
 8+if [ -z $3 ]; then
 9+ table=blobs
 10+else
 11+ table=$3
 12+fi
813
914 echo "CREATE DATABASE $2" | mysql -u wikiadmin -p`wikiadmin_pass` -h $1 && \
10 -mysql -u wikiadmin -p`wikiadmin_pass` -h $1 $2 < blobs.sql
 15+sed "s/blobs\>/$table/" blobs.sql | mysql -u wikiadmin -p`wikiadmin_pass` -h $1 $2
1116
1217
Index: branches/wmf-deployment/maintenance/backup.inc
@@ -233,6 +233,9 @@
234234 }
235235
236236 function backupDb() {
 237+ ## Live-hack to support LB --Andrew 2009-05-26
 238+ return wfGetDB( DB_SLAVE );
 239+
237240 global $wgDBadminuser, $wgDBadminpassword;
238241 global $wgDBname, $wgDebugDumpSql, $wgDBtype;
239242 $flags = ($wgDebugDumpSql ? DBO_DEBUG : 0) | DBO_DEFAULT; // god-damn hack
Index: branches/wmf-deployment/maintenance/runJobs.php
@@ -14,6 +14,8 @@
1515 $wgUseNormalUser = true;
1616 require_once( 'commandLine.inc' );
1717
 18+ini_set( 'memory_limit', 150*1024*1024 );
 19+
1820 if ( isset( $options['procs'] ) ) {
1921 $procs = intval( $options['procs'] );
2022 if ( $procs < 1 || $procs > 1000 ) {
Index: branches/wmf-deployment/maintenance/gearman/gearmanWorker.php
@@ -4,6 +4,8 @@
55 require( dirname(__FILE__).'/../commandLine.inc' );
66 require( dirname(__FILE__).'/gearman.inc' );
77
 8+ini_set('memory_limit', '150M' );
 9+
810 if ( isset( $options['procs'] ) ) {
911 $procs = $options['procs'];
1012 if ( $procs < 1 || $procs > 1000 ) {
Index: branches/wmf-deployment/skins/common/shared.css
@@ -289,7 +289,11 @@
290290 font-weight: bold;
291291 }
292292
 293+table#mw-search-top-table {
 294+ background-color:inherit;
 295+}
293296
 297+
294298 /*
295299 * Advanced PowerSearch box
296300 */
Index: branches/wmf-deployment/skins/common/mwsuggest.js
@@ -864,3 +864,4 @@
865865 }
866866
867867 hookEvent("load", os_MWSuggestInit);
 868+
Index: branches/wmf-deployment/skins/common/htmlform.js
@@ -14,8 +14,13 @@
1515
1616 var htmlforms = {
1717 'selectOrOtherSelectChanged' : function(e) {
 18+ var select;
1819 if (!e) e = window.event;
19 - var select = e.target;
 20+ if (e.target) select = e.target;
 21+ else if (e.srcElement) select = e.srcElement;
 22+ if (select.nodeType == 3) // defeat Safari bug
 23+ select = select.parentNode;
 24+
2025 var id = select.id;
2126 var textbox = document.getElementById( id+'-other' );
2227
Property changes on: branches/wmf-deployment/extensions/Widgets
___________________________________________________________________
Deleted: svn:externals
2328 - smarty http://smarty-php.googlecode.com/svn/tags/Smarty_2_6_18/libs/
Index: branches/wmf-deployment/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php
@@ -13,16 +13,17 @@
1414 private static $messages = array();
1515 private static $styles = array();
1616 private static $scripts = array(
17 - array( 'src' => 'Resources/jquery.textSelection.js', 'version' => 1 ),
18 - array( 'src' => 'Resources/jquery.cookie.js', 'version' => 1 ),
19 - array( 'src' => 'Resources/jquery.async.js', 'version' => 1 ),
20 - array( 'src' => 'Resources/jquery.browser.js', 'version' => 1 ),
 17+ array( 'src' => 'Resources/jquery.combined.js', 'version' => 1 ),
2118 );
22 -
23 -
 19+ private static $doOutput = false;
2420
 21+
2522 /* Static Functions */
2623
 24+ public static function initialize() {
 25+ self::$doOutput = true;
 26+ }
 27+
2728 /**
2829 * AjaxAddScript hook
2930 * Adds scripts
@@ -31,11 +32,13 @@
3233 global $wgScriptPath, $wgJsMimeType;
3334 global $wgUsabilityInitiativeCoesxistWithMvEmbed;
3435
 36+ if ( !self::$doOutput )
 37+ return true;
 38+
3539 // Play nice with mv_embed
3640 if ( !$wgUsabilityInitiativeCoesxistWithMvEmbed ) {
3741 self::$scripts = array_merge(
3842 array(
39 - array( 'src' => 'Resources/jquery.js', 'version' => 1 ),
4043 array( 'src' => 'Resources/messages.js', 'version' => 1 ),
4144 ),
4245 self::$scripts
@@ -86,7 +89,10 @@
8790 */
8891 public static function addCss( $out ) {
8992 global $wgScriptPath, $wgJsMimeType;
90 -
 93+
 94+ if ( !self::$doOutput )
 95+ return true;
 96+
9197 // Loops over each style
9298 foreach ( self::$styles as $style ) {
9399 // Add css for various styles
Index: branches/wmf-deployment/extensions/UsabilityInitiative/EditToolbar/EditToolbar.hooks.php
@@ -40,6 +40,7 @@
4141
4242 // Add JS and CSS
4343 global $wgEditToolbarStyleVersion;
 44+ UsabilityInitiativeHooks::initialize();
4445 UsabilityInitiativeHooks::addScript(
4546 'EditToolbar/EditToolbar.js', $wgEditToolbarStyleVersion
4647 );
Index: branches/wmf-deployment/extensions/UsabilityInitiative/EditWarning/EditWarning.php
@@ -41,4 +41,4 @@
4242 dirname( __FILE__ ) . '/EditWarning.i18n.php';
4343
4444 // Registers Hooks
45 -$wgHooks['AjaxAddScript'][] = 'EditWarningHooks::initialize';
 45+$wgHooks['EditPage::showEditForm:initial'][] = 'EditWarningHooks::initialize';
Index: branches/wmf-deployment/extensions/UsabilityInitiative/EditWarning/EditWarning.hooks.php
@@ -14,9 +14,10 @@
1515 * AjaxAddScript hook
1616 * Initializes the component
1717 */
18 - public static function initialize() {
19 - global $wgEditWarningStyleVersion;
20 -
 18+ public static function initialize( $out ) {
 19+ global $wgEditWarningStyleVersion, $wgRequest;
 20+
 21+ UsabilityInitiativeHooks::initialize();
2122 // Adds script to document
2223 UsabilityInitiativeHooks::addScript(
2324 'EditWarning/EditWarning.js', $wgEditWarningStyleVersion
Property changes on: branches/wmf-deployment/extensions/SyntaxHighlight_GeSHi
___________________________________________________________________
Deleted: svn:externals
2425 - geshi -r 1402 http://geshi.svn.sourceforge.net/svnroot/geshi/branches/RELEASE_1_0_X_STABLE/geshi-1.0.X/src
Index: branches/wmf-deployment/extensions/MWSearch/MWSearch_body.php
@@ -90,7 +90,7 @@
9191
9292 global $wgCanonicalNamespaceNames, $wgNamespaceAliases;
9393 $nsNamesRaw = array_merge($wgContLang->getNamespaces(), $wgCanonicalNamespaceNames,
94 - array_keys( array_merge($wgNamespaceAliases, $wgContLang->getNamespaceAliases()) ) );
 94+ array_keys( array_merge($wgNamespaceAliases, $wgContLang->namespaceAliases) ) );
9595
9696 # add all namespace names w/o spaces
9797 $nsNames = array();
Index: branches/wmf-deployment/extensions/AbuseFilter/AbuseFilter.parser.php
@@ -205,9 +205,14 @@
206206 $pattern = preg_replace( '!(\\\\\\\\)*(\\\\)?/!', '$1\/', $pattern );
207207 $pattern = "/$pattern/u";
208208
209 - set_error_handler( array( 'AbuseFilterParser', 'regexErrorHandler' ) );
210 - $result = preg_match( $pattern, $str );
211 - restore_error_handler();
 209+ try {
 210+ set_error_handler( array( 'AbuseFilterParser', 'regexErrorHandler' ) );
 211+ $result = preg_match( $pattern, $str );
 212+ restore_error_handler();
 213+ } catch( Exception $e ) {
 214+ restore_error_handler();
 215+ throw $e;
 216+ }
212217 return new AFPData( self::DBool, (bool)$result );
213218 }
214219
@@ -1344,9 +1349,14 @@
13451350 $count = 0;
13461351 $matches = array();
13471352
1348 - set_error_handler( array( 'AbuseFilterParser', 'regexErrorHandler' ) );
1349 - $count = preg_match_all( $needle, $haystack, $matches );
1350 - restore_error_handler();
 1353+ try {
 1354+ set_error_handler( array( 'AbuseFilterParser', 'regexErrorHandler' ) );
 1355+ $count = preg_match_all( $needle, $haystack, $matches );
 1356+ restore_error_handler();
 1357+ } catch( Exception $e ) {
 1358+ restore_error_handler();
 1359+ throw $e;
 1360+ }
13511361 }
13521362
13531363 return new AFPData( AFPData::DInt, $count );
@@ -1588,6 +1598,7 @@
15891599
15901600 public static function regexErrorHandler( $errno, $errstr, $errfile, $errline, $context ) {
15911601 if ( error_reporting() == 0 ) { return true; }
 1602+ wfLoadExtensionMessages( 'AbuseFilter' );
15921603 throw new AFPUserVisibleException( 'regexfailure', $context['pos'],
15931604 array( $errstr, $context['regex'] ) );
15941605 return true;
Index: branches/wmf-deployment/extensions/AbuseFilter/Views/AbuseFilterViewEdit.php
@@ -167,10 +167,9 @@
168168
169169 // Logging
170170
171 - ## Broken until logging table is expanded to 32 chars.
172 -# $lp = new LogPage( 'abusefilter' );
 171+ $lp = new LogPage( 'abusefilter' );
173172
174 -# $lp->addEntry( 'modify', $this->getTitle( $new_id ), '', array( $history_id, $new_id ) );
 173+ $lp->addEntry( 'modify', $this->getTitle( $new_id ), '', array( $history_id, $new_id ) );
175174
176175 // Special-case stuff for tags -- purge the tag list cache.
177176 if ( isset( $actions['tag'] ) ) {
Property changes on: branches/wmf-deployment/extensions/FCKeditor
___________________________________________________________________
Deleted: svn:externals
178177 - fckeditor http://svn.fckeditor.net/FCKeditor/branches/versions/2.6.x/
Index: branches/wmf-deployment/extensions/SecurePoll/includes/Auth.php
@@ -195,10 +195,16 @@
196196 */
197197 static function getUserParams( $user ) {
198198 global $wgServer;
 199+ if ( substr( $wgServer, 0, 5 ) == 'https' ) {
 200+ global $site, $lang;
 201+ $server = "$lang.$site.org";
 202+ } else {
 203+ $server = preg_replace( '!.*/(.*)$!', '$1', $wgServer );
 204+ }
199205 return array(
200206 'name' => $user->getName(),
201207 'type' => 'local',
202 - 'domain' => preg_replace( '!.*/(.*)$!', '$1', $wgServer ),
 208+ 'domain' => $server,
203209 'url' => $user->getUserPage()->getFullURL(),
204210 'properties' => array(
205211 'wiki' => wfWikiID(),
Index: branches/wmf-deployment/extensions/SecurePoll/includes/VotePage.php
@@ -241,6 +241,8 @@
242242 Xml::openElement( 'form', array( 'action' => $url, 'method' => 'post' ) ) .
243243 Xml::hidden( 'token', SecurePoll_RemoteMWAuth::encodeToken( $wgUser->getToken() ) ) .
244244 Xml::hidden( 'id', $wgUser->getId() ) .
 245+ Xml::hidden( 'site', $GLOBALS['site'] ) .
 246+ Xml::hidden( 'lang', $GLOBALS['lang'] ) .
245247 Xml::submitButton( wfMsg( 'securepoll-jump' ) ) .
246248 '</form>'
247249 );
Index: branches/wmf-deployment/includes/User.php
@@ -1646,6 +1646,9 @@
16471647 * for reload on the next hit.
16481648 */
16491649 function invalidateCache() {
 1650+ if ( wfReadOnly() ) {
 1651+ return;
 1652+ }
16501653 $this->load();
16511654 if( $this->mId ) {
16521655 $this->mTouched = self::newTouchedTimestamp();
Index: branches/wmf-deployment/includes/parser/ParserOutput.php
@@ -71,7 +71,6 @@
7272
7373 function addCategory( $c, $sort ) { $this->mCategories[$c] = $sort; }
7474 function addLanguageLink( $t ) { $this->mLanguageLinks[] = $t; }
75 - function addExternalLink( $url ) { $this->mExternalLinks[$url] = 1; }
7675 function addWarning( $s ) { $this->mWarnings[$s] = 1; }
7776
7877 function addOutputHook( $hook, $data = false ) {
@@ -91,6 +90,13 @@
9291 return (bool)$this->mNewSection;
9392 }
9493
 94+ function addExternalLink( $url ) {
 95+ # We don't register links pointing to our own server, unless... :-)
 96+ global $wgServer, $wgRegisterInternalExternals;
 97+ if( $wgRegisterInternalExternals or stripos($url,$wgServer.'/')!==0)
 98+ $this->mExternalLinks[$url] = 1;
 99+ }
 100+
95101 function addLink( $title, $id = null ) {
96102 $ns = $title->getNamespace();
97103 $dbk = $title->getDBkey();
Index: branches/wmf-deployment/includes/ImagePage.php
@@ -780,15 +780,16 @@
781781 */
782782 class ImageHistoryList {
783783
784 - protected $imagePage, $img, $skin, $title, $repo;
 784+ protected $imagePage, $img, $skin, $title, $repo, $showThumb;
785785
786786 public function __construct( $imagePage ) {
787 - global $wgUser;
 787+ global $wgUser, $wgShowArchiveThumbnails;
788788 $this->skin = $wgUser->getSkin();
789789 $this->current = $imagePage->getFile();
790790 $this->img = $imagePage->getDisplayedFile();
791791 $this->title = $imagePage->getTitle();
792792 $this->imagePage = $imagePage;
 793+ $this->showThumb = $wgShowArchiveThumbnails;
793794 }
794795
795796 public function getImagePage() {
@@ -813,7 +814,7 @@
814815 . '<tr><td></td>'
815816 . ( $this->current->isLocal() && ($wgUser->isAllowed('delete') || $wgUser->isAllowed('deleterevision') ) ? '<td></td>' : '' )
816817 . '<th>' . wfMsgHtml( 'filehist-datetime' ) . '</th>'
817 - . '<th>' . wfMsgHtml( 'filehist-thumb' ) . '</th>'
 818+ . ( $this->showThumb ? '<th>' . wfMsgHtml( 'filehist-thumb' ) . '</th>' : '' )
818819 . '<th>' . wfMsgHtml( 'filehist-dimensions' ) . '</th>'
819820 . '<th>' . wfMsgHtml( 'filehist-user' ) . '</th>'
820821 . '<th>' . wfMsgHtml( 'filehist-comment' ) . '</th>'
@@ -933,7 +934,9 @@
934935 $row .= "</td>";
935936
936937 // Thumbnail
937 - $row .= '<td>' . $this->getThumbForLine( $file ) . '</td>';
 938+ if ( $this->showThumb ) {
 939+ $row .= '<td>' . $this->getThumbForLine( $file ) . '</td>';
 940+ }
938941
939942 // Image dimensions + size
940943 $row .= '<td>';
Index: branches/wmf-deployment/includes/ChangeTags.php
@@ -124,7 +124,8 @@
125125 // Add an INNER JOIN on change_tag
126126
127127 // FORCE INDEX -- change_tags will almost ALWAYS be the correct query plan.
128 - $options['USE INDEX'] = array( 'change_tag' => 'change_tag_tag_id' );
 128+ ## Wikimedia hack: index renamed see CR 49068
 129+ $options['USE INDEX'] = array( 'change_tag' => 'ct_tag' );
129130 unset( $options['FORCE INDEX'] );
130131 $tables[] = 'change_tag';
131132 $join_conds['change_tag'] = array( 'INNER JOIN', "ct_$join_cond=$join_cond" );
Index: branches/wmf-deployment/includes/EditPage.php
@@ -1309,6 +1309,8 @@
13101310 $copywarnMsg = array( 'copyrightwarning2',
13111311 '[[' . wfMsgForContent( 'copyrightpage' ) . ']]' );
13121312 }
 1313+ // Allow for site and per-namespace customization of contribution/copyright notice.
 1314+ wfRunHooks( 'EditPageCopyrightWarning', array( $this->mTitle, &$copywarnMsg ) );
13131315
13141316 if ( $wgUser->getOption('showtoolbar') and !$this->isCssJsSubpage ) {
13151317 # prepare toolbar for edit buttons
@@ -1539,6 +1541,7 @@
15401542 $token = htmlspecialchars( $wgUser->editToken() );
15411543 $wgOut->addHTML( "\n<input type='hidden' value=\"$token\" name=\"wpEditToken\" />\n" );
15421544
 1545+ $this->showTosSummary();
15431546 $this->showEditTools();
15441547
15451548 $wgOut->addHTML( <<<END
@@ -1687,6 +1690,24 @@
16881691 '"' . $liveAction . '"' . ")";
16891692 }
16901693
 1694+ protected function showTosSummary() {
 1695+ $msg = 'editpage-tos-summary';
 1696+ // Give a chance for site and per-namespace customizations of
 1697+ // terms of service summary link that might exist separately
 1698+ // from the copyright notice.
 1699+ //
 1700+ // This will display between the save button and the edit tools,
 1701+ // so should remain short!
 1702+ wfRunHooks( 'EditPageTosSummary', array( $this->mTitle, &$msg ) );
 1703+ $text = wfMsgForContent( $msg );
 1704+ if( $text != '-' ) {
 1705+ global $wgOut;
 1706+ $wgOut->addHTML( '<div class="mw-tos-summary">' );
 1707+ $wgOut->addWikiMsgArray( $msg, array(), array( 'content' ) );
 1708+ $wgOut->addHTML( '</div>' );
 1709+ }
 1710+ }
 1711+
16911712 protected function showEditTools() {
16921713 global $wgOut;
16931714 $wgOut->addHTML( '<div class="mw-editTools">' );
Index: branches/wmf-deployment/includes/Title.php
@@ -1014,7 +1014,8 @@
10151015
10161016 /**
10171017 * Can $wgUser perform $action on this page?
1018 - * This skips potentially expensive cascading permission checks.
 1018+ * This skips potentially expensive cascading permission checks
 1019+ * as well as avoids expensive error formatting
10191020 *
10201021 * Suitable for use for nonessential UI controls in common cases, but
10211022 * _not_ for functional access control.
@@ -1206,8 +1207,14 @@
12071208 }
12081209 } elseif( !$user->isAllowed( $action ) ) {
12091210 $return = null;
1210 - $groups = array_map( array( 'User', 'makeGroupLinkWiki' ),
1211 - User::getGroupsWithPermission( $action ) );
 1211+
 1212+ // We avoid expensive display logic for quickUserCan's and such
 1213+ $groups = false;
 1214+ if (!$short) {
 1215+ $groups = array_map( array( 'User', 'makeGroupLinkWiki' ),
 1216+ User::getGroupsWithPermission( $action ) );
 1217+ }
 1218+
12121219 if( $groups ) {
12131220 $return = array( 'badaccess-groups',
12141221 array( implode( ', ', $groups ), count( $groups ) ) );
Index: branches/wmf-deployment/includes/SkinTemplate.php
@@ -707,7 +707,7 @@
708708 );
709709
710710 // adds new section link if page is a current revision of a talk page or
711 - if ( ( $wgArticle->isCurrent() && $istalk ) || $wgOut->showNewSectionLink() ) {
 711+ if ( ( $wgArticle && $wgArticle->isCurrent() && $istalk ) || $wgOut->showNewSectionLink() ) {
712712 if ( !$wgOut->forceHideNewSectionLink() ) {
713713 $content_actions['addsection'] = array(
714714 'class' => $section == 'new' ? 'selected' : false,
Index: branches/wmf-deployment/includes/DefaultSettings.php
@@ -2154,6 +2154,11 @@
21552155 */
21562156 $wgGenerateThumbnailOnParse = true;
21572157
 2158+/**
 2159+ * Show thumbnails for old images on the image description page
 2160+ */
 2161+$wgShowArchiveThumbnails = true;
 2162+
21582163 /** Whether or not to use image resizing */
21592164 $wgUseImageResize = true;
21602165
@@ -3708,6 +3713,12 @@
37093714 $wgLinkHolderBatchSize = 1000;
37103715
37113716 /**
 3717+ * By default MediaWiki does not register links pointing to same server in externallinks dataset,
 3718+ * use this value to override:
 3719+ */
 3720+$wgRegisterInternalExternals = false;
 3721+
 3722+/**
37123723 * Hooks that are used for outputting exceptions. Format is:
37133724 * $wgExceptionHooks[] = $funcname
37143725 * or:
Index: branches/wmf-deployment/includes/specials/SpecialRecentchanges.php
@@ -55,7 +55,7 @@
5656 $this->parseParameters( $parameters, $opts );
5757 }
5858
59 - $opts->validateIntBounds( 'limit', 0, 500 );
 59+ $opts->validateIntBounds( 'limit', 0, 5000 );
6060 return $opts;
6161 }
6262
Index: branches/wmf-deployment/includes/specials/SpecialBlockip.php
@@ -655,7 +655,7 @@
656656 */
657657 private function getContribsLink( $skin ) {
658658 $contribsPage = SpecialPage::getTitleFor( 'Contributions', $this->BlockAddress );
659 - return $skin->link( $contribsPage, wfMsgHtml( 'ipb-blocklist-contribs', $this->BlockAddress ) );
 659+ return $skin->link( $contribsPage, wfMsgExt( 'ipb-blocklist-contribs', 'escape', $this->BlockAddress ) );
660660 }
661661
662662 /**
Index: branches/wmf-deployment/includes/specials/SpecialSearch.php
@@ -203,7 +203,7 @@
204204 )
205205 );
206206 $wgOut->addHtml(
207 - Xml::openElement( 'table', array( 'border'=>0, 'cellpadding'=>0, 'cellspacing'=>0 ) ) .
 207+ Xml::openElement( 'table', array( 'id'=>'mw-search-top-table', 'border'=>0, 'cellpadding'=>0, 'cellspacing'=>0 ) ) .
208208 Xml::openElement( 'tr' ) .
209209 Xml::openElement( 'td' ) . "\n" .
210210 $this->shortDialog( $term ) .
@@ -225,8 +225,8 @@
226226 $wgOut->addHTML( $this->formHeader($term, 0, 0));
227227 if( $this->searchAdvanced ) {
228228 $wgOut->addHTML( $this->powerSearchBox( $term ) );
229 - } else
230 - $wgOut->addHTML( '</form>' );
 229+ }
 230+ $wgOut->addHTML( '</form>' );
231231 // Empty query -- straight view of search form
232232 wfProfileOut( __METHOD__ );
233233 return;
Index: branches/wmf-deployment/includes/Math.php
@@ -46,6 +46,7 @@
4747
4848 if( !$this->_recall() ) {
4949 # Ensure that the temp and output directories are available before continuing...
 50+ /*
5051 if( !file_exists( $wgTmpDirectory ) ) {
5152 if( !wfMkdirParents( $wgTmpDirectory ) ) {
5253 return $this->_error( 'math_bad_tmpdir' );
@@ -57,6 +58,7 @@
5859 if( function_exists( 'is_executable' ) && !is_executable( $wgTexvc ) ) {
5960 return $this->_error( 'math_notexvc' );
6061 }
 62+ */
6163 $cmd = $wgTexvc . ' ' .
6264 escapeshellarg( $wgTmpDirectory ).' '.
6365 escapeshellarg( $wgTmpDirectory ).' '.
@@ -221,6 +223,10 @@
222224 $this->mathml = $rpage->math_mathml;
223225
224226 $filename = $this->_getHashPath() . "/{$this->hash}.png";
 227+
 228+ // Temp performance hack
 229+ return true;
 230+
225231 if( file_exists( $filename ) ) {
226232 if( filesize( $filename ) == 0 ) {
227233 // Some horrible error corrupted stuff :(
@@ -229,7 +235,7 @@
230236 return true;
231237 }
232238 }
233 -
 239+
234240 if( file_exists( $wgMathDirectory . "/{$this->hash}.png" ) ) {
235241 $hashpath = $this->_getHashPath();
236242
Index: branches/wmf-deployment/api.php
@@ -56,9 +56,18 @@
5757 } else {
5858 $url = $_SERVER['URL'];
5959 }
 60+
 61+// Live-hack to let api.php work with secure.wikimedia.org
 62+// Andrew 2009-06-17
 63+if ($secure) {
 64+ $url = "/$site/$lang$url";
 65+}
 66+// End live hack
 67+
6068 if( strcmp( "$wgScriptPath/api$wgScriptExtension", $url ) ) {
6169 wfHttpError( 403, 'Forbidden',
62 - 'API must be accessed through the primary script entry point.' );
 70+ 'API must be accessed through the primary script entry point. Expected '.
 71+ "$wgScriptPath/api$wgScriptExtension but got $url" );
6372 return;
6473 }
6574
Index: branches/wmf-deployment/languages/Language.php
@@ -1825,7 +1825,9 @@
18261826 function getMagic( &$mw ) {
18271827 if ( !$this->mMagicHookDone ) {
18281828 $this->mMagicHookDone = true;
 1829+ wfProfileIn( 'LanguageGetMagic' );
18291830 wfRunHooks( 'LanguageGetMagic', array( &$this->mMagicExtensions, $this->getCode() ) );
 1831+ wfProfileOut( 'LanguageGetMagic' );
18301832 }
18311833 if ( isset( $this->mMagicExtensions[$mw->mId] ) ) {
18321834 $rawEntry = $this->mMagicExtensions[$mw->mId];

Follow-up revisions

RevisionCommit summaryAuthorDate
r56333Merge remaining unmerged line of live hacks from r53208 on AbuseFilterbrion21:17, 14 September 2009
r56334Increase limit from 500 to 5000 per live hack committed to wmf-deployment in ...brion21:26, 14 September 2009
r56335Commit live hack from wmf-deployment r53208: skip user cache invalidation if ...brion21:28, 14 September 2009
r56336Merge live hack from wmf-deployment r53208: profiling for LanguageGetMagic ho...brion21:30, 14 September 2009
r56338Apply live hack from wmf-deployment r53208: allows passing alt table namebrion21:35, 14 September 2009
r56340Merge live hack from wmf-deployment r53208: skip calculation of display names...brion21:42, 14 September 2009
r56343Clean up a live hack from wmf-deployment r53208: option to short-circuit math...brion21:58, 14 September 2009
r56345Merge and clean up memory_limit hacks from wmf-deployment r53208....brion22:10, 14 September 2009
r56347Cleanup live hack from wmf-deployment r53208 a bit: DB selection using load b...brion22:32, 14 September 2009
r56394Reapply live hacks from r53208brion22:13, 15 September 2009

Comments

#Comment by Brion VIBBER (talk | contribs)   21:42, 14 September 2009

Finished merging the message load line from AbuseFilter; other changes already merged.

Going to let the change to MWSearch/MWSearch_body.php drop; it looks non-useful.

SecurePoll changes look Wikimedia-specific and should be rewrapped more portably.

UsabilityInitiative changes assumed to be from trunk...

DefaultSettings, EditPage, ImagePage, ParserOutput, SkinTemplate, SpecialBlockip, SpecialSearch, shared.css, htmlform.js are changes from trunk or already merged as of my check.

Merged changes to SpecialRecentchanges, User, Language, make-blobs, Title.

backup.inc change looks wrong; we're looking into it.

Unsure about status of ChangeTags.php tweak (index name change? wtf?)

Math.php hack looks like of crappy (skipping some existence checks?)

gearmanWorker.php and runJobs.php are raising memory limit; this really should just be a global switch for maint scripts to have an optionally higher limit than web scripts.

#Comment by Brion VIBBER (talk | contribs)   22:14, 14 September 2009

Math file checks short-circuit added to trunk as a config var in r56343.

runJobs.php and gearmanWorker.php memory_limit merged to trunk w/ cleanup in r56345.

#Comment by Brion VIBBER (talk | contribs)   22:34, 14 September 2009

backup.inc DB selection cleaned up on trunk in r56347... this just leaves SecurePoll and ChangeTags

Status & tagging log