r25843 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r25842‎ | r25843 | r25844 >
Date:04:21, 14 September 2007
Author:rotem
Status:old
Tags:
Comment:
* (bug 7890) Special:BrokenRedirects links deleted redirects to a non-existent page
** See explanation in the bug report.
* Adding some TODO notes: current implementation of Special:BrokenRedirects caching can be improved.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/SpecialBrokenRedirects.php (modified) (history)
  • /trunk/phase3/includes/Title.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Title.php
@@ -2034,10 +2034,16 @@
20352035 /**
20362036 * Get an array of Title objects referring to non-existent articles linked from this page
20372037 *
 2038+ * @todo check if needed (used only in SpecialBrokenRedirects.php, and should use redirect table in this case)
20382039 * @param string $options may be FOR UPDATE
20392040 * @return array the Title objects
20402041 */
20412042 public function getBrokenLinksFrom( $options = '' ) {
 2043+ if ( $this->getArticleId() == 0 ) {
 2044+ # All links from article ID 0 are false positives
 2045+ return array();
 2046+ }
 2047+
20422048 if ( $options ) {
20432049 $db = wfGetDB( DB_MASTER );
20442050 } else {
Index: trunk/phase3/includes/SpecialBrokenRedirects.php
@@ -51,7 +51,7 @@
5252 if ( isset( $result->rd_title ) ) {
5353 $toObj = Title::makeTitle( $result->rd_namespace, $result->rd_title );
5454 } else {
55 - $blinks = $fromObj->getBrokenLinksFrom();
 55+ $blinks = $fromObj->getBrokenLinksFrom(); # TODO: check for redirect, not for links
5656 if ( $blinks ) {
5757 $toObj = $blinks[0];
5858 } else {
Index: trunk/phase3/RELEASE-NOTES
@@ -49,6 +49,7 @@
5050 * (bug 4021) Fix for MySQL wildcard search
5151 * (bug 10699) Fix for MySQL phrase search
5252 * (bug 11321) Fix width of gallerybox when option "width=xxx" is used
 53+* (bug 7890) Special:BrokenRedirects links deleted redirects to a non-existent page
5354
5455 === API changes in 1.12 ===
5556

Follow-up revisions

RevisionCommit summaryAuthorDate
r25849Merged revisions 25804-25848 via svnmerge from...david06:54, 14 September 2007

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r24859(bug 7890) Don't list redirects to special pages in Special:BrokenRedirects...robchurch20:41, 16 August 2007
r24866Merged revisions 24755-24865 via svnmerge from...david23:08, 16 August 2007

Status & tagging log