X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FCoreBundle%2FHelper%2FContentProxy.php;h=7fb41393127c8bcdaab1a11511a988e93bb6cb16;hb=da3d4998c0972557952c83b610f8f45fdcd31b72;hp=3de8828f98e1e5740a155d60532d45c875010836;hpb=34c2cc7a1a2b8f1ac606957096274b3998005ec0;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/CoreBundle/Helper/ContentProxy.php b/src/Wallabag/CoreBundle/Helper/ContentProxy.php index 3de8828f..7fb41393 100644 --- a/src/Wallabag/CoreBundle/Helper/ContentProxy.php +++ b/src/Wallabag/CoreBundle/Helper/ContentProxy.php @@ -4,6 +4,7 @@ namespace Wallabag\CoreBundle\Helper; use Graby\Graby; use Wallabag\CoreBundle\Entity\Entry; +use Wallabag\CoreBundle\Tools\Utils; /** * This kind of proxy class take care of getting the content from an url @@ -51,6 +52,8 @@ class ContentProxy $entry->setContent($html); $entry->setLanguage($content['language']); $entry->setMimetype($content['content_type']); + $entry->setReadingTime(Utils::getReadingTime($html)); + $entry->setDomainName(parse_url($entry->getUrl(), PHP_URL_HOST)); if (isset($content['open_graph']['og_image'])) { $entry->setPreviewPicture($content['open_graph']['og_image']);