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
try {
return oEmbedHelper::getObject($url, $parameters);
} catch (Exception $e) {
- common_log(LOG_ERR, "Error during oembed lookup for $url - " . $e->getMessage());
+ common_log(LOG_INFO, "Error during oembed lookup for $url - " . $e->getMessage());
return false;
}
}
$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;
$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'];
}
$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__);