r52789 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r52788‎ | r52789 | r52790 >
Date:08:51, 6 July 2009
Author:mkroetzsch
Status:deferred
Tags:
Comment:
catch upgrade problems with email, beautify output (Bug 18547)
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_DV_URI.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/SMW_DV_URI.php
@@ -133,6 +133,11 @@
134134 $this->m_caption = $this->m_value;
135135 if ($this->m_mode == SMW_URI_MODE_EMAIL) {
136136 $this->m_url = $this->m_value;
 137+ if (strpos($this->m_value,'mailto:') === 0) { // this check is just to be wary
 138+ $this->m_caption = substr($this->m_value, 7);
 139+ } else { // this case is only for backwards compatibility/repair; may vanish at some point
 140+ $this->m_url = 'mailto:' . $this->m_value;
 141+ }
137142 } else {
138143 $parts = explode(':', $this->m_value, 2); // try to split "schema:rest"
139144 global $wgUrlProtocols;

Status & tagging log