Code cleanup + standards

pull/3261/head
Hypolite Petovan 2017-03-25 01:54:16 -04:00
rodzic d799662992
commit b9f4a6e4f0
2 zmienionych plików z 18 dodań i 18 usunięć

Wyświetl plik

@ -41,8 +41,8 @@ function oembed_fetch_url($embedurl, $no_rich_type = false){
// These media files should now be caught in bbcode.php
// left here as a fallback in case this is called from another source
$noexts = array("mp3","mp4","ogg","ogv","oga","ogm","webm");
$ext = pathinfo(strtolower($embedurl),PATHINFO_EXTENSION);
$noexts = array("mp3", "mp4", "ogg", "ogv", "oga", "ogm", "webm");
$ext = pathinfo(strtolower($embedurl), PATHINFO_EXTENSION);
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]!="{") {
$txt='{"type":"error"}';
if ($txt[0] != "{") {
$txt = '{"type":"error"}';
} else { //save in cache
$j = json_decode($txt);
if ($j->type != "error") {