Index: trunk/phase3/includes/Title.php |
— | — | @@ -2034,10 +2034,16 @@ |
2035 | 2035 | /** |
2036 | 2036 | * Get an array of Title objects referring to non-existent articles linked from this page |
2037 | 2037 | * |
| 2038 | + * @todo check if needed (used only in SpecialBrokenRedirects.php, and should use redirect table in this case) |
2038 | 2039 | * @param string $options may be FOR UPDATE |
2039 | 2040 | * @return array the Title objects |
2040 | 2041 | */ |
2041 | 2042 | public function getBrokenLinksFrom( $options = '' ) { |
| 2043 | + if ( $this->getArticleId() == 0 ) { |
| 2044 | + # All links from article ID 0 are false positives |
| 2045 | + return array(); |
| 2046 | + } |
| 2047 | + |
2042 | 2048 | if ( $options ) { |
2043 | 2049 | $db = wfGetDB( DB_MASTER ); |
2044 | 2050 | } else { |
Index: trunk/phase3/includes/SpecialBrokenRedirects.php |
— | — | @@ -51,7 +51,7 @@ |
52 | 52 | if ( isset( $result->rd_title ) ) { |
53 | 53 | $toObj = Title::makeTitle( $result->rd_namespace, $result->rd_title ); |
54 | 54 | } else { |
55 | | - $blinks = $fromObj->getBrokenLinksFrom(); |
| 55 | + $blinks = $fromObj->getBrokenLinksFrom(); # TODO: check for redirect, not for links |
56 | 56 | if ( $blinks ) { |
57 | 57 | $toObj = $blinks[0]; |
58 | 58 | } else { |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -49,6 +49,7 @@ |
50 | 50 | * (bug 4021) Fix for MySQL wildcard search |
51 | 51 | * (bug 10699) Fix for MySQL phrase search |
52 | 52 | * (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 |
53 | 54 | |
54 | 55 | === API changes in 1.12 === |
55 | 56 | |