r104468 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r104467‎ | r104468 | r104469 >
Date:19:02, 28 November 2011
Author:reedy
Status:reverted (Comments)
Tags:
Comment:
URL-ify index.php urls
Modified paths:
  • /trunk/phase3/includes/api/ApiFormatBase.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiFormatBase.php
@@ -265,6 +265,8 @@
266266 $text = preg_replace( "#(($protos).*?)(&quot;)?([ \\'\"<>\n]|&lt;|&gt;|&quot;)#", '<a href="\\1">\\1</a>\\3\\4', $text );
267267 // identify requests to api.php
268268 $text = preg_replace( "#api\\.php\\?[^ \\()<\n\t]+#", '<a href="\\0">\\0</a>', $text );
 269+ // identify requests to index.php
 270+ $text = preg_replace( "#index\\.php\\?[^ \\()<\n\t]+#", '<a href="\\0">\\0</a>', $text );
269271 if ( $this->mHelp ) {
270272 // make strings inside * bold
271273 $text = preg_replace( "#\\*[^<>\n]+\\*#", '<b>\\0</b>', $text );

Follow-up revisions

RevisionCommit summaryAuthorDate
r105292revert r104468 per CR: not needed :-)hashar12:49, 6 December 2011

Comments

#Comment by Brion VIBBER (talk | contribs)   23:19, 1 December 2011

When does this case come up? I can't think of any cases offhand where I'd expect to get a relative URL starting with "index.php" in API result data...

#Comment by Reedy (talk | contribs)   21:59, 2 December 2011

I was going to use it in the ApiSandbox hook stuff. Then ended up using a full url

Happy to revert this out though

Status & tagging log