Mooeypoo has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/357205 )

Change subject: Fallback to dbname if source title doesn't exist
......................................................................

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
---
M modules/model/mw.echo.dm.SourcePagesModel.js
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo 
refs/changes/05/357205/1

diff --git a/modules/model/mw.echo.dm.SourcePagesModel.js 
b/modules/model/mw.echo.dm.SourcePagesModel.js
index 07c7b96..c305f7d 100644
--- a/modules/model/mw.echo.dm.SourcePagesModel.js
+++ b/modules/model/mw.echo.dm.SourcePagesModel.js
@@ -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: {}
                };
 

-- 
To view, visit https://gerrit.wikimedia.org/r/357205
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I94074adc260a5caf55ca21578fd7071b3323a5e6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Mooeypoo <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to