r41069 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r41068‎ | r41069 | r41070 >
Date:14:19, 20 September 2008
Author:aaron
Status:old
Tags:
Comment:
Use cur_id condition alone so that it actually deletes the proper entries. (bug 15655)
Modified paths:
  • /trunk/phase3/includes/Article.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Article.php
@@ -2404,7 +2404,7 @@
24052405 if ( !$dbw->cleanupTriggers() ) {
24062406 # Clean up recentchanges entries...
24072407 $dbw->delete( 'recentchanges',
2408 - array( 'rc_namespace' => $ns, 'rc_title' => $t, 'rc_type != '.RC_LOG, 'rc_cur_id' => $id ),
 2408+ array( 'rc_type != '.RC_LOG, 'rc_cur_id' => $id ),
24092409 __METHOD__ );
24102410 }
24112411
@@ -3104,7 +3104,7 @@
31053105 * @param $title_obj a title object
31063106 */
31073107
3108 - static function onArticleCreate($title) {
 3108+ public static function onArticleCreate($title) {
31093109 # The talk page isn't in the regular link tables, so we need to update manually:
31103110 if ( $title->isTalkPage() ) {
31113111 $other = $title->getSubjectPage();
@@ -3119,7 +3119,7 @@
31203120 $title->deleteTitleProtection();
31213121 }
31223122
3123 - static function onArticleDelete( $title ) {
 3123+ public static function onArticleDelete( $title ) {
31243124 global $wgUseFileCache, $wgMessageCache;
31253125
31263126 // Update existence markers on article/talk tabs...
@@ -3171,7 +3171,7 @@
31723172 # Purge squid for this page only
31733173 $title->purgeSquid();
31743174
3175 - # Clear file cache
 3175+ # Clear file cache for this page only
31763176 if ( $wgUseFileCache ) {
31773177 $cm = new HTMLFileCache( $title );
31783178 @unlink( $cm->fileCacheName() );
@@ -3292,7 +3292,7 @@
32933293 *
32943294 * @return array Array of Title objects
32953295 */
3296 - function getUsedTemplates() {
 3296+ public function getUsedTemplates() {
32973297 $result = array();
32983298 $id = $this->mTitle->getArticleID();
32993299 if( $id == 0 ) {
@@ -3319,7 +3319,7 @@
33203320 *
33213321 * @return array Array of Title objects
33223322 */
3323 - function getHiddenCategories() {
 3323+ public function getHiddenCategories() {
33243324 $result = array();
33253325 $id = $this->mTitle->getArticleID();
33263326 if( $id == 0 ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r41667Make sure all RC entries for page are cleared on delete (bug 15655)aaron22:00, 4 October 2008