]> git.mjollnir.org Git - s9y.git/commitdiff
Fix double slash problem
authorgarvinhicking <garvinhicking>
Sat, 3 Jun 2006 22:19:08 +0000 (22:19 +0000)
committergarvinhicking <garvinhicking>
Sat, 3 Jun 2006 22:19:08 +0000 (22:19 +0000)
plugins/serendipity_event_spartacus/serendipity_event_spartacus.php

index 103501b84182f774a47d62c4c958dae2a315e2ea..d42b278c373c7a22854a9b014a636b488fcaaf43 100644 (file)
@@ -34,7 +34,7 @@ class serendipity_event_spartacus extends serendipity_event
         $propbag->add('description',   PLUGIN_EVENT_SPARTACUS_DESC);
         $propbag->add('stackable',     false);
         $propbag->add('author',        'Garvin Hicking');
-        $propbag->add('version',       '2.6');
+        $propbag->add('version',       '2.7');
         $propbag->add('requirements',  array(
             'serendipity' => '0.9',
             'smarty'      => '2.6.7',
@@ -245,6 +245,9 @@ class serendipity_event_spartacus extends serendipity_event
     function &fetchfile($url, $target, $cacheTimeout = 0, $decode_utf8 = false, $sub = 'plugins') {
         static $error = false;
 
+        // Fix double URL strings.
+        $url = str_replace('http:/', 'http://', str_replace('//', '/', $url));
+
         printf(PLUGIN_EVENT_SPARTACUS_FETCHING, '<a href="' . $url . '">' . basename($url) . '</a>');
         echo '<br />';