]> gitweb.fluxo.info Git - semanticscuttle.git/commitdiff
Merge branch 'master' into configurable-privacy2
authorChristian Weiske <cweiske@cweiske.de>
Thu, 12 May 2011 17:25:03 +0000 (19:25 +0200)
committerChristian Weiske <cweiske@cweiske.de>
Thu, 12 May 2011 17:25:03 +0000 (19:25 +0200)
1  2 
data/config.default.php
src/SemanticScuttle/header.php
tests/TestBaseApi.php
www/bookmarks.php

Simple merge
Simple merge
index 23e1812aa662dc1e7e3ec0711f9811ad2701e8e0,036ab6bcace817576370fcc1f1fc778ca6256a8b..2caa7011943545e0b2cc9f8074ddbaa11686c46e
@@@ -85,9 -92,26 +85,26 @@@ class TestBaseApi extends TestBas
      }
  
  
+     /**
+      * Completes an URL that's missing the protocol.
+      * Useful when re-using URLs extracted from HTML
+      *
+      * @param string $url Potentially partial URL
+      *
+      * @return string Full URL
+      */
+     protected function completeUrl($url)
+     {
+         if (substr($url, 0, 2) == '//') {
+             $url = 'http:' . $url;
+         }
+         return $url;
+     }
  
      /**
 -     * Creates a user and a HTTP request object and prepares
 +     * Creates a user and a HTTP GET request object and prepares
       * the request object with authentication details, so that
       * the user is logged in.
       *
Simple merge