From 8a21985474c2daae9f84ac52463fe7d297aae3ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Mon, 20 Nov 2017 17:39:14 +0100 Subject: Added internal setting to enable/disable headers storage --- app/DoctrineMigrations/Version20171120163128.php | 52 ++++++++++++++++++++++ .../translations/CraueConfigBundle.da.yml | 3 ++ .../translations/CraueConfigBundle.de.yml | 3 ++ .../translations/CraueConfigBundle.en.yml | 3 ++ .../translations/CraueConfigBundle.es.yml | 3 ++ .../translations/CraueConfigBundle.fa.yml | 3 ++ .../translations/CraueConfigBundle.fr.yml | 3 ++ .../translations/CraueConfigBundle.it.yml | 3 ++ .../translations/CraueConfigBundle.oc.yml | 3 ++ .../translations/CraueConfigBundle.pl.yml | 2 + .../translations/CraueConfigBundle.pt.yml | 3 ++ .../translations/CraueConfigBundle.ro.yml | 3 ++ .../translations/CraueConfigBundle.ru.yml | 4 ++ .../translations/CraueConfigBundle.tr.yml | 3 ++ app/config/wallabag.yml | 4 ++ 15 files changed, 95 insertions(+) create mode 100644 app/DoctrineMigrations/Version20171120163128.php (limited to 'app') diff --git a/app/DoctrineMigrations/Version20171120163128.php b/app/DoctrineMigrations/Version20171120163128.php new file mode 100644 index 00000000..fc3d4c37 --- /dev/null +++ b/app/DoctrineMigrations/Version20171120163128.php @@ -0,0 +1,52 @@ +container = $container; + } + + /** + * @param Schema $schema + */ + public function up(Schema $schema) + { + $storeArticleHeaders = $this->container + ->get('doctrine.orm.default_entity_manager') + ->getConnection() + ->fetchArray('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'store_article_headers'"); + + $this->skipIf(false !== $storeArticleHeaders, 'It seems that you already played this migration.'); + + $this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('store_article_headers', '0', 'entry')"); + } + + /** + * @param Schema $schema + */ + public function down(Schema $schema) + { + $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'store_article_headers';"); + } + + private function getTable($tableName) + { + return $this->container->getParameter('database_table_prefix') . $tableName; + } +} diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.da.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.da.yml index 5475e571..c3fd843f 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.da.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.da.yml @@ -12,6 +12,8 @@ export_xml: Aktiver eksport til XML # import_with_rabbitmq: Enable RabbitMQ to import data asynchronously # import_with_redis: Enable Redis to import data asynchronously shaarli_url: Shaarli-URL, hvis tjenesten er aktiv +scuttle_url: Scuttle-URL, hvis tjenesten er aktiv +unmark_url: Unmark-URL, hvis tjenesten er aktiv share_diaspora: Aktiver deling til Diaspora share_mail: Aktiver deling med email share_shaarli: Aktiver deling gennem Shaarli @@ -34,3 +36,4 @@ demo_mode_username: "Demobruger" # download_images_enabled: Download images locally # restricted_access: Enable authentication for websites with paywall # api_user_registration: Enable user to be registered using the API +# store_article_headers: Enable if wallabag stores HTTP headers for each article diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.de.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.de.yml index a066c8e3..37da383e 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.de.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.de.yml @@ -12,6 +12,8 @@ export_xml: 'XML-Export aktivieren' import_with_rabbitmq: 'Aktiviere RabbitMQ, um Artikel asynchron zu importieren' import_with_redis: 'Aktiviere Redis, um Artikel asynchron zu importieren' shaarli_url: 'Shaarli-URL, sofern der Service aktiviert ist' +scuttle_url: 'Scuttle-URL, sofern der Service aktiviert ist' +unmark_url: 'Unmark-URL, sofern der Service aktiviert ist' share_diaspora: 'Teilen zu Diaspora aktiveren' share_mail: 'Teilen via E-Mail aktiveren' share_shaarli: 'Teilen zu Shaarli aktiveren' @@ -34,3 +36,4 @@ share_public: 'Erlaube eine öffentliche URL für Einträge' download_images_enabled: 'Bilder lokal herunterladen' restricted_access: 'Authentifizierung für Webseiten mit Paywall aktivieren' api_user_registration: 'Registrierung eines Benutzers über die API ermöglichen' +# store_article_headers: Enable if wallabag stores HTTP headers for each article diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.en.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.en.yml index b53066b1..0a89ce2c 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.en.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.en.yml @@ -12,6 +12,8 @@ export_xml: Enable XML export import_with_rabbitmq: Enable RabbitMQ to import data asynchronously import_with_redis: Enable Redis to import data asynchronously shaarli_url: Shaarli URL, if the service is enabled +scuttle_url: Scuttle URL, if the service is enabled +unmark_url: Unmark URL, if the service is enabled share_diaspora: Enable share to diaspora* share_mail: Enable share by e-mail share_shaarli: Enable sharing to Shaarli @@ -34,3 +36,4 @@ share_public: Allow public URL for entries download_images_enabled: Download images locally restricted_access: Enable authentication for paywalled websites api_user_registration: Enable user to be registered using the API +store_article_headers: Enable if wallabag stores HTTP headers for each article diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.es.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.es.yml index 46ed4040..db5858d6 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.es.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.es.yml @@ -12,6 +12,8 @@ export_xml: Activar exportación a XML import_with_rabbitmq: Activar RabbitMQ para importar datos de forma asíncrona import_with_redis: Activar Redis para importar datos de forma asíncrona shaarli_url: URL de Shaarli, si el servicio está activado +scuttle_url: URL de Scuttle, si el servicio está activado +unmark_url: URL de Unmark, si el servicio está activado share_diaspora: Activar compartir con Diaspora share_mail: Activar compartir con Email share_shaarli: Activar compartir con Shaarli @@ -34,3 +36,4 @@ share_public: Permitir URL pública para los artículos download_images_enabled: Descargar imágenes localmente restricted_access: Activar autenticación para websites con paywall # api_user_registration: Enable user to be registered using the API +# store_article_headers: Enable if wallabag stores HTTP headers for each article diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fa.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fa.yml index f8da4acf..11cc601b 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fa.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fa.yml @@ -12,6 +12,8 @@ export_xml: فعال‌سازی برون‌سپاری به XML # import_with_rabbitmq: Enable RabbitMQ to import data asynchronously # import_with_redis: Enable Redis to import data asynchronously shaarli_url: نشانی Shaarli، اگر فعال بود +scuttle_url: نشانی Scuttle، اگر فعال بود +unmark_url: نشانی Unmark، اگر فعال بود share_diaspora: فعال‌سازی هم‌رسانی به Diaspora share_mail: فعال‌سازی هم‌رسانی با ایمیل share_shaarli: فعال‌سازی هم‌رسانی به Shaarli @@ -34,3 +36,4 @@ modify_settings: "اعمال" # download_images_enabled: Download images locally # restricted_access: Enable authentication for websites with paywall # api_user_registration: Enable user to be registered using the API +# store_article_headers: Enable if wallabag stores HTTP headers for each article diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fr.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fr.yml index a79409b4..f23b5bf9 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fr.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fr.yml @@ -12,6 +12,8 @@ export_xml: Activer l'export XML import_with_rabbitmq: Activer RabbitMQ pour gérer les imports de façon asynchrone import_with_redis: Activer Redis pour gérer les imports de façon asynchrone shaarli_url: URL de Shaarli, si le service Shaarli est activé +scuttle_url: URL de Scuttle, si le service Scuttle est activé +unmark_url: URL de Unmark, si le service Unmark est activé share_diaspora: Activer le partage vers Diaspora share_mail: Activer le partage par email share_shaarli: Activer le partage vers Shaarli @@ -34,3 +36,4 @@ share_public: Autoriser une URL publique pour les articles download_images_enabled: Télécharger les images en local restricted_access: Activer l'authentification pour les articles derrière un paywall api_user_registration: Activer la création de compte depuis l'API +store_article_headers: Activer le stockage des en-têtes HTTP de chaque article diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.it.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.it.yml index dd4def4b..ade6f7da 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.it.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.it.yml @@ -12,6 +12,8 @@ export_xml: Abilita esportazione XML # import_with_rabbitmq: Enable RabbitMQ to import data asynchronously # import_with_redis: Enable Redis to import data asynchronously shaarli_url: Shaarli URL, se il servizio è abilitato +scuttle_url: Scuttle URL, se il servizio è abilitato +unmark_url: Unmark URL, se il servizio è abilitato share_diaspora: Abilita la condivisione con Diaspora share_mail: Abilita la condivisione per email share_shaarli: Abilita la condivisione con Shaarli @@ -34,3 +36,4 @@ demo_mode_username: "Utente Demo" # download_images_enabled: Download images locally # restricted_access: Enable authentication for websites with paywall api_user_registration: Abilita la registrazione dell'utente attraverso l'API +# store_article_headers: Enable if wallabag stores HTTP headers for each article diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.oc.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.oc.yml index fb163ce7..99986642 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.oc.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.oc.yml @@ -12,6 +12,8 @@ export_xml: Activar l'expòrt XML import_with_rabbitmq: Activar RabbitMQ per importar de donadas de manièra asincròna import_with_redis: Activar Redis per importar de donadas de manièra asincròna shaarli_url: URL de Shaarli, se lo servici Shaarli es activat +scuttle_url: URL de Scuttle, se lo servici Scuttle es activat +unmark_url: URL de Unmark, se lo servici Scuttle es activat share_diaspora: Activar lo partatge cap a Diaspora* share_mail: Activar lo partatge per corrièl share_shaarli: Activar lo partatge cap a Shaarli @@ -34,3 +36,4 @@ share_public: Autorizar una URL publica pels articles download_images_enabled: Telecargar los imatges en local restricted_access: Activar l'autenticacion pels sites amb peatge api_user_registration: Autorizar los utilizaires a se marcar amb l'API +# store_article_headers: Enable if wallabag stores HTTP headers for each article diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pl.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pl.yml index 04ad4fd3..8b8f2ebd 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pl.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pl.yml @@ -12,6 +12,7 @@ export_xml: Włącz eksport do XML import_with_rabbitmq: Włącz RabbitMQ dla asynchronicznego importu danych import_with_redis: Włącz Redis dla asynchronicznego importu danych shaarli_url: Adress URL Shaarli, jeżeli usługa jest włączona +scuttle_url: Adress URL Scuttle, jeżeli usługa jest włączona share_diaspora: Włącz udostępnianie dla Diaspora share_mail: Włącz udostępnianie przez email share_shaarli: Włącz udostępnianie dla Shaarli @@ -34,3 +35,4 @@ share_public: Zezwalaj na publiczny adres url dla wpisow download_images_enabled: Pobierz obrazy lokalnie restricted_access: Włącz autoryzację dla stron z paywallem api_user_registration: Włącz rejestrację użytkownika przy użyciu API +# store_article_headers: Enable if wallabag stores HTTP headers for each article diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pt.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pt.yml index 77e22b37..76cb0174 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pt.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pt.yml @@ -12,6 +12,8 @@ export_xml: Habilita exportação para XML # import_with_rabbitmq: Enable RabbitMQ to import data asynchronously # import_with_redis: Enable Redis to import data asynchronously shaarli_url: URL Shaarli, se o serviço está habilitado +scuttle_url: URL Scuttle, se o serviço está habilitado +unmark_url: URL Unmark, se o serviço está habilitado share_diaspora: Habilitar compartilhamento para o Diaspora share_mail: Habilitar compartilhamento por e-mail share_shaarli: Habilitar compartilhamento para o Shaarli @@ -34,3 +36,4 @@ demo_mode_username: "Usuário demo" # download_images_enabled: Download images locally # restricted_access: Enable authentication for websites with paywall # api_user_registration: Enable user to be registered using the API +# store_article_headers: Enable if wallabag stores HTTP headers for each article diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.ro.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.ro.yml index 1b4bfb5b..8300cec8 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.ro.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.ro.yml @@ -12,6 +12,8 @@ export_xml: Permite exportare XML # import_with_rabbitmq: Enable RabbitMQ to import data asynchronously # import_with_redis: Enable Redis to import data asynchronously shaarli_url: Shaarli URL, dacă serviciul este permis +scuttle_url: Scuttle URL, dacă serviciul este permis +unmark_url: Unmark URL, dacă serviciul este permis share_diaspora: Permite share către Diaspora share_mail: Permite share prin email share_shaarli: Permite share către Shaarli @@ -34,3 +36,4 @@ modify_settings: "aplică" # download_images_enabled: Download images locally # restricted_access: Enable authentication for websites with paywall # api_user_registration: Enable user to be registered using the API +# store_article_headers: Enable if wallabag stores HTTP headers for each article diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.ru.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.ru.yml index 37b4bbfd..8fed84ae 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.ru.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.ru.yml @@ -12,6 +12,8 @@ export_xml: "Включить XML экспорт" import_with_rabbitmq: "Включить RabbitMQ для импорта данных(асинхронно)" import_with_redis: "Включить Redis для импорта данных(асинхронно)" shaarli_url: "Shaarli URL, если сервис включен" +scuttle_url: "Scuttle URL, если сервис включен" +unmark_url: "Unmark URL, если сервис включен" share_diaspora: "Включить возможность поделиться в соц.сети Diaspora" share_mail: "Включить возможность поделиться по email" share_shaarli: "Включить возможность поделиться в Shaarli" @@ -33,3 +35,5 @@ demo_mode_username: "Демо пользователь" share_public: "Разрешить публичные ссылки на записи" download_images_enabled: "Скачивать изображения локально" restricted_access: "Включить авторизацию на сайте с помощью paywall" +# api_user_registration: Enable user to be registered using the API +# store_article_headers: Enable if wallabag stores HTTP headers for each article diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.tr.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.tr.yml index 1579366d..b992ccc2 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.tr.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.tr.yml @@ -12,6 +12,8 @@ # import_with_rabbitmq: Enable RabbitMQ to import data asynchronously # import_with_redis: Enable Redis to import data asynchronously # shaarli_url: Shaarli URL, if the service is enabled +# scuttle_url: Scuttle URL, if the service is enabled +# unmark_url: Unmark URL, if the service is enabled # share_diaspora: Enable share to Diaspora # share_mail: Enable share by email # share_shaarli: Enable share to Shaarli @@ -35,3 +37,4 @@ # download_images_enabled: Download images locally # restricted_access: Enable authentication for websites with paywall # api_user_registration: Enable user to be registered using the API +# store_article_headers: Enable if wallabag stores HTTP headers for each article diff --git a/app/config/wallabag.yml b/app/config/wallabag.yml index bbc587b0..7795bae6 100644 --- a/app/config/wallabag.yml +++ b/app/config/wallabag.yml @@ -153,6 +153,10 @@ wallabag_core: name: api_user_registration value: 0 section: api + - + name: store_article_headers + value: 0 + section: entry wallabag_user: registration_enabled: "%fosuser_registration%" -- cgit v1.2.3