http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94967
Revision: 94967
Author: reedy
Date: 2011-08-18 23:37:04 +0000 (Thu, 18 Aug 2011)
Log Message:
-----------
* (bug 30450) Clear page_props table on page deletion
Also clear them on a move over redirect
Modified delete() calls in doDeleteArticle to pass __METHOD__ for the function
name
Modified Paths:
--------------
trunk/phase3/RELEASE-NOTES-1.19
trunk/phase3/includes/Title.php
trunk/phase3/includes/WikiPage.php
Modified: trunk/phase3/RELEASE-NOTES-1.19
===================================================================
--- trunk/phase3/RELEASE-NOTES-1.19 2011-08-18 23:36:24 UTC (rev 94966)
+++ trunk/phase3/RELEASE-NOTES-1.19 2011-08-18 23:37:04 UTC (rev 94967)
@@ -44,6 +44,7 @@
language. In theory this sets the right magic words in system messages,
although they are not used there.
* (bug 30451) Add page_props to RefreshLinks::deleteLinksFromNonexistent
+* (bug 30450) Clear page_props table on page deletion
=== Bug fixes in 1.19 ===
* $wgUploadNavigationUrl should be used for file redlinks if
Modified: trunk/phase3/includes/Title.php
===================================================================
--- trunk/phase3/includes/Title.php 2011-08-18 23:36:24 UTC (rev 94966)
+++ trunk/phase3/includes/Title.php 2011-08-18 23:37:04 UTC (rev 94967)
@@ -839,12 +839,12 @@
# Hand off all the decisions on urls to getLocalURL
$url = $this->getLocalURL( $query, $variant );
-
+
# Expand the url to make it a full url. Note that getLocalURL
has the
# potential to output full urls for a variety of reasons, so we
use
# wfExpandUrl instead of simply prepending $wgServer
$url = wfExpandUrl( $url, PROTO_RELATIVE );
-
+
# Finally, add the fragment.
$url .= $this->getFragmentForURL();
@@ -923,7 +923,7 @@
$url =
"{$wgScript}?title={$dbkey}&{$query}";
}
}
-
+
wfRunHooks( 'GetLocalURL::Internal', array( &$this,
&$url, $query, $variant ) );
// @todo FIXME: This causes breakage in various places
when we
@@ -1930,7 +1930,7 @@
/**
* Does that page contain wikitext, or it is JS, CSS or whatever?
- *
+ *
* @return Bool
*/
public function isWikitextPage() {
@@ -3306,6 +3306,7 @@
$dbw->delete( 'externallinks', array( 'el_from'
=> $newid ), __METHOD__ );
$dbw->delete( 'langlinks', array( 'll_from' =>
$newid ), __METHOD__ );
$dbw->delete( 'redirect', array( 'rd_from' =>
$newid ), __METHOD__ );
+ $dbw->delete( 'page_props', array( 'pp_page' =>
$newid ), __METHOD__ );
}
// If the target page was recently created, it may have
an entry in recentchanges still
$dbw->delete( 'recentchanges',
Modified: trunk/phase3/includes/WikiPage.php
===================================================================
--- trunk/phase3/includes/WikiPage.php 2011-08-18 23:36:24 UTC (rev 94966)
+++ trunk/phase3/includes/WikiPage.php 2011-08-18 23:37:04 UTC (rev 94967)
@@ -1695,18 +1695,20 @@
if ( !$dbw->cascadingDeletes() ) {
$dbw->delete( 'revision', array( 'rev_page' => $id ),
__METHOD__ );
- if ( $wgUseTrackbacks )
+ if ( $wgUseTrackbacks ) {
$dbw->delete( 'trackbacks', array( 'tb_page' =>
$id ), __METHOD__ );
+ }
# Delete outgoing links
- $dbw->delete( 'pagelinks', array( 'pl_from' => $id ) );
- $dbw->delete( 'imagelinks', array( 'il_from' => $id ) );
- $dbw->delete( 'categorylinks', array( 'cl_from' => $id
) );
- $dbw->delete( 'templatelinks', array( 'tl_from' => $id
) );
- $dbw->delete( 'externallinks', array( 'el_from' => $id
) );
- $dbw->delete( 'langlinks', array( 'll_from' => $id ) );
- $dbw->delete( 'iwlinks', array( 'iwl_from' => $id ) );
- $dbw->delete( 'redirect', array( 'rd_from' => $id ) );
+ $dbw->delete( 'pagelinks', array( 'pl_from' => $id ),
__METHOD__ );
+ $dbw->delete( 'imagelinks', array( 'il_from' => $id ),
__METHOD__ );
+ $dbw->delete( 'categorylinks', array( 'cl_from' => $id
), __METHOD__ );
+ $dbw->delete( 'templatelinks', array( 'tl_from' => $id
), __METHOD__ );
+ $dbw->delete( 'externallinks', array( 'el_from' => $id
), __METHOD__ );
+ $dbw->delete( 'langlinks', array( 'll_from' => $id ),
__METHOD__ );
+ $dbw->delete( 'iwlinks', array( 'iwl_from' => $id ),
__METHOD__ );
+ $dbw->delete( 'redirect', array( 'rd_from' => $id ),
__METHOD__ );
+ $dbw->delete( 'page_props', array( 'pp_page' => $id ),
__METHOD__ );
}
# If using cleanup triggers, we can skip some manual deletes
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs