X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=inline;f=src%2FParseUrl.php;h=35557067d7474ca4d7d85d522c0b1847fc33977a;hb=84b85e91980583601fe5e5a14ce6db3cfd2c1f3b;hp=81c5671c90c5cac48bdb8c54187604c996b561aa;hpb=96501bda816bb3db29ea19d89e6ffc0e83f350b3;p=friendica.git diff --git a/src/ParseUrl.php b/src/ParseUrl.php index 81c5671c90..35557067d7 100644 --- a/src/ParseUrl.php +++ b/src/ParseUrl.php @@ -1,38 +1,34 @@ The url of the parsed page @@ -47,14 +43,18 @@ class ParseUrl { * @see ParseUrl::getSiteinfo() for more information about scraping * embeddable content */ - public static function getSiteinfoCached($url, $no_guessing = false, $do_oembed = true) { - + public static function getSiteinfoCached($url, $no_guessing = false, $do_oembed = true) + { if ($url == "") { return false; } - $r = q("SELECT * FROM `parsed_url` WHERE `url` = '%s' AND `guessing` = %d AND `oembed` = %d", - dbesc(normalise_link($url)), intval(!$no_guessing), intval($do_oembed)); + $r = q( + "SELECT * FROM `parsed_url` WHERE `url` = '%s' AND `guessing` = %d AND `oembed` = %d", + dbesc(normalise_link($url)), + intval(!$no_guessing), + intval($do_oembed) + ); if ($r) { $data = $r[0]["content"]; @@ -67,9 +67,14 @@ class ParseUrl { $data = self::getSiteinfo($url, $no_guessing, $do_oembed); - dba::insert('parsed_url', array('url' => normalise_link($url), 'guessing' => !$no_guessing, + dba::insert( + 'parsed_url', + array( + 'url' => normalise_link($url), 'guessing' => !$no_guessing, 'oembed' => $do_oembed, 'content' => serialize($data), - 'created' => datetime_convert()), true); + 'created' => datetime_convert()), + true + ); return $data; } @@ -83,12 +88,12 @@ class ParseUrl { * like \