Page MenuHomePhabricator

getLocalUrl breaks on $wgActionPaths with query strings
Closed, ResolvedPublic

Description

Author: wpedia

Description:
I have this config in LocalSettings. When I link to a new article links to "/w/NewArticle?action=edit?redlink=1" (must be "/w/NewArticle?action=edit&redlink=1").

<code>
$wgScriptPath = "/wiki";
$wgArticlePath = "/w/$1";

$actions = array('view', 'edit', 'watch', 'unwatch', 'delete','revert', 'rollback', 'protect',

'unprotect','info','markpatrolled','validate','render','deletetrackback','print',
'dublincore','creativecommons','credits','submit','viewsource','history','purge');

foreach ($actions as $a)

$wgActionPaths[$a] = $wgArticlePath.'?action='.$a;

</code>


Version: 1.13.x
Severity: normal
OS: Linux
Platform: Other

Details

Reference
bz16850

Event Timeline

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

Changing summary to what is probably the case. It seems to be that getLocalUrl() isn't taking into account that an action path might already have query string. An edge case, but needs fixing :)