jenkins-bot has submitted this change and it was merged. Change subject: Get rid of GadgetPageList::isGadgetPage() ......................................................................
Get rid of GadgetPageList::isGadgetPage() Just use the contentmodel Change-Id: I271fa9f04d4b1fc348273c31128f1d2ba966c993 --- M backend/GadgetPageList.php M populateGadgetPageList.php 2 files changed, 3 insertions(+), 10 deletions(-) Approvals: Alex Monk: Looks good to me, approved jenkins-bot: Verified diff --git a/backend/GadgetPageList.php b/backend/GadgetPageList.php index ceaab8d..640086d 100644 --- a/backend/GadgetPageList.php +++ b/backend/GadgetPageList.php @@ -28,15 +28,6 @@ } /** - * Check whether a given title is a gadget page - * @param Title $title object - * @return bool True if $title is a CSS/JS page and isn't a redirect, false otherwise - */ - public static function isGadgetPage( Title $title ) { - return ( $title->isCssOrJsPage() || $title->isCssJsSubpage() ) && !$title->isRedirect(); - } - - /** * Get a row for the gadgetpagelist table * @param Title $title * @return array Database row diff --git a/populateGadgetPageList.php b/populateGadgetPageList.php index c32c377..659221f 100644 --- a/populateGadgetPageList.php +++ b/populateGadgetPageList.php @@ -50,7 +50,9 @@ $gplRows = array(); foreach ( $res as $row ) { $title = Title::newFromRow( $row ); - if ( GadgetPageList::isGadgetPage( $title ) ) { + if ( $title->hasContentModel( 'GadgetJs' ) + || $title->hasContentModel( 'GadgetCss' ) + ) { $gplRows[] = GadgetPageList::getRowForTitle( $title ); } $lastPageID = intval( $row->page_id ); -- To view, visit https://gerrit.wikimedia.org/r/160197 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I271fa9f04d4b1fc348273c31128f1d2ba966c993 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Gadgets Gerrit-Branch: RL2 Gerrit-Owner: Legoktm <legoktm.wikipe...@gmail.com> Gerrit-Reviewer: Addshore <addshorew...@gmail.com> Gerrit-Reviewer: Alex Monk <kren...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits