Use new API for descriptions in TitleWidget
authorEd Sanders <esanders@wikimedia.org>
Wed, 4 Apr 2018 14:47:31 +0000 (15:47 +0100)
committerEd Sanders <esanders@wikimedia.org>
Wed, 4 Apr 2018 14:47:31 +0000 (15:47 +0100)
Bug: T191333
Change-Id: I5682f2fe3000d61c3760d22e9a567c762cf36710

resources/src/mediawiki.widgets/mw.widgets.TitleWidget.js

index 190962c..2bbeabf 100644 (file)
                        params.pilimit = this.limit;
                }
                if ( this.showDescriptions ) {
-                       params.prop.push( 'pageterms' );
-                       params.wbptterms = 'description';
+                       params.prop.push( 'description' );
                }
                return params;
        };
                                redirect: suggestionPage.redirect !== undefined,
                                disambiguation: OO.getProp( suggestionPage, 'pageprops', 'disambiguation' ) !== undefined,
                                imageUrl: OO.getProp( suggestionPage, 'thumbnail', 'source' ),
-                               description: OO.getProp( suggestionPage, 'terms', 'description' ),
+                               description: suggestionPage.description,
                                // Sort index
                                index: suggestionPage.index,
                                originalData: suggestionPage