check before saving a thumbnail
This commit is contained in:
parent
f463329b9a
commit
2e42d3336a
|
@ -115,8 +115,14 @@ class File_oembed extends Memcached_DataObject
|
||||||
}
|
}
|
||||||
$file_oembed->insert();
|
$file_oembed->insert();
|
||||||
if (!empty($data->thumbnail_url)) {
|
if (!empty($data->thumbnail_url)) {
|
||||||
|
$ft = File_thumbnail::staticGet('file_id', $file_id);
|
||||||
|
if (!empty($ft)) {
|
||||||
|
common_log(LOG_WARNING, "Strangely, a File_thumbnail object exists for new file $file_id",
|
||||||
|
__FILE__);
|
||||||
|
} else {
|
||||||
File_thumbnail::saveNew($data, $file_id);
|
File_thumbnail::saveNew($data, $file_id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user