http://microformats.org/wiki/index.php?title=hkit-issues&feed=atom&action=history
hkit-issues - Revision history
2024-03-29T07:30:55Z
Revision history for this page on the wiki
MediaWiki 1.38.4
http://microformats.org/wiki/index.php?title=hkit-issues&diff=39991&oldid=prev
Beaulebens: create page, add 2 new issues.
2009-07-27T00:39:56Z
<p>create page, add 2 new issues.</p>
<p><b>New page</b></p><div>== hKit Issues ==<br />
* [http://getsatisfaction.com/satisfaction/topics/hcard_profile_import_is_erratic hCard profile import is erratic]<br />
* If your hCard contains multiple emails or phone numbers, it will drop all of them from the output (e.g. you will have no emails/phone numbers in your output)<br />
* The scheme-detection in $hKit::resolvePath() cause non-http URIs to be resolved as absolute paths. That can be fixed by replacing that method with this:<br />
<pre><nowiki><br />
private function resolvePath($filepath)<br />
{ // ugly code ahoy: needs a serious tidy up<br />
<br />
$filepath = $filepath[0];<br />
<br />
$bits = parse_url( $filepath );<br />
if ( !empty( $bits['scheme'] ) ) {<br />
return $filepath;<br />
}<br />
<br />
$base = $this->base;<br />
$url = $this->url;<br />
<br />
$bits = parse_url( $base );<br />
if ( !empty( $bits['scheme'] ) )<br />
$url = $base;<br />
<br />
$r = parse_url($url);<br />
$domain = $r['scheme'] . '://' . $r['host'];<br />
<br />
if (!isset($r['path'])) $r['path'] = '/';<br />
$path = explode('/', $r['path']);<br />
$file = explode('/', $filepath);<br />
$new = array('');<br />
<br />
if ($file[0] == ''){<br />
// absolute path<br />
return ''.$domain . implode('/', $file);<br />
}else{<br />
// relative path<br />
if ($path[sizeof($path)-1] == '') array_pop($path);<br />
if (strpos($path[sizeof($path)-1], '.') !== false) array_pop($path);<br />
<br />
foreach ($file as $segment){<br />
if ($segment == '..'){<br />
array_pop($path);<br />
}else{<br />
$new[] = $segment;<br />
}<br />
}<br />
return ''.$domain . implode('/', $path) . implode('/', $new);<br />
} <br />
}<br />
</nowiki></pre></div>
Beaulebens