Some more replaced old database functions
This commit is contained in:
parent
663c38afed
commit
7c3fd2adb5
10 changed files with 65 additions and 107 deletions
|
@ -28,17 +28,17 @@ function oembed_replacecb($matches){
|
|||
* @return bool|object Returns object with embed content or false if no embedable
|
||||
* content exists
|
||||
*/
|
||||
function oembed_fetch_url($embedurl, $no_rich_type = false){
|
||||
function oembed_fetch_url($embedurl, $no_rich_type = false) {
|
||||
$embedurl = trim($embedurl, "'");
|
||||
$embedurl = trim($embedurl, '"');
|
||||
|
||||
$a = get_app();
|
||||
|
||||
$r = q("SELECT * FROM `oembed` WHERE `url` = '%s'",
|
||||
dbesc(normalise_link($embedurl)));
|
||||
$condition = array('url' => normalise_link($embedurl));
|
||||
$r = dba::select('oembed', array('content'), $condition, array('limit' => 1));
|
||||
|
||||
if (DBM::is_result($r)) {
|
||||
$txt = $r[0]["content"];
|
||||
$txt = $r["content"];
|
||||
} else {
|
||||
$txt = Cache::get($a->videowidth . $embedurl);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue