Index: trunk/extensions/SemanticMediaWiki/includes/dataitems/SMW_DI_URI.php |
— | — | @@ -67,9 +67,15 @@ |
68 | 68 | |
69 | 69 | /// @todo This should be changed to the spelling getUri(). |
70 | 70 | public function getURI() { |
71 | | - return $this->m_scheme . '://' . $this->m_hierpart . |
72 | | - ( $this->m_query ? '?' . $this->m_query : '' ) . |
73 | | - ( $this->m_fragment ? '#' . $this->m_fragment : '' ); |
| 71 | + $schemesWithDoubleslesh = array( |
| 72 | + 'http', 'https', 'ftp' |
| 73 | + ); |
| 74 | + |
| 75 | + return $this->m_scheme . ':' |
| 76 | + . ( in_array( $this->m_scheme, $schemesWithDoubleslesh ) ? '//' : '' ) |
| 77 | + . $this->m_hierpart |
| 78 | + . ( $this->m_query ? '?' . $this->m_query : '' ) |
| 79 | + . ( $this->m_fragment ? '#' . $this->m_fragment : '' ); |
74 | 80 | } |
75 | 81 | |
76 | 82 | public function getScheme() { |