Merge pull request #3030 from wallabag/remove-isPublic-from-entry

Remove isPublic from Entry entity fix #2598
This commit is contained in:
Jérémy Benoist 2017-04-14 14:56:26 +02:00 committed by GitHub
commit 531828ca44
30 changed files with 65 additions and 61 deletions

View file

@ -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
{

View file

@ -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
{

View file

@ -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
{

View file

@ -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
{

View file

@ -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
{

View file

@ -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
{

View file

@ -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
{

View file

@ -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
{

View file

@ -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
{

View file

@ -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
{

View file

@ -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
{

View file

@ -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
{

View file

@ -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
{

View file

@ -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
{

View file

@ -0,0 +1,51 @@
<?php
namespace Application\Migrations;
use Doctrine\DBAL\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
* Remove isPublic in Entry Table.
*/
class Version20170407200919 extends AbstractMigration implements ContainerAwareInterface
{
/**
* @var ContainerInterface
*/
private $container;
public function setContainer(ContainerInterface $container = null)
{
$this->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]);
}
}

View file

@ -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<Tag>
*/

View file

@ -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,

View file

@ -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 <a href=%wallabag_instance%'>wallabag</a>"

View file

@ -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 <a href='%wallabag_instance%'>wallabag</a> geteilt"

View file

@ -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 <a href='%wallabag_instance%'>wallabag</a>"

View file

@ -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 <a href='%wallabag_instance%'>wallabag</a>"

View file

@ -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 <a href='%wallabag_instance%'>wallabag</a>"

View file

@ -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 <a href=\"%wallabag_instance%\">wallabag</a>"

View file

@ -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 <a href='%wallabag_instance%'>wallabag</a>"

View file

@ -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 <a href='%wallabag_instance%'>wallabag</a>"

View file

@ -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 <a href='%wallabag_instance%'>wallabag</a>"

View file

@ -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 <a href='%wallabag_instance%'>wallabag</a>"

View file

@ -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 <a href='%wallabag_instance%'>wallabag</a>"

View file

@ -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 <a href='%wallabag_instance%'>wallabag</a>"

View file

@ -27,11 +27,6 @@
{{ form_label(form.url) }}
{{ form_widget(form.url) }}
</div>
<div class="input-field s12">
{{ form_widget(form.is_public) }}
{{ form_label(form.is_public) }}
</div>
<br>
{{ form_widget(form.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }}