]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Merge pull request #3024 from wallabag/store-date
authorNicolas Lœuillet <nicolas@loeuillet.org>
Tue, 18 Apr 2017 11:12:28 +0000 (13:12 +0200)
committerGitHub <noreply@github.com>
Tue, 18 Apr 2017 11:12:28 +0000 (13:12 +0200)
Added publication date and author

19 files changed:
app/DoctrineMigrations/Version20170407200919.php [new file with mode: 0644]
composer.json
src/Wallabag/CoreBundle/Entity/Entry.php
src/Wallabag/CoreBundle/Form/Type/EditEntryType.php
src/Wallabag/CoreBundle/Helper/DownloadImages.php
src/Wallabag/CoreBundle/Helper/EntriesExport.php
src/Wallabag/CoreBundle/Resources/translations/messages.da.yml
src/Wallabag/CoreBundle/Resources/translations/messages.de.yml
src/Wallabag/CoreBundle/Resources/translations/messages.en.yml
src/Wallabag/CoreBundle/Resources/translations/messages.es.yml
src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml
src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml
src/Wallabag/CoreBundle/Resources/translations/messages.it.yml
src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml
src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml
src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml
src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml
src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml
src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/edit.html.twig

diff --git a/app/DoctrineMigrations/Version20170407200919.php b/app/DoctrineMigrations/Version20170407200919.php
new file mode 100644 (file)
index 0000000..4b9d475
--- /dev/null
@@ -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]);
+    }
+}
index ed0e30c19b7486ea24c9a570cf535be0bac9b813..5f9e6c1d2756f3bdf3dfa9924f9e7d66e45c09a3 100644 (file)
@@ -65,7 +65,7 @@
         "liip/theme-bundle": "~1.1",
         "lexik/form-filter-bundle": "~5.0",
         "j0k3r/graby": "~1.0",
-        "friendsofsymfony/user-bundle": "2.0.x-dev",
+        "friendsofsymfony/user-bundle": "^2.0",
         "friendsofsymfony/oauth-server-bundle": "^1.5",
         "stof/doctrine-extensions-bundle": "^1.2",
         "scheb/two-factor-bundle": "~2.0",
index 8d385eb470b8e9174a1a58adbccfa8b43461a172..b71c467cf6ba3942812e670510cccbe00fd14b6f 100644 (file)
@@ -192,15 +192,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
      *
@@ -549,22 +540,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>
      */
index 40e5b5b9a2cd88e120cd32a96cf0ddbb71208a08..1627cc445e60035047fa9d1926a1e0866750e3e2 100644 (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,
index c83f96187f8a2c9b01479ae2a15cc34467065231..0d330d2a315c5f01d9d1d11022cde49c7f29ae86 100644 (file)
@@ -144,6 +144,8 @@ class DownloadImages
                 $this->logger->debug('DownloadImages: Re-creating jpg');
                 break;
             case 'png':
+                imagealphablending($im, false);
+                imagesavealpha($im, true);
                 imagepng($im, $localPath, ceil(self::REGENERATE_PICTURES_QUALITY / 100 * 9));
                 $this->logger->debug('DownloadImages: Re-creating png');
         }
index 93c01fcb4a634127f1bb198c7db67bbf9d13ff6a..3d36a4c89e40c91c3ae635c5c8aad1d5641ea835 100644 (file)
@@ -148,8 +148,6 @@ class EntriesExport
             $book->setCoverImage('Cover.png', file_get_contents($this->logoPath), 'image/png');
         }
 
-        $book->addChapter('Notices', 'Cover2.html', $content_start.$this->getExportInformation('PHPePub').$bookEnd);
-
         $book->buildTOC();
 
         /*
@@ -170,6 +168,8 @@ class EntriesExport
             $book->addChapter($entry->getTitle(), htmlspecialchars($filename).'.html', $chapter, true, EPub::EXTERNAL_REF_ADD);
         }
 
+        $book->addChapter('Notices', 'Cover2.html', $content_start.$this->getExportInformation('PHPePub').$bookEnd);
+
         return Response::create(
             $book->getBook(),
             200,
index 3e841a18b1529ee14891662f5036cafffe096972..72493fe39d41f09c762d5dc29f9b1b84a3ecdcb4 100644 (file)
@@ -237,7 +237,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>"
index 3358b5d35224026cf64a67d25384b1d92c0a7b76..dbad8b16fabbf5edf596940aecc449fbdb70afce 100644 (file)
@@ -237,7 +237,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"
index 30f443504371ffc617aaa138f23bd75d56439811..7da9fe6b7cec186f73de9530596712f98ecd3544 100644 (file)
@@ -237,7 +237,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>"
index 363c94fb1d7a57f0270837727561484d4a080b73..6e21614e25cd7623f31f5fc54d6dfb2c5e4625fc 100644 (file)
@@ -237,7 +237,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>"
index 972c2a5d5e4957646def926e134eb28faaf0b6d6..b938c80aa7ad713f4963205d6e17ec04e83996ef 100644 (file)
@@ -237,7 +237,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>"
index 04b1eeefe65b9e1ee370bfc73b5f400aa66adaa4..9abcda45cf9ba1ceab87c99a4eb567e85a1714aa 100644 (file)
@@ -237,7 +237,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>"
index 7f6787c9028cc5d79ca28b13388175ca0c3ecf68..58d0962a0bc326cc2c6fb2de08aeb1cd0786b362 100644 (file)
@@ -237,7 +237,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>"
index 5a760b878e623c579f34db39cc332ad3a764c588..825a0efd14e862b57629c47823fc1ded816237f2 100644 (file)
@@ -237,7 +237,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>"
index b2df8a0a672050398654e6cf33b1bccfe3dd9be6..b02aa4ec491bea5a211b790890795392893a111b 100644 (file)
@@ -237,7 +237,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>"
index fb8c4d2940ccdb4b8b06dfe000d71bade7039e6d..8aa7e5af87a0657e1bc92f0e15b95bc31fe2c03e 100644 (file)
@@ -237,7 +237,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>"
index d702159abfa5aa2e7ca9777f60e8e5686e2ebcff..ce8d8d52109c1e895de68f44461c7e179e0316ae 100644 (file)
@@ -237,7 +237,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>"
index 6525afacb1c48361a6707f0afb0a8eaafebc0523..d890360862119681ca26058b1c78f9eba0641ee3 100644 (file)
@@ -237,7 +237,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>"
index 1c5e2aab55db0df0e4b414d47e21a5e1e0097bbd..b95379758dc5de2cb15bf7e0d4ebd66cd9e7db10 100644 (file)
                             {{ 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'}}) }}