diff --git a/app/DoctrineMigrations/Version20160410190541.php b/app/DoctrineMigrations/Version20160410190541.php index 6294d8420..5e5cae35c 100644 --- a/app/DoctrineMigrations/Version20160410190541.php +++ b/app/DoctrineMigrations/Version20160410190541.php @@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** - * Added foreign keys for account resetting + * Added foreign keys for account resetting. */ class Version20160410190541 extends AbstractMigration implements ContainerAwareInterface { diff --git a/app/DoctrineMigrations/Version20160812120952.php b/app/DoctrineMigrations/Version20160812120952.php index bd6e8d636..132722670 100644 --- a/app/DoctrineMigrations/Version20160812120952.php +++ b/app/DoctrineMigrations/Version20160812120952.php @@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** - * Added name field on wallabag_oauth2_clients + * Added name field on wallabag_oauth2_clients. */ class Version20160812120952 extends AbstractMigration implements ContainerAwareInterface { diff --git a/app/DoctrineMigrations/Version20160911214952.php b/app/DoctrineMigrations/Version20160911214952.php index edef81ed5..4eae46e70 100644 --- a/app/DoctrineMigrations/Version20160911214952.php +++ b/app/DoctrineMigrations/Version20160911214952.php @@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** - * Added settings for RabbitMQ and Redis imports + * Added settings for RabbitMQ and Redis imports. */ class Version20160911214952 extends AbstractMigration implements ContainerAwareInterface { diff --git a/app/DoctrineMigrations/Version20160916201049.php b/app/DoctrineMigrations/Version20160916201049.php index 9f8e77e73..ff34c8944 100644 --- a/app/DoctrineMigrations/Version20160916201049.php +++ b/app/DoctrineMigrations/Version20160916201049.php @@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** - * Added pocket_consumer_key field on wallabag_config + * Added pocket_consumer_key field on wallabag_config. */ class Version20160916201049 extends AbstractMigration implements ContainerAwareInterface { diff --git a/app/DoctrineMigrations/Version20161001072726.php b/app/DoctrineMigrations/Version20161001072726.php index f247c236f..ad761541c 100644 --- a/app/DoctrineMigrations/Version20161001072726.php +++ b/app/DoctrineMigrations/Version20161001072726.php @@ -9,7 +9,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface; use Doctrine\DBAL\Migrations\SkipMigrationException; /** - * Added pocket_consumer_key field on wallabag_config + * Added pocket_consumer_key field on wallabag_config. */ class Version20161001072726 extends AbstractMigration implements ContainerAwareInterface { diff --git a/app/DoctrineMigrations/Version20161022134138.php b/app/DoctrineMigrations/Version20161022134138.php index c71166a00..39949e7d5 100644 --- a/app/DoctrineMigrations/Version20161022134138.php +++ b/app/DoctrineMigrations/Version20161022134138.php @@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** - * Converted database to utf8mb4 encoding (for MySQL only) + * Converted database to utf8mb4 encoding (for MySQL only). */ class Version20161022134138 extends AbstractMigration implements ContainerAwareInterface { diff --git a/app/DoctrineMigrations/Version20161024212538.php b/app/DoctrineMigrations/Version20161024212538.php index ecb872d10..b2f6aaf86 100644 --- a/app/DoctrineMigrations/Version20161024212538.php +++ b/app/DoctrineMigrations/Version20161024212538.php @@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** - * Added user_id column on oauth2_clients to prevent users to delete API clients from other users + * Added user_id column on oauth2_clients to prevent users to delete API clients from other users. */ class Version20161024212538 extends AbstractMigration implements ContainerAwareInterface { diff --git a/app/DoctrineMigrations/Version20161031132655.php b/app/DoctrineMigrations/Version20161031132655.php index 83b97ca99..ef8464126 100644 --- a/app/DoctrineMigrations/Version20161031132655.php +++ b/app/DoctrineMigrations/Version20161031132655.php @@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** - * Added the internal setting to enable/disable downloading pictures + * Added the internal setting to enable/disable downloading pictures. */ class Version20161031132655 extends AbstractMigration implements ContainerAwareInterface { diff --git a/app/DoctrineMigrations/Version20161104073720.php b/app/DoctrineMigrations/Version20161104073720.php index fb8f5fa1e..0e05f02eb 100644 --- a/app/DoctrineMigrations/Version20161104073720.php +++ b/app/DoctrineMigrations/Version20161104073720.php @@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** - * Added created_at index on entry table + * Added created_at index on entry table. */ class Version20161104073720 extends AbstractMigration implements ContainerAwareInterface { diff --git a/app/DoctrineMigrations/Version20161106113822.php b/app/DoctrineMigrations/Version20161106113822.php index de3702a40..facc14f4a 100644 --- a/app/DoctrineMigrations/Version20161106113822.php +++ b/app/DoctrineMigrations/Version20161106113822.php @@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** - * Added action_mark_as_read field on config table + * Added action_mark_as_read field on config table. */ class Version20161106113822 extends AbstractMigration implements ContainerAwareInterface { diff --git a/app/DoctrineMigrations/Version20161117071626.php b/app/DoctrineMigrations/Version20161117071626.php index 8daa2142b..e779eacfb 100644 --- a/app/DoctrineMigrations/Version20161117071626.php +++ b/app/DoctrineMigrations/Version20161117071626.php @@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** - * Added the internal setting to share articles to unmark.it + * Added the internal setting to share articles to unmark.it. */ class Version20161117071626 extends AbstractMigration implements ContainerAwareInterface { diff --git a/app/DoctrineMigrations/Version20161214094402.php b/app/DoctrineMigrations/Version20161214094402.php index db125f763..8ca32b099 100644 --- a/app/DoctrineMigrations/Version20161214094402.php +++ b/app/DoctrineMigrations/Version20161214094402.php @@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** - * Renamed uuid to uid in entry table + * Renamed uuid to uid in entry table. */ class Version20161214094402 extends AbstractMigration implements ContainerAwareInterface { diff --git a/app/DoctrineMigrations/Version20161214094403.php b/app/DoctrineMigrations/Version20161214094403.php index 5948b5fa5..c7326f957 100644 --- a/app/DoctrineMigrations/Version20161214094403.php +++ b/app/DoctrineMigrations/Version20161214094403.php @@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** - * Added index on wallabag_entry.uid + * Added index on wallabag_entry.uid. */ class Version20161214094403 extends AbstractMigration implements ContainerAwareInterface { diff --git a/app/DoctrineMigrations/Version20170127093841.php b/app/DoctrineMigrations/Version20170127093841.php index 20c79479b..5bfd96702 100644 --- a/app/DoctrineMigrations/Version20170127093841.php +++ b/app/DoctrineMigrations/Version20170127093841.php @@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** - * Added indexes on wallabag_entry.is_starred and wallabag_entry.is_archived + * Added indexes on wallabag_entry.is_starred and wallabag_entry.is_archived. */ class Version20170127093841 extends AbstractMigration implements ContainerAwareInterface { diff --git a/app/DoctrineMigrations/Version20170407200919.php b/app/DoctrineMigrations/Version20170407200919.php new file mode 100644 index 000000000..4b9d475ac --- /dev/null +++ b/app/DoctrineMigrations/Version20170407200919.php @@ -0,0 +1,51 @@ +container = $container; + } + + private function getTable($tableName) + { + return $this->container->getParameter('database_table_prefix').$tableName; + } + + /** + * @param Schema $schema + */ + public function up(Schema $schema) + { + $entryTable = $schema->getTable($this->getTable('entry')); + $this->skipIf(!$entryTable->hasColumn('is_public'), 'It seems that you already played this migration.'); + + $entryTable->dropColumn('is_public'); + } + + /** + * @param Schema $schema + */ + public function down(Schema $schema) + { + $entryTable = $schema->getTable($this->getTable('entry')); + $this->skipIf($entryTable->hasColumn('is_public'), 'It seems that you already played this migration.'); + + $entryTable->addColumn('is_public', 'boolean', ['notnull' => false, 'default' => 0]); + } +} diff --git a/src/Wallabag/CoreBundle/Entity/Entry.php b/src/Wallabag/CoreBundle/Entity/Entry.php index 7276b437c..bbb1fb533 100644 --- a/src/Wallabag/CoreBundle/Entity/Entry.php +++ b/src/Wallabag/CoreBundle/Entity/Entry.php @@ -174,15 +174,6 @@ class Entry */ private $previewPicture; - /** - * @var bool - * - * @ORM\Column(name="is_public", type="boolean", nullable=true, options={"default" = false}) - * - * @Groups({"export_all"}) - */ - private $isPublic; - /** * @var string * @@ -531,22 +522,6 @@ class Entry $this->domainName = $domainName; } - /** - * @return bool - */ - public function isPublic() - { - return $this->isPublic; - } - - /** - * @param bool $isPublic - */ - public function setIsPublic($isPublic) - { - $this->isPublic = $isPublic; - } - /** * @return ArrayCollection */ diff --git a/src/Wallabag/CoreBundle/Form/Type/EditEntryType.php b/src/Wallabag/CoreBundle/Form/Type/EditEntryType.php index 40e5b5b9a..1627cc445 100644 --- a/src/Wallabag/CoreBundle/Form/Type/EditEntryType.php +++ b/src/Wallabag/CoreBundle/Form/Type/EditEntryType.php @@ -3,7 +3,6 @@ namespace Wallabag\CoreBundle\Form\Type; use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\Extension\Core\Type\CheckboxType; use Symfony\Component\Form\Extension\Core\Type\SubmitType; use Symfony\Component\Form\Extension\Core\Type\TextType; use Symfony\Component\Form\FormBuilderInterface; @@ -18,10 +17,6 @@ class EditEntryType extends AbstractType 'required' => true, 'label' => 'entry.edit.title_label', ]) - ->add('is_public', CheckboxType::class, [ - 'required' => false, - 'label' => 'entry.edit.is_public_label', - ]) ->add('url', TextType::class, [ 'disabled' => true, 'required' => false, diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml index dfac7a65a..ff89a6d1f 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml @@ -235,7 +235,6 @@ entry: # page_title: 'Edit an entry' # title_label: 'Title' url_label: 'Url' - # is_public_label: 'Public' save_label: 'Gem' public: # shared_by_wallabag: "This article has been shared by wallabag" diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml index 0b9df325b..99b15b0d5 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml @@ -235,7 +235,6 @@ entry: page_title: 'Eintrag bearbeiten' title_label: 'Titel' url_label: 'URL' - is_public_label: 'Öffentlich' save_label: 'Speichern' public: shared_by_wallabag: "Dieser Artikel wurde mittels wallabag geteilt" diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml index 2fa3192ed..273ba25da 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml @@ -235,7 +235,6 @@ entry: page_title: 'Edit an entry' title_label: 'Title' url_label: 'Url' - is_public_label: 'Public' save_label: 'Save' public: shared_by_wallabag: "This article has been shared by wallabag" diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml index ce581d899..87c6954ff 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml @@ -235,7 +235,6 @@ entry: page_title: 'Editar un artículo' title_label: 'Título' url_label: 'URL' - is_public_label: 'Es público' save_label: 'Guardar' public: shared_by_wallabag: "Este artículo se ha compartido con wallabag" diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml index 3e3ee12c3..caafd6d79 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml @@ -235,7 +235,6 @@ entry: page_title: 'ویرایش مقاله' title_label: 'عنوان' url_label: 'نشانی' - is_public_label: 'عمومی' save_label: 'ذخیره' public: # shared_by_wallabag: "This article has been shared by wallabag" diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml index 074593a6f..72366513b 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml @@ -235,7 +235,6 @@ entry: page_title: "Éditer un article" title_label: "Titre" url_label: "Adresse" - is_public_label: "Public" save_label: "Enregistrer" public: shared_by_wallabag: "Cet article a été partagé par wallabag" diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml index 0d86756ab..52f05b870 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml @@ -235,7 +235,6 @@ entry: page_title: 'Modifica voce' title_label: 'Titolo' url_label: 'Url' - is_public_label: 'Pubblico' save_label: 'Salva' public: # shared_by_wallabag: "This article has been shared by wallabag" diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml index d2949c503..c8b0e7839 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml @@ -235,7 +235,6 @@ entry: page_title: 'Modificar un article' title_label: 'Títol' url_label: 'Url' - is_public_label: 'Public' save_label: 'Enregistrar' public: shared_by_wallabag: "Aqueste article es estat partejat per wallabag" diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml index 1f512942b..e586ea845 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml @@ -235,7 +235,6 @@ entry: page_title: 'Edytuj wpis' title_label: 'Tytuł' url_label: 'Adres URL' - is_public_label: 'Publiczny' save_label: 'Zapisz' public: shared_by_wallabag: "Ten artykuł został udostępniony przez wallabag" diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml index 2e8152304..09ddd7f8a 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml @@ -235,7 +235,6 @@ entry: page_title: 'Editar uma entrada' title_label: 'Título' url_label: 'Url' - is_public_label: 'Público' save_label: 'Salvar' public: shared_by_wallabag: "Este artigo foi compartilhado pelo wallabag" diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml index 16401efd1..cdd0be9fa 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml @@ -235,7 +235,6 @@ entry: # page_title: 'Edit an entry' # title_label: 'Title' url_label: 'Url' - # is_public_label: 'Public' save_label: 'Salvează' public: # shared_by_wallabag: "This article has been shared by wallabag" diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml index a4bf7dfe2..ae05e036b 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml @@ -235,7 +235,6 @@ entry: page_title: 'Makaleyi düzenle' title_label: 'Başlık' url_label: 'Url' - is_public_label: 'Herkes tarafından erişime açık olsun mu?' save_label: 'Kaydet' public: # shared_by_wallabag: "This article has been shared by wallabag" diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/edit.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/edit.html.twig index 1c5e2aab5..b95379758 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/edit.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/edit.html.twig @@ -27,11 +27,6 @@ {{ form_label(form.url) }} {{ form_widget(form.url) }} - -
- {{ form_widget(form.is_public) }} - {{ form_label(form.is_public) }} -

{{ form_widget(form.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }}