Code cleanup + standards
parent
d799662992
commit
b9f4a6e4f0
|
@ -41,8 +41,8 @@ function oembed_fetch_url($embedurl, $no_rich_type = false){
|
||||||
// These media files should now be caught in bbcode.php
|
// These media files should now be caught in bbcode.php
|
||||||
// left here as a fallback in case this is called from another source
|
// left here as a fallback in case this is called from another source
|
||||||
|
|
||||||
$noexts = array("mp3","mp4","ogg","ogv","oga","ogm","webm");
|
$noexts = array("mp3", "mp4", "ogg", "ogv", "oga", "ogm", "webm");
|
||||||
$ext = pathinfo(strtolower($embedurl),PATHINFO_EXTENSION);
|
$ext = pathinfo(strtolower($embedurl), PATHINFO_EXTENSION);
|
||||||
|
|
||||||
|
|
||||||
if (is_null($txt)) {
|
if (is_null($txt)) {
|
||||||
|
@ -85,10 +85,10 @@ function oembed_fetch_url($embedurl, $no_rich_type = false){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$txt=trim($txt);
|
$txt = trim($txt);
|
||||||
|
|
||||||
if ($txt[0]!="{") {
|
if ($txt[0] != "{") {
|
||||||
$txt='{"type":"error"}';
|
$txt = '{"type":"error"}';
|
||||||
} else { //save in cache
|
} else { //save in cache
|
||||||
$j = json_decode($txt);
|
$j = json_decode($txt);
|
||||||
if ($j->type != "error") {
|
if ($j->type != "error") {
|
||||||
|
|
Loading…
Reference in New Issue