On Mon, Sep 29, 2008 at 9:56 PM, <mattj(a)svn.wikimedia.org> wrote:
Modified: trunk/phase3/includes/Linker.php
===================================================================
--- trunk/phase3/includes/Linker.php 2008-09-30 01:00:40 UTC (rev 41409)
+++ trunk/phase3/includes/Linker.php 2008-09-30 01:56:54 UTC (rev 41410)
@@ -203,9 +203,18 @@
}
}
wfProfileOut( __METHOD__ . '-checkPageExistence' );
+
+ $oldquery = array();
+ if( in_array( "forcearticlepath", $options ) && $query
){
+ $oldquery = $query;
+ $query = array();
+ }
# Note: we want the href attribute first, for prettiness.
$attribs = array( 'href' => $this->linkUrl( $target, $query,
$options ) );
+ if( in_array( 'forcearticlepath', $options ) && $oldquery
){
+ $attribs['href'] = wfAppendQuery(
$attribs['href'], wfArrayToCgi( $oldquery ) );
+ }
$attribs = array_merge(
$attribs,
$this->linkAttribs( $target, $customAttribs, $options )
You need to document this new option in the comment for link().