X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FParseUrl.php;h=9e46281ec91a73ec6d159be72dc84068c91aaeb1;hb=394e94cbc1b3a11e50cd6b076582403d62839c86;hp=35557067d7474ca4d7d85d522c0b1847fc33977a;hpb=52bddd580c3f97add2d15f00c01c80acfc73230f;p=friendica.git diff --git a/src/ParseUrl.php b/src/ParseUrl.php index 35557067d7..9e46281ec9 100644 --- a/src/ParseUrl.php +++ b/src/ParseUrl.php @@ -10,9 +10,10 @@ use Friendica\Object\Image; use Friendica\Util\XML; use dba; -use DomXPath; +use DOMXPath; use DOMDocument; +require_once 'include/dba.php'; require_once "include/network.php"; require_once "include/oembed.php"; @@ -24,10 +25,10 @@ class ParseUrl /** * @brief Search for chached embeddable data of an url otherwise fetch it * - * @param type $url The url of the page which should be scraped - * @param type $no_guessing If true the parse doens't search for + * @param string $url The url of the page which should be scraped + * @param bool $no_guessing If true the parse doens't search for * preview pictures - * @param type $do_oembed The false option is used by the function fetch_oembed() + * @param bool $do_oembed The false option is used by the function fetch_oembed() * to avoid endless loops * * @return array which contains needed data for embedding @@ -88,12 +89,12 @@ class ParseUrl * like \Awesome Title\ or * \ * - * @param type $url The url of the page which should be scraped - * @param type $no_guessing If true the parse doens't search for + * @param string $url The url of the page which should be scraped + * @param bool $no_guessing If true the parse doens't search for * preview pictures - * @param type $do_oembed The false option is used by the function fetch_oembed() + * @param bool $do_oembed The false option is used by the function fetch_oembed() * to avoid endless loops - * @param type $count Internal counter to avoid endless loops + * @param int $count Internal counter to avoid endless loops * * @return array which contains needed data for embedding * string 'url' => The url of the parsed page @@ -215,7 +216,7 @@ class ParseUrl XML::deleteNode($doc, "ol"); XML::deleteNode($doc, "ul"); - $xpath = new DomXPath($doc); + $xpath = new DOMXPath($doc); $list = $xpath->query("//meta[@content]"); foreach ($list as $node) {