From fb9f100e8f4f3288b87536faff4b59cacc7b1efb Mon Sep 17 00:00:00 2001 From: FrenchHope Date: Sun, 19 Mar 2017 09:40:31 +0100 Subject: Scuttle sharing --- src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/Wallabag/CoreBundle/DataFixtures') diff --git a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php index a723656e..52941a64 100644 --- a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php +++ b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php @@ -50,11 +50,21 @@ class LoadSettingData extends AbstractFixture implements OrderedFixtureInterface 'value' => '1', 'section' => 'entry', ], + [ + 'name' => 'share_scuttle', + 'value' => '1', + 'section' => 'entry', + ], [ 'name' => 'shaarli_url', 'value' => 'http://myshaarli.com', 'section' => 'entry', ], + [ + 'name' => 'scuttle_url', + 'value' => 'http://scuttle.org', + 'section' => 'entry', + ], [ 'name' => 'share_mail', 'value' => '1', -- cgit v1.2.3 From b5a5377af12048e05269fc490e588c1b777cde13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Mon, 27 Mar 2017 22:13:13 +0200 Subject: Added migration for Scuttle sharing --- src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Wallabag/CoreBundle/DataFixtures') diff --git a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php index 52941a64..aaeb9ee9 100644 --- a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php +++ b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php @@ -54,7 +54,7 @@ class LoadSettingData extends AbstractFixture implements OrderedFixtureInterface 'name' => 'share_scuttle', 'value' => '1', 'section' => 'entry', - ], + ], [ 'name' => 'shaarli_url', 'value' => 'http://myshaarli.com', @@ -64,7 +64,7 @@ class LoadSettingData extends AbstractFixture implements OrderedFixtureInterface 'name' => 'scuttle_url', 'value' => 'http://scuttle.org', 'section' => 'entry', - ], + ], [ 'name' => 'share_mail', 'value' => '1', -- cgit v1.2.3 From fdd725f58cfe96d9bb9454d0347f6ff847fce69d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Thu, 20 Apr 2017 14:58:20 +0200 Subject: Added notmatches operator for tagging rule --- src/Wallabag/CoreBundle/DataFixtures/ORM/LoadTaggingRuleData.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/Wallabag/CoreBundle/DataFixtures') diff --git a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadTaggingRuleData.php b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadTaggingRuleData.php index 7efe6356..55abd63c 100644 --- a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadTaggingRuleData.php +++ b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadTaggingRuleData.php @@ -36,6 +36,13 @@ class LoadTaggingRuleData extends AbstractFixture implements OrderedFixtureInter $manager->persist($tr3); + $tr4 = new TaggingRule(); + $tr4->setRule('content notmatches "basket"'); + $tr4->setTags(['foot']); + $tr4->setConfig($this->getReference('admin-config')); + + $manager->persist($tr4); + $manager->flush(); } -- cgit v1.2.3 From 426bb453d295900fb3e35dce2f9081a42639cf27 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Fri, 2 Jun 2017 10:19:33 +0200 Subject: API user creation behing a toggle I've added a toggle feature (in internal settings) so that user api creation can be disabled while form registration still can be enabled. Also, the /api/user endpoint shouldn't require authentication. Even if we check the authentication when sending a GET request, to retrieve current user information. I've moved all the internal settings definition to config to avoid duplicated place to define them. I don't know why we didn't did that earlier. --- .../DataFixtures/ORM/LoadSettingData.php | 174 ++------------------- 1 file changed, 14 insertions(+), 160 deletions(-) (limited to 'src/Wallabag/CoreBundle/DataFixtures') diff --git a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php index aaeb9ee9..a52288e6 100644 --- a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php +++ b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php @@ -6,173 +6,27 @@ use Doctrine\Common\DataFixtures\AbstractFixture; use Doctrine\Common\DataFixtures\OrderedFixtureInterface; use Doctrine\Common\Persistence\ObjectManager; use Craue\ConfigBundle\Entity\Setting; +use Symfony\Component\DependencyInjection\ContainerAwareInterface; +use Symfony\Component\DependencyInjection\ContainerInterface; -class LoadSettingData extends AbstractFixture implements OrderedFixtureInterface +class LoadSettingData extends AbstractFixture implements OrderedFixtureInterface, ContainerAwareInterface { + /** + * @var ContainerInterface + */ + private $container; + + public function setContainer(ContainerInterface $container = null) + { + $this->container = $container; + } + /** * {@inheritdoc} */ public function load(ObjectManager $manager) { - $settings = [ - [ - 'name' => 'share_public', - 'value' => '1', - 'section' => 'entry', - ], - [ - 'name' => 'carrot', - 'value' => '1', - 'section' => 'entry', - ], - [ - 'name' => 'share_diaspora', - 'value' => '1', - 'section' => 'entry', - ], - [ - 'name' => 'diaspora_url', - 'value' => 'http://diasporapod.com', - 'section' => 'entry', - ], - [ - 'name' => 'share_unmark', - 'value' => '1', - 'section' => 'entry', - ], - [ - 'name' => 'unmark_url', - 'value' => 'https://unmark.it', - 'section' => 'entry', - ], - [ - 'name' => 'share_shaarli', - 'value' => '1', - 'section' => 'entry', - ], - [ - 'name' => 'share_scuttle', - 'value' => '1', - 'section' => 'entry', - ], - [ - 'name' => 'shaarli_url', - 'value' => 'http://myshaarli.com', - 'section' => 'entry', - ], - [ - 'name' => 'scuttle_url', - 'value' => 'http://scuttle.org', - 'section' => 'entry', - ], - [ - 'name' => 'share_mail', - 'value' => '1', - 'section' => 'entry', - ], - [ - 'name' => 'share_twitter', - 'value' => '1', - 'section' => 'entry', - ], - [ - 'name' => 'export_epub', - 'value' => '1', - 'section' => 'export', - ], - [ - 'name' => 'export_mobi', - 'value' => '1', - 'section' => 'export', - ], - [ - 'name' => 'export_pdf', - 'value' => '1', - 'section' => 'export', - ], - [ - 'name' => 'export_csv', - 'value' => '1', - 'section' => 'export', - ], - [ - 'name' => 'export_json', - 'value' => '1', - 'section' => 'export', - ], - [ - 'name' => 'export_txt', - 'value' => '1', - 'section' => 'export', - ], - [ - 'name' => 'export_xml', - 'value' => '1', - 'section' => 'export', - ], - [ - 'name' => 'import_with_redis', - 'value' => '0', - 'section' => 'import', - ], - [ - 'name' => 'import_with_rabbitmq', - 'value' => '0', - 'section' => 'import', - ], - [ - 'name' => 'show_printlink', - 'value' => '1', - 'section' => 'entry', - ], - [ - 'name' => 'wallabag_support_url', - 'value' => 'https://www.wallabag.org/pages/support.html', - 'section' => 'misc', - ], - [ - 'name' => 'wallabag_url', - 'value' => 'http://v2.wallabag.org', - 'section' => 'misc', - ], - [ - 'name' => 'piwik_enabled', - 'value' => '0', - 'section' => 'analytics', - ], - [ - 'name' => 'piwik_host', - 'value' => 'v2.wallabag.org', - 'section' => 'analytics', - ], - [ - 'name' => 'piwik_site_id', - 'value' => '1', - 'section' => 'analytics', - ], - [ - 'name' => 'demo_mode_enabled', - 'value' => '0', - 'section' => 'misc', - ], - [ - 'name' => 'demo_mode_username', - 'value' => 'wallabag', - 'section' => 'misc', - ], - [ - 'name' => 'download_images_enabled', - 'value' => '0', - 'section' => 'misc', - ], - [ - 'name' => 'restricted_access', - 'value' => '0', - 'section' => 'entry', - ], - ]; - - foreach ($settings as $setting) { + foreach ($this->container->getParameter('wallabag_core.default_internal_settings') as $setting) { $newSetting = new Setting(); $newSetting->setName($setting['name']); $newSetting->setValue($setting['value']); -- cgit v1.2.3 From b8427f22f06cab58383ec3080f09715c712c65ef Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Mon, 1 May 2017 22:13:35 +0200 Subject: Add menu access to site credentials CRUD --- .../DataFixtures/ORM/LoadSiteCredentialData.php | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSiteCredentialData.php (limited to 'src/Wallabag/CoreBundle/DataFixtures') diff --git a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSiteCredentialData.php b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSiteCredentialData.php new file mode 100644 index 00000000..866f55a4 --- /dev/null +++ b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSiteCredentialData.php @@ -0,0 +1,34 @@ +getReference('admin-user')); + $credential->setHost('example.com'); + $credential->setUsername('foo'); + $credential->setPassword('bar'); + + $manager->persist($credential); + + $manager->flush(); + } + + /** + * {@inheritdoc} + */ + public function getOrder() + { + return 50; + } +} -- cgit v1.2.3 From f808b01692a835673f328d7221ba8c212caa9b61 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Sat, 1 Jul 2017 09:52:38 +0200 Subject: Add a real configuration for CS-Fixer --- src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Wallabag/CoreBundle/DataFixtures') diff --git a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php index a52288e6..3fe88e7f 100644 --- a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php +++ b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php @@ -2,10 +2,10 @@ namespace Wallabag\CoreBundle\DataFixtures\ORM; +use Craue\ConfigBundle\Entity\Setting; use Doctrine\Common\DataFixtures\AbstractFixture; use Doctrine\Common\DataFixtures\OrderedFixtureInterface; use Doctrine\Common\Persistence\ObjectManager; -use Craue\ConfigBundle\Entity\Setting; use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerInterface; -- cgit v1.2.3 From 7c04b7396a296e31bb11beadc19550396ee728a8 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Thu, 3 Aug 2017 12:46:20 +0200 Subject: Multiple tag search was broken from API First, the setParameter() were done on the same parameter which in fact just duplicated the condition in the SQL query (like `where t.label = 'test' and t.label = 'test'`. Changed the parameter doesn't help because the query was then wrong. Changing the way to match associated tags for an entry and it worked. --- src/Wallabag/CoreBundle/DataFixtures/ORM/LoadTagData.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/Wallabag/CoreBundle/DataFixtures') diff --git a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadTagData.php b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadTagData.php index 6de561e0..0ecfd18b 100644 --- a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadTagData.php +++ b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadTagData.php @@ -19,7 +19,7 @@ class LoadTagData extends AbstractFixture implements OrderedFixtureInterface $manager->persist($tag1); - $this->addReference('foo-tag', $tag1); + $this->addReference('foo-bar-tag', $tag1); $tag2 = new Tag(); $tag2->setLabel('bar'); @@ -35,6 +35,13 @@ class LoadTagData extends AbstractFixture implements OrderedFixtureInterface $this->addReference('baz-tag', $tag3); + $tag4 = new Tag(); + $tag4->setLabel('foo'); + + $manager->persist($tag4); + + $this->addReference('foo-tag', $tag4); + $manager->flush(); } -- cgit v1.2.3