Fallback to dbname if source title doesn't exist

This shouldn't happen regularly, since the source should always
have a title through a wg* variable in LocalSettings.php but in
cases where that is not set up correctly, or is missing for whatever
reason, the system should always fall back to displaying the name
of the source, if the title doesn't exist.

Bug: T164112
Change-Id: I94074adc260a5caf55ca21578fd7071b3323a5e6
This commit is contained in:
Moriel Schottlender 2017-06-05 16:40:15 +03:00
parent 33ea210dc9
commit f05131a8ef

View file

@ -166,9 +166,9 @@
mw.echo.dm.SourcePagesModel.prototype.setSourcePagesDetails = function ( source, details ) {
var i, page;
this.sources[ source ] = {
title: details.source.title,
title: details.source.title || source,
base: details.source.base,
totalCount: details.totalCount,
totalCount: details.totalCount || 0,
pages: {}
};