]> source.dussan.org Git - nextcloud-server.git/commitdiff
Bookmarks: make a soft-requirement of php-curl
authorBart Visscher <bartv@thisnet.nl>
Thu, 24 Nov 2011 20:28:44 +0000 (21:28 +0100)
committerBart Visscher <bartv@thisnet.nl>
Thu, 24 Nov 2011 20:36:34 +0000 (21:36 +0100)
apps/bookmarks/bookmarksHelper.php

index 44d4235b9b3a69384f251ce05a3b862499ad80b1..ac512fbc241f2bd98d17efc859619fd1a43749e8 100644 (file)
@@ -56,6 +56,9 @@ function getURLMetadata($url) {
        } 
        $metadata['url'] = $url;
 
+       if (!function_exists('curl_init')){
+               return $metadata;
+       }
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, $url);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
@@ -66,4 +69,4 @@ function getURLMetadata($url) {
        $metadata['title'] = htmlspecialchars_decode(@$match[1]); 
 
        return $metadata;
-}
\ No newline at end of file
+}