Page MenuHomePhabricator

pagelink-depth parameter is broken
Closed, InvalidPublic

Description

I'm no PHP expert, but the new pagelink-depth parameter in Special:Export appears to be broken. Specifically, it seems to rely on a check against $linkDepth, but $linkDepth is unused outside that one if statement.


Version: 1.16.x
Severity: normal

Details

Reference
bz26052

Event Timeline

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

The if block in includes/specials/SpecialExport.php on line 214 is not a comparaison between $linkDepth and $this->pageLinkDepth but an assignment (only one "="), and thus the check is only against $this->pageLinkDepth to see if it's zero or not. See http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/includes/specials/SpecialExport.php?r1=74745&r2=75767 where the code was modified to be more readable.

Seems bugzilla didn't like the URL, see r75767 and then select the correct file.

I'd missed that. Now I see what's going on. Thanks! I still wasn't able to get it to work in testing, but maybe I goofed somewhere.