diff options
Diffstat (limited to 'src/Wallabag')
38 files changed, 98 insertions, 33 deletions
diff --git a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadConfigData.php b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadConfigData.php index 45358022..3d4d5def 100644 --- a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadConfigData.php +++ b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadConfigData.php | |||
@@ -22,6 +22,7 @@ class LoadConfigData extends AbstractFixture implements OrderedFixtureInterface | |||
22 | $adminConfig->setLanguage('en'); | 22 | $adminConfig->setLanguage('en'); |
23 | $adminConfig->setPocketConsumerKey('xxxxx'); | 23 | $adminConfig->setPocketConsumerKey('xxxxx'); |
24 | $adminConfig->setActionMarkAsRead(0); | 24 | $adminConfig->setActionMarkAsRead(0); |
25 | $adminConfig->setListMode(0); | ||
25 | 26 | ||
26 | $manager->persist($adminConfig); | 27 | $manager->persist($adminConfig); |
27 | 28 | ||
@@ -34,6 +35,7 @@ class LoadConfigData extends AbstractFixture implements OrderedFixtureInterface | |||
34 | $bobConfig->setLanguage('fr'); | 35 | $bobConfig->setLanguage('fr'); |
35 | $bobConfig->setPocketConsumerKey(null); | 36 | $bobConfig->setPocketConsumerKey(null); |
36 | $bobConfig->setActionMarkAsRead(1); | 37 | $bobConfig->setActionMarkAsRead(1); |
38 | $bobConfig->setListMode(1); | ||
37 | 39 | ||
38 | $manager->persist($bobConfig); | 40 | $manager->persist($bobConfig); |
39 | 41 | ||
@@ -46,6 +48,7 @@ class LoadConfigData extends AbstractFixture implements OrderedFixtureInterface | |||
46 | $emptyConfig->setLanguage('en'); | 48 | $emptyConfig->setLanguage('en'); |
47 | $emptyConfig->setPocketConsumerKey(null); | 49 | $emptyConfig->setPocketConsumerKey(null); |
48 | $emptyConfig->setActionMarkAsRead(0); | 50 | $emptyConfig->setActionMarkAsRead(0); |
51 | $emptyConfig->setListMode(0); | ||
49 | 52 | ||
50 | $manager->persist($emptyConfig); | 53 | $manager->persist($emptyConfig); |
51 | 54 | ||
diff --git a/src/Wallabag/CoreBundle/DependencyInjection/Configuration.php b/src/Wallabag/CoreBundle/DependencyInjection/Configuration.php index 3a3da024..006a18c3 100644 --- a/src/Wallabag/CoreBundle/DependencyInjection/Configuration.php +++ b/src/Wallabag/CoreBundle/DependencyInjection/Configuration.php | |||
@@ -41,6 +41,12 @@ class Configuration implements ConfigurationInterface | |||
41 | ->end() | 41 | ->end() |
42 | ->scalarNode('fetching_error_message') | 42 | ->scalarNode('fetching_error_message') |
43 | ->end() | 43 | ->end() |
44 | ->scalarNode('action_mark_as_read') | ||
45 | ->defaultValue(1) | ||
46 | ->end() | ||
47 | ->scalarNode('list_mode') | ||
48 | ->defaultValue(1) | ||
49 | ->end() | ||
44 | ->end() | 50 | ->end() |
45 | ; | 51 | ; |
46 | 52 | ||
diff --git a/src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php b/src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php index b4992d54..aa9ee339 100644 --- a/src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php +++ b/src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php | |||
@@ -23,6 +23,8 @@ class WallabagCoreExtension extends Extension | |||
23 | $container->setParameter('wallabag_core.version', $config['version']); | 23 | $container->setParameter('wallabag_core.version', $config['version']); |
24 | $container->setParameter('wallabag_core.paypal_url', $config['paypal_url']); | 24 | $container->setParameter('wallabag_core.paypal_url', $config['paypal_url']); |
25 | $container->setParameter('wallabag_core.cache_lifetime', $config['cache_lifetime']); | 25 | $container->setParameter('wallabag_core.cache_lifetime', $config['cache_lifetime']); |
26 | $container->setParameter('wallabag_core.action_mark_as_read', $config['action_mark_as_read']); | ||
27 | $container->setParameter('wallabag_core.list_mode', $config['list_mode']); | ||
26 | $container->setParameter('wallabag_core.fetching_error_message', $config['fetching_error_message']); | 28 | $container->setParameter('wallabag_core.fetching_error_message', $config['fetching_error_message']); |
27 | 29 | ||
28 | $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); | 30 | $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
diff --git a/src/Wallabag/CoreBundle/Entity/TaggingRule.php b/src/Wallabag/CoreBundle/Entity/TaggingRule.php index 28914cc1..72651b19 100644 --- a/src/Wallabag/CoreBundle/Entity/TaggingRule.php +++ b/src/Wallabag/CoreBundle/Entity/TaggingRule.php | |||
@@ -28,6 +28,7 @@ class TaggingRule | |||
28 | * @var string | 28 | * @var string |
29 | * | 29 | * |
30 | * @Assert\NotBlank() | 30 | * @Assert\NotBlank() |
31 | * @Assert\Length(max=255) | ||
31 | * @RulerZAssert\ValidRule( | 32 | * @RulerZAssert\ValidRule( |
32 | * allowed_variables={"title", "url", "isArchived", "isStared", "content", "language", "mimetype", "readingTime", "domainName"}, | 33 | * allowed_variables={"title", "url", "isArchived", "isStared", "content", "language", "mimetype", "readingTime", "domainName"}, |
33 | * allowed_operators={">", "<", ">=", "<=", "=", "is", "!=", "and", "not", "or", "matches"} | 34 | * allowed_operators={">", "<", ">=", "<=", "=", "is", "!=", "and", "not", "or", "matches"} |
diff --git a/src/Wallabag/CoreBundle/Helper/ContentProxy.php b/src/Wallabag/CoreBundle/Helper/ContentProxy.php index fd059325..0130bd2b 100644 --- a/src/Wallabag/CoreBundle/Helper/ContentProxy.php +++ b/src/Wallabag/CoreBundle/Helper/ContentProxy.php | |||
@@ -21,14 +21,16 @@ class ContentProxy | |||
21 | protected $logger; | 21 | protected $logger; |
22 | protected $tagRepository; | 22 | protected $tagRepository; |
23 | protected $mimeGuesser; | 23 | protected $mimeGuesser; |
24 | protected $fetchingErrorMessage; | ||
24 | 25 | ||
25 | public function __construct(Graby $graby, RuleBasedTagger $tagger, TagRepository $tagRepository, LoggerInterface $logger) | 26 | public function __construct(Graby $graby, RuleBasedTagger $tagger, TagRepository $tagRepository, LoggerInterface $logger, $fetchingErrorMessage) |
26 | { | 27 | { |
27 | $this->graby = $graby; | 28 | $this->graby = $graby; |
28 | $this->tagger = $tagger; | 29 | $this->tagger = $tagger; |
29 | $this->logger = $logger; | 30 | $this->logger = $logger; |
30 | $this->tagRepository = $tagRepository; | 31 | $this->tagRepository = $tagRepository; |
31 | $this->mimeGuesser = new MimeTypeExtensionGuesser(); | 32 | $this->mimeGuesser = new MimeTypeExtensionGuesser(); |
33 | $this->fetchingErrorMessage = $fetchingErrorMessage; | ||
32 | } | 34 | } |
33 | 35 | ||
34 | /** | 36 | /** |
@@ -48,7 +50,13 @@ class ContentProxy | |||
48 | { | 50 | { |
49 | // do we have to fetch the content or the provided one is ok? | 51 | // do we have to fetch the content or the provided one is ok? |
50 | if (empty($content) || false === $this->validateContent($content)) { | 52 | if (empty($content) || false === $this->validateContent($content)) { |
51 | $content = $this->graby->fetchContent($url); | 53 | $fetchedContent = $this->graby->fetchContent($url); |
54 | |||
55 | // when content is imported, we have information in $content | ||
56 | // in case fetching content goes bad, we'll keep the imported information instead of overriding them | ||
57 | if (empty($content) || $fetchedContent['html'] !== $this->fetchingErrorMessage) { | ||
58 | $content = $fetchedContent; | ||
59 | } | ||
52 | } | 60 | } |
53 | 61 | ||
54 | $title = $content['title']; | 62 | $title = $content['title']; |
@@ -58,7 +66,7 @@ class ContentProxy | |||
58 | 66 | ||
59 | $html = $content['html']; | 67 | $html = $content['html']; |
60 | if (false === $html) { | 68 | if (false === $html) { |
61 | $html = '<p>Unable to retrieve readable content.</p>'; | 69 | $html = $this->fetchingErrorMessage; |
62 | 70 | ||
63 | if (isset($content['open_graph']['og_description'])) { | 71 | if (isset($content['open_graph']['og_description'])) { |
64 | $html .= '<p><i>But we found a short description: </i></p>'; | 72 | $html .= '<p><i>But we found a short description: </i></p>'; |
@@ -71,8 +79,8 @@ class ContentProxy | |||
71 | $entry->setContent($html); | 79 | $entry->setContent($html); |
72 | $entry->setHttpStatus(isset($content['status']) ? $content['status'] : ''); | 80 | $entry->setHttpStatus(isset($content['status']) ? $content['status'] : ''); |
73 | 81 | ||
74 | $entry->setLanguage($content['language']); | 82 | $entry->setLanguage(isset($content['language']) ? $content['language'] : ''); |
75 | $entry->setMimetype($content['content_type']); | 83 | $entry->setMimetype(isset($content['content_type']) ? $content['content_type'] : ''); |
76 | $entry->setReadingTime(Utils::getReadingTime($html)); | 84 | $entry->setReadingTime(Utils::getReadingTime($html)); |
77 | 85 | ||
78 | $domainName = parse_url($entry->getUrl(), PHP_URL_HOST); | 86 | $domainName = parse_url($entry->getUrl(), PHP_URL_HOST); |
@@ -85,7 +93,7 @@ class ContentProxy | |||
85 | } | 93 | } |
86 | 94 | ||
87 | // if content is an image define as a preview too | 95 | // if content is an image define as a preview too |
88 | if (in_array($this->mimeGuesser->guess($content['content_type']), ['jpeg', 'jpg', 'gif', 'png'], true)) { | 96 | if (isset($content['content_type']) && in_array($this->mimeGuesser->guess($content['content_type']), ['jpeg', 'jpg', 'gif', 'png'], true)) { |
89 | $entry->setPreviewPicture($content['url']); | 97 | $entry->setPreviewPicture($content['url']); |
90 | } | 98 | } |
91 | 99 | ||
diff --git a/src/Wallabag/CoreBundle/Helper/DownloadImages.php b/src/Wallabag/CoreBundle/Helper/DownloadImages.php index 264bc6a3..c83f9618 100644 --- a/src/Wallabag/CoreBundle/Helper/DownloadImages.php +++ b/src/Wallabag/CoreBundle/Helper/DownloadImages.php | |||
@@ -36,7 +36,7 @@ class DownloadImages | |||
36 | { | 36 | { |
37 | // if folder doesn't exist, attempt to create one and store the folder name in property $folder | 37 | // if folder doesn't exist, attempt to create one and store the folder name in property $folder |
38 | if (!file_exists($this->baseFolder)) { | 38 | if (!file_exists($this->baseFolder)) { |
39 | mkdir($this->baseFolder, 0777, true); | 39 | mkdir($this->baseFolder, 0755, true); |
40 | } | 40 | } |
41 | } | 41 | } |
42 | 42 | ||
diff --git a/src/Wallabag/CoreBundle/Repository/EntryRepository.php b/src/Wallabag/CoreBundle/Repository/EntryRepository.php index 47e24d6b..553ad6ab 100644 --- a/src/Wallabag/CoreBundle/Repository/EntryRepository.php +++ b/src/Wallabag/CoreBundle/Repository/EntryRepository.php | |||
@@ -20,8 +20,7 @@ class EntryRepository extends EntityRepository | |||
20 | private function getBuilderByUser($userId) | 20 | private function getBuilderByUser($userId) |
21 | { | 21 | { |
22 | return $this->createQueryBuilder('e') | 22 | return $this->createQueryBuilder('e') |
23 | ->leftJoin('e.user', 'u') | 23 | ->andWhere('e.user = :userId')->setParameter('userId', $userId) |
24 | ->andWhere('u.id = :userId')->setParameter('userId', $userId) | ||
25 | ->orderBy('e.createdAt', 'desc') | 24 | ->orderBy('e.createdAt', 'desc') |
26 | ; | 25 | ; |
27 | } | 26 | } |
diff --git a/src/Wallabag/CoreBundle/Resources/config/parameters.yml b/src/Wallabag/CoreBundle/Resources/config/parameters.yml index 6068e84c..52ac90fd 100644 --- a/src/Wallabag/CoreBundle/Resources/config/parameters.yml +++ b/src/Wallabag/CoreBundle/Resources/config/parameters.yml | |||
@@ -1,8 +1,9 @@ | |||
1 | parameters: | 1 | parameters: |
2 | addons_url: | 2 | addons_url: |
3 | firefox: https://addons.mozilla.org/firefox/addon/wallabag-v2/ | 3 | firefox: https://addons.mozilla.org/firefox/addon/wallabag-v2/ |
4 | chrome: https://chrome.google.com/webstore/detail/wallabagit/peehlcgckcnclnjlndmoddifcicdnabm | 4 | chrome: https://chrome.google.com/webstore/detail/wallabagger/gbmgphmejlcoihgedabhgjdkcahacjlj |
5 | opera: https://addons.opera.com/en/extensions/details/wallabagger/?display=en | ||
5 | f_droid: https://f-droid.org/app/fr.gaulupeau.apps.InThePoche | 6 | f_droid: https://f-droid.org/app/fr.gaulupeau.apps.InThePoche |
6 | google_play: https://play.google.com/store/apps/details?id=fr.gaulupeau.apps.InThePoche | 7 | google_play: https://play.google.com/store/apps/details?id=fr.gaulupeau.apps.InThePoche |
7 | ios: https://itunes.apple.com/app/wallabag/id828331015?mt=8 | 8 | ios: https://itunes.apple.com/app/wallabag-2/id1170800946?mt=8 |
8 | windows: https://www.microsoft.com/store/apps/wallabag/9nblggh11646 | 9 | windows: https://www.microsoft.com/store/apps/wallabag/9nblggh11646 |
diff --git a/src/Wallabag/CoreBundle/Resources/config/services.yml b/src/Wallabag/CoreBundle/Resources/config/services.yml index bcf0c9ca..fadd5e49 100644 --- a/src/Wallabag/CoreBundle/Resources/config/services.yml +++ b/src/Wallabag/CoreBundle/Resources/config/services.yml | |||
@@ -86,6 +86,7 @@ services: | |||
86 | - "@wallabag_core.rule_based_tagger" | 86 | - "@wallabag_core.rule_based_tagger" |
87 | - "@wallabag_core.tag_repository" | 87 | - "@wallabag_core.tag_repository" |
88 | - "@logger" | 88 | - "@logger" |
89 | - '%wallabag_core.fetching_error_message%' | ||
89 | 90 | ||
90 | wallabag_core.rule_based_tagger: | 91 | wallabag_core.rule_based_tagger: |
91 | class: Wallabag\CoreBundle\Helper\RuleBasedTagger | 92 | class: Wallabag\CoreBundle\Helper\RuleBasedTagger |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml index c9e21959..3380edca 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml | |||
@@ -285,6 +285,7 @@ howto: | |||
285 | browser_addons: | 285 | browser_addons: |
286 | firefox: 'Standardudvidelse til Firefox' | 286 | firefox: 'Standardudvidelse til Firefox' |
287 | chrome: 'Chrome-udvidelse' | 287 | chrome: 'Chrome-udvidelse' |
288 | opera: 'Opera-udvidelse' | ||
288 | mobile_apps: | 289 | mobile_apps: |
289 | android: | 290 | android: |
290 | via_f_droid: 'via F-Droid' | 291 | via_f_droid: 'via F-Droid' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml index b84bd9d3..cfa11e82 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml | |||
@@ -285,6 +285,7 @@ howto: | |||
285 | browser_addons: | 285 | browser_addons: |
286 | firefox: 'Firefox-Erweiterung' | 286 | firefox: 'Firefox-Erweiterung' |
287 | chrome: 'Chrome-Erweiterung' | 287 | chrome: 'Chrome-Erweiterung' |
288 | opera: 'Opera-Erweiterung' | ||
288 | mobile_apps: | 289 | mobile_apps: |
289 | android: | 290 | android: |
290 | via_f_droid: 'via F-Droid' | 291 | via_f_droid: 'via F-Droid' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml index 4b92fe97..673a0a16 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml | |||
@@ -283,8 +283,9 @@ howto: | |||
283 | form: | 283 | form: |
284 | description: 'Thanks to this form' | 284 | description: 'Thanks to this form' |
285 | browser_addons: | 285 | browser_addons: |
286 | firefox: 'Standard Firefox Add-On' | 286 | firefox: 'Firefox addon' |
287 | chrome: 'Chrome Extension' | 287 | chrome: 'Chrome addon' |
288 | opera: 'Opera addon' | ||
288 | mobile_apps: | 289 | mobile_apps: |
289 | android: | 290 | android: |
290 | via_f_droid: 'via F-Droid' | 291 | via_f_droid: 'via F-Droid' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml index 02ce7e19..d08edd6e 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml | |||
@@ -285,6 +285,7 @@ howto: | |||
285 | browser_addons: | 285 | browser_addons: |
286 | firefox: 'Extensión Firefox' | 286 | firefox: 'Extensión Firefox' |
287 | chrome: 'Extensión Chrome' | 287 | chrome: 'Extensión Chrome' |
288 | opera: 'Extensión Opera' | ||
288 | mobile_apps: | 289 | mobile_apps: |
289 | android: | 290 | android: |
290 | via_f_droid: 'via F-Droid' | 291 | via_f_droid: 'via F-Droid' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml index 99c0f71b..ad6144b8 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml | |||
@@ -285,6 +285,7 @@ howto: | |||
285 | browser_addons: | 285 | browser_addons: |
286 | firefox: 'افزونهٔ فایرفاکس' | 286 | firefox: 'افزونهٔ فایرفاکس' |
287 | chrome: 'افزونهٔ کروم' | 287 | chrome: 'افزونهٔ کروم' |
288 | # opera: 'Opera addon' | ||
288 | mobile_apps: | 289 | mobile_apps: |
289 | android: | 290 | android: |
290 | via_f_droid: 'از راه F-Droid' | 291 | via_f_droid: 'از راه F-Droid' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml index 5579bf1f..f7371d3e 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml | |||
@@ -285,6 +285,7 @@ howto: | |||
285 | browser_addons: | 285 | browser_addons: |
286 | firefox: "Extension Firefox" | 286 | firefox: "Extension Firefox" |
287 | chrome: "Extension Chrome" | 287 | chrome: "Extension Chrome" |
288 | opera: "Extension Opera" | ||
288 | mobile_apps: | 289 | mobile_apps: |
289 | android: | 290 | android: |
290 | via_f_droid: "via F-Droid" | 291 | via_f_droid: "via F-Droid" |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml index 92ccef68..bbb526dc 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml | |||
@@ -285,6 +285,7 @@ howto: | |||
285 | browser_addons: | 285 | browser_addons: |
286 | firefox: 'Add-On di Firefox' | 286 | firefox: 'Add-On di Firefox' |
287 | chrome: 'Estensione di Chrome' | 287 | chrome: 'Estensione di Chrome' |
288 | opera: 'Estensione di Opera' | ||
288 | mobile_apps: | 289 | mobile_apps: |
289 | android: | 290 | android: |
290 | via_f_droid: 'via F-Droid' | 291 | via_f_droid: 'via F-Droid' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml index 9ef3b475..33c1a660 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml | |||
@@ -285,6 +285,7 @@ howto: | |||
285 | browser_addons: | 285 | browser_addons: |
286 | firefox: 'Extension Firefox' | 286 | firefox: 'Extension Firefox' |
287 | chrome: 'Extension Chrome' | 287 | chrome: 'Extension Chrome' |
288 | opera: 'Extension Opera' | ||
288 | mobile_apps: | 289 | mobile_apps: |
289 | android: | 290 | android: |
290 | via_f_droid: 'via F-Droid' | 291 | via_f_droid: 'via F-Droid' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml index 9e3726a5..1eb83d53 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml | |||
@@ -285,6 +285,7 @@ howto: | |||
285 | browser_addons: | 285 | browser_addons: |
286 | firefox: 'Standardowe rozszerzenie dla Firefox' | 286 | firefox: 'Standardowe rozszerzenie dla Firefox' |
287 | chrome: 'Rozszerzenie dla Chrome' | 287 | chrome: 'Rozszerzenie dla Chrome' |
288 | opera: 'Rozszerzenie dla Opera' | ||
288 | mobile_apps: | 289 | mobile_apps: |
289 | android: | 290 | android: |
290 | via_f_droid: 'w F-Droid' | 291 | via_f_droid: 'w F-Droid' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml index abe51305..f58b2115 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml | |||
@@ -285,6 +285,7 @@ howto: | |||
285 | browser_addons: | 285 | browser_addons: |
286 | firefox: 'Extensão padrão do Firefox' | 286 | firefox: 'Extensão padrão do Firefox' |
287 | chrome: 'Extensão do Chrome' | 287 | chrome: 'Extensão do Chrome' |
288 | opera: 'Extensão do Opera' | ||
288 | mobile_apps: | 289 | mobile_apps: |
289 | android: | 290 | android: |
290 | via_f_droid: 'via F-Droid' | 291 | via_f_droid: 'via F-Droid' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml index 88780b54..b9a57e36 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml | |||
@@ -285,6 +285,7 @@ howto: | |||
285 | browser_addons: | 285 | browser_addons: |
286 | firefox: 'Add-On standard de Firefox' | 286 | firefox: 'Add-On standard de Firefox' |
287 | chrome: 'Extensie Chrome' | 287 | chrome: 'Extensie Chrome' |
288 | opera: 'Extensie Opera' | ||
288 | mobile_apps: | 289 | mobile_apps: |
289 | android: | 290 | android: |
290 | via_f_droid: 'prin F-Droid' | 291 | via_f_droid: 'prin F-Droid' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml index db0a9bbf..ec21c014 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml | |||
@@ -285,6 +285,7 @@ howto: | |||
285 | browser_addons: | 285 | browser_addons: |
286 | firefox: 'Standart Firefox Eklentisi' | 286 | firefox: 'Standart Firefox Eklentisi' |
287 | chrome: 'Chrome Eklentisi' | 287 | chrome: 'Chrome Eklentisi' |
288 | opera: 'Opera Eklentisi' | ||
288 | mobile_apps: | 289 | mobile_apps: |
289 | android: | 290 | android: |
290 | # via_f_droid: 'via F-Droid' | 291 | # via_f_droid: 'via F-Droid' |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/common/Static/howto.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/common/Static/howto.html.twig index 3b02993e..231f9bdf 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/common/Static/howto.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/common/Static/howto.html.twig | |||
@@ -30,6 +30,7 @@ | |||
30 | <ul> | 30 | <ul> |
31 | <li><a href="{{ addonsUrl.firefox }}" target="_blank">{{ 'howto.browser_addons.firefox'|trans }}</a></li> | 31 | <li><a href="{{ addonsUrl.firefox }}" target="_blank">{{ 'howto.browser_addons.firefox'|trans }}</a></li> |
32 | <li><a href="{{ addonsUrl.chrome }}" target="_blank">{{ 'howto.browser_addons.chrome'|trans }}</a></li> | 32 | <li><a href="{{ addonsUrl.chrome }}" target="_blank">{{ 'howto.browser_addons.chrome'|trans }}</a></li> |
33 | <li><a href="{{ addonsUrl.opera }}" target="_blank">{{ 'howto.browser_addons.opera'|trans }}</a></li> | ||
33 | </ul> | 34 | </ul> |
34 | </div> | 35 | </div> |
35 | 36 | ||
@@ -186,7 +187,7 @@ | |||
186 | </tbody> | 187 | </tbody> |
187 | </table> | 188 | </table> |
188 | </div> | 189 | </div> |
189 | 190 | ||
190 | </div> | 191 | </div> |
191 | </div> | 192 | </div> |
192 | </div> | 193 | </div> |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig index bed0fdec..0cbf1999 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig | |||
@@ -257,6 +257,17 @@ | |||
257 | <article> | 257 | <article> |
258 | {{ entry.content | raw }} | 258 | {{ entry.content | raw }} |
259 | </article> | 259 | </article> |
260 | |||
261 | <div class="fixed-action-btn horizontal click-to-toggle hide-on-large-only"> | ||
262 | <a class="btn-floating btn-large"> | ||
263 | <i class="material-icons">menu</i> | ||
264 | </a> | ||
265 | <ul> | ||
266 | <li><a class="btn-floating" href="{{ path('archive_entry', { 'id': entry.id }) }}"><i class="material-icons">done</i></a></li> | ||
267 | <li><a class="btn-floating" href="{{ path('star_entry', { 'id': entry.id }) }}"><i class="material-icons">star_outline</i></a></li> | ||
268 | <li><a class="btn-floating" href="{{ path('delete_entry', { 'id': entry.id }) }}"><i class="material-icons">delete</i></a></li> | ||
269 | </ul> | ||
270 | </div> | ||
260 | </div> | 271 | </div> |
261 | 272 | ||
262 | <script id="annotationroutes" type="application/json"> | 273 | <script id="annotationroutes" type="application/json"> |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig index e5bfc62c..131fbf26 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig | |||
@@ -19,8 +19,6 @@ | |||
19 | Materialize.toast('{{ flashMessage|trans }}', 4000); | 19 | Materialize.toast('{{ flashMessage|trans }}', 4000); |
20 | </script> | 20 | </script> |
21 | {% endfor %} | 21 | {% endfor %} |
22 | |||
23 | {{ render(controller("WallabagImportBundle:Import:checkQueue")) }} | ||
24 | {% endblock %} | 22 | {% endblock %} |
25 | 23 | ||
26 | {% block menu %} | 24 | {% block menu %} |
diff --git a/src/Wallabag/ImportBundle/Command/RedisWorkerCommand.php b/src/Wallabag/ImportBundle/Command/RedisWorkerCommand.php index f793a314..2d06af44 100644 --- a/src/Wallabag/ImportBundle/Command/RedisWorkerCommand.php +++ b/src/Wallabag/ImportBundle/Command/RedisWorkerCommand.php | |||
@@ -36,7 +36,7 @@ class RedisWorkerCommand extends ContainerAwareCommand | |||
36 | $worker = new QueueWorker( | 36 | $worker = new QueueWorker( |
37 | $this->getContainer()->get('wallabag_import.queue.redis.'.$serviceName), | 37 | $this->getContainer()->get('wallabag_import.queue.redis.'.$serviceName), |
38 | $this->getContainer()->get('wallabag_import.consumer.redis.'.$serviceName), | 38 | $this->getContainer()->get('wallabag_import.consumer.redis.'.$serviceName), |
39 | $input->getOption('maxIterations') | 39 | (int) $input->getOption('maxIterations') |
40 | ); | 40 | ); |
41 | 41 | ||
42 | $worker->start(); | 42 | $worker->start(); |
diff --git a/src/Wallabag/ImportBundle/Import/ChromeImport.php b/src/Wallabag/ImportBundle/Import/ChromeImport.php index d7620bcb..2667890f 100644 --- a/src/Wallabag/ImportBundle/Import/ChromeImport.php +++ b/src/Wallabag/ImportBundle/Import/ChromeImport.php | |||
@@ -37,9 +37,10 @@ class ChromeImport extends BrowserImport | |||
37 | { | 37 | { |
38 | $data = [ | 38 | $data = [ |
39 | 'title' => $entry['name'], | 39 | 'title' => $entry['name'], |
40 | 'html' => '', | 40 | 'html' => false, |
41 | 'url' => $entry['url'], | 41 | 'url' => $entry['url'], |
42 | 'is_archived' => $this->markAsRead, | 42 | 'is_archived' => (int) $this->markAsRead, |
43 | 'is_starred' => false, | ||
43 | 'tags' => '', | 44 | 'tags' => '', |
44 | 'created_at' => substr($entry['date_added'], 0, 10), | 45 | 'created_at' => substr($entry['date_added'], 0, 10), |
45 | ]; | 46 | ]; |
diff --git a/src/Wallabag/ImportBundle/Import/FirefoxImport.php b/src/Wallabag/ImportBundle/Import/FirefoxImport.php index e010f5a4..c50c69b3 100644 --- a/src/Wallabag/ImportBundle/Import/FirefoxImport.php +++ b/src/Wallabag/ImportBundle/Import/FirefoxImport.php | |||
@@ -37,9 +37,10 @@ class FirefoxImport extends BrowserImport | |||
37 | { | 37 | { |
38 | $data = [ | 38 | $data = [ |
39 | 'title' => $entry['title'], | 39 | 'title' => $entry['title'], |
40 | 'html' => '', | 40 | 'html' => false, |
41 | 'url' => $entry['uri'], | 41 | 'url' => $entry['uri'], |
42 | 'is_archived' => $this->markAsRead, | 42 | 'is_archived' => (int) $this->markAsRead, |
43 | 'is_starred' => false, | ||
43 | 'tags' => '', | 44 | 'tags' => '', |
44 | 'created_at' => substr($entry['dateAdded'], 0, 10), | 45 | 'created_at' => substr($entry['dateAdded'], 0, 10), |
45 | ]; | 46 | ]; |
diff --git a/src/Wallabag/ImportBundle/Import/InstapaperImport.php b/src/Wallabag/ImportBundle/Import/InstapaperImport.php index cf4c785c..70a53f1a 100644 --- a/src/Wallabag/ImportBundle/Import/InstapaperImport.php +++ b/src/Wallabag/ImportBundle/Import/InstapaperImport.php | |||
@@ -74,8 +74,7 @@ class InstapaperImport extends AbstractImport | |||
74 | 'status' => $data[3], | 74 | 'status' => $data[3], |
75 | 'is_archived' => $data[3] === 'Archive' || $data[3] === 'Starred', | 75 | 'is_archived' => $data[3] === 'Archive' || $data[3] === 'Starred', |
76 | 'is_starred' => $data[3] === 'Starred', | 76 | 'is_starred' => $data[3] === 'Starred', |
77 | 'content_type' => '', | 77 | 'html' => false, |
78 | 'language' => '', | ||
79 | ]; | 78 | ]; |
80 | } | 79 | } |
81 | fclose($handle); | 80 | fclose($handle); |
diff --git a/src/Wallabag/ImportBundle/Import/PinboardImport.php b/src/Wallabag/ImportBundle/Import/PinboardImport.php index 9bcfbc36..d9865534 100644 --- a/src/Wallabag/ImportBundle/Import/PinboardImport.php +++ b/src/Wallabag/ImportBundle/Import/PinboardImport.php | |||
@@ -98,8 +98,6 @@ class PinboardImport extends AbstractImport | |||
98 | $data = [ | 98 | $data = [ |
99 | 'title' => $importedEntry['description'], | 99 | 'title' => $importedEntry['description'], |
100 | 'url' => $importedEntry['href'], | 100 | 'url' => $importedEntry['href'], |
101 | 'content_type' => '', | ||
102 | 'language' => '', | ||
103 | 'is_archived' => ('no' === $importedEntry['toread']) || $this->markAsRead, | 101 | 'is_archived' => ('no' === $importedEntry['toread']) || $this->markAsRead, |
104 | 'is_starred' => false, | 102 | 'is_starred' => false, |
105 | 'created_at' => $importedEntry['time'], | 103 | 'created_at' => $importedEntry['time'], |
diff --git a/src/Wallabag/ImportBundle/Import/ReadabilityImport.php b/src/Wallabag/ImportBundle/Import/ReadabilityImport.php index b8c0f777..de320d23 100644 --- a/src/Wallabag/ImportBundle/Import/ReadabilityImport.php +++ b/src/Wallabag/ImportBundle/Import/ReadabilityImport.php | |||
@@ -98,11 +98,10 @@ class ReadabilityImport extends AbstractImport | |||
98 | $data = [ | 98 | $data = [ |
99 | 'title' => $importedEntry['article__title'], | 99 | 'title' => $importedEntry['article__title'], |
100 | 'url' => $importedEntry['article__url'], | 100 | 'url' => $importedEntry['article__url'], |
101 | 'content_type' => '', | ||
102 | 'language' => '', | ||
103 | 'is_archived' => $importedEntry['archive'] || $this->markAsRead, | 101 | 'is_archived' => $importedEntry['archive'] || $this->markAsRead, |
104 | 'is_starred' => $importedEntry['favorite'], | 102 | 'is_starred' => $importedEntry['favorite'], |
105 | 'created_at' => $importedEntry['date_added'], | 103 | 'created_at' => $importedEntry['date_added'], |
104 | 'html' => false, | ||
106 | ]; | 105 | ]; |
107 | 106 | ||
108 | $entry = new Entry($this->user); | 107 | $entry = new Entry($this->user); |
diff --git a/src/Wallabag/ImportBundle/Import/WallabagV1Import.php b/src/Wallabag/ImportBundle/Import/WallabagV1Import.php index 4f001062..59e3ce02 100644 --- a/src/Wallabag/ImportBundle/Import/WallabagV1Import.php +++ b/src/Wallabag/ImportBundle/Import/WallabagV1Import.php | |||
@@ -37,8 +37,6 @@ class WallabagV1Import extends WallabagImport | |||
37 | 'title' => $entry['title'], | 37 | 'title' => $entry['title'], |
38 | 'html' => $entry['content'], | 38 | 'html' => $entry['content'], |
39 | 'url' => $entry['url'], | 39 | 'url' => $entry['url'], |
40 | 'content_type' => '', | ||
41 | 'language' => '', | ||
42 | 'is_archived' => $entry['is_read'] || $this->markAsRead, | 40 | 'is_archived' => $entry['is_read'] || $this->markAsRead, |
43 | 'is_starred' => $entry['is_fav'], | 41 | 'is_starred' => $entry['is_fav'], |
44 | 'tags' => '', | 42 | 'tags' => '', |
diff --git a/src/Wallabag/ImportBundle/Import/WallabagV2Import.php b/src/Wallabag/ImportBundle/Import/WallabagV2Import.php index 37c8ca14..d2a89d79 100644 --- a/src/Wallabag/ImportBundle/Import/WallabagV2Import.php +++ b/src/Wallabag/ImportBundle/Import/WallabagV2Import.php | |||
@@ -36,7 +36,8 @@ class WallabagV2Import extends WallabagImport | |||
36 | return [ | 36 | return [ |
37 | 'html' => $entry['content'], | 37 | 'html' => $entry['content'], |
38 | 'content_type' => $entry['mimetype'], | 38 | 'content_type' => $entry['mimetype'], |
39 | 'is_archived' => ($entry['is_archived'] || $this->markAsRead), | 39 | 'is_archived' => (int) ($entry['is_archived'] || $this->markAsRead), |
40 | 'is_starred' => false, | ||
40 | ] + $entry; | 41 | ] + $entry; |
41 | } | 42 | } |
42 | 43 | ||
diff --git a/src/Wallabag/ImportBundle/Resources/views/Import/index.html.twig b/src/Wallabag/ImportBundle/Resources/views/Import/index.html.twig index b1ec40a6..b79a1470 100644 --- a/src/Wallabag/ImportBundle/Resources/views/Import/index.html.twig +++ b/src/Wallabag/ImportBundle/Resources/views/Import/index.html.twig | |||
@@ -2,6 +2,12 @@ | |||
2 | 2 | ||
3 | {% block title %}{{ 'import.page_title'|trans }}{% endblock %} | 3 | {% block title %}{{ 'import.page_title'|trans }}{% endblock %} |
4 | 4 | ||
5 | {% block messages %} | ||
6 | {{ render(controller("WallabagImportBundle:Import:checkQueue")) }} | ||
7 | |||
8 | {{ parent() }} | ||
9 | {% endblock %} | ||
10 | |||
5 | {% block content %} | 11 | {% block content %} |
6 | <div class="row"> | 12 | <div class="row"> |
7 | <div class="col s12"> | 13 | <div class="col s12"> |
diff --git a/src/Wallabag/UserBundle/EventListener/CreateConfigListener.php b/src/Wallabag/UserBundle/EventListener/CreateConfigListener.php index 8e2f04e9..0bdd1cae 100644 --- a/src/Wallabag/UserBundle/EventListener/CreateConfigListener.php +++ b/src/Wallabag/UserBundle/EventListener/CreateConfigListener.php | |||
@@ -21,8 +21,10 @@ class CreateConfigListener implements EventSubscriberInterface | |||
21 | private $rssLimit; | 21 | private $rssLimit; |
22 | private $language; | 22 | private $language; |
23 | private $readingSpeed; | 23 | private $readingSpeed; |
24 | private $actionMarkAsRead; | ||
25 | private $listMode; | ||
24 | 26 | ||
25 | public function __construct(EntityManager $em, $theme, $itemsOnPage, $rssLimit, $language, $readingSpeed) | 27 | public function __construct(EntityManager $em, $theme, $itemsOnPage, $rssLimit, $language, $readingSpeed, $actionMarkAsRead, $listMode) |
26 | { | 28 | { |
27 | $this->em = $em; | 29 | $this->em = $em; |
28 | $this->theme = $theme; | 30 | $this->theme = $theme; |
@@ -30,6 +32,8 @@ class CreateConfigListener implements EventSubscriberInterface | |||
30 | $this->rssLimit = $rssLimit; | 32 | $this->rssLimit = $rssLimit; |
31 | $this->language = $language; | 33 | $this->language = $language; |
32 | $this->readingSpeed = $readingSpeed; | 34 | $this->readingSpeed = $readingSpeed; |
35 | $this->actionMarkAsRead = $actionMarkAsRead; | ||
36 | $this->listMode = $listMode; | ||
33 | } | 37 | } |
34 | 38 | ||
35 | public static function getSubscribedEvents() | 39 | public static function getSubscribedEvents() |
@@ -51,6 +55,8 @@ class CreateConfigListener implements EventSubscriberInterface | |||
51 | $config->setRssLimit($this->rssLimit); | 55 | $config->setRssLimit($this->rssLimit); |
52 | $config->setLanguage($this->language); | 56 | $config->setLanguage($this->language); |
53 | $config->setReadingSpeed($this->readingSpeed); | 57 | $config->setReadingSpeed($this->readingSpeed); |
58 | $config->setActionMarkAsRead($this->actionMarkAsRead); | ||
59 | $config->setListMode($this->listMode); | ||
54 | 60 | ||
55 | $this->em->persist($config); | 61 | $this->em->persist($config); |
56 | $this->em->flush(); | 62 | $this->em->flush(); |
diff --git a/src/Wallabag/UserBundle/Resources/config/services.yml b/src/Wallabag/UserBundle/Resources/config/services.yml index 164a25ec..72f6f12c 100644 --- a/src/Wallabag/UserBundle/Resources/config/services.yml +++ b/src/Wallabag/UserBundle/Resources/config/services.yml | |||
@@ -31,5 +31,7 @@ services: | |||
31 | - "%wallabag_core.rss_limit%" | 31 | - "%wallabag_core.rss_limit%" |
32 | - "%wallabag_core.language%" | 32 | - "%wallabag_core.language%" |
33 | - "%wallabag_core.reading_speed%" | 33 | - "%wallabag_core.reading_speed%" |
34 | - "%wallabag_core.action_mark_as_read%" | ||
35 | - "%wallabag_core.list_mode%" | ||
34 | tags: | 36 | tags: |
35 | - { name: kernel.event_subscriber } | 37 | - { name: kernel.event_subscriber } |
diff --git a/src/Wallabag/UserBundle/Resources/translations/wallabag_user.de.yml b/src/Wallabag/UserBundle/Resources/translations/wallabag_user.de.yml new file mode 100644 index 00000000..4efaaab4 --- /dev/null +++ b/src/Wallabag/UserBundle/Resources/translations/wallabag_user.de.yml | |||
@@ -0,0 +1,11 @@ | |||
1 | # Two factor mail | ||
2 | auth_code: | ||
3 | on: 'an' | ||
4 | mailer: | ||
5 | subject: 'wallabag Authentifizierungcode' | ||
6 | body: | ||
7 | hello: "Hi %user%," | ||
8 | first_para: "da du die Zwei-Faktor-Authentifizierung in deinem wallabag Konto aktiviert hast, und du dich gerade von einem neuen Gerät (Computer, Handy, etc.) anmeldest, senden wir dir einen Code, um deinen Zugriff zu prüfen." | ||
9 | second_para: "Hier ist der Code:" | ||
10 | support: "Bitte zögere nicht, Kontakt mit uns aufzunehmen falls du ein Problem hast:" | ||
11 | signature: "Das wallabag Team" | ||
diff --git a/src/Wallabag/UserBundle/Resources/translations/wallabag_user.en.yml b/src/Wallabag/UserBundle/Resources/translations/wallabag_user.en.yml index 85f2ea9c..ee0a27d5 100644 --- a/src/Wallabag/UserBundle/Resources/translations/wallabag_user.en.yml +++ b/src/Wallabag/UserBundle/Resources/translations/wallabag_user.en.yml | |||
@@ -2,7 +2,7 @@ | |||
2 | auth_code: | 2 | auth_code: |
3 | on: 'on' | 3 | on: 'on' |
4 | mailer: | 4 | mailer: |
5 | subject: 'Wallabag authentication Code' | 5 | subject: 'wallabag authentication code' |
6 | body: | 6 | body: |
7 | hello: "Hi %user%," | 7 | hello: "Hi %user%," |
8 | first_para: "Since you enable two factor authentication on your wallabag account and you just logged in from a new device (computer, phone, etc.), we send you a code to validate your connection." | 8 | first_para: "Since you enable two factor authentication on your wallabag account and you just logged in from a new device (computer, phone, etc.), we send you a code to validate your connection." |
diff --git a/src/Wallabag/UserBundle/Resources/views/TwoFactor/email_auth_code.html.twig b/src/Wallabag/UserBundle/Resources/views/TwoFactor/email_auth_code.html.twig index 3731f13b..5d1f22b7 100644 --- a/src/Wallabag/UserBundle/Resources/views/TwoFactor/email_auth_code.html.twig +++ b/src/Wallabag/UserBundle/Resources/views/TwoFactor/email_auth_code.html.twig | |||
@@ -74,7 +74,7 @@ | |||
74 | 74 | ||
75 | <table cellpadding="0" cellspacing="0" border="0" align="center" id="card"> | 75 | <table cellpadding="0" cellspacing="0" border="0" align="center" id="card"> |
76 | <tr> | 76 | <tr> |
77 | <td style="padding: 20px;" width="96px" valign="top"><img class="image_fix" src="{{ asset('bundles/wallabagcore/themes/material/img/logo-other_themes.png') }}" alt="logo" title="{{ wallabag_url }}" style="width: 96px; height: 96px;" /></td> | 77 | <td style="padding: 20px;" width="96px" valign="top"><img class="image_fix" src="{{ absolute_url(asset('bundles/wallabagcore/themes/_global/img/logo-other_themes.png')) }}" alt="logo" title="{{ wallabag_url }}" style="width: 96px; height: 96px;" /></td> |
78 | <td style="padding: 20px; padding-left: 0;" valign="top" id="cell_desc"> | 78 | <td style="padding: 20px; padding-left: 0;" valign="top" id="cell_desc"> |
79 | <h1>wallabag</h1> | 79 | <h1>wallabag</h1> |
80 | <h5>{{ "auth_code.on"|trans({}, 'wallabag_user') }} {{ wallabag_url }}</h5> | 80 | <h5>{{ "auth_code.on"|trans({}, 'wallabag_user') }} {{ wallabag_url }}</h5> |