diff options
author | Nicolas Lœuillet <nicolas@loeuillet.org> | 2017-11-26 08:58:17 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-26 08:58:17 +0100 |
commit | 1d91f14516e109978f497e9f55d2f87c8268e1d7 (patch) | |
tree | abfab5d6303ca3bb5996e2e98fbfdc6bc804ba45 /app | |
parent | 773ac5b0f7a56ff2527601498b0822d6ef8bfa40 (diff) | |
parent | 893fd6434f11b6a1fef375f19e6ea427402bc605 (diff) | |
download | wallabag-1d91f14516e109978f497e9f55d2f87c8268e1d7.tar.gz wallabag-1d91f14516e109978f497e9f55d2f87c8268e1d7.tar.zst wallabag-1d91f14516e109978f497e9f55d2f87c8268e1d7.zip |
Merge pull request #3436 from wallabag/origin-shaarli
Add craue setting to enable sharing of origin url to Shaarli
Diffstat (limited to 'app')
16 files changed, 70 insertions, 0 deletions
diff --git a/app/DoctrineMigrations/Version20171125164500.php b/app/DoctrineMigrations/Version20171125164500.php new file mode 100644 index 00000000..980e0e75 --- /dev/null +++ b/app/DoctrineMigrations/Version20171125164500.php | |||
@@ -0,0 +1,52 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Application\Migrations; | ||
4 | |||
5 | use Doctrine\DBAL\Migrations\AbstractMigration; | ||
6 | use Doctrine\DBAL\Schema\Schema; | ||
7 | use Symfony\Component\DependencyInjection\ContainerAwareInterface; | ||
8 | use Symfony\Component\DependencyInjection\ContainerInterface; | ||
9 | |||
10 | /** | ||
11 | * Add shaarli_share_origin_url in craue_config_setting. | ||
12 | */ | ||
13 | class Version20171125164500 extends AbstractMigration implements ContainerAwareInterface | ||
14 | { | ||
15 | /** | ||
16 | * @var ContainerInterface | ||
17 | */ | ||
18 | private $container; | ||
19 | |||
20 | public function setContainer(ContainerInterface $container = null) | ||
21 | { | ||
22 | $this->container = $container; | ||
23 | } | ||
24 | |||
25 | /** | ||
26 | * @param Schema $schema | ||
27 | */ | ||
28 | public function up(Schema $schema) | ||
29 | { | ||
30 | $shaarliShareOriginUrl = $this->container | ||
31 | ->get('doctrine.orm.default_entity_manager') | ||
32 | ->getConnection() | ||
33 | ->fetchArray('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'shaarli_share_origin_url'"); | ||
34 | |||
35 | $this->skipIf(false !== $shaarliShareOriginUrl, 'It seems that you already played this migration.'); | ||
36 | |||
37 | $this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('shaarli_share_origin_url', '0', 'entry')"); | ||
38 | } | ||
39 | |||
40 | /** | ||
41 | * @param Schema $schema | ||
42 | */ | ||
43 | public function down(Schema $schema) | ||
44 | { | ||
45 | $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'shaarli_share_origin_url';"); | ||
46 | } | ||
47 | |||
48 | private function getTable($tableName) | ||
49 | { | ||
50 | return $this->container->getParameter('database_table_prefix') . $tableName; | ||
51 | } | ||
52 | } | ||
diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.da.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.da.yml index c3fd843f..6d6a60d6 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.da.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.da.yml | |||
@@ -37,3 +37,4 @@ demo_mode_username: "Demobruger" | |||
37 | # restricted_access: Enable authentication for websites with paywall | 37 | # restricted_access: Enable authentication for websites with paywall |
38 | # api_user_registration: Enable user to be registered using the API | 38 | # api_user_registration: Enable user to be registered using the API |
39 | # store_article_headers: Enable if wallabag stores HTTP headers for each article | 39 | # store_article_headers: Enable if wallabag stores HTTP headers for each article |
40 | # shaarli_share_origin_url: Enable sharing origin url to Shaarli, if the service is enabled | ||
diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.de.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.de.yml index 37da383e..58d024ef 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.de.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.de.yml | |||
@@ -37,3 +37,4 @@ download_images_enabled: 'Bilder lokal herunterladen' | |||
37 | restricted_access: 'Authentifizierung für Webseiten mit Paywall aktivieren' | 37 | restricted_access: 'Authentifizierung für Webseiten mit Paywall aktivieren' |
38 | api_user_registration: 'Registrierung eines Benutzers über die API ermöglichen' | 38 | api_user_registration: 'Registrierung eines Benutzers über die API ermöglichen' |
39 | # store_article_headers: Enable if wallabag stores HTTP headers for each article | 39 | # store_article_headers: Enable if wallabag stores HTTP headers for each article |
40 | # shaarli_share_origin_url: Enable sharing origin url to Shaarli, if the service is enabled | ||
diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.en.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.en.yml index 0a89ce2c..a26e451f 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.en.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.en.yml | |||
@@ -37,3 +37,4 @@ download_images_enabled: Download images locally | |||
37 | restricted_access: Enable authentication for paywalled websites | 37 | restricted_access: Enable authentication for paywalled websites |
38 | api_user_registration: Enable user to be registered using the API | 38 | api_user_registration: Enable user to be registered using the API |
39 | store_article_headers: Enable if wallabag stores HTTP headers for each article | 39 | store_article_headers: Enable if wallabag stores HTTP headers for each article |
40 | shaarli_share_origin_url: Enable sharing origin url to Shaarli, if the service is enabled \ No newline at end of file | ||
diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.es.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.es.yml index db5858d6..f9bd27f2 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.es.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.es.yml | |||
@@ -37,3 +37,4 @@ download_images_enabled: Descargar imágenes localmente | |||
37 | restricted_access: Activar autenticación para websites con paywall | 37 | restricted_access: Activar autenticación para websites con paywall |
38 | # api_user_registration: Enable user to be registered using the API | 38 | # api_user_registration: Enable user to be registered using the API |
39 | # store_article_headers: Enable if wallabag stores HTTP headers for each article | 39 | # store_article_headers: Enable if wallabag stores HTTP headers for each article |
40 | # shaarli_share_origin_url: Enable sharing origin url to Shaarli, if the service is enabled | ||
diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fa.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fa.yml index 11cc601b..15e4d6fd 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fa.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fa.yml | |||
@@ -37,3 +37,4 @@ modify_settings: "اعمال" | |||
37 | # restricted_access: Enable authentication for websites with paywall | 37 | # restricted_access: Enable authentication for websites with paywall |
38 | # api_user_registration: Enable user to be registered using the API | 38 | # api_user_registration: Enable user to be registered using the API |
39 | # store_article_headers: Enable if wallabag stores HTTP headers for each article | 39 | # store_article_headers: Enable if wallabag stores HTTP headers for each article |
40 | # shaarli_share_origin_url: Enable sharing origin url to Shaarli, if the service is enabled | ||
diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fr.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fr.yml index f23b5bf9..fe91044a 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fr.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fr.yml | |||
@@ -37,3 +37,4 @@ download_images_enabled: Télécharger les images en local | |||
37 | restricted_access: Activer l'authentification pour les articles derrière un paywall | 37 | restricted_access: Activer l'authentification pour les articles derrière un paywall |
38 | api_user_registration: Activer la création de compte depuis l'API | 38 | api_user_registration: Activer la création de compte depuis l'API |
39 | store_article_headers: Activer le stockage des en-têtes HTTP de chaque article | 39 | store_article_headers: Activer le stockage des en-têtes HTTP de chaque article |
40 | shaarli_share_origin_url: Activer le partage de l'adresse d'origine vers Shaarli, si le service est activé | ||
diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.it.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.it.yml index ade6f7da..3d5681fb 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.it.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.it.yml | |||
@@ -37,3 +37,4 @@ demo_mode_username: "Utente Demo" | |||
37 | # restricted_access: Enable authentication for websites with paywall | 37 | # restricted_access: Enable authentication for websites with paywall |
38 | api_user_registration: Abilita la registrazione dell'utente attraverso l'API | 38 | api_user_registration: Abilita la registrazione dell'utente attraverso l'API |
39 | # store_article_headers: Enable if wallabag stores HTTP headers for each article | 39 | # store_article_headers: Enable if wallabag stores HTTP headers for each article |
40 | # shaarli_share_origin_url: Enable sharing origin url to Shaarli, if the service is enabled | ||
diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.oc.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.oc.yml index 99986642..4c99652a 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.oc.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.oc.yml | |||
@@ -37,3 +37,4 @@ download_images_enabled: Telecargar los imatges en local | |||
37 | restricted_access: Activar l'autenticacion pels sites amb peatge | 37 | restricted_access: Activar l'autenticacion pels sites amb peatge |
38 | api_user_registration: Autorizar los utilizaires a se marcar amb l'API | 38 | api_user_registration: Autorizar los utilizaires a se marcar amb l'API |
39 | # store_article_headers: Enable if wallabag stores HTTP headers for each article | 39 | # store_article_headers: Enable if wallabag stores HTTP headers for each article |
40 | # shaarli_share_origin_url: Enable sharing origin url to Shaarli, if the service is enabled | ||
diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pl.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pl.yml index 8b8f2ebd..7c125fcf 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pl.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pl.yml | |||
@@ -36,3 +36,4 @@ download_images_enabled: Pobierz obrazy lokalnie | |||
36 | restricted_access: Włącz autoryzację dla stron z paywallem | 36 | restricted_access: Włącz autoryzację dla stron z paywallem |
37 | api_user_registration: Włącz rejestrację użytkownika przy użyciu API | 37 | api_user_registration: Włącz rejestrację użytkownika przy użyciu API |
38 | # store_article_headers: Enable if wallabag stores HTTP headers for each article | 38 | # store_article_headers: Enable if wallabag stores HTTP headers for each article |
39 | # shaarli_share_origin_url: Enable sharing origin url to Shaarli, if the service is enabled | ||
diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pt.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pt.yml index 76cb0174..a81eda0e 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pt.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pt.yml | |||
@@ -37,3 +37,4 @@ demo_mode_username: "Usuário demo" | |||
37 | # restricted_access: Enable authentication for websites with paywall | 37 | # restricted_access: Enable authentication for websites with paywall |
38 | # api_user_registration: Enable user to be registered using the API | 38 | # api_user_registration: Enable user to be registered using the API |
39 | # store_article_headers: Enable if wallabag stores HTTP headers for each article | 39 | # store_article_headers: Enable if wallabag stores HTTP headers for each article |
40 | # shaarli_share_origin_url: Enable sharing origin url to Shaarli, if the service is enabled | ||
diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.ro.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.ro.yml index 8300cec8..9d927cc0 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.ro.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.ro.yml | |||
@@ -37,3 +37,4 @@ modify_settings: "aplică" | |||
37 | # restricted_access: Enable authentication for websites with paywall | 37 | # restricted_access: Enable authentication for websites with paywall |
38 | # api_user_registration: Enable user to be registered using the API | 38 | # api_user_registration: Enable user to be registered using the API |
39 | # store_article_headers: Enable if wallabag stores HTTP headers for each article | 39 | # store_article_headers: Enable if wallabag stores HTTP headers for each article |
40 | # shaarli_share_origin_url: Enable sharing origin url to Shaarli, if the service is enabled | ||
diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.ru.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.ru.yml index 8fed84ae..2eb7b237 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.ru.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.ru.yml | |||
@@ -37,3 +37,4 @@ download_images_enabled: "Скачивать изображения локаль | |||
37 | restricted_access: "Включить авторизацию на сайте с помощью paywall" | 37 | restricted_access: "Включить авторизацию на сайте с помощью paywall" |
38 | # api_user_registration: Enable user to be registered using the API | 38 | # api_user_registration: Enable user to be registered using the API |
39 | # store_article_headers: Enable if wallabag stores HTTP headers for each article | 39 | # store_article_headers: Enable if wallabag stores HTTP headers for each article |
40 | # shaarli_share_origin_url: Enable sharing origin url to Shaarli, if the service is enabled | ||
diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.th.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.th.yml index 4e4d3234..93c0d6b4 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.th.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.th.yml | |||
@@ -34,3 +34,4 @@ share_public: ยอมรับ URL สาธารณะจากการเ | |||
34 | download_images_enabled: ดาวน์โหลดรูปภาพเฉพาะ | 34 | download_images_enabled: ดาวน์โหลดรูปภาพเฉพาะ |
35 | restricted_access: เปิดใช้งานการรองรับบนเว็บไซต์กับ paywall | 35 | restricted_access: เปิดใช้งานการรองรับบนเว็บไซต์กับ paywall |
36 | api_user_registration: เปิดใช้งานให้ผู้ใช้ลงทะเบียนการใช้ API | 36 | api_user_registration: เปิดใช้งานให้ผู้ใช้ลงทะเบียนการใช้ API |
37 | # shaarli_share_origin_url: Enable sharing origin url to Shaarli, if the service is enabled | ||
diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.tr.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.tr.yml index b992ccc2..6de880ec 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.tr.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.tr.yml | |||
@@ -38,3 +38,4 @@ | |||
38 | # restricted_access: Enable authentication for websites with paywall | 38 | # restricted_access: Enable authentication for websites with paywall |
39 | # api_user_registration: Enable user to be registered using the API | 39 | # api_user_registration: Enable user to be registered using the API |
40 | # store_article_headers: Enable if wallabag stores HTTP headers for each article | 40 | # store_article_headers: Enable if wallabag stores HTTP headers for each article |
41 | # shaarli_share_origin_url: Enable sharing origin url to Shaarli, if the service is enabled | ||
diff --git a/app/config/wallabag.yml b/app/config/wallabag.yml index ec6aae63..978a48f4 100644 --- a/app/config/wallabag.yml +++ b/app/config/wallabag.yml | |||
@@ -158,6 +158,10 @@ wallabag_core: | |||
158 | name: store_article_headers | 158 | name: store_article_headers |
159 | value: 0 | 159 | value: 0 |
160 | section: entry | 160 | section: entry |
161 | - | ||
162 | name: shaarli_share_origin_url | ||
163 | value: 0 | ||
164 | section: entry | ||
161 | 165 | ||
162 | wallabag_user: | 166 | wallabag_user: |
163 | registration_enabled: "%fosuser_registration%" | 167 | registration_enabled: "%fosuser_registration%" |