From f400aa1281c27b9af43770af1e53832b14d40abf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Allan=20Nordh=C3=B8y?= Date: Sun, 25 Mar 2018 04:31:22 +0200 Subject: GitHub, Log out, of the dev --- src/Wallabag/CoreBundle/Resources/translations/messages.en.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Wallabag') diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml index 0a65ce9f..88517c82 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml @@ -265,7 +265,7 @@ about: who_behind_wallabag: developped_by: 'Developed by' website: 'website' - many_contributors: 'And many others contributors ♥ on Github' + many_contributors: 'And many others contributors ♥ on GitHub' project_website: 'Project website' license: 'License' version: 'Version' @@ -323,7 +323,7 @@ howto: go_import: Go to import go_developers: Go to developers go_howto: Go to howto (this page!) - go_logout: Logout + go_logout: Log out list_title: Shortcuts available in listing pages search: Display the search form article_title: Shortcuts available in entry view @@ -373,7 +373,7 @@ quickstart: instapaper: 'Migrate from Instapaper' developer: title: 'Developers' - description: 'We also thought to the developers: Docker, API, translations, etc.' + description: 'We also thought of the developers: Docker, API, translations, etc.' create_application: 'Create your third-party application' use_docker: 'Use Docker to install wallabag' docs: -- cgit v1.2.3 From 609adaca9b29fd6938cd718f2b36b5bdd5ae6b96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Quent=C3=AD?= <33203663+Quenty31@users.noreply.github.com> Date: Sat, 5 May 2018 21:13:55 +0200 Subject: Update messages.oc.yml --- src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/Wallabag') diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml index 6130eee2..95bc9560 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml @@ -234,7 +234,7 @@ entry: created_at: 'Data de creacion' published_at: 'Data de publicacion' published_by: 'Publicat per' - # provided_by: 'Provided by' + provided_by: 'Provesit per' new: page_title: 'Enregistrar un novèl article' placeholder: 'http://website.com' @@ -246,7 +246,7 @@ entry: page_title: 'Modificar un article' title_label: 'Títol' url_label: 'Url' - # origin_url_label: 'Origin url (from where you found that entry)' + origin_url_label: 'Url d’origina (ont avètz trobat aqueste article)' save_label: 'Enregistrar' public: shared_by_wallabag: "Aqueste article es estat partejat per wallabag" @@ -400,8 +400,8 @@ tag: add: 'Ajustar' placeholder: "Podètz ajustar mai qu'una etiqueta, separadas per de virgula." -# export: -# footer_template: '

Produced by wallabag with %method%

Please open an issue if you have trouble with the display of this E-Book on your device.

' +export: + footer_template: '

Produch per wallabag amb %method%

Mercés de dobrir una sollicitacion s’avètz de problèmas amb l’afichatge d’aqueste E-Book sus vòstre periferic.

' import: page_title: 'Importar' -- cgit v1.2.3 From 7c3184376cafa4134e83e67ef881cb050b72a43b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Quent=C3=AD?= <33203663+Quenty31@users.noreply.github.com> Date: Sat, 5 May 2018 21:15:01 +0200 Subject: Update wallabag_user.oc.yml Mens dialectal, mai estandard --- src/Wallabag/UserBundle/Resources/translations/wallabag_user.oc.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Wallabag') diff --git a/src/Wallabag/UserBundle/Resources/translations/wallabag_user.oc.yml b/src/Wallabag/UserBundle/Resources/translations/wallabag_user.oc.yml index e62ea2bc..c7f6efbf 100644 --- a/src/Wallabag/UserBundle/Resources/translations/wallabag_user.oc.yml +++ b/src/Wallabag/UserBundle/Resources/translations/wallabag_user.oc.yml @@ -5,7 +5,7 @@ auth_code: subject: "Còdi d'autentificacion wallabag" body: hello: "Bonjorn %user%," - first_para: "Estant qu'avètz activat l'autentificacion en dos temps sus vòstre compte wallabag e que venètz de vos connectar dempuèi un novèl periferic (ordinador, mobil, etc.) vos mandem un còdi per validar la connexion." + first_para: "Estant qu'avètz activat l'autentificacion en dos temps sus vòstre compte wallabag e que venètz de vos connectar d’un novèl periferic (ordinador, mobil, etc.) vos mandem un còdi per validar la connexion." second_para: "Vaquí lo còdi per dintrar : " support: "S'avètz un problèma de connexion, dobtetz pas a contactar l'assisténcia : " signature: "La còla de wallabag" -- cgit v1.2.3 From 65f499b4acd0677430750f86805a277b3b9f790b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Quent=C3=AD?= <33203663+Quenty31@users.noreply.github.com> Date: Sun, 6 May 2018 12:36:55 +0200 Subject: Update wallabag_user.oc.yml --- src/Wallabag/UserBundle/Resources/translations/wallabag_user.oc.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Wallabag') diff --git a/src/Wallabag/UserBundle/Resources/translations/wallabag_user.oc.yml b/src/Wallabag/UserBundle/Resources/translations/wallabag_user.oc.yml index c7f6efbf..6277dc73 100644 --- a/src/Wallabag/UserBundle/Resources/translations/wallabag_user.oc.yml +++ b/src/Wallabag/UserBundle/Resources/translations/wallabag_user.oc.yml @@ -5,7 +5,7 @@ auth_code: subject: "Còdi d'autentificacion wallabag" body: hello: "Bonjorn %user%," - first_para: "Estant qu'avètz activat l'autentificacion en dos temps sus vòstre compte wallabag e que venètz de vos connectar d’un novèl periferic (ordinador, mobil, etc.) vos mandem un còdi per validar la connexion." + first_para: "Estant qu'avètz activat l'autentificacion en dos temps sus vòstre compte wallabag e que venètz de vos connectar d'un novèl periferic (ordinador, mobil, etc.) vos mandem un còdi per validar la connexion." second_para: "Vaquí lo còdi per dintrar : " support: "S'avètz un problèma de connexion, dobtetz pas a contactar l'assisténcia : " signature: "La còla de wallabag" -- cgit v1.2.3 From c15bb5ad72b1a9692682cf88318a70b7e650d34a Mon Sep 17 00:00:00 2001 From: Simounet Date: Thu, 31 May 2018 23:42:06 +0200 Subject: Fix srcset attribute on images downloaded --- src/Wallabag/CoreBundle/Helper/DownloadImages.php | 36 +++++++++++++++++++++-- 1 file changed, 33 insertions(+), 3 deletions(-) (limited to 'src/Wallabag') diff --git a/src/Wallabag/CoreBundle/Helper/DownloadImages.php b/src/Wallabag/CoreBundle/Helper/DownloadImages.php index 252ba57c..9c9452dd 100644 --- a/src/Wallabag/CoreBundle/Helper/DownloadImages.php +++ b/src/Wallabag/CoreBundle/Helper/DownloadImages.php @@ -42,14 +42,17 @@ class DownloadImages public function processHtml($entryId, $html, $url) { $crawler = new Crawler($html); - $result = $crawler - ->filterXpath('//img') + $imagesCrawler = $crawler + ->filterXpath('//img'); + $imagesUrls = $imagesCrawler ->extract(['src']); + $imagesSrcsetUrls = $this->getSrcsetUrls($imagesCrawler); + $imagesUrls = array_unique(array_merge($imagesUrls, $imagesSrcsetUrls)); $relativePath = $this->getRelativePath($entryId); // download and save the image to the folder - foreach ($result as $image) { + foreach ($imagesUrls as $image) { $imagePath = $this->processSingleImage($entryId, $image, $url, $relativePath); if (false === $imagePath) { @@ -171,6 +174,33 @@ class DownloadImages @rmdir($folderPath); } + /** + * Get images urls from the srcset image attribute. + * + * @param Crawler $imagesCrawler + * + * @return array An array of urls + */ + protected function getSrcsetUrls(Crawler $imagesCrawler) + { + $urls = []; + $iterator = $imagesCrawler + ->getIterator(); + while ($iterator->valid()) { + $srcsetAttribute = $iterator->current()->getAttribute('srcset'); + if ('' !== $srcsetAttribute) { + $srcset = array_map('trim', explode(',', $srcsetAttribute)); + $srcsetUrls = array_map(function ($src) { + return explode(' ', $src)[0]; + }, $srcset); + $urls = array_merge($srcsetUrls, $urls); + } + $iterator->next(); + } + + return $urls; + } + /** * Setup base folder where all images are going to be saved. */ -- cgit v1.2.3 From 03f2cacb58167c33212bba1267b9cf848edab29e Mon Sep 17 00:00:00 2001 From: Simounet Date: Mon, 4 Jun 2018 12:04:37 +0200 Subject: Fix authors and preview alt encoding display --- .../CoreBundle/Resources/views/themes/material/Entry/entry.html.twig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Wallabag') 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 0d05f4d5..7484d53b 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 @@ -245,7 +245,7 @@
  • person {% for author in entry.publishedBy %} - {{ author }}{% if not loop.last %}, {% endif %} + {{ author|raw }}{% if not loop.last %}, {% endif %} {% endfor %}
  • {% endif %} @@ -276,7 +276,7 @@ {% if entry.previewPicture is not null %} -
    {{ entry.title|striptags|e('html_attr') }}
    +
    {{ entry.title|striptags|default('entry.default_title'|trans)|raw }}
    {% endif %} -- cgit v1.2.3 From 778543311f5efde4c99321f257c5a9c34a7dea5f Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Wed, 6 Jun 2018 17:34:20 +0200 Subject: Fix tests --- src/Wallabag/CoreBundle/Controller/RssController.php | 1 - 1 file changed, 1 deletion(-) (limited to 'src/Wallabag') diff --git a/src/Wallabag/CoreBundle/Controller/RssController.php b/src/Wallabag/CoreBundle/Controller/RssController.php index e84044b1..848bb814 100644 --- a/src/Wallabag/CoreBundle/Controller/RssController.php +++ b/src/Wallabag/CoreBundle/Controller/RssController.php @@ -12,7 +12,6 @@ use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Routing\Generator\UrlGeneratorInterface; -use Wallabag\CoreBundle\Entity\Entry; use Wallabag\CoreBundle\Entity\Tag; use Wallabag\UserBundle\Entity\User; -- cgit v1.2.3 From bfe7a692261760517199a3797191fd214fc2ee6c Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Thu, 14 Jun 2018 13:43:09 +0200 Subject: Fixed migrations with dash into db name --- .../CoreBundle/Doctrine/WallabagMigration.php | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 src/Wallabag/CoreBundle/Doctrine/WallabagMigration.php (limited to 'src/Wallabag') diff --git a/src/Wallabag/CoreBundle/Doctrine/WallabagMigration.php b/src/Wallabag/CoreBundle/Doctrine/WallabagMigration.php new file mode 100644 index 00000000..eb5ae407 --- /dev/null +++ b/src/Wallabag/CoreBundle/Doctrine/WallabagMigration.php @@ -0,0 +1,43 @@ +container = $container; + } + + protected function getTable($tableName) + { + $table = $this->container->getParameter('database_table_prefix') . $tableName; + + // escape table name is handled using " on postgresql + if ('postgresql' === $this->connection->getDatabasePlatform()->getName()) { + return '"' . $table . '"'; + } + + // return escaped table + return '`' . $table . '`'; + } +} -- cgit v1.2.3 From 49b4c875985c7b001af711079662dd3684373229 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Thu, 14 Jun 2018 14:15:07 +0200 Subject: We should able to get the table name unescaped When we want to perform complex queries to retrieve metadata from the database --- src/Wallabag/CoreBundle/Doctrine/WallabagMigration.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/Wallabag') diff --git a/src/Wallabag/CoreBundle/Doctrine/WallabagMigration.php b/src/Wallabag/CoreBundle/Doctrine/WallabagMigration.php index eb5ae407..7aa2409a 100644 --- a/src/Wallabag/CoreBundle/Doctrine/WallabagMigration.php +++ b/src/Wallabag/CoreBundle/Doctrine/WallabagMigration.php @@ -9,6 +9,8 @@ use Symfony\Component\DependencyInjection\ContainerInterface; abstract class WallabagMigration extends AbstractMigration implements ContainerAwareInterface { + const UN_ESCAPED_TABLE = true; + /** * @var ContainerInterface */ @@ -28,10 +30,14 @@ abstract class WallabagMigration extends AbstractMigration implements ContainerA $this->container = $container; } - protected function getTable($tableName) + protected function getTable($tableName, $unEscaped = false) { $table = $this->container->getParameter('database_table_prefix') . $tableName; + if (self::UN_ESCAPED_TABLE === $unEscaped) { + return $table; + } + // escape table name is handled using " on postgresql if ('postgresql' === $this->connection->getDatabasePlatform()->getName()) { return '"' . $table . '"'; -- cgit v1.2.3