]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/Bookmark/bookmarkforurl.php
Merge branch 'master' of gitorious.org:statusnet/mainline
[quix0rs-gnu-social.git] / plugins / Bookmark / bookmarkforurl.php
index d3a1a2c76f2bc5e2afc7bc36ae8d137f63194c5c..e4dedf4a48c7c38abb69c22f3a0c7593dd466aad 100644 (file)
@@ -47,9 +47,10 @@ if (!defined('STATUSNET')) {
 
 class BookmarkforurlAction extends Action
 {
-    protected $url;
-    protected $oembed;
-    protected $thumbnail;
+    protected $url        = null;
+    protected $oembed     = null;
+    protected $thumbnail  = null;
+    protected $title      = null;
 
     /**
      * For initializing members of the class.
@@ -77,7 +78,13 @@ class BookmarkforurlAction extends Action
             throw new ClientException(_('Invalid URL.'), 400);
         }
 
-        $f = File::processNew($this->url);
+        $f = File::staticGet('url', $this->url);
+
+        if (empty($url)) { 
+           $f = File::processNew($this->url);
+        }
+
+        // How about now?
 
         if (!empty($f)) {
             $this->oembed    = File_oembed::staticGet('file_id', $f->id);