"Catrope" posted a comment on MediaWiki.r110326. URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/110326#c30287
Commit summary for MediaWiki.r110326: AFT5 bug fixes: - Finally fix that thing where the articlefeedbackv5-error-loading-feedback message was undocumented and not loaded on the Special page. - Bold the active sort order. - Change permalinks from #id=ID to /ID. - Re-un-comment the Special page and API calls, per Yoni. - Fix bug with user names going to contributions page instead of user page - Switch header to put smiley face before name instead of after. Catrope's comment: <pre> + var id = window.location.href.match(/(.+)\/(\d+)$/) </pre> Simply using <code>.match(/\/(\d+)$/)</code> should work, right? That regex would execute much faster, because the regex engine wouldn't have to backtrack after having the first <code>.+</code> match everything. <pre> + Title::newFromText( + "Special:ArticleFeedbackv5/$title/$id" + ), </pre> You can use <code>SpecialPage::getTitleFor( 'ArticleFeedbackv5', "$title/$id" )</code> instead. Looks good to me, except that the whitespace is messed up as pointed out by Santhosh. _______________________________________________ MediaWiki-CodeReview mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview
