r81719 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81718‎ | r81719 | r81720 >
Date:12:06, 8 February 2011
Author:catrope
Status:resolved
Tags:
Comment:
Quick fix to make debug mode work with non-standard $wgStylePath. This strips the leading skins/ from each file path and sets $wgStylePath as the remote base path. $IP/skins is needed as a local base path to make stuff work, but I guess that could be changed $wgSkinDirectory
Modified paths:
  • /trunk/phase3/resources/Resources.php (modified) (history)

Diff [purge]

Index: trunk/phase3/resources/Resources.php
@@ -12,31 +12,47 @@
1313 /* Skins */
1414
1515 'skins.vector' => array(
16 - 'styles' => array( 'skins/vector/screen.css' => array( 'media' => 'screen' ) ),
 16+ 'styles' => array( 'vector/screen.css' => array( 'media' => 'screen' ) ),
 17+ 'remoteBasePath' => $GLOBALS['wgStylePath'],
 18+ 'localBasePath' => "{$GLOBALS['IP']}/skins"
1719 ),
1820 'skins.monobook' => array(
1921 'styles' => array(
20 - 'skins/monobook/main.css' => array( 'media' => 'screen' ),
 22+ 'monobook/main.css' => array( 'media' => 'screen' ),
2123 ),
 24+ 'remoteBasePath' => $GLOBALS['wgStylePath'],
 25+ 'localBasePath' => "{$GLOBALS['IP']}/skins"
2226 ),
2327 'skins.simple' => array(
24 - 'styles' => array( 'skins/simple/main.css' => array( 'media' => 'screen' ) ),
 28+ 'styles' => array( 'simple/main.css' => array( 'media' => 'screen' ) ),
 29+ 'remoteBasePath' => $GLOBALS['wgStylePath'],
 30+ 'localBasePath' => "{$GLOBALS['IP']}/skins"
2531 ),
2632 'skins.chick' => array(
27 - 'styles' => array( 'skins/chick/main.css' => array( 'media' => 'screen,handheld' ) ),
 33+ 'styles' => array( 'chick/main.css' => array( 'media' => 'screen,handheld' ) ),
 34+ 'remoteBasePath' => $GLOBALS['wgStylePath'],
 35+ 'localBasePath' => "{$GLOBALS['IP']}/skins"
2836 ),
2937 'skins.modern' => array(
30 - 'styles' => array( 'skins/modern/main.css' => array( 'media' => 'screen' ),
31 - 'skins/modern/print.css' => array( 'media' => 'print' ) ),
 38+ 'styles' => array( 'modern/main.css' => array( 'media' => 'screen' ),
 39+ 'modern/print.css' => array( 'media' => 'print' ) ),
 40+ 'remoteBasePath' => $GLOBALS['wgStylePath'],
 41+ 'localBasePath' => "{$GLOBALS['IP']}/skins"
3242 ),
3343 'skins.cologneblue' => array(
34 - 'styles' => array( 'skins/common/cologneblue.css' => array( 'media' => 'screen' ) ),
 44+ 'styles' => array( 'common/cologneblue.css' => array( 'media' => 'screen' ) ),
 45+ 'remoteBasePath' => $GLOBALS['wgStylePath'],
 46+ 'localBasePath' => "{$GLOBALS['IP']}/skins"
3547 ),
3648 'skins.nostalgia' => array(
37 - 'styles' => array( 'skins/common/nostalgia.css' => array( 'media' => 'screen' ) ),
 49+ 'styles' => array( 'common/nostalgia.css' => array( 'media' => 'screen' ) ),
 50+ 'remoteBasePath' => $GLOBALS['wgStylePath'],
 51+ 'localBasePath' => "{$GLOBALS['IP']}/skins"
3852 ),
3953 'skins.standard' => array(
40 - 'styles' => array( 'skins/common/wikistandard.css' => array( 'media' => 'screen' ) ),
 54+ 'styles' => array( 'common/wikistandard.css' => array( 'media' => 'screen' ) ),
 55+ 'remoteBasePath' => $GLOBALS['wgStylePath'],
 56+ 'localBasePath' => "{$GLOBALS['IP']}/skins"
4157 ),
4258
4359 /* jQuery */
@@ -472,7 +488,9 @@
473489 /* mediawiki Legacy */
474490
475491 'mediawiki.legacy.ajax' => array(
476 - 'scripts' => 'skins/common/ajax.js',
 492+ 'scripts' => 'common/ajax.js',
 493+ 'remoteBasePath' => $GLOBALS['wgStylePath'],
 494+ 'localBasePath' => "{$GLOBALS['IP']}/skins"
477495 'messages' => array(
478496 'watch',
479497 'unwatch',
@@ -484,86 +502,126 @@
485503 'dependencies' => 'mediawiki.legacy.wikibits',
486504 ),
487505 'mediawiki.legacy.block' => array(
488 - 'scripts' => 'skins/common/block.js',
 506+ 'scripts' => 'common/block.js',
 507+ 'remoteBasePath' => $GLOBALS['wgStylePath'],
 508+ 'localBasePath' => "{$GLOBALS['IP']}/skins"
489509 'dependencies' => 'mediawiki.legacy.wikibits',
490510 ),
491511 'mediawiki.legacy.commonPrint' => array(
492 - 'styles' => array( 'skins/common/commonPrint.css' => array( 'media' => 'print' ) ),
 512+ 'styles' => array( 'common/commonPrint.css' => array( 'media' => 'print' ) ),
 513+ 'remoteBasePath' => $GLOBALS['wgStylePath'],
 514+ 'localBasePath' => "{$GLOBALS['IP']}/skins"
493515 ),
494516 'mediawiki.legacy.config' => array(
495 - 'scripts' => 'skins/common/config.js',
496 - 'styles' => array( 'skins/common/config.css', 'skins/common/config-cc.css' ),
 517+ 'scripts' => 'common/config.js',
 518+ 'styles' => array( 'common/config.css', 'common/config-cc.css' ),
 519+ 'remoteBasePath' => $GLOBALS['wgStylePath'],
 520+ 'localBasePath' => "{$GLOBALS['IP']}/skins"
497521 'dependencies' => 'mediawiki.legacy.wikibits',
498522 ),
499523 'mediawiki.legacy.diff' => array(
500 - 'scripts' => 'skins/common/diff.js',
501 - 'styles' => 'skins/common/diff.css',
 524+ 'scripts' => 'common/diff.js',
 525+ 'styles' => 'common/diff.css',
 526+ 'remoteBasePath' => $GLOBALS['wgStylePath'],
 527+ 'localBasePath' => "{$GLOBALS['IP']}/skins"
502528 'dependencies' => 'mediawiki.legacy.wikibits',
503529 ),
504530 'mediawiki.legacy.edit' => array(
505 - 'scripts' => 'skins/common/edit.js',
 531+ 'scripts' => 'common/edit.js',
 532+ 'remoteBasePath' => $GLOBALS['wgStylePath'],
 533+ 'localBasePath' => "{$GLOBALS['IP']}/skins"
506534 'dependencies' => 'mediawiki.legacy.wikibits',
507535 ),
508536 'mediawiki.legacy.history' => array(
509 - 'scripts' => 'skins/common/history.js',
 537+ 'scripts' => 'common/history.js',
 538+ 'remoteBasePath' => $GLOBALS['wgStylePath'],
 539+ 'localBasePath' => "{$GLOBALS['IP']}/skins"
510540 'dependencies' => 'mediawiki.legacy.wikibits',
511541 ),
512542 'mediawiki.legacy.htmlform' => array(
513 - 'scripts' => 'skins/common/htmlform.js',
 543+ 'scripts' => 'common/htmlform.js',
 544+ 'remoteBasePath' => $GLOBALS['wgStylePath'],
 545+ 'localBasePath' => "{$GLOBALS['IP']}/skins"
514546 'dependencies' => 'mediawiki.legacy.wikibits',
515547 ),
516548 'mediawiki.legacy.IEFixes' => array(
517 - 'scripts' => 'skins/common/IEFixes.js',
 549+ 'scripts' => 'common/IEFixes.js',
 550+ 'remoteBasePath' => $GLOBALS['wgStylePath'],
 551+ 'localBasePath' => "{$GLOBALS['IP']}/skins"
518552 'dependencies' => 'mediawiki.legacy.wikibits',
519553 ),
520554 'mediawiki.legacy.metadata' => array(
521 - 'scripts' => 'skins/common/metadata.js',
 555+ 'scripts' => 'common/metadata.js',
 556+ 'remoteBasePath' => $GLOBALS['wgStylePath'],
 557+ 'localBasePath' => "{$GLOBALS['IP']}/skins"
522558 'dependencies' => 'mediawiki.legacy.wikibits',
523559 'messages' => array( 'metadata-expand', 'metadata-collapse' ),
524560 ),
525561 'mediawiki.legacy.mwsuggest' => array(
526 - 'scripts' => 'skins/common/mwsuggest.js',
 562+ 'scripts' => 'common/mwsuggest.js',
 563+ 'remoteBasePath' => $GLOBALS['wgStylePath'],
 564+ 'localBasePath' => "{$GLOBALS['IP']}/skins"
527565 'dependencies' => array( 'mediawiki.legacy.wikibits', 'jquery.client' ),
528566 'messages' => array( 'search-mwsuggest-enabled', 'search-mwsuggest-disabled' ),
529567 ),
530568 'mediawiki.legacy.password' => array(
531 - 'scripts' => 'skins/common/password.js',
532 - 'styles' => 'skins/common/password.css',
 569+ 'scripts' => 'common/password.js',
 570+ 'remoteBasePath' => $GLOBALS['wgStylePath'],
 571+ 'localBasePath' => "{$GLOBALS['IP']}/skins"
 572+ 'styles' => 'common/password.css',
533573 'dependencies' => 'mediawiki.legacy.wikibits',
534574 ),
535575 'mediawiki.legacy.prefs' => array(
536 - 'scripts' => 'skins/common/prefs.js',
 576+ 'scripts' => 'common/prefs.js',
 577+ 'remoteBasePath' => $GLOBALS['wgStylePath'],
 578+ 'localBasePath' => "{$GLOBALS['IP']}/skins"
537579 'dependencies' => array( 'mediawiki.legacy.wikibits', 'mediawiki.legacy.htmlform' ),
538580 ),
539581 'mediawiki.legacy.preview' => array(
540 - 'scripts' => 'skins/common/preview.js',
 582+ 'scripts' => 'common/preview.js',
 583+ 'remoteBasePath' => $GLOBALS['wgStylePath'],
 584+ 'localBasePath' => "{$GLOBALS['IP']}/skins"
541585 'dependencies' => 'mediawiki.legacy.wikibits',
542586 ),
543587 'mediawiki.legacy.protect' => array(
544 - 'scripts' => 'skins/common/protect.js',
 588+ 'scripts' => 'common/protect.js',
 589+ 'remoteBasePath' => $GLOBALS['wgStylePath'],
 590+ 'localBasePath' => "{$GLOBALS['IP']}/skins"
545591 'dependencies' => 'mediawiki.legacy.wikibits',
546592 ),
547593 'mediawiki.legacy.search' => array(
548 - 'scripts' => 'skins/common/search.js',
549 - 'styles' => 'skins/common/search.css',
 594+ 'scripts' => 'common/search.js',
 595+ 'remoteBasePath' => $GLOBALS['wgStylePath'],
 596+ 'localBasePath' => "{$GLOBALS['IP']}/skins"
 597+ 'styles' => 'common/search.css',
550598 'dependencies' => 'mediawiki.legacy.wikibits',
551599 ),
552600 'mediawiki.legacy.shared' => array(
553 - 'styles' => array( 'skins/common/shared.css' => array( 'media' => 'screen' ) ),
 601+ 'styles' => array( 'common/shared.css' => array( 'media' => 'screen' ) ),
 602+ 'remoteBasePath' => $GLOBALS['wgStylePath'],
 603+ 'localBasePath' => "{$GLOBALS['IP']}/skins"
554604 ),
555605 'mediawiki.legacy.oldshared' => array(
556 - 'styles' => array( 'skins/common/oldshared.css' => array( 'media' => 'screen' ) ),
 606+ 'styles' => array( 'common/oldshared.css' => array( 'media' => 'screen' ) ),
 607+ 'remoteBasePath' => $GLOBALS['wgStylePath'],
 608+ 'localBasePath' => "{$GLOBALS['IP']}/skins"
557609 ),
558610 'mediawiki.legacy.upload' => array(
559 - 'scripts' => 'skins/common/upload.js',
 611+ 'scripts' => 'common/upload.js',
 612+ 'remoteBasePath' => $GLOBALS['wgStylePath'],
 613+ 'localBasePath' => "{$GLOBALS['IP']}/skins"
560614 'dependencies' => 'mediawiki.legacy.wikibits',
561615 ),
562616 'mediawiki.legacy.wikibits' => array(
563 - 'scripts' => 'skins/common/wikibits.js',
 617+ 'scripts' => 'common/wikibits.js',
 618+ 'remoteBasePath' => $GLOBALS['wgStylePath'],
 619+ 'localBasePath' => "{$GLOBALS['IP']}/skins"
564620 'dependencies' => 'mediawiki.language',
565621 'messages' => array( 'showtoc', 'hidetoc' ),
566622 ),
567623 'mediawiki.legacy.wikiprintable' => array(
568 - 'styles' => array( 'skins/common/wikiprintable.css' => array( 'media' => 'print' ) ),
 624+ 'styles' => array( 'common/wikiprintable.css' => array( 'media' => 'print' ) ),
 625+ 'remoteBasePath' => $GLOBALS['wgStylePath'],
 626+ 'localBasePath' => "{$GLOBALS['IP']}/skins"
569627 ),
570628 );

Follow-up revisions

RevisionCommit summaryAuthorDate
r81721Fix r81719: trailing commascatrope12:13, 8 February 2011
r817231.17wmf1: MFT r81719, r81721, r81722catrope12:15, 8 February 2011
r85348Fixes for r85151: grab Resources.php changes for r81719, r81721, r81722, r822...demon17:41, 4 April 2011

Status & tagging log