** See explanation in the bug report.
* Adding some TODO notes: current implementation of Special:BrokenRedirects caching can be improved.
* (bug 4021) Fix for MySQL wildcard search
* (bug 10699) Fix for MySQL phrase search
* (bug 11321) Fix width of gallerybox when option "width=xxx" is used
+* (bug 7890) Special:BrokenRedirects links deleted redirects to a non-existent page
=== API changes in 1.12 ===
if ( isset( $result->rd_title ) ) {
$toObj = Title::makeTitle( $result->rd_namespace, $result->rd_title );
} else {
- $blinks = $fromObj->getBrokenLinksFrom();
+ $blinks = $fromObj->getBrokenLinksFrom(); # TODO: check for redirect, not for links
if ( $blinks ) {
$toObj = $blinks[0];
} else {
/**
* Get an array of Title objects referring to non-existent articles linked from this page
*
+ * @todo check if needed (used only in SpecialBrokenRedirects.php, and should use redirect table in this case)
* @param string $options may be FOR UPDATE
* @return array the Title objects
*/
public function getBrokenLinksFrom( $options = '' ) {
+ if ( $this->getArticleId() == 0 ) {
+ # All links from article ID 0 are false positives
+ return array();
+ }
+
if ( $options ) {
$db = wfGetDB( DB_MASTER );
} else {