r50542 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r50541‎ | r50542 | r50543 >
Date:09:08, 13 May 2009
Author:jojo
Status:ok
Tags:
Comment:
use text form of titles instead of URL form + escaping
Modified paths:
  • /trunk/extensions/Collection/Collection.hooks.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Collection/Collection.hooks.php
@@ -194,13 +194,13 @@
195195 array( 'onclick' => "collectionCall('AddCategory', ['addcategory', wgTitle]); return false;",
196196 'rel' => 'nofollow',
197197 'title' => wfMsg( "coll-add_category_tooltip" ), ),
198 - array( 'cattitle' => urldecode( $wgTitle->getPartialURL() ) ),
 198+ array( 'cattitle' => $wgTitle->getText() ),
199199 array( 'known', 'noclasses' )
200200 )
201201 );
202202
203203 } else if( $ajaxHint || in_array( $namespace, $wgCollectionArticleNamespaces ) ) {
204 - $params = array( 'arttitle' => urldecode( $wgTitle->getPrefixedUrl() ) );
 204+ $params = array( 'arttitle' => $wgTitle->getPrefixedText() );
205205 if ( !is_null( $wgArticle ) ) {
206206 $oldid = $wgArticle->getOldID();
207207 $params['oldid'] = $oldid;

Status & tagging log