[ 'name' => 'ResourceLoaderDynamicStyles', 'content' => '' ]
);
+ $separateReq = [ 'site.styles', 'user.styles' ];
foreach ( $this->rlExemptStyleModules as $group => $moduleNames ) {
- $chunks[] = $this->makeResourceLoaderLink( $moduleNames,
+ // Combinable modules
+ $chunks[] = $this->makeResourceLoaderLink(
+ array_diff( $moduleNames, $separateReq ),
ResourceLoaderModule::TYPE_STYLES
);
+
+ foreach ( array_intersect( $moduleNames, $separateReq ) as $name ) {
+ // These require their own dedicated request in order to support "@import"
+ // syntax, which is incompatible with concatenation. (T147667, T37562)
+ $chunks[] = $this->makeResourceLoaderLink( $name,
+ ResourceLoaderModule::TYPE_STYLES
+ );
+ }
}
return self::combineWrappedStrings( array_merge( $chunks, $append ) );
<?php
/**
* This does the initial set up for a web request.
- * It does some security checks, starts the profiler and loads the
- * configuration, and optionally loads Setup.php depending on whether
- * MW_NO_SETUP is defined.
*
- * Setup.php (if loaded) then sets up GlobalFunctions, the AutoLoader,
- * and the configuration globals.
+ * It does some security checks, loads autoloaders, constants, and
+ * global functions, starts the profiler, loads the configuration,
+ * and loads Setup.php, which loads extensions using the extension
+ * registration system and initializes the application's global state.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
$safeseq = str_replace( "'", "''", $seqName );
$res = $this->query( "SELECT nextval('$safeseq')" );
$row = $this->fetchRow( $res );
- $this->mInsertId = $row[0];
+ $this->mInsertId = is_null( $row[0] ) ? null : (int)$row[0];
return $this->mInsertId;
}
);
if ( $dbw->affectedRows() > 0 ) {
- $newid = $pageId ?: $dbw->insertId();
+ $newid = $pageId ? (int)$pageId : $dbw->insertId();
$this->mId = $newid;
$this->mTitle->resetArticleID( $newid );
"recentchanges-submit": "Show",
"rcfilters-activefilters": "Active filters",
"rcfilters-quickfilters": "Quick links",
- "rcfilters-quickfilters-placeholder": "Save your favorite tool settings to re-use them later.",
+ "rcfilters-quickfilters-placeholder-title": "No links saved yet",
+ "rcfilters-quickfilters-placeholder-description": "To save your filter settings and reuse them later, click the bookmark icon in the Active Filter area, below.",
"rcfilters-savedqueries-defaultlabel": "Saved filters",
"rcfilters-savedqueries-rename": "Rename",
"rcfilters-savedqueries-setdefault": "Set as default",
"recentchanges-submit": "Label for submit button in [[Special:RecentChanges]]\n{{Identical|Show}}",
"rcfilters-activefilters": "Title for the filters selection showing the active filters.",
"rcfilters-quickfilters": "Label for the button that opens the quick filters menu in [[Special:RecentChanges]]",
- "rcfilters-quickfilters-placeholder": "Text shown in the quick filters menu on [[Special:RecentChanges]] if the user has not saved any quick filters.",
+ "rcfilters-quickfilters-placeholder-title": "Title for the text shown in the quick filters menu on [[Special:RecentChanges]] if the user has not saved any quick filters.",
+ "rcfilters-quickfilters-placeholder-description": "Description for the text shown in the quick filters menu on [[Special:RecentChanges]] if the user has not saved any quick filters.",
"rcfilters-savedqueries-defaultlabel": "Default name for saving a new set of quick filters [[Special:RecentChanges]]",
"rcfilters-savedqueries-rename": "Label for the menu option that edits a quick filter in [[Special:RecentChanges]]\n{{Identical|Rename}}",
"rcfilters-savedqueries-setdefault": "Label for the menu option that sets a quick filter as default in [[Special:RecentChanges]]",
* @ingroup Maintenance
*/
class BaseDump {
+ /** @var XMLReader */
protected $reader = null;
protected $atEnd = false;
protected $atPageEnd = false;
* @ingroup Maintenance
*/
class TextPassDumper extends BackupDumper {
+ /** @var BaseDump */
public $prefetch = null;
+ /** @var string|bool */
+ private $thisPage;
+ /** @var string|bool */
+ private $thisRev;
// when we spend more than maxTimeAllowed seconds on this run, we continue
// processing until we write out the next complete page, then save output file(s),
if ( $text === false && isset( $this->prefetch ) && $prefetchNotTried ) {
$prefetchNotTried = false;
$tryIsPrefetch = true;
- $text = $this->prefetch->prefetch( intval( $this->thisPage ),
- intval( $this->thisRev ) );
+ $text = $this->prefetch->prefetch( (int)$this->thisPage, (int)$this->thisRev );
if ( $text === null ) {
$text = false;
'messages' => [
'rcfilters-activefilters',
'rcfilters-quickfilters',
- 'rcfilters-quickfilters-placeholder',
+ 'rcfilters-quickfilters-placeholder-title',
+ 'rcfilters-quickfilters-placeholder-description',
'rcfilters-savedqueries-defaultlabel',
'rcfilters-savedqueries-rename',
'rcfilters-savedqueries-setdefault',
.mw-rcfilters-ui-savedLinksListItemWidget {
- padding: 0.5em;
+ padding: 0.2em 0.7em;
&:hover {
// Mimicking optionWidget styles
vertical-align: middle;
}
- &:not( .oo-ui-iconElement ) .oo-ui-iconElement-icon {
- // The iconElement-icon class still appears when we
- // have an empty icon, and we need it to pretend to
- // be there so the text has the same alignment as
- // text next to a visible icon. #ThanksOOUI
- width: 1.875em;
- height: 1.875em;
+ .oo-ui-iconElement-icon {
+ // Since we made the rows narrower (height smaller than usual)
+ // then the icon needs to be slightly smaller as well, so that
+ // when we toggle 'default' the icon doesn't bounce the option
+ // height up a little
+ width: 1.7em;
+ height: 1.7em;
}
&-icon span {
overflow: hidden;
cursor: pointer;
margin-left: 0.5px;
+ color: #36c; // Accent50;
}
&-icon,
}
&-placeholder {
+ &-title {
+ font-weight: bold;
+ margin-bottom: 1em;
+ }
+
// Extra specificity needed to override OOUI rule that sets white-space: nowrap;
// on labels inside options
&.oo-ui-optionWidget .oo-ui-labelElement-label {
.oo-ui-iconElement-icon {
opacity: 0.5;
+ // Override OOUI option widget rules for icons
+ // we want the icon to appear at the top near the
+ // title, not in the middle of the multiline option
+ top: 0.7em !important; /* stylelint-disable-line declaration-no-important */
+ height: inherit !important; /* stylelint-disable-line declaration-no-important */
}
}
}
$( '<div>' )
.addClass( 'mw-rcfilters-ui-row' )
.append(
- $( '<div>' )
- .addClass( 'mw-rcfilters-ui-cell' )
- .addClass( 'mw-rcfilters-ui-savedLinksListItemWidget-icon' )
- .append( this.$icon ),
$( '<div>' )
.addClass( 'mw-rcfilters-ui-cell' )
.addClass( 'mw-rcfilters-ui-savedLinksListItemWidget-content' )
this.editInput.$element,
this.saveButton.$element
),
+ $( '<div>' )
+ .addClass( 'mw-rcfilters-ui-cell' )
+ .addClass( 'mw-rcfilters-ui-savedLinksListItemWidget-icon' )
+ .append( this.$icon ),
this.popupButton.$element
.addClass( 'mw-rcfilters-ui-cell' )
)
this.editInput.toggle( isEdit );
this.$label.toggleClass( 'oo-ui-element-hidden', isEdit );
+ this.$icon.toggleClass( 'oo-ui-element-hidden', isEdit );
this.popupButton.toggle( !isEdit );
this.saveButton.toggle( isEdit );
* @cfg {jQuery} [$overlay] A jQuery object serving as overlay for popups
*/
mw.rcfilters.ui.SavedLinksListWidget = function MwRcfiltersUiSavedLinksListWidget( controller, model, config ) {
+ var $labelNoEntries = $( '<div>' )
+ .append(
+ $( '<div>' )
+ .addClass( 'mw-rcfilters-ui-savedLinksListWidget-placeholder-title' )
+ .text( mw.msg( 'rcfilters-quickfilters-placeholder-title' ) ),
+ $( '<div>' )
+ .addClass( 'mw-rcfilters-ui-savedLinksListWidget-placeholder-description' )
+ .text( mw.msg( 'rcfilters-quickfilters-placeholder-description' ) )
+ );
+
config = config || {};
// Parent
this.placeholderItem = new OO.ui.DecoratedOptionWidget( {
classes: [ 'mw-rcfilters-ui-savedLinksListWidget-placeholder' ],
- label: mw.msg( 'rcfilters-quickfilters-placeholder' ),
+ label: $labelNoEntries,
icon: 'unClip'
} );
// The only reason we're using "ButtonGroupWidget" here is that
'user' => [ 'user.styles', 'example.user' ],
],
'<meta name="ResourceLoaderDynamicStyles" content=""/>' . "\n" .
- '<link rel="stylesheet" href="/w/load.php?debug=false&lang=en&modules=example.site.a%2Cb%7Csite.styles&only=styles&skin=fallback"/>' . "\n" .
- '<link rel="stylesheet" href="/w/load.php?debug=false&lang=en&modules=example.user%7Cuser.styles&only=styles&skin=fallback&version=17f1vjw"/>',
+ '<link rel="stylesheet" href="/w/load.php?debug=false&lang=en&modules=example.site.a%2Cb&only=styles&skin=fallback"/>' . "\n" .
+ '<link rel="stylesheet" href="/w/load.php?debug=false&lang=en&modules=site.styles&only=styles&skin=fallback"/>' . "\n" .
+ '<link rel="stylesheet" href="/w/load.php?debug=false&lang=en&modules=example.user&only=styles&skin=fallback&version=0a56zyi"/>' . "\n" .
+ '<link rel="stylesheet" href="/w/load.php?debug=false&lang=en&modules=user.styles&only=styles&skin=fallback&version=1e9z0ox"/>',
],
// @codingStandardsIgnoreEnd Generic.Files.LineLength
];
// increasing
$this->assertEquals(
[ $this->pageId2, $this->pageId3, $this->pageId4 ],
- [ $this->pageId1 + 1, $this->pageId2 + 1, $this->pageId3 + 1 ],
+ [ $this->pageId1 + 1, $this->pageId1 + 2, $this->pageId1 + 3 ],
"Page ids increasing without holes" );
}