Commit graph

69 commits

Author SHA1 Message Date
Yassine Guedidi 7ebc96f3b9 Remove session-based redirection 2023-12-28 21:42:26 +01:00
Yassine Guedidi f4493f7472 Remove support for fallback in Redirect helper 2023-12-28 21:42:12 +01:00
Simounet a46fd5fc9f
Fix deprecated null parameter passed to explode() 2023-09-26 18:02:46 +02:00
Michael Ciociola e90daf0690
Update TagController.php 2023-08-06 20:20:35 +00:00
Michael Ciociola ced2ea4015
Merge branch 'master' into feat_referer_to_session_redirect 2023-08-06 20:14:44 +00:00
Nicolas Lœuillet 28db6c22eb
Fix duplicate tags creation when assigning search results to tag
Fixes #6330
2023-06-17 15:19:59 +02:00
Nicolas Lœuillet 96cf34f730 Added flash message when we try to add to much tags 2023-06-13 13:06:35 +02:00
Jeremy Benoist 66b7bdd07c
Merge remote-tracking branch 'origin/2.5.x' 2023-04-24 14:36:32 +02:00
Jeremy Benoist 242e3feac9
Fix adding tag to entries from other people
I've also limited tag length to 20 chars (and limit adding more than 5 tags at once)
2023-02-07 21:25:57 +01:00
Michael Ciociola 97fee36fa6
Update src/Wallabag/CoreBundle/Controller/TagController.php
Co-authored-by: Jérémy Benoist <j0k3r@users.noreply.github.com>
2022-12-23 11:03:25 -06:00
Jeremy Benoist 0a6e6abdc4
Add RabbitMQConsumerTotalProxy to lazy RabbitMQ services for messages
This is just a simple proxy because we can't lazy load RabbitMQ service just to count number of messages in the queue.
As they are automatically injected in the controller now, we can't lazy load them.

Also forgot to use `AbstractController` in previous PR about _controller as a service_.
2022-12-19 13:23:56 +01:00
Jeremy Benoist 6aca334d53
Move to controller as a service
Mostly using autowiring to inject deps.
The only tricky part was for import because all producer use the same class and have a different alias. So we must write them down in the service definition, autowiring doesn't work in that case.

Usually:
- if a controller has a constructor, it means injected services are at least re-used once in actions
- otherwise, service are injected per action
2022-12-19 10:38:08 +01:00
Michael Ciociola 13bd448e01 feat: use session instead of referer for redirects 2022-12-04 16:20:11 -06:00
Jeremy Benoist b7dba18cb2
Cleanup 2022-11-23 15:51:33 +01:00
Yassine Guedidi d1d56fbe25 Import used classes 2022-09-01 19:21:45 +02:00
Yassine Guedidi eb43c78720 Use FQCN instead of service alias 2022-09-01 09:07:19 +02:00
Yassine Guedidi 9549a90e76 Migrate first level template references to new notation 2022-08-25 21:09:26 +02:00
Yassine Guedidi 0f9c359476 Use FQCN as service name for repositories 2022-08-24 23:24:25 +02:00
Yassine Guedidi 844e8e9d22 Use FQCN as service name for helper services 2022-08-24 23:24:24 +02:00
Nicolas Lœuillet 086b3dda88
Fixed cs 2022-06-15 16:18:12 +02:00
Nicolas Lœuillet 4feca1ccd5
Added tag deletion from tags list
Fixed #2952
2022-06-15 16:18:11 +02:00
Jeremy Benoist 9f6414785c
Fix tests 2022-04-20 23:13:17 +02:00
Nicolas Lœuillet 5077c46e4e
Added action to tag search results 2022-04-20 22:57:25 +02:00
Kevin Decherf 48f9a9632d TagController: support merging labels when renaming one with label of another
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
2020-04-18 18:12:33 +02:00
Kevin Decherf a19caf8a37 TagController: prevent tag deletion when renaming a tag with the same label
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
2020-04-18 18:09:07 +02:00
Kevin Decherf 39133eb796 TagController: fix duplicated tags when renaming them
The fix relies on a workaround available on TagsAssigner, see the
AssignTagsToEntry() signature for detail.

I replaced the findOneByLabel in the corresponding test to assert that
there is no duplicate.

Fixes #4216

Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
2020-04-18 18:09:07 +02:00
Jeremy Benoist 8d4ed0df06
Update deps
Also CS (because cs-fixer got an update)

Package operations: 0 installs, 26 updates, 0 removals
  - Updating twig/twig (v2.12.1 => v2.12.2)
  - Updating symfony/symfony (v3.4.33 => v3.4.34)
  - Updating doctrine/event-manager (v1.0.0 => 1.1.0)
  - Updating doctrine/collections (v1.6.2 => 1.6.3)
  - Updating doctrine/cache (v1.8.1 => 1.9.0)
  - Updating doctrine/persistence (1.1.1 => 1.2.0)
  - Updating doctrine/inflector (v1.3.0 => 1.3.1)
  - Updating symfony/mime (v4.3.5 => v4.3.7)
  - Updating swiftmailer/swiftmailer (v6.2.1 => v6.2.3)
  - Updating symfony/swiftmailer-bundle (v3.3.0 => v3.3.1)
  - Updating doctrine/dbal (v2.9.2 => v2.9.3)
  - Updating doctrine/instantiator (1.2.0 => 1.3.0)
  - Updating j0k3r/graby-site-config (1.0.93 => 1.0.94)
  - Updating phpoption/phpoption (1.5.0 => 1.5.2)
  - Updating symfony/http-client-contracts (v1.1.7 => v1.1.8)
  - Updating symfony/http-client (v4.3.5 => v4.3.7)
  - Updating sensiolabs/security-checker (v6.0.2 => v6.0.3)
  - Updating paragonie/constant_time_encoding (v2.2.3 => v2.3.0)
  - Updating scheb/two-factor-bundle (v4.7.1 => v4.8.0)
  - Updating symfony/phpunit-bridge (v4.3.6 => v4.3.7)
  - Updating composer/xdebug-handler (1.3.3 => 1.4.0)
  - Updating friendsofphp/php-cs-fixer (v2.15.3 => v2.16.0)
  - Updating doctrine/data-fixtures (v1.3.2 => 1.3.3)
  - Updating nette/schema (v1.0.0 => v1.0.1)
  - Updating nikic/php-parser (v4.2.4 => v4.3.0)
  - Updating sentry/sentry (2.2.2 => 2.2.4)
2019-11-12 14:18:58 +01:00
Jeremy Benoist 35c7819cb6
Remove link when there are no untagged articles 2019-06-06 13:34:20 +02:00
Jeremy Benoist 0f2d24feb4
Fix typo & CS 2019-06-05 17:09:05 +02:00
Kevin Decherf ad51743e8b
Show untagged entries count on tag list
Closes #3235

Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
2019-06-05 17:03:51 +02:00
Jérémy Benoist e673b54f70
Merge pull request #3574 from shulard/feature/rename-tags
Allow to rename tags from the web interface.
2018-10-15 08:32:59 +00:00
Jeremy Benoist 115de64e5b
Jump to Symfony 3.4
Thanks to the BC compatibility, almost nothing have to be changed.
All changes are related to new bundle version of:
- SensioFrameworkExtraBundle
- DoctrineFixturesBundle
2018-10-04 14:11:57 +02:00
Stéphane HULARD b846c1e4d0
Add RenameForm as tag list view parameters.
This will help handling the CSRF protection token and use symfony HTML generation layer.
Also a FormView instance is generated for each tag because we need to render a form for each tag and FormView are not reusable.
2018-09-25 10:18:08 +02:00
Stéphane HULARD be326a22f9
Create a new Tag action to rename tags.
The current tag is removed from all the current logged user entries. Then the new one is created and attached.
2018-09-25 10:18:08 +02:00
Kevin Decherf 2a1ceb67b4 php-cs-fixer
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
2018-09-05 14:25:32 +02:00
Jeremy Benoist 3ef055ced3
CS 2017-10-09 16:47:15 +02:00
Nicolas Hart 935e9fffb4 Reduce number of queries on tag list 2017-08-06 23:02:32 +02:00
Jeremy Benoist f808b01692
Add a real configuration for CS-Fixer 2017-07-01 09:52:38 +02:00
Thomas Citharel bd40f1af88
Add all entries RSS feed and put links on tag page itself and baggy too
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2017-06-21 12:02:04 +02:00
Jeremy Benoist 25203e5081
User existing service instead of getDoctrine 2017-06-21 11:44:35 +02:00
Jeremy Benoist 53da8ad844
Page parameter was never used in the function
It could have been used if we set the current page inside PreparePagerForEntries.
But we did that in each controller because we can have an OutOfRangeCurrentPageException
2017-06-01 09:29:18 +02:00
Kevin Decherf 5dbf3f2326 TagController: ignore ActionMarkAsRead when removing tag from entry
Fixes #2835

Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
2017-05-31 00:36:46 +02:00
Thomas Citharel 6bc6fb1f60 Move Tags assigner to a separate file
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2017-05-27 22:08:14 +02:00
Nicolas Lœuillet c8de7ab94c
Fixed export by tags with a tag which contains space 2016-12-27 21:26:53 +01:00
Jeremy Benoist 21e7ccef3d
Fix tests & deprecation notice 2016-12-15 21:38:16 +01:00
Jeremy Benoist 5a619812ca
Merge remote-tracking branch 'origin/master' into 2.2 2016-11-03 16:41:29 +01:00
Nicolas Lœuillet 7a5043f187
Added tag label in the page title
Fix #2472
2016-10-26 13:53:23 +02:00
Jeremy Benoist b0de88f75d
Use statements & update translation 2016-10-22 13:13:07 +02:00
Jeremy Benoist 28bb48905a
Optimize the way tag list is rendered
Instead of retrieve all informations about entries of a tag to just count them, we’ll count them before with a fastest query.

Also change the layout of the tag list in material design
2016-10-09 18:55:22 +02:00
Jeremy Benoist ac8cf632bb
Ensure orphan tag are remove in API
When the association between a tag and an entry is removed, if the tag doesn’t have other entries, we can remove it.

Also add more tests for that part and ensure TagControllerTest is isolated from the rest of the test suite (finally!)
2016-10-07 23:31:53 +02:00