Hi,
I encountered a problem when using the collection extension concerning
the url used as a redirection when rendering articles.
In the "renderCollection" function ("Collection.body.php), here is the
code from the latest version:
$redirect = SkinTemplate::makeSpecialUrlSubpage( 'Book',
'rendering/' );
$query = 'return_to=' . urlencode( $referrer->getPrefixedText() )
. '&collection_id=' . urlencode( $response['collection_id'] )
. '&writer=' . urlencode( $response['writer'] );
if ( isset( $response['is_cached'] ) && $response['is_cached'] ) {
$query .= '&is_cached=1';
}
$wgOut->redirect( wfAppendQuery( $redirect, $query ) );
The problem is that the query is added after making the
specialurlsubpage, while it could be done that way:
$query = 'return_to=' . urlencode( $referrer->getPrefixedText() )
. '&collection_id=' . urlencode( $response['collection_id'] )
. '&writer=' . urlencode( $response['writer'] );
if ( isset( $response['is_cached'] ) && $response['is_cached'] ) {
$query .= '&is_cached=1';
}
$redirect = SkinTemplate::makeSpecialUrlSubpage( 'Book', 'rendering/',
$query );
$wgOut->redirect( $redirect );
It fixed a problem with url rewriting I had on my setup, the url used
for redirection was somethink like:
http://mywiki/Spécial:Livre/rendering/?return_to=Accueil&collection_id=a73f20db84be385f&writer=rl
which is a huge problem, cause with the url rewriting it end up like
that in the end:
http://mywiki/index.php?title=Spécial:Livre/rendering/?return_to=Accueil&collection_id=a73f20db84be385f&writer=rl
As you can see, there is 2 '?', so all arguments after the second ?
are ignored and dropped.
I hope you understand the problem I'm pointing and that someone will
be kind enough to fixe it in the respository using my patch.
Thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"mwlib" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/mwlib?hl=en
-~----------~----~----~----~------~----~------~--~---