Aude has uploaded a new change for review. https://gerrit.wikimedia.org/r/95707
Change subject: Cleanup in WikiPageUpdater ...................................................................... Cleanup in WikiPageUpdater Change-Id: I5f3234d09b8bcee7aff19123352da1ea74daa10e --- M client/includes/WikiPageUpdater.php 1 file changed, 22 insertions(+), 35 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/07/95707/1 diff --git a/client/includes/WikiPageUpdater.php b/client/includes/WikiPageUpdater.php index d5306e6..e3f4ceb 100644 --- a/client/includes/WikiPageUpdater.php +++ b/client/includes/WikiPageUpdater.php @@ -2,31 +2,18 @@ namespace Wikibase; +use Job; +use JobQueueGroup; +use RefreshLinksJob; +use Title; + /** * Service object for triggering different kinds of page updates * and generally notifying the local wiki of external changes. * * Used by ChangeHandler as an interface to the local wiki. * - * 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 - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * http://www.gnu.org/copyleft/gpl.html - * * @since 0.4 - * - * @file - * @ingroup WikibaseLib * * @licence GNU GPL v2+ * @author Daniel Kinzler @@ -37,12 +24,12 @@ /** * Invalidates local cached of the given pages. * - * @since 0.4 + * @since 0.4 * - * @param \Title[] $titles The Titles of the pages to update + * @param Title[] $titles The Titles of the pages to update */ public function purgeParserCache( array $titles ) { - /* @var \Title $title */ + /* @var Title $title */ foreach ( $titles as $title ) { wfDebugLog( __CLASS__, __FUNCTION__ . ": purging page " . $title->getText() ); $title->invalidateCache(); @@ -52,12 +39,12 @@ /** * Invalidates external web cached of the given pages. * - * @since 0.4 + * @since 0.4 * - * @param \Title[] $titles The Titles of the pages to update + * @param Title[] $titles The Titles of the pages to update */ public function purgeWebCache( array $titles ) { - /* @var \Title $title */ + /* @var Title $title */ foreach ( $titles as $title ) { wfDebugLog( __CLASS__, __FUNCTION__ . ": purging web cache for " . $title->getText() ); $title->purgeSquid(); @@ -67,38 +54,38 @@ /** * Schedules RefreshLinks jobs for the given titles * - * @since 0.4 + * @since 0.4 * - * @param \Title[] $titles The Titles of the pages to update + * @param Title[] $titles The Titles of the pages to update */ public function scheduleRefreshLinks( array $titles ) { - /* @var \Title $title */ + /* @var Title $title */ foreach ( $titles as $title ) { wfDebugLog( __CLASS__, __FUNCTION__ . ": scheduling refresh links for " . $title->getText() ); - //XXX: use \RefreshLinksJob2 ?! - $job = new \RefreshLinksJob( + //XXX: use RefreshLinksJob2 ?! + $job = new RefreshLinksJob( $title, - \Job::newRootJobParams( //XXX: the right thing? + Job::newRootJobParams( //XXX: the right thing? $title->getPrefixedDBkey() ) ); - \JobQueueGroup::singleton()->push( $job ); - \JobQueueGroup::singleton()->deduplicateRootJob( $job ); + JobQueueGroup::singleton()->push( $job ); + JobQueueGroup::singleton()->deduplicateRootJob( $job ); } } /** * Injects an RC entry into the recentchanges, using the the given title and attribs * - * @param \Title $title + * @param Title $title * @param array $attribs * * @return bool */ - public function injectRCRecord( \Title $title, array $attribs ) { + public function injectRCRecord( Title $title, array $attribs ) { wfProfileIn( __METHOD__ ); if ( !$title->exists() ) { @@ -119,4 +106,4 @@ wfProfileOut( __METHOD__ ); return true; } -} \ No newline at end of file +} -- To view, visit https://gerrit.wikimedia.org/r/95707 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5f3234d09b8bcee7aff19123352da1ea74daa10e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Aude <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
