]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php
Add ability to manually define the reading speed
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Form / Type / EntryFilterType.php
index 702c7f7aa03d196939d8f51cd747b803794e34fa..8a575b68058fbdb799f7321b65d659987e417232 100644 (file)
@@ -54,8 +54,8 @@ class EntryFilterType extends AbstractType
                     $lower = $values['value']['left_number'][0];
                     $upper = $values['value']['right_number'][0];
 
-                    $min = (int) ($lower * $this->user->getConfig()->getReadingSpeed());
-                    $max = (int) ($upper * $this->user->getConfig()->getReadingSpeed());
+                    $min = (int) ($lower * $this->user->getConfig()->getReadingSpeed() / 200);
+                    $max = (int) ($upper * $this->user->getConfig()->getReadingSpeed() / 200);
 
                     if (null === $lower && null === $upper) {
                         // no value? no filter
@@ -108,7 +108,7 @@ class EntryFilterType extends AbstractType
             ->add('httpStatus', TextFilterType::class, [
                 'apply_filter' => function (QueryInterface $filterQuery, $field, $values) {
                     $value = $values['value'];
-                    if (false === array_key_exists($value, Response::$statusTexts)) {
+                    if (false === \array_key_exists($value, Response::$statusTexts)) {
                         return;
                     }