]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - classes/File_oembed.php
Qvitter API changes (thanks hannes2peer)
[quix0rs-gnu-social.git] / classes / File_oembed.php
index ae46e61bd489a248b091959e0de71a3275ea8073..551d12cafb0c33f3240a81b3e849da42664f302a 100644 (file)
@@ -47,9 +47,6 @@ class File_oembed extends Managed_DataObject
     public $url;                             // varchar(255)
     public $modified;                        // timestamp()   not_null default_CURRENT_TIMESTAMP
 
-    /* Static get */
-    function staticGet($k,$v=NULL) { return Memcached_DataObject::staticGet('File_oembed',$k,$v); }
-
     /* the code above is auto generated do not remove the tag below */
     ###END_AUTOCODE
 
@@ -105,7 +102,7 @@ class File_oembed extends Managed_DataObject
         $file_oembed->type = $data->type;
         if (!empty($data->provider_name)) $file_oembed->provider = $data->provider_name;
         if (!empty($data->provider)) $file_oembed->provider = $data->provider;
-        if (!empty($data->provide_url)) $file_oembed->provider_url = $data->provider_url;
+        if (!empty($data->provider_url)) $file_oembed->provider_url = $data->provider_url;
         if (!empty($data->width)) $file_oembed->width = intval($data->width);
         if (!empty($data->height)) $file_oembed->height = intval($data->height);
         if (!empty($data->html)) $file_oembed->html = $data->html;
@@ -116,9 +113,9 @@ class File_oembed extends Managed_DataObject
             $file_oembed->url = $data->url;
             $given_url = File_redirection::_canonUrl($file_oembed->url);
             if (! empty($given_url)){
-                $file = File::staticGet('url', $given_url);
+                $file = File::getKV('url', $given_url);
                 if (empty($file)) {
-                    $file_redir = File_redirection::staticGet('url', $given_url);
+                    $file_redir = File_redirection::getKV('url', $given_url);
                     if (empty($file_redir)) {
                         $redir_data = File_redirection::where($given_url);
                         $file_oembed->mimetype = $redir_data['type'];
@@ -132,7 +129,7 @@ class File_oembed extends Managed_DataObject
         }
         $file_oembed->insert();
         if (!empty($data->thumbnail_url) || ($data->type == 'photo')) {
-            $ft = File_thumbnail::staticGet('file_id', $file_id);
+            $ft = File_thumbnail::getKV('file_id', $file_id);
             if (!empty($ft)) {
                 common_log(LOG_WARNING, "Strangely, a File_thumbnail object exists for new file $file_id",
                            __FILE__);