r100898 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r100897‎ | r100898 | r100899 >
Date:23:07, 26 October 2011
Author:preilly
Status:ok
Tags:
Comment:
small fix for relative urls in search results
Modified paths:
  • /trunk/extensions/MobileFrontend/javascripts/opensearch.js (modified) (history)
  • /trunk/extensions/MobileFrontend/views/layout/application.html.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MobileFrontend/javascripts/opensearch.js
@@ -71,6 +71,7 @@
7272 for ( i = 0; i < sections.length; i++ ) {
7373 var section = sections[i];
7474 var rel = i + 1;
 75+ section.value = section.value.replace(/^(?:\/\/|[^\/]+)*\//, '/');
7576 html = html + "<div class=\"suggestions-result\" rel=\"" + rel + "\" title=\"" + section.label + "\"><a href='" + section.value + "'>" + section.label + "</a></div>";
7677 }
7778 html = html + '</div>';
Index: trunk/extensions/MobileFrontend/views/layout/application.html.php
@@ -18,7 +18,7 @@
1919 $endScriptTag = '"></script>';
2020 $javaScriptPath = $wgExtensionAssetsPath . '/MobileFrontend/javascripts/';
2121
22 -$openSearchScript = ( self::$isBetaGroupMember ) ? $startScriptTag . $javaScriptPath . 'opensearch.js?version=10202011120715' . $endScriptTag : '';
 22+$openSearchScript = ( self::$isBetaGroupMember ) ? $startScriptTag . $javaScriptPath . 'opensearch.js?version=10262011120715' . $endScriptTag : '';
2323
2424 $applicationHtml = <<<EOT
2525 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

Follow-up revisions

RevisionCommit summaryAuthorDate
r100899mft r100898preilly23:08, 26 October 2011

Status & tagging log