From 7c4278f3f109e030b6313cd1ba513157c5fba224 Mon Sep 17 00:00:00 2001 From: aude Date: Tue, 8 Apr 2014 10:40:04 +0200 Subject: [PATCH] Split part of EnhancedChangesList::recentChangesLine into new method Change-Id: I57f22ac0969fe3ba324a2b9d107c6f2d9968769c --- includes/changes/EnhancedChangesList.php | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/includes/changes/EnhancedChangesList.php b/includes/changes/EnhancedChangesList.php index feb6d7b2bf..6c4260160c 100644 --- a/includes/changes/EnhancedChangesList.php +++ b/includes/changes/EnhancedChangesList.php @@ -107,9 +107,20 @@ class EnhancedChangesList extends ChangesList { } $cacheEntry = $this->cacheEntryFactory->newFromRecentChange( $baseRC, $watched ); + $this->addCacheEntry( $cacheEntry ); - # Put accumulated information into the cache, for later display - # Page moves go on their own line + wfProfileOut( __METHOD__ ); + + return $ret; + } + + /** + * Put accumulated information into the cache, for later display. + * Page moves go on their own line. + * + * @param RCCacheEntry $cacheEntry + */ + protected function addCacheEntry( RCCacheEntry $cacheEntry ) { $title = $cacheEntry->getTitle(); $secureName = $title->getPrefixedDBkey(); @@ -132,10 +143,6 @@ class EnhancedChangesList extends ChangesList { array_push( $this->rc_cache[$secureName], $cacheEntry ); } - - wfProfileOut( __METHOD__ ); - - return $ret; } /** -- 2.20.1