]> git.openstreetmap.org Git - rails.git/blobdiff - app/helpers/browse_helper.rb
Merge branch 'master' into openstreetbugs
[rails.git] / app / helpers / browse_helper.rb
index d2c2b5807c97f6ee6494fec99dbfdc4240bd4f53..ff702aed11f7a0ac04a0d284c604b4d3f467c9d8 100644 (file)
@@ -49,6 +49,9 @@ private
   end
 
   def wikipedia_link(key, value)
+    # Some k/v's are wikipedia=http://en.wikipedia.org/wiki/Full%20URL
+    return nil if value =~ /^http:\/\//
+
     if key == "wikipedia"
       # This regex should match Wikipedia language codes, everything
       # from de to zh-classical
@@ -68,9 +71,6 @@ private
       return nil
     end
 
-    # Some k/v's are wikipedia=http://en.wikipedia.org/wiki/Full%20URL
-    return nil if value =~ /^http:\/\//
-
     return {
       :url => "http://#{lang}.wikipedia.org/wiki/#{value}?uselang=#{I18n.locale}",
       :title => value