X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FParseUrl.php;h=35557067d7474ca4d7d85d522c0b1847fc33977a;hb=7c470f0be9a0b4a9f8625333345c8b994487b504;hp=919a5ad9f9bed0b69d722c9c5beba2b01d212613;hpb=f245bc83590879948d588fa9a2ac1ed50adefdb6;p=friendica.git diff --git a/src/ParseUrl.php b/src/ParseUrl.php index 919a5ad9f9..35557067d7 100644 --- a/src/ParseUrl.php +++ b/src/ParseUrl.php @@ -6,14 +6,14 @@ namespace Friendica; use Friendica\Core\Config; -use Friendica\Util\Xml; +use Friendica\Object\Image; +use Friendica\Util\XML; use dba; use DomXPath; use DOMDocument; require_once "include/network.php"; -require_once "include/Photo.php"; require_once "include/oembed.php"; /** @@ -203,17 +203,17 @@ class ParseUrl $doc = new DOMDocument(); @$doc->loadHTML($body); - Xml::deleteNode($doc, "style"); - Xml::deleteNode($doc, "script"); - Xml::deleteNode($doc, "option"); - Xml::deleteNode($doc, "h1"); - Xml::deleteNode($doc, "h2"); - Xml::deleteNode($doc, "h3"); - Xml::deleteNode($doc, "h4"); - Xml::deleteNode($doc, "h5"); - Xml::deleteNode($doc, "h6"); - Xml::deleteNode($doc, "ol"); - Xml::deleteNode($doc, "ul"); + XML::deleteNode($doc, "style"); + XML::deleteNode($doc, "script"); + XML::deleteNode($doc, "option"); + XML::deleteNode($doc, "h1"); + XML::deleteNode($doc, "h2"); + XML::deleteNode($doc, "h3"); + XML::deleteNode($doc, "h4"); + XML::deleteNode($doc, "h5"); + XML::deleteNode($doc, "h6"); + XML::deleteNode($doc, "ol"); + XML::deleteNode($doc, "ul"); $xpath = new DomXPath($doc); @@ -353,7 +353,7 @@ class ParseUrl } $src = self::completeUrl($attr["src"], $url); - $photodata = get_photo_info($src); + $photodata = Image::getInfoFromURL($src); if (($photodata) && ($photodata[0] > 150) && ($photodata[1] > 150)) { if ($photodata[0] > 300) { @@ -374,7 +374,7 @@ class ParseUrl unset($siteinfo["image"]); - $photodata = get_photo_info($src); + $photodata = Image::getInfoFromURL($src); if (($photodata) && ($photodata[0] > 10) && ($photodata[1] > 10)) { $siteinfo["images"][] = array("src" => $src, @@ -454,6 +454,7 @@ class ParseUrl * * @param string $tag The pure tag name * @param int $k Counter for internal use + * @return void */ private static function arrAddHashes(&$tag, $k) {