Index: branches/wmf-deployment/maintenance/archives/patch-categorylinksindex.sql |
— | — | @@ -8,4 +8,5 @@ |
9 | 9 | |
10 | 10 | ALTER TABLE /*$wgDBprefix*/categorylinks |
11 | 11 | 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 @@ |
2 | 2 | #!/bin/bash |
3 | 3 | |
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>]' |
6 | 6 | exit 1 |
7 | 7 | fi |
| 8 | +if [ -z $3 ]; then |
| 9 | + table=blobs |
| 10 | +else |
| 11 | + table=$3 |
| 12 | +fi |
8 | 13 | |
9 | 14 | 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 |
11 | 16 | |
12 | 17 | |
Index: branches/wmf-deployment/maintenance/backup.inc |
— | — | @@ -233,6 +233,9 @@ |
234 | 234 | } |
235 | 235 | |
236 | 236 | function backupDb() { |
| 237 | + ## Live-hack to support LB --Andrew 2009-05-26 |
| 238 | + return wfGetDB( DB_SLAVE ); |
| 239 | + |
237 | 240 | global $wgDBadminuser, $wgDBadminpassword; |
238 | 241 | global $wgDBname, $wgDebugDumpSql, $wgDBtype; |
239 | 242 | $flags = ($wgDebugDumpSql ? DBO_DEBUG : 0) | DBO_DEFAULT; // god-damn hack |
Index: branches/wmf-deployment/maintenance/runJobs.php |
— | — | @@ -14,6 +14,8 @@ |
15 | 15 | $wgUseNormalUser = true; |
16 | 16 | require_once( 'commandLine.inc' ); |
17 | 17 | |
| 18 | +ini_set( 'memory_limit', 150*1024*1024 ); |
| 19 | + |
18 | 20 | if ( isset( $options['procs'] ) ) { |
19 | 21 | $procs = intval( $options['procs'] ); |
20 | 22 | if ( $procs < 1 || $procs > 1000 ) { |
Index: branches/wmf-deployment/maintenance/gearman/gearmanWorker.php |
— | — | @@ -4,6 +4,8 @@ |
5 | 5 | require( dirname(__FILE__).'/../commandLine.inc' ); |
6 | 6 | require( dirname(__FILE__).'/gearman.inc' ); |
7 | 7 | |
| 8 | +ini_set('memory_limit', '150M' ); |
| 9 | + |
8 | 10 | if ( isset( $options['procs'] ) ) { |
9 | 11 | $procs = $options['procs']; |
10 | 12 | if ( $procs < 1 || $procs > 1000 ) { |
Index: branches/wmf-deployment/skins/common/shared.css |
— | — | @@ -289,7 +289,11 @@ |
290 | 290 | font-weight: bold; |
291 | 291 | } |
292 | 292 | |
| 293 | +table#mw-search-top-table { |
| 294 | + background-color:inherit; |
| 295 | +} |
293 | 296 | |
| 297 | + |
294 | 298 | /* |
295 | 299 | * Advanced PowerSearch box |
296 | 300 | */ |
Index: branches/wmf-deployment/skins/common/mwsuggest.js |
— | — | @@ -864,3 +864,4 @@ |
865 | 865 | } |
866 | 866 | |
867 | 867 | hookEvent("load", os_MWSuggestInit); |
| 868 | + |
Index: branches/wmf-deployment/skins/common/htmlform.js |
— | — | @@ -14,8 +14,13 @@ |
15 | 15 | |
16 | 16 | var htmlforms = { |
17 | 17 | 'selectOrOtherSelectChanged' : function(e) { |
| 18 | + var select; |
18 | 19 | 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 | + |
20 | 25 | var id = select.id; |
21 | 26 | var textbox = document.getElementById( id+'-other' ); |
22 | 27 | |
Property changes on: branches/wmf-deployment/extensions/Widgets |
___________________________________________________________________ |
Deleted: svn:externals |
23 | 28 | - 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 @@ |
14 | 14 | private static $messages = array(); |
15 | 15 | private static $styles = array(); |
16 | 16 | 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 ), |
21 | 18 | ); |
22 | | - |
23 | | - |
| 19 | + private static $doOutput = false; |
24 | 20 | |
| 21 | + |
25 | 22 | /* Static Functions */ |
26 | 23 | |
| 24 | + public static function initialize() { |
| 25 | + self::$doOutput = true; |
| 26 | + } |
| 27 | + |
27 | 28 | /** |
28 | 29 | * AjaxAddScript hook |
29 | 30 | * Adds scripts |
— | — | @@ -31,11 +32,13 @@ |
32 | 33 | global $wgScriptPath, $wgJsMimeType; |
33 | 34 | global $wgUsabilityInitiativeCoesxistWithMvEmbed; |
34 | 35 | |
| 36 | + if ( !self::$doOutput ) |
| 37 | + return true; |
| 38 | + |
35 | 39 | // Play nice with mv_embed |
36 | 40 | if ( !$wgUsabilityInitiativeCoesxistWithMvEmbed ) { |
37 | 41 | self::$scripts = array_merge( |
38 | 42 | array( |
39 | | - array( 'src' => 'Resources/jquery.js', 'version' => 1 ), |
40 | 43 | array( 'src' => 'Resources/messages.js', 'version' => 1 ), |
41 | 44 | ), |
42 | 45 | self::$scripts |
— | — | @@ -86,7 +89,10 @@ |
87 | 90 | */ |
88 | 91 | public static function addCss( $out ) { |
89 | 92 | global $wgScriptPath, $wgJsMimeType; |
90 | | - |
| 93 | + |
| 94 | + if ( !self::$doOutput ) |
| 95 | + return true; |
| 96 | + |
91 | 97 | // Loops over each style |
92 | 98 | foreach ( self::$styles as $style ) { |
93 | 99 | // Add css for various styles |
Index: branches/wmf-deployment/extensions/UsabilityInitiative/EditToolbar/EditToolbar.hooks.php |
— | — | @@ -40,6 +40,7 @@ |
41 | 41 | |
42 | 42 | // Add JS and CSS |
43 | 43 | global $wgEditToolbarStyleVersion; |
| 44 | + UsabilityInitiativeHooks::initialize(); |
44 | 45 | UsabilityInitiativeHooks::addScript( |
45 | 46 | 'EditToolbar/EditToolbar.js', $wgEditToolbarStyleVersion |
46 | 47 | ); |
Index: branches/wmf-deployment/extensions/UsabilityInitiative/EditWarning/EditWarning.php |
— | — | @@ -41,4 +41,4 @@ |
42 | 42 | dirname( __FILE__ ) . '/EditWarning.i18n.php'; |
43 | 43 | |
44 | 44 | // 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 @@ |
15 | 15 | * AjaxAddScript hook |
16 | 16 | * Initializes the component |
17 | 17 | */ |
18 | | - public static function initialize() { |
19 | | - global $wgEditWarningStyleVersion; |
20 | | - |
| 18 | + public static function initialize( $out ) { |
| 19 | + global $wgEditWarningStyleVersion, $wgRequest; |
| 20 | + |
| 21 | + UsabilityInitiativeHooks::initialize(); |
21 | 22 | // Adds script to document |
22 | 23 | UsabilityInitiativeHooks::addScript( |
23 | 24 | 'EditWarning/EditWarning.js', $wgEditWarningStyleVersion |
Property changes on: branches/wmf-deployment/extensions/SyntaxHighlight_GeSHi |
___________________________________________________________________ |
Deleted: svn:externals |
24 | 25 | - 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 @@ |
91 | 91 | |
92 | 92 | global $wgCanonicalNamespaceNames, $wgNamespaceAliases; |
93 | 93 | $nsNamesRaw = array_merge($wgContLang->getNamespaces(), $wgCanonicalNamespaceNames, |
94 | | - array_keys( array_merge($wgNamespaceAliases, $wgContLang->getNamespaceAliases()) ) ); |
| 94 | + array_keys( array_merge($wgNamespaceAliases, $wgContLang->namespaceAliases) ) ); |
95 | 95 | |
96 | 96 | # add all namespace names w/o spaces |
97 | 97 | $nsNames = array(); |
Index: branches/wmf-deployment/extensions/AbuseFilter/AbuseFilter.parser.php |
— | — | @@ -205,9 +205,14 @@ |
206 | 206 | $pattern = preg_replace( '!(\\\\\\\\)*(\\\\)?/!', '$1\/', $pattern ); |
207 | 207 | $pattern = "/$pattern/u"; |
208 | 208 | |
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 | + } |
212 | 217 | return new AFPData( self::DBool, (bool)$result ); |
213 | 218 | } |
214 | 219 | |
— | — | @@ -1344,9 +1349,14 @@ |
1345 | 1350 | $count = 0; |
1346 | 1351 | $matches = array(); |
1347 | 1352 | |
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 | + } |
1351 | 1361 | } |
1352 | 1362 | |
1353 | 1363 | return new AFPData( AFPData::DInt, $count ); |
— | — | @@ -1588,6 +1598,7 @@ |
1589 | 1599 | |
1590 | 1600 | public static function regexErrorHandler( $errno, $errstr, $errfile, $errline, $context ) { |
1591 | 1601 | if ( error_reporting() == 0 ) { return true; } |
| 1602 | + wfLoadExtensionMessages( 'AbuseFilter' ); |
1592 | 1603 | throw new AFPUserVisibleException( 'regexfailure', $context['pos'], |
1593 | 1604 | array( $errstr, $context['regex'] ) ); |
1594 | 1605 | return true; |
Index: branches/wmf-deployment/extensions/AbuseFilter/Views/AbuseFilterViewEdit.php |
— | — | @@ -167,10 +167,9 @@ |
168 | 168 | |
169 | 169 | // Logging |
170 | 170 | |
171 | | - ## Broken until logging table is expanded to 32 chars. |
172 | | -# $lp = new LogPage( 'abusefilter' ); |
| 171 | + $lp = new LogPage( 'abusefilter' ); |
173 | 172 | |
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 ) ); |
175 | 174 | |
176 | 175 | // Special-case stuff for tags -- purge the tag list cache. |
177 | 176 | if ( isset( $actions['tag'] ) ) { |
Property changes on: branches/wmf-deployment/extensions/FCKeditor |
___________________________________________________________________ |
Deleted: svn:externals |
178 | 177 | - fckeditor http://svn.fckeditor.net/FCKeditor/branches/versions/2.6.x/ |
Index: branches/wmf-deployment/extensions/SecurePoll/includes/Auth.php |
— | — | @@ -195,10 +195,16 @@ |
196 | 196 | */ |
197 | 197 | static function getUserParams( $user ) { |
198 | 198 | 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 | + } |
199 | 205 | return array( |
200 | 206 | 'name' => $user->getName(), |
201 | 207 | 'type' => 'local', |
202 | | - 'domain' => preg_replace( '!.*/(.*)$!', '$1', $wgServer ), |
| 208 | + 'domain' => $server, |
203 | 209 | 'url' => $user->getUserPage()->getFullURL(), |
204 | 210 | 'properties' => array( |
205 | 211 | 'wiki' => wfWikiID(), |
Index: branches/wmf-deployment/extensions/SecurePoll/includes/VotePage.php |
— | — | @@ -241,6 +241,8 @@ |
242 | 242 | Xml::openElement( 'form', array( 'action' => $url, 'method' => 'post' ) ) . |
243 | 243 | Xml::hidden( 'token', SecurePoll_RemoteMWAuth::encodeToken( $wgUser->getToken() ) ) . |
244 | 244 | Xml::hidden( 'id', $wgUser->getId() ) . |
| 245 | + Xml::hidden( 'site', $GLOBALS['site'] ) . |
| 246 | + Xml::hidden( 'lang', $GLOBALS['lang'] ) . |
245 | 247 | Xml::submitButton( wfMsg( 'securepoll-jump' ) ) . |
246 | 248 | '</form>' |
247 | 249 | ); |
Index: branches/wmf-deployment/includes/User.php |
— | — | @@ -1646,6 +1646,9 @@ |
1647 | 1647 | * for reload on the next hit. |
1648 | 1648 | */ |
1649 | 1649 | function invalidateCache() { |
| 1650 | + if ( wfReadOnly() ) { |
| 1651 | + return; |
| 1652 | + } |
1650 | 1653 | $this->load(); |
1651 | 1654 | if( $this->mId ) { |
1652 | 1655 | $this->mTouched = self::newTouchedTimestamp(); |
Index: branches/wmf-deployment/includes/parser/ParserOutput.php |
— | — | @@ -71,7 +71,6 @@ |
72 | 72 | |
73 | 73 | function addCategory( $c, $sort ) { $this->mCategories[$c] = $sort; } |
74 | 74 | function addLanguageLink( $t ) { $this->mLanguageLinks[] = $t; } |
75 | | - function addExternalLink( $url ) { $this->mExternalLinks[$url] = 1; } |
76 | 75 | function addWarning( $s ) { $this->mWarnings[$s] = 1; } |
77 | 76 | |
78 | 77 | function addOutputHook( $hook, $data = false ) { |
— | — | @@ -91,6 +90,13 @@ |
92 | 91 | return (bool)$this->mNewSection; |
93 | 92 | } |
94 | 93 | |
| 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 | + |
95 | 101 | function addLink( $title, $id = null ) { |
96 | 102 | $ns = $title->getNamespace(); |
97 | 103 | $dbk = $title->getDBkey(); |
Index: branches/wmf-deployment/includes/ImagePage.php |
— | — | @@ -780,15 +780,16 @@ |
781 | 781 | */ |
782 | 782 | class ImageHistoryList { |
783 | 783 | |
784 | | - protected $imagePage, $img, $skin, $title, $repo; |
| 784 | + protected $imagePage, $img, $skin, $title, $repo, $showThumb; |
785 | 785 | |
786 | 786 | public function __construct( $imagePage ) { |
787 | | - global $wgUser; |
| 787 | + global $wgUser, $wgShowArchiveThumbnails; |
788 | 788 | $this->skin = $wgUser->getSkin(); |
789 | 789 | $this->current = $imagePage->getFile(); |
790 | 790 | $this->img = $imagePage->getDisplayedFile(); |
791 | 791 | $this->title = $imagePage->getTitle(); |
792 | 792 | $this->imagePage = $imagePage; |
| 793 | + $this->showThumb = $wgShowArchiveThumbnails; |
793 | 794 | } |
794 | 795 | |
795 | 796 | public function getImagePage() { |
— | — | @@ -813,7 +814,7 @@ |
814 | 815 | . '<tr><td></td>' |
815 | 816 | . ( $this->current->isLocal() && ($wgUser->isAllowed('delete') || $wgUser->isAllowed('deleterevision') ) ? '<td></td>' : '' ) |
816 | 817 | . '<th>' . wfMsgHtml( 'filehist-datetime' ) . '</th>' |
817 | | - . '<th>' . wfMsgHtml( 'filehist-thumb' ) . '</th>' |
| 818 | + . ( $this->showThumb ? '<th>' . wfMsgHtml( 'filehist-thumb' ) . '</th>' : '' ) |
818 | 819 | . '<th>' . wfMsgHtml( 'filehist-dimensions' ) . '</th>' |
819 | 820 | . '<th>' . wfMsgHtml( 'filehist-user' ) . '</th>' |
820 | 821 | . '<th>' . wfMsgHtml( 'filehist-comment' ) . '</th>' |
— | — | @@ -933,7 +934,9 @@ |
934 | 935 | $row .= "</td>"; |
935 | 936 | |
936 | 937 | // Thumbnail |
937 | | - $row .= '<td>' . $this->getThumbForLine( $file ) . '</td>'; |
| 938 | + if ( $this->showThumb ) { |
| 939 | + $row .= '<td>' . $this->getThumbForLine( $file ) . '</td>'; |
| 940 | + } |
938 | 941 | |
939 | 942 | // Image dimensions + size |
940 | 943 | $row .= '<td>'; |
Index: branches/wmf-deployment/includes/ChangeTags.php |
— | — | @@ -124,7 +124,8 @@ |
125 | 125 | // Add an INNER JOIN on change_tag |
126 | 126 | |
127 | 127 | // 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' ); |
129 | 130 | unset( $options['FORCE INDEX'] ); |
130 | 131 | $tables[] = 'change_tag'; |
131 | 132 | $join_conds['change_tag'] = array( 'INNER JOIN', "ct_$join_cond=$join_cond" ); |
Index: branches/wmf-deployment/includes/EditPage.php |
— | — | @@ -1309,6 +1309,8 @@ |
1310 | 1310 | $copywarnMsg = array( 'copyrightwarning2', |
1311 | 1311 | '[[' . wfMsgForContent( 'copyrightpage' ) . ']]' ); |
1312 | 1312 | } |
| 1313 | + // Allow for site and per-namespace customization of contribution/copyright notice. |
| 1314 | + wfRunHooks( 'EditPageCopyrightWarning', array( $this->mTitle, &$copywarnMsg ) ); |
1313 | 1315 | |
1314 | 1316 | if ( $wgUser->getOption('showtoolbar') and !$this->isCssJsSubpage ) { |
1315 | 1317 | # prepare toolbar for edit buttons |
— | — | @@ -1539,6 +1541,7 @@ |
1540 | 1542 | $token = htmlspecialchars( $wgUser->editToken() ); |
1541 | 1543 | $wgOut->addHTML( "\n<input type='hidden' value=\"$token\" name=\"wpEditToken\" />\n" ); |
1542 | 1544 | |
| 1545 | + $this->showTosSummary(); |
1543 | 1546 | $this->showEditTools(); |
1544 | 1547 | |
1545 | 1548 | $wgOut->addHTML( <<<END |
— | — | @@ -1687,6 +1690,24 @@ |
1688 | 1691 | '"' . $liveAction . '"' . ")"; |
1689 | 1692 | } |
1690 | 1693 | |
| 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 | + |
1691 | 1712 | protected function showEditTools() { |
1692 | 1713 | global $wgOut; |
1693 | 1714 | $wgOut->addHTML( '<div class="mw-editTools">' ); |
Index: branches/wmf-deployment/includes/Title.php |
— | — | @@ -1014,7 +1014,8 @@ |
1015 | 1015 | |
1016 | 1016 | /** |
1017 | 1017 | * 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 |
1019 | 1020 | * |
1020 | 1021 | * Suitable for use for nonessential UI controls in common cases, but |
1021 | 1022 | * _not_ for functional access control. |
— | — | @@ -1206,8 +1207,14 @@ |
1207 | 1208 | } |
1208 | 1209 | } elseif( !$user->isAllowed( $action ) ) { |
1209 | 1210 | $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 | + |
1212 | 1219 | if( $groups ) { |
1213 | 1220 | $return = array( 'badaccess-groups', |
1214 | 1221 | array( implode( ', ', $groups ), count( $groups ) ) ); |
Index: branches/wmf-deployment/includes/SkinTemplate.php |
— | — | @@ -707,7 +707,7 @@ |
708 | 708 | ); |
709 | 709 | |
710 | 710 | // 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() ) { |
712 | 712 | if ( !$wgOut->forceHideNewSectionLink() ) { |
713 | 713 | $content_actions['addsection'] = array( |
714 | 714 | 'class' => $section == 'new' ? 'selected' : false, |
Index: branches/wmf-deployment/includes/DefaultSettings.php |
— | — | @@ -2154,6 +2154,11 @@ |
2155 | 2155 | */ |
2156 | 2156 | $wgGenerateThumbnailOnParse = true; |
2157 | 2157 | |
| 2158 | +/** |
| 2159 | + * Show thumbnails for old images on the image description page |
| 2160 | + */ |
| 2161 | +$wgShowArchiveThumbnails = true; |
| 2162 | + |
2158 | 2163 | /** Whether or not to use image resizing */ |
2159 | 2164 | $wgUseImageResize = true; |
2160 | 2165 | |
— | — | @@ -3708,6 +3713,12 @@ |
3709 | 3714 | $wgLinkHolderBatchSize = 1000; |
3710 | 3715 | |
3711 | 3716 | /** |
| 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 | +/** |
3712 | 3723 | * Hooks that are used for outputting exceptions. Format is: |
3713 | 3724 | * $wgExceptionHooks[] = $funcname |
3714 | 3725 | * or: |
Index: branches/wmf-deployment/includes/specials/SpecialRecentchanges.php |
— | — | @@ -55,7 +55,7 @@ |
56 | 56 | $this->parseParameters( $parameters, $opts ); |
57 | 57 | } |
58 | 58 | |
59 | | - $opts->validateIntBounds( 'limit', 0, 500 ); |
| 59 | + $opts->validateIntBounds( 'limit', 0, 5000 ); |
60 | 60 | return $opts; |
61 | 61 | } |
62 | 62 | |
Index: branches/wmf-deployment/includes/specials/SpecialBlockip.php |
— | — | @@ -655,7 +655,7 @@ |
656 | 656 | */ |
657 | 657 | private function getContribsLink( $skin ) { |
658 | 658 | $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 ) ); |
660 | 660 | } |
661 | 661 | |
662 | 662 | /** |
Index: branches/wmf-deployment/includes/specials/SpecialSearch.php |
— | — | @@ -203,7 +203,7 @@ |
204 | 204 | ) |
205 | 205 | ); |
206 | 206 | $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 ) ) . |
208 | 208 | Xml::openElement( 'tr' ) . |
209 | 209 | Xml::openElement( 'td' ) . "\n" . |
210 | 210 | $this->shortDialog( $term ) . |
— | — | @@ -225,8 +225,8 @@ |
226 | 226 | $wgOut->addHTML( $this->formHeader($term, 0, 0)); |
227 | 227 | if( $this->searchAdvanced ) { |
228 | 228 | $wgOut->addHTML( $this->powerSearchBox( $term ) ); |
229 | | - } else |
230 | | - $wgOut->addHTML( '</form>' ); |
| 229 | + } |
| 230 | + $wgOut->addHTML( '</form>' ); |
231 | 231 | // Empty query -- straight view of search form |
232 | 232 | wfProfileOut( __METHOD__ ); |
233 | 233 | return; |
Index: branches/wmf-deployment/includes/Math.php |
— | — | @@ -46,6 +46,7 @@ |
47 | 47 | |
48 | 48 | if( !$this->_recall() ) { |
49 | 49 | # Ensure that the temp and output directories are available before continuing... |
| 50 | + /* |
50 | 51 | if( !file_exists( $wgTmpDirectory ) ) { |
51 | 52 | if( !wfMkdirParents( $wgTmpDirectory ) ) { |
52 | 53 | return $this->_error( 'math_bad_tmpdir' ); |
— | — | @@ -57,6 +58,7 @@ |
58 | 59 | if( function_exists( 'is_executable' ) && !is_executable( $wgTexvc ) ) { |
59 | 60 | return $this->_error( 'math_notexvc' ); |
60 | 61 | } |
| 62 | + */ |
61 | 63 | $cmd = $wgTexvc . ' ' . |
62 | 64 | escapeshellarg( $wgTmpDirectory ).' '. |
63 | 65 | escapeshellarg( $wgTmpDirectory ).' '. |
— | — | @@ -221,6 +223,10 @@ |
222 | 224 | $this->mathml = $rpage->math_mathml; |
223 | 225 | |
224 | 226 | $filename = $this->_getHashPath() . "/{$this->hash}.png"; |
| 227 | + |
| 228 | + // Temp performance hack |
| 229 | + return true; |
| 230 | + |
225 | 231 | if( file_exists( $filename ) ) { |
226 | 232 | if( filesize( $filename ) == 0 ) { |
227 | 233 | // Some horrible error corrupted stuff :( |
— | — | @@ -229,7 +235,7 @@ |
230 | 236 | return true; |
231 | 237 | } |
232 | 238 | } |
233 | | - |
| 239 | + |
234 | 240 | if( file_exists( $wgMathDirectory . "/{$this->hash}.png" ) ) { |
235 | 241 | $hashpath = $this->_getHashPath(); |
236 | 242 | |
Index: branches/wmf-deployment/api.php |
— | — | @@ -56,9 +56,18 @@ |
57 | 57 | } else { |
58 | 58 | $url = $_SERVER['URL']; |
59 | 59 | } |
| 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 | + |
60 | 68 | if( strcmp( "$wgScriptPath/api$wgScriptExtension", $url ) ) { |
61 | 69 | 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" ); |
63 | 72 | return; |
64 | 73 | } |
65 | 74 | |
Index: branches/wmf-deployment/languages/Language.php |
— | — | @@ -1825,7 +1825,9 @@ |
1826 | 1826 | function getMagic( &$mw ) { |
1827 | 1827 | if ( !$this->mMagicHookDone ) { |
1828 | 1828 | $this->mMagicHookDone = true; |
| 1829 | + wfProfileIn( 'LanguageGetMagic' ); |
1829 | 1830 | wfRunHooks( 'LanguageGetMagic', array( &$this->mMagicExtensions, $this->getCode() ) ); |
| 1831 | + wfProfileOut( 'LanguageGetMagic' ); |
1830 | 1832 | } |
1831 | 1833 | if ( isset( $this->mMagicExtensions[$mw->mId] ) ) { |
1832 | 1834 | $rawEntry = $this->mMagicExtensions[$mw->mId]; |