diff --git a/app/DoctrineMigrations/Version20160410190541.php b/app/DoctrineMigrations/Version20160410190541.php new file mode 100644 index 000000000..b30a898c4 --- /dev/null +++ b/app/DoctrineMigrations/Version20160410190541.php @@ -0,0 +1,26 @@ +addSql('ALTER TABLE wallabag_entry ADD uuid LONGTEXT DEFAULT NULL'); + $this->addSql('UPDATE wallabag_entry SET uuid = uuid()'); + } + + /** + * @param Schema $schema + */ + public function down(Schema $schema) + { + $this->addSql('ALTER TABLE `wallabag_entry` DROP uuid'); + } +} diff --git a/src/Wallabag/CoreBundle/Command/InstallCommand.php b/src/Wallabag/CoreBundle/Command/InstallCommand.php index e134ced52..143def4f1 100644 --- a/src/Wallabag/CoreBundle/Command/InstallCommand.php +++ b/src/Wallabag/CoreBundle/Command/InstallCommand.php @@ -241,6 +241,11 @@ class InstallCommand extends ContainerAwareCommand $em->createQuery('DELETE FROM CraueConfigBundle:Setting')->execute(); $settings = [ + [ + 'name' => 'share_public', + 'value' => '1', + 'section' => 'entry', + ], [ 'name' => 'carrot', 'value' => '1', diff --git a/src/Wallabag/CoreBundle/Controller/EntryController.php b/src/Wallabag/CoreBundle/Controller/EntryController.php index a78dd00cf..e3b4b1eb6 100644 --- a/src/Wallabag/CoreBundle/Controller/EntryController.php +++ b/src/Wallabag/CoreBundle/Controller/EntryController.php @@ -451,10 +451,9 @@ class EntryController extends Controller private function checkIfEntryAlreadyExists(Entry $entry) { return $this->get('wallabag_core.entry_repository')->findByUrlAndUserId($entry->getUrl(), $this->getUser()->getId()); - } - /* + /** * Share entry content. * * @param Entry $entry @@ -463,7 +462,7 @@ class EntryController extends Controller * * @return \Symfony\Component\HttpFoundation\Response */ - public function shareEntry(Entry $entry) + public function shareEntryAction(Entry $entry) { return $this->render( '@WallabagCore/themes/share.html.twig', diff --git a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php index 090587961..b4309304e 100644 --- a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php +++ b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php @@ -15,6 +15,11 @@ class LoadSettingData extends AbstractFixture implements OrderedFixtureInterface public function load(ObjectManager $manager) { $settings = [ + [ + 'name' => 'share_public', + 'value' => '1', + 'section' => 'entry', + ], [ 'name' => 'carrot', 'value' => '1', diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig index ce47a6771..61b871f05 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig @@ -17,6 +17,9 @@
  • {{ 'entry.view.left_menu.set_as_starred'|trans }}
  • {{ 'entry.view.left_menu.add_a_tag'|trans }}
  • {{ 'entry.view.left_menu.delete'|trans }}
  • + {% if craue_setting('share_public') %} +
  • public
  • + {% endif %} {% if craue_setting('share_twitter') %}
  • Tweet
  • {% endif %} {% if craue_setting('share_mail') %}
  • Email
  • {% endif %} {% if craue_setting('share_shaarli') %}
  • shaarli
  • {% endif %} 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 b634dd40b..d05bdd085 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 @@ -99,7 +99,7 @@