diff --git a/WatchAnalyticsUser.php b/WatchAnalyticsUser.php index f4d44d9..66de375 100644 --- a/WatchAnalyticsUser.php +++ b/WatchAnalyticsUser.php @@ -30,7 +30,7 @@ public function getPendingWatches() { null // array( 'u' => array( 'LEFT JOIN', 'u.user-id=w.wl_user' ) ) ); $this->pendingWatches = []; - while ( $row = $dbr->fetchRow( $res ) ) { + while ( $row = $res->fetchRow() ) { // $title = Title::newFromText( $row['title_text'], $row['notification_timestamp'] ); $this->pendingWatches[] = $row; diff --git a/includes/PendingReview.php b/includes/PendingReview.php index 3b938d2..09e79dc 100644 --- a/includes/PendingReview.php +++ b/includes/PendingReview.php @@ -182,7 +182,7 @@ public static function getPendingReviewsList( User $user, $limit, $offset ) { $pending = []; - while ( $row = $dbr->fetchRow( $watchResult ) ) { + while ( $row = $watchResult->fetchRow() ) { $pending[] = new self( $row ); @@ -249,7 +249,7 @@ public static function getPendingReview( User $user, Title $title ) { $pending = []; - while ( $row = $dbr->fetchRow( $watchResult ) ) { + while ( $row = $watchResult->fetchRow() ) { $pending[] = new self( $row ); diff --git a/includes/UserWatchesQuery.php b/includes/UserWatchesQuery.php index f602100..b831259 100644 --- a/includes/UserWatchesQuery.php +++ b/includes/UserWatchesQuery.php @@ -119,7 +119,7 @@ public function getUserWatchStats( User $user ) { $qInfo['join_conds'] ); - $row = $dbr->fetchRow( $res ); + $row = $res->fetchRow(); // if user doesn't have any pages in watchlist, then no data will be // returned by this query. Create a "blank" row instead. diff --git a/includes/WatchAnalyticsParserFunctions.php b/includes/WatchAnalyticsParserFunctions.php index 881267c..eb56043 100644 --- a/includes/WatchAnalyticsParserFunctions.php +++ b/includes/WatchAnalyticsParserFunctions.php @@ -76,7 +76,7 @@ public static function renderUnderwatchedCategories( &$parser, $frame, $args ) { $output .= "! Category !! Number of Under-watched pages\n"; $categories = []; - while ( $row = $dbr->fetchObject( $result ) ) { + while ( $row = $result->fetchObject() ) { $pageCategories = explode( ';', $row->categories ); foreach ( $pageCategories as $cat ) { @@ -189,7 +189,7 @@ public static function renderWatchersNeeded( &$parser, $frame, $args ) { $result = $dbr->query( $query ); $output = ''; - while ( $row = $dbr->fetchObject( $result ) ) { + while ( $row = $result->fetchObject() ) { // $title = Title::makeTitle( $row->page_namespace, $row->page_title ); // $watchURL = $title->getFullURL( array( 'action' => 'watch' ) ); // $output .= "* [[$title]] - '''[$watchURL watch]'''\n"; diff --git a/maintenance/forgivePendingReviews.php b/maintenance/forgivePendingReviews.php index 1351ecc..83a1002 100644 --- a/maintenance/forgivePendingReviews.php +++ b/maintenance/forgivePendingReviews.php @@ -108,7 +108,7 @@ public function execute() { $result = $dbw->query( $query ); $success = print_r( $result, true ); // $count = 0; - // while ( $row = $dbw->fetchObject( $result ) ) { + // while ( $row = $result->fetchObject() ) { // $count++; // $this->output( "\n{$row->pending_since}: {$row->user_name}: {$row->title}" ); // } diff --git a/specials/SpecialPageStatistics.php b/specials/SpecialPageStatistics.php index a7a6186..f8a3971 100644 --- a/specials/SpecialPageStatistics.php +++ b/specials/SpecialPageStatistics.php @@ -263,7 +263,7 @@ public function pageChart() { ); $data = []; - while ( $row = $dbr->fetchObject( $res ) ) { + while ( $row = $res->fetchObject() ) { $data[ $row->timestamp ] = $row->num_reviewed; } diff --git a/specials/SpecialWatchAnalytics.php b/specials/SpecialWatchAnalytics.php index e1f1595..7d62243 100644 --- a/specials/SpecialWatchAnalytics.php +++ b/specials/SpecialWatchAnalytics.php @@ -105,7 +105,7 @@ public function getPageHeader() { INNER JOIN page ON page.page_namespace = watchlist.wl_namespace AND page.page_title = watchlist.wl_title; ' ); - $allWikiData = $db->fetchRow( $res ); + $allWikiData = $res->fetchRow(); list( $watches, $pending, $percent ) = [ $allWikiData['num_watches'],