From ff2b59edd2f8602a61cac9376809eb034f3755b2 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Mon, 16 Feb 2009 17:57:38 +0000 Subject: [PATCH] Fix r47319: this is reverting the wrong revision (cause was r40912). Move cat stuff up to original point. --- includes/Article.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/includes/Article.php b/includes/Article.php index 0ac7481a76..e3c57066b1 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -2532,6 +2532,14 @@ class Article { $dbw->rollback(); return false; } + + # Fix category table counts + $cats = array(); + $res = $dbw->select( 'categorylinks', 'cl_to', array( 'cl_from' => $id ), __METHOD__ ); + foreach( $res as $row ) { + $cats []= $row->cl_to; + } + $this->updateCategoryCounts( array(), $cats ); # If using cascading deletes, we can skip some explicit deletes if( !$dbw->cascadingDeletes() ) { @@ -2549,14 +2557,6 @@ class Article { $dbw->delete( 'langlinks', array( 'll_from' => $id ) ); $dbw->delete( 'redirect', array( 'rd_from' => $id ) ); } - - # Fix category table counts - $cats = array(); - $res = $dbw->select( 'categorylinks', 'cl_to', array( 'cl_from' => $id ), __METHOD__ ); - foreach( $res as $row ) { - $cats []= $row->cl_to; - } - $this->updateCategoryCounts( array(), $cats ); # If using cleanup triggers, we can skip some manual deletes if( !$dbw->cleanupTriggers() ) { -- 2.20.1