Page MenuHomePhabricator

Wrong sql query syntax on SpecialBrokenRedirects.php
Closed, ResolvedPublic

Description

Author: ivan

Description:
I was using the Special:BrokenRedirects on my internal wiki installation when I
realize that I have too many broken redirects. I found out that the sql syntax
for join is wrong.

Current:
LEFT JOIN $page AS p2 ON (pl_namespace=p2.page_namespace AND
pl_title=p2.page_title AND p2.page_namespace IS NULL)

Should be:
LEFT JOIN $page AS p2 ON (pl_namespace=p2.page_namespace AND pl_title=p2.page_title)
WHERE p2.page_namespace IS NULL

The p2.page_namespace should be used as WHERE, not ON. I've test it in my local
installation and it shows the correct broken redirects.


Version: 1.7.x
Severity: normal

Details

Reference
bz5791

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:13 PM
bzimport set Reference to bz5791.
bzimport added a subscriber: Unknown Object (MLST).

ivan wrote:

SpecialBrokenRedirects patch

Attached:

robchur wrote:

Applied to SVN trunk, r14094.