From: Brion Vibber Date: Tue, 20 Dec 2005 21:17:03 +0000 (+0000) Subject: * (bug 3424) Update page_touched for category members on category page creation X-Git-Tag: 1.6.0~923 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=b9ca65dc29ab59b7114dc35d8d80187bddb7cad1;p=lhc%2Fweb%2Fwiklou.git * (bug 3424) Update page_touched for category members on category page creation --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 9418f656fa..ec2b42345e 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -337,6 +337,7 @@ fully support the editing toolbar, but was found to be too confusing. * Removed experimental Amethyst skin from default set * Upgrade old skin preferences properly at Special:Preferences (used to spontaneously switch to Classic skin for old numeric pref records) +* (bug 3424) Update page_touched for category members on category page creation === Caveats === diff --git a/includes/Title.php b/includes/Title.php index 0d5d1c7414..ed8e7f6a4a 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -2035,14 +2035,25 @@ class Title { 'pl_namespace' => $this->getNamespace(), 'pl_title' => $this->getDbKey() ), $fname ); - if ( 0 == $dbw->numRows( $res ) ) { - return; - } $toucharr = array(); while( $row = $dbw->fetchObject( $res ) ) { $toucharr[] = $row->pl_from; } + $dbw->freeResult( $res ); + + if( $this->getNamespace() == NS_CATEGORY ) { + // Categories show up in a separate set of links as well + $res = $dbw->select( 'categorylinks', + array( 'cl_from' ), + array( 'cl_to' => $this->getDbKey() ), + $fname ); + while( $row = $dbw->fetchObject( $res ) ) { + $toucharr[] = $row->cl_from; + } + $dbw->freeResult( $res ); + } + if (!count($toucharr)) return; $dbw->update( 'page', /* SET */ array( 'page_touched' => $dbw->timestamp() ),