X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FCoreBundle%2FEntity%2FEntry.php;h=7d2d2027f1bbf43478db1887339a2ed8a38cef56;hb=c3cb46809b54b2f74d00de7330e06be45776e61e;hp=f139bbacc0ce80500249e2d7dd956cd7de93beec;hpb=82d6d9cb06a1486e2e3b05fa6ce857b3b8655180;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/CoreBundle/Entity/Entry.php b/src/Wallabag/CoreBundle/Entity/Entry.php index f139bbac..7d2d2027 100644 --- a/src/Wallabag/CoreBundle/Entity/Entry.php +++ b/src/Wallabag/CoreBundle/Entity/Entry.php @@ -7,6 +7,7 @@ use Doctrine\ORM\Mapping as ORM; use Symfony\Component\Validator\Constraints as Assert; use Hateoas\Configuration\Annotation as Hateoas; use JMS\Serializer\Annotation\XmlRoot; +use Wallabag\CoreBundle\Helper\Tools; /** * Entry. @@ -96,7 +97,7 @@ class Entry /** * @var int * - * @ORM\Column(name="reading_type", type="integer", nullable=true) + * @ORM\Column(name="reading_time", type="integer", nullable=true) */ private $readingTime; @@ -264,6 +265,8 @@ class Entry public function setContent($content) { $this->content = $content; + $this->readingTime = Tools::getReadingTime($content); + $this->domainName = parse_url($this->url, PHP_URL_HOST); return $this; }