Last modified: 2009-04-16 20:10:56 UTC
In Article::doDeleteArticle(), the code for updating the category counters is executed after the delete on the categorylinks table, so the query > # Fix category table counts > $cats = array(); > $res = $dbw->select( 'categorylinks', 'cl_to', array( 'cl_from' => $id ), __METHOD__ ); will never return a result. Thus, the category counters aren't updated at all on article deletions.
Created attachment 5796 [details] Proposed fix: Move updateCategoryCounts() up a few lines
Thanks for the report. This was inexplicably broken in r41018. I reverted the bad parts of that in r47318, backported to 1.14 in r47319.
(In reply to comment #2) > bad parts of that in r47318, backported to 1.14 in r47319. That should be r47319 and r47320 respectively.
Note that r41018 only moved the step below the RC row deletion and Article::onArticleDelete( $this->mTitle ) steps. r47319 Just reverted this. The *above* patch moves this up before the page row deletion and more importantly before: $dbw->delete( 'categorylinks', array( 'cl_from' => $id ) ); This seems to be actually broken by r40912. Restored in r47326