aboutsummaryrefslogtreecommitdiffhomepage
path: root/app
diff options
context:
space:
mode:
authorJeremy Benoist <j0k3r@users.noreply.github.com>2017-01-27 09:34:32 +0100
committerGitHub <noreply@github.com>2017-01-27 09:34:32 +0100
commit6fb06904ecde15b1b07d0a2af945338b416cf0e2 (patch)
treee76f3e8142399316ec5660fab8c646b2c34b8336 /app
parent05fa529bcfde01be5d320cb532900d72cf4b0830 (diff)
parent78295b99dd1721c613f1ce52e2debbe6f6db7753 (diff)
downloadwallabag-6fb06904ecde15b1b07d0a2af945338b416cf0e2.tar.gz
wallabag-6fb06904ecde15b1b07d0a2af945338b416cf0e2.tar.zst
wallabag-6fb06904ecde15b1b07d0a2af945338b416cf0e2.zip
Merge pull request #2416 from wallabag/2.2
wallabag 2.2.0
Diffstat (limited to 'app')
-rw-r--r--app/AppKernel.php3
-rw-r--r--app/DoctrineMigrations/Version20160410190541.php25
-rw-r--r--app/DoctrineMigrations/Version20160812120952.php24
-rw-r--r--app/DoctrineMigrations/Version20160911214952.php28
-rw-r--r--app/DoctrineMigrations/Version20160916201049.php20
-rw-r--r--app/DoctrineMigrations/Version20161001072726.php127
-rw-r--r--app/DoctrineMigrations/Version20161022134138.php85
-rw-r--r--app/DoctrineMigrations/Version20161024212538.php67
-rw-r--r--app/DoctrineMigrations/Version20161031132655.php52
-rw-r--r--app/DoctrineMigrations/Version20161104073720.php53
-rw-r--r--app/DoctrineMigrations/Version20161106113822.php56
-rw-r--r--app/DoctrineMigrations/Version20161117071626.php64
-rw-r--r--app/DoctrineMigrations/Version20161118134328.php56
-rw-r--r--app/DoctrineMigrations/Version20161122144743.php52
-rw-r--r--app/DoctrineMigrations/Version20161122203647.php63
-rw-r--r--app/DoctrineMigrations/Version20161128084725.php49
-rw-r--r--app/DoctrineMigrations/Version20161128131503.php61
-rw-r--r--app/DoctrineMigrations/Version20161214094402.php75
-rw-r--r--app/DoctrineMigrations/Version20161214094403.php53
-rw-r--r--app/Resources/CraueConfigBundle/translations/CraueConfigBundle.da.yml4
-rw-r--r--app/Resources/CraueConfigBundle/translations/CraueConfigBundle.de.yml4
-rw-r--r--app/Resources/CraueConfigBundle/translations/CraueConfigBundle.en.yml4
-rw-r--r--app/Resources/CraueConfigBundle/translations/CraueConfigBundle.es.yml4
-rw-r--r--app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fa.yml4
-rw-r--r--app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fr.yml4
-rw-r--r--app/Resources/CraueConfigBundle/translations/CraueConfigBundle.it.yml4
-rw-r--r--app/Resources/CraueConfigBundle/translations/CraueConfigBundle.oc.yml4
-rw-r--r--app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pl.yml4
-rw-r--r--app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pt.yml8
-rw-r--r--app/Resources/CraueConfigBundle/translations/CraueConfigBundle.ro.yml4
-rw-r--r--app/Resources/CraueConfigBundle/translations/CraueConfigBundle.tr.yml4
-rw-r--r--app/Resources/FOSUserBundle/translations/FOSUserBundle.da.yml2
-rw-r--r--app/Resources/FOSUserBundle/translations/FOSUserBundle.de.yml2
-rw-r--r--app/Resources/FOSUserBundle/translations/FOSUserBundle.es.yml2
-rw-r--r--app/Resources/FOSUserBundle/translations/FOSUserBundle.fr.yml2
-rw-r--r--app/Resources/FOSUserBundle/translations/FOSUserBundle.oc.yml2
-rw-r--r--app/Resources/FOSUserBundle/translations/FOSUserBundle.pl.yml2
-rw-r--r--app/Resources/FOSUserBundle/translations/FOSUserBundle.pt.yml2
-rw-r--r--app/Resources/static/themes/_global/img/icons/unmark-icon--black.pngbin0 -> 926 bytes
-rwxr-xr-xapp/Resources/static/themes/_global/img/list.pngbin0 -> 201 bytes
-rwxr-xr-xapp/Resources/static/themes/_global/img/table.pngbin0 -> 229 bytes
-rw-r--r--app/Resources/static/themes/_global/js/bookmarklet.js1
-rw-r--r--app/Resources/static/themes/_global/js/shortcuts/entry.js0
-rw-r--r--app/Resources/static/themes/_global/js/shortcuts/main.js15
-rw-r--r--app/Resources/static/themes/_global/js/tools.js11
-rwxr-xr-xapp/Resources/static/themes/baggy/css/main.css24
-rwxr-xr-xapp/Resources/static/themes/baggy/js/autoCompleteTags.js2
-rwxr-xr-xapp/Resources/static/themes/baggy/js/init.js27
-rw-r--r--app/Resources/static/themes/baggy/js/shortcuts/entry.js26
-rw-r--r--app/Resources/static/themes/baggy/js/shortcuts/main.js7
-rw-r--r--app/Resources/static/themes/baggy/js/uiTools.js4
-rwxr-xr-xapp/Resources/static/themes/material/css/main.css165
-rwxr-xr-xapp/Resources/static/themes/material/js/init.js19
-rw-r--r--app/Resources/static/themes/material/js/shortcuts/entry.js26
-rw-r--r--app/Resources/static/themes/material/js/shortcuts/main.js75
-rw-r--r--app/config/config.yml81
-rw-r--r--app/config/config_test.yml2
-rw-r--r--app/config/parameters.yml.dist19
-rw-r--r--app/config/parameters_test.yml1
-rw-r--r--app/config/routing.yml7
-rw-r--r--app/config/routing_rest.yml5
-rw-r--r--app/config/services.yml4
-rw-r--r--app/config/tests/parameters_test.mysql.yml1
-rw-r--r--app/config/tests/parameters_test.pgsql.yml1
-rw-r--r--app/config/tests/parameters_test.sqlite.yml1
65 files changed, 1483 insertions, 120 deletions
diff --git a/app/AppKernel.php b/app/AppKernel.php
index 52f85558..c8382d5f 100644
--- a/app/AppKernel.php
+++ b/app/AppKernel.php
@@ -29,8 +29,9 @@ class AppKernel extends Kernel
29 new KPhoen\RulerZBundle\KPhoenRulerZBundle(), 29 new KPhoen\RulerZBundle\KPhoenRulerZBundle(),
30 new Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle(), 30 new Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle(),
31 new Craue\ConfigBundle\CraueConfigBundle(), 31 new Craue\ConfigBundle\CraueConfigBundle(),
32 new Lexik\Bundle\MaintenanceBundle\LexikMaintenanceBundle(),
33 new WhiteOctober\PagerfantaBundle\WhiteOctoberPagerfantaBundle(), 32 new WhiteOctober\PagerfantaBundle\WhiteOctoberPagerfantaBundle(),
33 new FOS\JsRoutingBundle\FOSJsRoutingBundle(),
34 new BD\GuzzleSiteAuthenticatorBundle\BDGuzzleSiteAuthenticatorBundle(),
34 35
35 // wallabag bundles 36 // wallabag bundles
36 new Wallabag\CoreBundle\WallabagCoreBundle(), 37 new Wallabag\CoreBundle\WallabagCoreBundle(),
diff --git a/app/DoctrineMigrations/Version20160410190541.php b/app/DoctrineMigrations/Version20160410190541.php
index f034b0e4..ebf4135f 100644
--- a/app/DoctrineMigrations/Version20160410190541.php
+++ b/app/DoctrineMigrations/Version20160410190541.php
@@ -7,6 +7,9 @@ use Doctrine\DBAL\Schema\Schema;
7use Symfony\Component\DependencyInjection\ContainerAwareInterface; 7use Symfony\Component\DependencyInjection\ContainerAwareInterface;
8use Symfony\Component\DependencyInjection\ContainerInterface; 8use Symfony\Component\DependencyInjection\ContainerInterface;
9 9
10/**
11 * Added foreign keys for account resetting
12 */
10class Version20160410190541 extends AbstractMigration implements ContainerAwareInterface 13class Version20160410190541 extends AbstractMigration implements ContainerAwareInterface
11{ 14{
12 /** 15 /**
@@ -21,7 +24,7 @@ class Version20160410190541 extends AbstractMigration implements ContainerAwareI
21 24
22 private function getTable($tableName) 25 private function getTable($tableName)
23 { 26 {
24 return $this->container->getParameter('database_table_prefix') . $tableName; 27 return $this->container->getParameter('database_table_prefix').$tableName;
25 } 28 }
26 29
27 /** 30 /**
@@ -29,13 +32,15 @@ class Version20160410190541 extends AbstractMigration implements ContainerAwareI
29 */ 32 */
30 public function up(Schema $schema) 33 public function up(Schema $schema)
31 { 34 {
32 if ($this->connection->getDatabasePlatform()->getName() == 'postgresql') { 35 $entryTable = $schema->getTable($this->getTable('entry'));
33 $this->addSql('ALTER TABLE "'.$this->getTable('entry').'" ADD uuid UUID DEFAULT NULL');
34 } else {
35 $this->addSql('ALTER TABLE "'.$this->getTable('entry').'" ADD uuid LONGTEXT DEFAULT NULL');
36 }
37 36
38 $this->addSql("INSERT INTO \"".$this->getTable('craue_config_setting')."\" (name, value, section) VALUES ('share_public', '1', 'entry')"); 37 $this->skipIf($entryTable->hasColumn('uid'), 'It seems that you already played this migration.');
38
39 $entryTable->addColumn('uid', 'string', [
40 'notnull' => false,
41 'length' => 23,
42 ]);
43 $this->addSql('INSERT INTO '.$this->getTable('craue_config_setting')." (name, value, section) VALUES ('share_public', '1', 'entry')");
39 } 44 }
40 45
41 /** 46 /**
@@ -43,9 +48,9 @@ class Version20160410190541 extends AbstractMigration implements ContainerAwareI
43 */ 48 */
44 public function down(Schema $schema) 49 public function down(Schema $schema)
45 { 50 {
46 $this->abortIf($this->connection->getDatabasePlatform()->getName() != 'sqlite', 'This down migration can\'t be executed on SQLite databases, because SQLite don\'t support DROP COLUMN.'); 51 $entryTable = $schema->getTable($this->getTable('entry'));
52 $entryTable->dropColumn('uid');
47 53
48 $this->addSql('ALTER TABLE "'.$this->getTable('entry').'" DROP uuid'); 54 $this->addSql('DELETE FROM '.$this->getTable('craue_config_setting')." WHERE name = 'share_public'");
49 $this->addSql("DELETE FROM \"".$this->getTable('craue_config_setting')."\" WHERE name = 'share_public'");
50 } 55 }
51} 56}
diff --git a/app/DoctrineMigrations/Version20160812120952.php b/app/DoctrineMigrations/Version20160812120952.php
index 3aafea64..bd6e8d63 100644
--- a/app/DoctrineMigrations/Version20160812120952.php
+++ b/app/DoctrineMigrations/Version20160812120952.php
@@ -7,6 +7,9 @@ use Doctrine\DBAL\Schema\Schema;
7use Symfony\Component\DependencyInjection\ContainerAwareInterface; 7use Symfony\Component\DependencyInjection\ContainerAwareInterface;
8use Symfony\Component\DependencyInjection\ContainerInterface; 8use Symfony\Component\DependencyInjection\ContainerInterface;
9 9
10/**
11 * Added name field on wallabag_oauth2_clients
12 */
10class Version20160812120952 extends AbstractMigration implements ContainerAwareInterface 13class Version20160812120952 extends AbstractMigration implements ContainerAwareInterface
11{ 14{
12 /** 15 /**
@@ -21,7 +24,7 @@ class Version20160812120952 extends AbstractMigration implements ContainerAwareI
21 24
22 private function getTable($tableName) 25 private function getTable($tableName)
23 { 26 {
24 return $this->container->getParameter('database_table_prefix') . $tableName; 27 return $this->container->getParameter('database_table_prefix').$tableName;
25 } 28 }
26 29
27 /** 30 /**
@@ -29,16 +32,10 @@ class Version20160812120952 extends AbstractMigration implements ContainerAwareI
29 */ 32 */
30 public function up(Schema $schema) 33 public function up(Schema $schema)
31 { 34 {
32 switch ($this->connection->getDatabasePlatform()->getName()) { 35 $clientsTable = $schema->getTable($this->getTable('oauth2_clients'));
33 case 'sqlite': 36 $this->skipIf($clientsTable->hasColumn('name'), 'It seems that you already played this migration.');
34 $this->addSql('ALTER TABLE '.$this->getTable('oauth2_clients').' ADD name longtext DEFAULT NULL'); 37
35 break; 38 $clientsTable->addColumn('name', 'blob');
36 case 'mysql':
37 $this->addSql('ALTER TABLE '.$this->getTable('oauth2_clients').' ADD name longtext COLLATE \'utf8_unicode_ci\' DEFAULT NULL');
38 break;
39 case 'postgresql':
40 $this->addSql('ALTER TABLE '.$this->getTable('oauth2_clients').' ADD name text DEFAULT NULL');
41 }
42 } 39 }
43 40
44 /** 41 /**
@@ -46,8 +43,7 @@ class Version20160812120952 extends AbstractMigration implements ContainerAwareI
46 */ 43 */
47 public function down(Schema $schema) 44 public function down(Schema $schema)
48 { 45 {
49 $this->abortIf($this->connection->getDatabasePlatform()->getName() == 'sqlite', 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.'); 46 $clientsTable = $schema->getTable($this->getTable('oauth2_clients'));
50 47 $clientsTable->dropColumn('name');
51 $this->addSql('ALTER TABLE '.$this->getTable('oauth2_clients').' DROP COLUMN name');
52 } 48 }
53} 49}
diff --git a/app/DoctrineMigrations/Version20160911214952.php b/app/DoctrineMigrations/Version20160911214952.php
index f14f7bc6..edef81ed 100644
--- a/app/DoctrineMigrations/Version20160911214952.php
+++ b/app/DoctrineMigrations/Version20160911214952.php
@@ -7,6 +7,9 @@ use Doctrine\DBAL\Schema\Schema;
7use Symfony\Component\DependencyInjection\ContainerAwareInterface; 7use Symfony\Component\DependencyInjection\ContainerAwareInterface;
8use Symfony\Component\DependencyInjection\ContainerInterface; 8use Symfony\Component\DependencyInjection\ContainerInterface;
9 9
10/**
11 * Added settings for RabbitMQ and Redis imports
12 */
10class Version20160911214952 extends AbstractMigration implements ContainerAwareInterface 13class Version20160911214952 extends AbstractMigration implements ContainerAwareInterface
11{ 14{
12 /** 15 /**
@@ -21,7 +24,7 @@ class Version20160911214952 extends AbstractMigration implements ContainerAwareI
21 24
22 private function getTable($tableName) 25 private function getTable($tableName)
23 { 26 {
24 return $this->container->getParameter('database_table_prefix') . $tableName; 27 return $this->container->getParameter('database_table_prefix').$tableName;
25 } 28 }
26 29
27 /** 30 /**
@@ -29,8 +32,25 @@ class Version20160911214952 extends AbstractMigration implements ContainerAwareI
29 */ 32 */
30 public function up(Schema $schema) 33 public function up(Schema $schema)
31 { 34 {
32 $this->addSql('INSERT INTO "'.$this->getTable('craue_config_setting').'" (name, value, section) VALUES (\'import_with_redis\', \'0\', \'import\')'); 35 $redis = $this->container
33 $this->addSql('INSERT INTO "'.$this->getTable('craue_config_setting').'" (name, value, section) VALUES (\'import_with_rabbitmq\', \'0\', \'import\')'); 36 ->get('doctrine.orm.default_entity_manager')
37 ->getConnection()
38 ->fetchArray('SELECT * FROM '.$this->getTable('craue_config_setting')." WHERE name = 'import_with_redis'");
39
40 if (false === $redis) {
41 $this->addSql('INSERT INTO '.$this->getTable('craue_config_setting')." (name, value, section) VALUES ('import_with_redis', 0, 'import')");
42 }
43
44 $rabbitmq = $this->container
45 ->get('doctrine.orm.default_entity_manager')
46 ->getConnection()
47 ->fetchArray('SELECT * FROM '.$this->getTable('craue_config_setting')." WHERE name = 'import_with_rabbitmq'");
48
49 if (false === $rabbitmq) {
50 $this->addSql('INSERT INTO '.$this->getTable('craue_config_setting')." (name, value, section) VALUES ('import_with_rabbitmq', 0, 'import')");
51 }
52
53 $this->skipIf(false !== $rabbitmq && false !== $redis, 'It seems that you already played this migration.');
34 } 54 }
35 55
36 /** 56 /**
@@ -38,5 +58,7 @@ class Version20160911214952 extends AbstractMigration implements ContainerAwareI
38 */ 58 */
39 public function down(Schema $schema) 59 public function down(Schema $schema)
40 { 60 {
61 $this->addSql('DELETE FROM '.$this->getTable('craue_config_setting')." WHERE name = 'import_with_redis';");
62 $this->addSql('DELETE FROM '.$this->getTable('craue_config_setting')." WHERE name = 'import_with_rabbitmq';");
41 } 63 }
42} 64}
diff --git a/app/DoctrineMigrations/Version20160916201049.php b/app/DoctrineMigrations/Version20160916201049.php
index 0d2edf9e..9f8e77e7 100644
--- a/app/DoctrineMigrations/Version20160916201049.php
+++ b/app/DoctrineMigrations/Version20160916201049.php
@@ -7,6 +7,9 @@ use Doctrine\DBAL\Schema\Schema;
7use Symfony\Component\DependencyInjection\ContainerAwareInterface; 7use Symfony\Component\DependencyInjection\ContainerAwareInterface;
8use Symfony\Component\DependencyInjection\ContainerInterface; 8use Symfony\Component\DependencyInjection\ContainerInterface;
9 9
10/**
11 * Added pocket_consumer_key field on wallabag_config
12 */
10class Version20160916201049 extends AbstractMigration implements ContainerAwareInterface 13class Version20160916201049 extends AbstractMigration implements ContainerAwareInterface
11{ 14{
12 /** 15 /**
@@ -21,7 +24,7 @@ class Version20160916201049 extends AbstractMigration implements ContainerAwareI
21 24
22 private function getTable($tableName) 25 private function getTable($tableName)
23 { 26 {
24 return $this->container->getParameter('database_table_prefix') . $tableName; 27 return $this->container->getParameter('database_table_prefix').$tableName;
25 } 28 }
26 29
27 /** 30 /**
@@ -29,8 +32,12 @@ class Version20160916201049 extends AbstractMigration implements ContainerAwareI
29 */ 32 */
30 public function up(Schema $schema) 33 public function up(Schema $schema)
31 { 34 {
32 $this->addSql('ALTER TABLE "'.$this->getTable('config').'" ADD pocket_consumer_key VARCHAR(255) DEFAULT NULL'); 35 $configTable = $schema->getTable($this->getTable('config'));
33 $this->addSql("DELETE FROM \"".$this->getTable('craue_config_setting')."\" WHERE name = 'pocket_consumer_key';"); 36
37 $this->skipIf($configTable->hasColumn('pocket_consumer_key'), 'It seems that you already played this migration.');
38
39 $configTable->addColumn('pocket_consumer_key', 'string', ['notnull' => false]);
40 $this->addSql('DELETE FROM '.$this->getTable('craue_config_setting')." WHERE name = 'pocket_consumer_key';");
34 } 41 }
35 42
36 /** 43 /**
@@ -38,9 +45,8 @@ class Version20160916201049 extends AbstractMigration implements ContainerAwareI
38 */ 45 */
39 public function down(Schema $schema) 46 public function down(Schema $schema)
40 { 47 {
41 $this->abortIf($this->connection->getDatabasePlatform()->getName() == 'sqlite', 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.'); 48 $configTable = $schema->getTable($this->getTable('config'));
42 49 $configTable->dropColumn('pocket_consumer_key');
43 $this->addSql('ALTER TABLE "'.$this->getTable('config').'" DROP pocket_consumer_key'); 50 $this->addSql('INSERT INTO '.$this->getTable('craue_config_setting')." (name, value, section) VALUES ('pocket_consumer_key', NULL, 'import')");
44 $this->addSql("INSERT INTO \"".$this->getTable('craue_config_setting')."\" (name, value, section) VALUES ('pocket_consumer_key', NULL, 'import')");
45 } 51 }
46} 52}
diff --git a/app/DoctrineMigrations/Version20161001072726.php b/app/DoctrineMigrations/Version20161001072726.php
new file mode 100644
index 00000000..f247c236
--- /dev/null
+++ b/app/DoctrineMigrations/Version20161001072726.php
@@ -0,0 +1,127 @@
1<?php
2
3namespace Application\Migrations;
4
5use Doctrine\DBAL\Migrations\AbstractMigration;
6use Doctrine\DBAL\Schema\Schema;
7use Symfony\Component\DependencyInjection\ContainerAwareInterface;
8use Symfony\Component\DependencyInjection\ContainerInterface;
9use Doctrine\DBAL\Migrations\SkipMigrationException;
10
11/**
12 * Added pocket_consumer_key field on wallabag_config
13 */
14class Version20161001072726 extends AbstractMigration implements ContainerAwareInterface
15{
16 /**
17 * @var ContainerInterface
18 */
19 private $container;
20
21 public function setContainer(ContainerInterface $container = null)
22 {
23 $this->container = $container;
24 }
25
26 private function getTable($tableName)
27 {
28 return $this->container->getParameter('database_table_prefix').$tableName;
29 }
30
31 /**
32 * @param Schema $schema
33 */
34 public function up(Schema $schema)
35 {
36 $this->skipIf($this->connection->getDatabasePlatform()->getName() == 'sqlite', 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.');
37
38 // remove all FK from entry_tag
39 switch ($this->connection->getDatabasePlatform()->getName()) {
40 case 'mysql':
41 $query = $this->connection->query("
42 SELECT CONSTRAINT_NAME
43 FROM information_schema.key_column_usage
44 WHERE TABLE_NAME = '".$this->getTable('entry_tag')."' AND CONSTRAINT_NAME LIKE 'FK_%'
45 AND TABLE_SCHEMA = '".$this->connection->getDatabase()."'"
46 );
47 $query->execute();
48
49 foreach ($query->fetchAll() as $fk) {
50 $this->addSql('ALTER TABLE '.$this->getTable('entry_tag').' DROP FOREIGN KEY '.$fk['CONSTRAINT_NAME']);
51 }
52 break;
53
54 case 'postgresql':
55 // http://dba.stackexchange.com/questions/36979/retrieving-all-pk-and-fk
56 $query = $this->connection->query("
57 SELECT conrelid::regclass AS table_from
58 ,conname
59 ,pg_get_constraintdef(c.oid)
60 FROM pg_constraint c
61 JOIN pg_namespace n ON n.oid = c.connamespace
62 WHERE contype = 'f'
63 AND conrelid::regclass::text = '".$this->getTable('entry_tag')."'
64 AND n.nspname = 'public';"
65 );
66 $query->execute();
67
68 foreach ($query->fetchAll() as $fk) {
69 $this->addSql('ALTER TABLE '.$this->getTable('entry_tag').' DROP CONSTRAINT '.$fk['conname']);
70 }
71 break;
72 }
73
74 $this->addSql('ALTER TABLE '.$this->getTable('entry_tag').' ADD CONSTRAINT FK_entry_tag_entry FOREIGN KEY (entry_id) REFERENCES '.$this->getTable('entry').' (id) ON DELETE CASCADE');
75 $this->addSql('ALTER TABLE '.$this->getTable('entry_tag').' ADD CONSTRAINT FK_entry_tag_tag FOREIGN KEY (tag_id) REFERENCES '.$this->getTable('tag').' (id) ON DELETE CASCADE');
76
77 // remove entry FK from annotation
78
79 switch ($this->connection->getDatabasePlatform()->getName()) {
80 case 'mysql':
81 $query = $this->connection->query("
82 SELECT CONSTRAINT_NAME
83 FROM information_schema.key_column_usage
84 WHERE TABLE_NAME = '".$this->getTable('annotation')."'
85 AND CONSTRAINT_NAME LIKE 'FK_%'
86 AND COLUMN_NAME = 'entry_id'
87 AND TABLE_SCHEMA = '".$this->connection->getDatabase()."'"
88 );
89 $query->execute();
90
91 foreach ($query->fetchAll() as $fk) {
92 $this->addSql('ALTER TABLE '.$this->getTable('annotation').' DROP FOREIGN KEY '.$fk['CONSTRAINT_NAME']);
93 }
94 break;
95
96 case 'postgresql':
97 // http://dba.stackexchange.com/questions/36979/retrieving-all-pk-and-fk
98 $query = $this->connection->query("
99 SELECT conrelid::regclass AS table_from
100 ,conname
101 ,pg_get_constraintdef(c.oid)
102 FROM pg_constraint c
103 JOIN pg_namespace n ON n.oid = c.connamespace
104 WHERE contype = 'f'
105 AND conrelid::regclass::text = '".$this->getTable('annotation')."'
106 AND n.nspname = 'public'
107 AND pg_get_constraintdef(c.oid) LIKE '%entry_id%';"
108 );
109 $query->execute();
110
111 foreach ($query->fetchAll() as $fk) {
112 $this->addSql('ALTER TABLE '.$this->getTable('annotation').' DROP CONSTRAINT '.$fk['conname']);
113 }
114 break;
115 }
116
117 $this->addSql('ALTER TABLE '.$this->getTable('annotation').' ADD CONSTRAINT FK_annotation_entry FOREIGN KEY (entry_id) REFERENCES '.$this->getTable('entry').' (id) ON DELETE CASCADE');
118 }
119
120 /**
121 * @param Schema $schema
122 */
123 public function down(Schema $schema)
124 {
125 throw new SkipMigrationException('Too complex ...');
126 }
127}
diff --git a/app/DoctrineMigrations/Version20161022134138.php b/app/DoctrineMigrations/Version20161022134138.php
new file mode 100644
index 00000000..c71166a0
--- /dev/null
+++ b/app/DoctrineMigrations/Version20161022134138.php
@@ -0,0 +1,85 @@
1<?php
2
3namespace Application\Migrations;
4
5use Doctrine\DBAL\Migrations\AbstractMigration;
6use Doctrine\DBAL\Schema\Schema;
7use Symfony\Component\DependencyInjection\ContainerAwareInterface;
8use Symfony\Component\DependencyInjection\ContainerInterface;
9
10/**
11 * Converted database to utf8mb4 encoding (for MySQL only)
12 */
13class Version20161022134138 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 private function getTable($tableName)
26 {
27 return $this->container->getParameter('database_table_prefix').$tableName;
28 }
29
30 /**
31 * @param Schema $schema
32 */
33 public function up(Schema $schema)
34 {
35 $this->skipIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'This migration only apply to MySQL');
36
37 $this->addSql('ALTER DATABASE '.$this->connection->getParams()['dbname'].' CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;');
38
39 // convert field length for utf8mb4
40 // http://stackoverflow.com/a/31474509/569101
41 $this->addSql('ALTER TABLE '.$this->getTable('user').' CHANGE confirmation_token confirmation_token VARCHAR(180) DEFAULT NULL;');
42 $this->addSql('ALTER TABLE '.$this->getTable('user').' CHANGE salt salt VARCHAR(180) NOT NULL;');
43 $this->addSql('ALTER TABLE '.$this->getTable('user').' CHANGE password password VARCHAR(180) NOT NULL;');
44
45 $this->addSql('ALTER TABLE '.$this->getTable('annotation').' CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;');
46 $this->addSql('ALTER TABLE '.$this->getTable('entry').' CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;');
47 $this->addSql('ALTER TABLE '.$this->getTable('tag').' CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;');
48 $this->addSql('ALTER TABLE '.$this->getTable('user').' CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;');
49
50 $this->addSql('ALTER TABLE '.$this->getTable('annotation').' CHANGE `text` `text` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;');
51 $this->addSql('ALTER TABLE '.$this->getTable('annotation').' CHANGE `quote` `quote` VARCHAR(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;');
52
53 $this->addSql('ALTER TABLE '.$this->getTable('entry').' CHANGE `title` `title` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;');
54 $this->addSql('ALTER TABLE '.$this->getTable('entry').' CHANGE `content` `content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;');
55
56 $this->addSql('ALTER TABLE '.$this->getTable('tag').' CHANGE `label` `label` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;');
57
58 $this->addSql('ALTER TABLE '.$this->getTable('user').' CHANGE `name` `name` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;');
59 }
60
61 /**
62 * @param Schema $schema
63 */
64 public function down(Schema $schema)
65 {
66 $this->skipIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'This migration only apply to MySQL');
67
68 $this->addSql('ALTER DATABASE '.$this->connection->getParams()['dbname'].' CHARACTER SET = utf8 COLLATE = utf8_unicode_ci;');
69
70 $this->addSql('ALTER TABLE '.$this->getTable('annotation').' CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;');
71 $this->addSql('ALTER TABLE '.$this->getTable('entry').' CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;');
72 $this->addSql('ALTER TABLE '.$this->getTable('tag').' CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;');
73 $this->addSql('ALTER TABLE '.$this->getTable('user').' CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;');
74
75 $this->addSql('ALTER TABLE '.$this->getTable('annotation').' CHANGE `text` `text` longtext CHARACTER SET utf8 COLLATE utf8_unicode_ci;');
76 $this->addSql('ALTER TABLE '.$this->getTable('annotation').' CHANGE `quote` `quote` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci;');
77
78 $this->addSql('ALTER TABLE '.$this->getTable('entry').' CHANGE `title` `title` longtext CHARACTER SET utf8 COLLATE utf8_unicode_ci;');
79 $this->addSql('ALTER TABLE '.$this->getTable('entry').' CHANGE `content` `content` longtext CHARACTER SET utf8 COLLATE utf8_unicode_ci;');
80
81 $this->addSql('ALTER TABLE '.$this->getTable('tag').' CHANGE `label` `label` longtext CHARACTER SET utf8 COLLATE utf8_unicode_ci;');
82
83 $this->addSql('ALTER TABLE '.$this->getTable('user').' CHANGE `name` `name` longtext CHARACTER SET utf8 COLLATE utf8_unicode_ci;');
84 }
85}
diff --git a/app/DoctrineMigrations/Version20161024212538.php b/app/DoctrineMigrations/Version20161024212538.php
new file mode 100644
index 00000000..ecb872d1
--- /dev/null
+++ b/app/DoctrineMigrations/Version20161024212538.php
@@ -0,0 +1,67 @@
1<?php
2
3namespace Application\Migrations;
4
5use Doctrine\DBAL\Migrations\AbstractMigration;
6use Doctrine\DBAL\Schema\Schema;
7use Symfony\Component\DependencyInjection\ContainerAwareInterface;
8use Symfony\Component\DependencyInjection\ContainerInterface;
9
10/**
11 * Added user_id column on oauth2_clients to prevent users to delete API clients from other users
12 */
13class Version20161024212538 extends AbstractMigration implements ContainerAwareInterface
14{
15 /**
16 * @var ContainerInterface
17 */
18 private $container;
19
20 private $constraintName = 'IDX_user_oauth_client';
21
22 public function setContainer(ContainerInterface $container = null)
23 {
24 $this->container = $container;
25 }
26
27 private function getTable($tableName)
28 {
29 return $this->container->getParameter('database_table_prefix').$tableName;
30 }
31
32 /**
33 * @param Schema $schema
34 */
35 public function up(Schema $schema)
36 {
37 $clientsTable = $schema->getTable($this->getTable('oauth2_clients'));
38
39 $this->skipIf($clientsTable->hasColumn('user_id'), 'It seems that you already played this migration.');
40
41 $clientsTable->addColumn('user_id', 'integer', ['notnull' => false]);
42
43 $clientsTable->addForeignKeyConstraint(
44 $this->getTable('user'),
45 ['user_id'],
46 ['id'],
47 ['onDelete' => 'CASCADE'],
48 $this->constraintName
49 );
50 }
51
52 /**
53 * @param Schema $schema
54 */
55 public function down(Schema $schema)
56 {
57 $clientsTable = $schema->getTable($this->getTable('oauth2_clients'));
58
59 $this->skipIf(!$clientsTable->hasColumn('user_id'), 'It seems that you already played this migration.');
60
61 $clientsTable->dropColumn('user_id', 'integer');
62
63 if ($this->connection->getDatabasePlatform()->getName() != 'sqlite') {
64 $clientsTable->removeForeignKey($this->constraintName);
65 }
66 }
67}
diff --git a/app/DoctrineMigrations/Version20161031132655.php b/app/DoctrineMigrations/Version20161031132655.php
new file mode 100644
index 00000000..83b97ca9
--- /dev/null
+++ b/app/DoctrineMigrations/Version20161031132655.php
@@ -0,0 +1,52 @@
1<?php
2
3namespace Application\Migrations;
4
5use Doctrine\DBAL\Migrations\AbstractMigration;
6use Doctrine\DBAL\Schema\Schema;
7use Symfony\Component\DependencyInjection\ContainerAwareInterface;
8use Symfony\Component\DependencyInjection\ContainerInterface;
9
10/**
11 * Added the internal setting to enable/disable downloading pictures
12 */
13class Version20161031132655 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 private function getTable($tableName)
26 {
27 return $this->container->getParameter('database_table_prefix').$tableName;
28 }
29
30 /**
31 * @param Schema $schema
32 */
33 public function up(Schema $schema)
34 {
35 $images = $this->container
36 ->get('doctrine.orm.default_entity_manager')
37 ->getConnection()
38 ->fetchArray('SELECT * FROM '.$this->getTable('craue_config_setting')." WHERE name = 'download_images_enabled'");
39
40 $this->skipIf(false !== $images, 'It seems that you already played this migration.');
41
42 $this->addSql('INSERT INTO '.$this->getTable('craue_config_setting')." (name, value, section) VALUES ('download_images_enabled', 0, 'misc')");
43 }
44
45 /**
46 * @param Schema $schema
47 */
48 public function down(Schema $schema)
49 {
50 $this->addSql('DELETE FROM '.$this->getTable('craue_config_setting')." WHERE name = 'download_images_enabled';");
51 }
52}
diff --git a/app/DoctrineMigrations/Version20161104073720.php b/app/DoctrineMigrations/Version20161104073720.php
new file mode 100644
index 00000000..fb8f5fa1
--- /dev/null
+++ b/app/DoctrineMigrations/Version20161104073720.php
@@ -0,0 +1,53 @@
1<?php
2
3namespace Application\Migrations;
4
5use Doctrine\DBAL\Migrations\AbstractMigration;
6use Doctrine\DBAL\Schema\Schema;
7use Symfony\Component\DependencyInjection\ContainerAwareInterface;
8use Symfony\Component\DependencyInjection\ContainerInterface;
9
10/**
11 * Added created_at index on entry table
12 */
13class Version20161104073720 extends AbstractMigration implements ContainerAwareInterface
14{
15 /**
16 * @var ContainerInterface
17 */
18 private $container;
19
20 private $indexName = 'IDX_entry_created_at';
21
22 public function setContainer(ContainerInterface $container = null)
23 {
24 $this->container = $container;
25 }
26
27 private function getTable($tableName)
28 {
29 return $this->container->getParameter('database_table_prefix').$tableName;
30 }
31
32 /**
33 * @param Schema $schema
34 */
35 public function up(Schema $schema)
36 {
37 $entryTable = $schema->getTable($this->getTable('entry'));
38 $this->skipIf($entryTable->hasIndex($this->indexName), 'It seems that you already played this migration.');
39
40 $entryTable->addIndex(['created_at'], $this->indexName);
41 }
42
43 /**
44 * @param Schema $schema
45 */
46 public function down(Schema $schema)
47 {
48 $entryTable = $schema->getTable($this->getTable('entry'));
49 $this->skipIf(false === $entryTable->hasIndex($this->indexName), 'It seems that you already played this migration.');
50
51 $entryTable->dropIndex($this->indexName);
52 }
53}
diff --git a/app/DoctrineMigrations/Version20161106113822.php b/app/DoctrineMigrations/Version20161106113822.php
new file mode 100644
index 00000000..de3702a4
--- /dev/null
+++ b/app/DoctrineMigrations/Version20161106113822.php
@@ -0,0 +1,56 @@
1<?php
2
3namespace Application\Migrations;
4
5use Doctrine\DBAL\Migrations\AbstractMigration;
6use Doctrine\DBAL\Schema\Schema;
7use Symfony\Component\DependencyInjection\ContainerAwareInterface;
8use Symfony\Component\DependencyInjection\ContainerInterface;
9
10/**
11 * Added action_mark_as_read field on config table
12 */
13class Version20161106113822 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 private function getTable($tableName)
26 {
27 return $this->container->getParameter('database_table_prefix').$tableName;
28 }
29
30 /**
31 * @param Schema $schema
32 */
33 public function up(Schema $schema)
34 {
35 $configTable = $schema->getTable($this->getTable('config'));
36
37 $this->skipIf($configTable->hasColumn('action_mark_as_read'), 'It seems that you already played this migration.');
38
39 $configTable->addColumn('action_mark_as_read', 'integer', [
40 'default' => 0,
41 'notnull' => false,
42 ]);
43 }
44
45 /**
46 * @param Schema $schema
47 */
48 public function down(Schema $schema)
49 {
50 $configTable = $schema->getTable($this->getTable('config'));
51
52 $this->skipIf(!$configTable->hasColumn('action_mark_as_read'), 'It seems that you already played this migration.');
53
54 $configTable->dropColumn('action_mark_as_read');
55 }
56}
diff --git a/app/DoctrineMigrations/Version20161117071626.php b/app/DoctrineMigrations/Version20161117071626.php
new file mode 100644
index 00000000..8daa2142
--- /dev/null
+++ b/app/DoctrineMigrations/Version20161117071626.php
@@ -0,0 +1,64 @@
1<?php
2
3namespace Application\Migrations;
4
5use Doctrine\DBAL\Migrations\AbstractMigration;
6use Doctrine\DBAL\Schema\Schema;
7use Symfony\Component\DependencyInjection\ContainerAwareInterface;
8use Symfony\Component\DependencyInjection\ContainerInterface;
9
10/**
11 * Added the internal setting to share articles to unmark.it
12 */
13class Version20161117071626 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 private function getTable($tableName)
26 {
27 return $this->container->getParameter('database_table_prefix').$tableName;
28 }
29
30 /**
31 * @param Schema $schema
32 */
33 public function up(Schema $schema)
34 {
35 $share = $this->container
36 ->get('doctrine.orm.default_entity_manager')
37 ->getConnection()
38 ->fetchArray('SELECT * FROM '.$this->getTable('craue_config_setting')." WHERE name = 'share_unmark'");
39
40 if (false === $share) {
41 $this->addSql('INSERT INTO '.$this->getTable('craue_config_setting')." (name, value, section) VALUES ('share_unmark', 0, 'entry')");
42 }
43
44 $unmark = $this->container
45 ->get('doctrine.orm.default_entity_manager')
46 ->getConnection()
47 ->fetchArray('SELECT * FROM '.$this->getTable('craue_config_setting')." WHERE name = 'unmark_url'");
48
49 if (false === $unmark) {
50 $this->addSql('INSERT INTO '.$this->getTable('craue_config_setting')." (name, value, section) VALUES ('unmark_url', 'https://unmark.it', 'entry')");
51 }
52
53 $this->skipIf(false !== $share && false !== $unmark, 'It seems that you already played this migration.');
54 }
55
56 /**
57 * @param Schema $schema
58 */
59 public function down(Schema $schema)
60 {
61 $this->addSql('DELETE FROM '.$this->getTable('craue_config_setting')." WHERE name = 'share_unmark';");
62 $this->addSql('DELETE FROM '.$this->getTable('craue_config_setting')." WHERE name = 'unmark_url';");
63 }
64}
diff --git a/app/DoctrineMigrations/Version20161118134328.php b/app/DoctrineMigrations/Version20161118134328.php
new file mode 100644
index 00000000..7b2eeb7b
--- /dev/null
+++ b/app/DoctrineMigrations/Version20161118134328.php
@@ -0,0 +1,56 @@
1<?php
2
3namespace Application\Migrations;
4
5use Doctrine\DBAL\Migrations\AbstractMigration;
6use Doctrine\DBAL\Schema\Schema;
7use Symfony\Component\DependencyInjection\ContainerAwareInterface;
8use Symfony\Component\DependencyInjection\ContainerInterface;
9
10/**
11 * Add http_status in `entry_table`.
12 */
13class Version20161118134328 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 private function getTable($tableName)
26 {
27 return $this->container->getParameter('database_table_prefix').$tableName;
28 }
29
30 /**
31 * @param Schema $schema
32 */
33 public function up(Schema $schema)
34 {
35 $entryTable = $schema->getTable($this->getTable('entry'));
36
37 $this->skipIf($entryTable->hasColumn('http_status'), 'It seems that you already played this migration.');
38
39 $entryTable->addColumn('http_status', 'string', [
40 'length' => 3,
41 'notnull' => false,
42 ]);
43 }
44
45 /**
46 * @param Schema $schema
47 */
48 public function down(Schema $schema)
49 {
50 $entryTable = $schema->getTable($this->getTable('entry'));
51
52 $this->skipIf(!$entryTable->hasColumn('http_status'), 'It seems that you already played this migration.');
53
54 $entryTable->dropColumn('http_status');
55 }
56}
diff --git a/app/DoctrineMigrations/Version20161122144743.php b/app/DoctrineMigrations/Version20161122144743.php
new file mode 100644
index 00000000..388a0e4b
--- /dev/null
+++ b/app/DoctrineMigrations/Version20161122144743.php
@@ -0,0 +1,52 @@
1<?php
2
3namespace Application\Migrations;
4
5use Doctrine\DBAL\Migrations\AbstractMigration;
6use Doctrine\DBAL\Schema\Schema;
7use Symfony\Component\DependencyInjection\ContainerAwareInterface;
8use Symfony\Component\DependencyInjection\ContainerInterface;
9
10/**
11 * Add the restricted_access internal setting for articles with paywall.
12 */
13class Version20161122144743 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 private function getTable($tableName)
26 {
27 return $this->container->getParameter('database_table_prefix').$tableName;
28 }
29
30 /**
31 * @param Schema $schema
32 */
33 public function up(Schema $schema)
34 {
35 $access = $this->container
36 ->get('doctrine.orm.default_entity_manager')
37 ->getConnection()
38 ->fetchArray('SELECT * FROM '.$this->getTable('craue_config_setting')." WHERE name = 'restricted_access'");
39
40 $this->skipIf(false !== $access, 'It seems that you already played this migration.');
41
42 $this->addSql('INSERT INTO '.$this->getTable('craue_config_setting')." (name, value, section) VALUES ('restricted_access', 0, 'entry')");
43 }
44
45 /**
46 * @param Schema $schema
47 */
48 public function down(Schema $schema)
49 {
50 $this->addSql('DELETE FROM '.$this->getTable('craue_config_setting')." WHERE name = 'restricted_access';");
51 }
52}
diff --git a/app/DoctrineMigrations/Version20161122203647.php b/app/DoctrineMigrations/Version20161122203647.php
new file mode 100644
index 00000000..9b17d6ef
--- /dev/null
+++ b/app/DoctrineMigrations/Version20161122203647.php
@@ -0,0 +1,63 @@
1<?php
2
3namespace Application\Migrations;
4
5use Doctrine\DBAL\Migrations\AbstractMigration;
6use Doctrine\DBAL\Schema\Schema;
7use Symfony\Component\DependencyInjection\ContainerAwareInterface;
8use Symfony\Component\DependencyInjection\ContainerInterface;
9
10/**
11 * Methods and properties removed from `FOS\UserBundle\Model\User`.
12 *
13 * - `$expired`
14 * - `$credentialsExpired`
15 * - `setExpired()` (use `setExpiresAt(\DateTime::now()` instead)
16 * - `setCredentialsExpired()` (use `setCredentialsExpireAt(\DateTime::now()` instead)
17 *
18 * You need to drop the fields `expired` and `credentials_expired` from your database
19 * schema, because they aren't mapped anymore.
20 */
21class Version20161122203647 extends AbstractMigration implements ContainerAwareInterface
22{
23 /**
24 * @var ContainerInterface
25 */
26 private $container;
27
28 public function setContainer(ContainerInterface $container = null)
29 {
30 $this->container = $container;
31 }
32
33 private function getTable($tableName)
34 {
35 return $this->container->getParameter('database_table_prefix').$tableName;
36 }
37
38 /**
39 * @param Schema $schema
40 */
41 public function up(Schema $schema)
42 {
43 $userTable = $schema->getTable($this->getTable('user'));
44
45 $this->skipIf(false === $userTable->hasColumn('expired') || false === $userTable->hasColumn('credentials_expired'), 'It seems that you already played this migration.');
46
47 $userTable->dropColumn('expired');
48 $userTable->dropColumn('credentials_expired');
49 }
50
51 /**
52 * @param Schema $schema
53 */
54 public function down(Schema $schema)
55 {
56 $userTable = $schema->getTable($this->getTable('user'));
57
58 $this->skipIf(true === $userTable->hasColumn('expired') || true === $userTable->hasColumn('credentials_expired'), 'It seems that you already played this migration.');
59
60 $userTable->addColumn('expired', 'smallint', ['notnull' => false]);
61 $userTable->addColumn('credentials_expired', 'smallint', ['notnull' => false]);
62 }
63}
diff --git a/app/DoctrineMigrations/Version20161128084725.php b/app/DoctrineMigrations/Version20161128084725.php
new file mode 100644
index 00000000..ea370076
--- /dev/null
+++ b/app/DoctrineMigrations/Version20161128084725.php
@@ -0,0 +1,49 @@
1<?php
2
3namespace Application\Migrations;
4
5use Doctrine\DBAL\Migrations\AbstractMigration;
6use Doctrine\DBAL\Schema\Schema;
7use Symfony\Component\DependencyInjection\ContainerAwareInterface;
8use Symfony\Component\DependencyInjection\ContainerInterface;
9
10/**
11 * Added list_mode in user config.
12 */
13class Version20161128084725 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 private function getTable($tableName)
26 {
27 return $this->container->getParameter('database_table_prefix').$tableName;
28 }
29
30 /**
31 * @param Schema $schema
32 */
33 public function up(Schema $schema)
34 {
35 $configTable = $schema->getTable($this->getTable('config'));
36 $this->skipIf($configTable->hasColumn('list_mode'), 'It seems that you already played this migration.');
37
38 $configTable->addColumn('list_mode', 'integer', ['notnull' => false]);
39 }
40
41 /**
42 * @param Schema $schema
43 */
44 public function down(Schema $schema)
45 {
46 $configTable = $schema->getTable($this->getTable('config'));
47 $configTable->dropColumn('list_mode');
48 }
49}
diff --git a/app/DoctrineMigrations/Version20161128131503.php b/app/DoctrineMigrations/Version20161128131503.php
new file mode 100644
index 00000000..b71aa38b
--- /dev/null
+++ b/app/DoctrineMigrations/Version20161128131503.php
@@ -0,0 +1,61 @@
1<?php
2
3namespace Application\Migrations;
4
5use Doctrine\DBAL\Migrations\AbstractMigration;
6use Doctrine\DBAL\Schema\Schema;
7use Symfony\Component\DependencyInjection\ContainerAwareInterface;
8use Symfony\Component\DependencyInjection\ContainerInterface;
9
10/**
11 * Removed locked, credentials_expire_at and expires_at.
12 */
13class Version20161128131503 extends AbstractMigration implements ContainerAwareInterface
14{
15 private $fields = [
16 'locked' => 'smallint',
17 'credentials_expire_at' => 'datetime',
18 'expires_at' => 'datetime',
19 ];
20
21 /**
22 * @var ContainerInterface
23 */
24 private $container;
25
26 public function setContainer(ContainerInterface $container = null)
27 {
28 $this->container = $container;
29 }
30
31 private function getTable($tableName)
32 {
33 return $this->container->getParameter('database_table_prefix').$tableName;
34 }
35
36 /**
37 * @param Schema $schema
38 */
39 public function up(Schema $schema)
40 {
41 $userTable = $schema->getTable($this->getTable('user'));
42
43 foreach ($this->fields as $field => $type) {
44 $this->skipIf(!$userTable->hasColumn($field), 'It seems that you already played this migration.');
45 $userTable->dropColumn($field);
46 }
47 }
48
49 /**
50 * @param Schema $schema
51 */
52 public function down(Schema $schema)
53 {
54 $userTable = $schema->getTable($this->getTable('user'));
55
56 foreach ($this->fields as $field => $type) {
57 $this->skipIf($userTable->hasColumn($field), 'It seems that you already played this migration.');
58 $userTable->addColumn($field, $type, ['notnull' => false]);
59 }
60 }
61}
diff --git a/app/DoctrineMigrations/Version20161214094402.php b/app/DoctrineMigrations/Version20161214094402.php
new file mode 100644
index 00000000..db125f76
--- /dev/null
+++ b/app/DoctrineMigrations/Version20161214094402.php
@@ -0,0 +1,75 @@
1<?php
2
3namespace Application\Migrations;
4
5use Doctrine\DBAL\Migrations\AbstractMigration;
6use Doctrine\DBAL\Schema\Schema;
7use Symfony\Component\DependencyInjection\ContainerAwareInterface;
8use Symfony\Component\DependencyInjection\ContainerInterface;
9
10/**
11 * Renamed uuid to uid in entry table
12 */
13class Version20161214094402 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 private function getTable($tableName)
26 {
27 return $this->container->getParameter('database_table_prefix').$tableName;
28 }
29
30 /**
31 * @param Schema $schema
32 */
33 public function up(Schema $schema)
34 {
35 $entryTable = $schema->getTable($this->getTable('entry'));
36
37 $this->skipIf($entryTable->hasColumn('uid'), 'It seems that you already played this migration.');
38
39 switch ($this->connection->getDatabasePlatform()->getName()) {
40 case 'sqlite':
41 $this->addSql('CREATE TEMPORARY TABLE __temp__wallabag_entry AS SELECT id, user_id, uuid, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, is_public FROM '.$this->getTable('entry'));
42 $this->addSql('DROP TABLE '.$this->getTable('entry'));
43 $this->addSql('CREATE TABLE '.$this->getTable('entry').' (id INTEGER NOT NULL, user_id INTEGER DEFAULT NULL, uid CLOB DEFAULT NULL COLLATE BINARY, title CLOB DEFAULT NULL COLLATE BINARY, url CLOB DEFAULT NULL COLLATE BINARY, is_archived BOOLEAN NOT NULL, is_starred BOOLEAN NOT NULL, content CLOB DEFAULT NULL COLLATE BINARY, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, mimetype CLOB DEFAULT NULL COLLATE BINARY, language CLOB DEFAULT NULL COLLATE BINARY, reading_time INTEGER DEFAULT NULL, domain_name CLOB DEFAULT NULL COLLATE BINARY, preview_picture CLOB DEFAULT NULL COLLATE BINARY, is_public BOOLEAN DEFAULT "0", PRIMARY KEY(id));');
44 $this->addSql('INSERT INTO '.$this->getTable('entry').' (id, user_id, uid, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, is_public) SELECT id, user_id, uuid, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, is_public FROM __temp__wallabag_entry;');
45 $this->addSql('DROP TABLE __temp__wallabag_entry');
46 break;
47 case 'mysql':
48 $this->addSql('ALTER TABLE '.$this->getTable('entry').' CHANGE uuid uid VARCHAR(23)');
49 break;
50 case 'postgresql':
51 $this->addSql('ALTER TABLE '.$this->getTable('entry').' RENAME uuid TO uid');
52 }
53 }
54
55 /**
56 * @param Schema $schema
57 */
58 public function down(Schema $schema)
59 {
60 $entryTable = $schema->getTable($this->getTable('entry'));
61
62 $this->skipIf($entryTable->hasColumn('uuid'), 'It seems that you already played this migration.');
63
64 switch ($this->connection->getDatabasePlatform()->getName()) {
65 case 'sqlite':
66 throw new SkipMigrationException('Too complex ...');
67 break;
68 case 'mysql':
69 $this->addSql('ALTER TABLE '.$this->getTable('entry').' CHANGE uid uuid VARCHAR(23)');
70 break;
71 case 'postgresql':
72 $this->addSql('ALTER TABLE '.$this->getTable('entry').' RENAME uid TO uuid');
73 }
74 }
75}
diff --git a/app/DoctrineMigrations/Version20161214094403.php b/app/DoctrineMigrations/Version20161214094403.php
new file mode 100644
index 00000000..5948b5fa
--- /dev/null
+++ b/app/DoctrineMigrations/Version20161214094403.php
@@ -0,0 +1,53 @@
1<?php
2
3namespace Application\Migrations;
4
5use Doctrine\DBAL\Migrations\AbstractMigration;
6use Doctrine\DBAL\Schema\Schema;
7use Symfony\Component\DependencyInjection\ContainerAwareInterface;
8use Symfony\Component\DependencyInjection\ContainerInterface;
9
10/**
11 * Added index on wallabag_entry.uid
12 */
13class Version20161214094403 extends AbstractMigration implements ContainerAwareInterface
14{
15 /**
16 * @var ContainerInterface
17 */
18 private $container;
19
20 private $indexName = 'IDX_entry_uid';
21
22 public function setContainer(ContainerInterface $container = null)
23 {
24 $this->container = $container;
25 }
26
27 private function getTable($tableName)
28 {
29 return $this->container->getParameter('database_table_prefix').$tableName;
30 }
31
32 /**
33 * @param Schema $schema
34 */
35 public function up(Schema $schema)
36 {
37 $entryTable = $schema->getTable($this->getTable('entry'));
38 $this->skipIf($entryTable->hasIndex($this->indexName), 'It seems that you already played this migration.');
39
40 $entryTable->addIndex(['uid'], $this->indexName);
41 }
42
43 /**
44 * @param Schema $schema
45 */
46 public function down(Schema $schema)
47 {
48 $entryTable = $schema->getTable($this->getTable('entry'));
49 $this->skipIf(false === $entryTable->hasIndex($this->indexName), 'It seems that you already played this migration.');
50
51 $entryTable->dropIndex($this->indexName);
52 }
53}
diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.da.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.da.yml
index 3e11d675..c65463db 100644
--- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.da.yml
+++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.da.yml
@@ -1,3 +1,4 @@
1# settings_changed: Configuration updated
1download_pictures: Download billeder på din server 2download_pictures: Download billeder på din server
2carrot: Aktiver deling til Carrot 3carrot: Aktiver deling til Carrot
3diaspora_url: Diaspora URL, hvis tjenesten er aktiv 4diaspora_url: Diaspora URL, hvis tjenesten er aktiv
@@ -15,6 +16,7 @@ share_diaspora: Aktiver deling til Diaspora
15share_mail: Aktiver deling med email 16share_mail: Aktiver deling med email
16share_shaarli: Aktiver deling gennem Shaarli 17share_shaarli: Aktiver deling gennem Shaarli
17share_twitter: Aktiver deling gennem Twitter 18share_twitter: Aktiver deling gennem Twitter
19share_unmark: Aktiver deling gennem Unmark.it
18show_printlink: Vis et link til print-indhold 20show_printlink: Vis et link til print-indhold
19wallabag_support_url: Support-URL for wallabag 21wallabag_support_url: Support-URL for wallabag
20wallabag_url: URL for *sin* wallabag-installation 22wallabag_url: URL for *sin* wallabag-installation
@@ -29,3 +31,5 @@ piwik_enabled: Aktiver Piwik
29demo_mode_enabled: "Aktiver demo-indstilling? (anvendes kun til wallabags offentlige demo)" 31demo_mode_enabled: "Aktiver demo-indstilling? (anvendes kun til wallabags offentlige demo)"
30demo_mode_username: "Demobruger" 32demo_mode_username: "Demobruger"
31# share_public: Allow public url for entries 33# share_public: Allow public url for entries
34# download_images_enabled: Download images locally
35# restricted_access: Enable authentication for websites with paywall
diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.de.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.de.yml
index c74b5c1f..bc378147 100644
--- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.de.yml
+++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.de.yml
@@ -1,3 +1,4 @@
1# settings_changed: Configuration updated
1download_pictures: Bilder auf den Server herunterladen 2download_pictures: Bilder auf den Server herunterladen
2carrot: Teilen zu Carrot aktivieren 3carrot: Teilen zu Carrot aktivieren
3diaspora_url: Diaspora-URL, sofern der Service aktiviert ist 4diaspora_url: Diaspora-URL, sofern der Service aktiviert ist
@@ -15,6 +16,7 @@ share_diaspora: Teilen zu Diaspora aktiveren
15share_mail: Teilen via E-Mail aktiveren 16share_mail: Teilen via E-Mail aktiveren
16share_shaarli: Teilen zu Shaarli aktiveren 17share_shaarli: Teilen zu Shaarli aktiveren
17share_twitter: Teilen zu Twitter aktiveren 18share_twitter: Teilen zu Twitter aktiveren
19share_unmark: Teilen zu Unmark.it aktiveren
18show_printlink: Link anzeigen, um den Inhalt auszudrucken 20show_printlink: Link anzeigen, um den Inhalt auszudrucken
19wallabag_support_url: Support-URL für wallabag 21wallabag_support_url: Support-URL für wallabag
20wallabag_url: URL von *deiner* wallabag-Instanz 22wallabag_url: URL von *deiner* wallabag-Instanz
@@ -29,3 +31,5 @@ piwik_enabled: Piwik aktivieren
29demo_mode_enabled: "Test-Modus aktivieren? (nur für die öffentliche wallabag-Demo genutzt)" 31demo_mode_enabled: "Test-Modus aktivieren? (nur für die öffentliche wallabag-Demo genutzt)"
30demo_mode_username: "Test-Benutzer" 32demo_mode_username: "Test-Benutzer"
31share_public: Erlaube eine öffentliche URL für Einträge 33share_public: Erlaube eine öffentliche URL für Einträge
34# download_images_enabled: Download images locally
35# restricted_access: Enable authentication for websites with paywall
diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.en.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.en.yml
index 77c09db4..52cb8e20 100644
--- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.en.yml
+++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.en.yml
@@ -1,3 +1,4 @@
1settings_changed: Configuration updated
1download_pictures: Download pictures on your server 2download_pictures: Download pictures on your server
2carrot: Enable share to Carrot 3carrot: Enable share to Carrot
3diaspora_url: Diaspora URL, if the service is enabled 4diaspora_url: Diaspora URL, if the service is enabled
@@ -15,6 +16,7 @@ share_diaspora: Enable share to Diaspora
15share_mail: Enable share by email 16share_mail: Enable share by email
16share_shaarli: Enable share to Shaarli 17share_shaarli: Enable share to Shaarli
17share_twitter: Enable share to Twitter 18share_twitter: Enable share to Twitter
19share_unmark: Enable share to Unmark.it
18show_printlink: Display a link to print content 20show_printlink: Display a link to print content
19wallabag_support_url: Support URL for wallabag 21wallabag_support_url: Support URL for wallabag
20wallabag_url: URL of *your* wallabag instance 22wallabag_url: URL of *your* wallabag instance
@@ -29,3 +31,5 @@ piwik_enabled: Enable Piwik
29demo_mode_enabled: "Enable demo mode ? (only used for the wallabag public demo)" 31demo_mode_enabled: "Enable demo mode ? (only used for the wallabag public demo)"
30demo_mode_username: "Demo user" 32demo_mode_username: "Demo user"
31share_public: Allow public url for entries 33share_public: Allow public url for entries
34download_images_enabled: Download images locally
35restricted_access: Enable authentication for websites with paywall
diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.es.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.es.yml
index baa83849..dbec0e81 100644
--- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.es.yml
+++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.es.yml
@@ -1,3 +1,4 @@
1# settings_changed: Configuration updated
1download_pictures: Descargar imágenes 2download_pictures: Descargar imágenes
2carrot: Activar compartir con Carrot 3carrot: Activar compartir con Carrot
3diaspora_url: Diaspora URL, si el servicio está activado 4diaspora_url: Diaspora URL, si el servicio está activado
@@ -15,6 +16,7 @@ share_diaspora: Activar compartir con Diaspora
15share_mail: Activar compartir con email 16share_mail: Activar compartir con email
16share_shaarli: Activar compartir con Shaarli 17share_shaarli: Activar compartir con Shaarli
17share_twitter: Activar compartir con Twitter 18share_twitter: Activar compartir con Twitter
19share_unmark: Activar compartir con Unmark.it
18show_printlink: Mostrar un enlace para imprimir contenido 20show_printlink: Mostrar un enlace para imprimir contenido
19wallabag_support_url: URL de soporte de wallabag 21wallabag_support_url: URL de soporte de wallabag
20wallabag_url: URL de *tu* instancia de wallabag 22wallabag_url: URL de *tu* instancia de wallabag
@@ -29,3 +31,5 @@ piwik_enabled: Activar Piwik
29demo_mode_enabled: "Activar modo demo (sólo usado para la demo de wallabag)" 31demo_mode_enabled: "Activar modo demo (sólo usado para la demo de wallabag)"
30demo_mode_username: "Nombre de usuario demo" 32demo_mode_username: "Nombre de usuario demo"
31# share_public: Allow public url for entries 33# share_public: Allow public url for entries
34# download_images_enabled: Download images locally
35# restricted_access: Enable authentication for websites with paywall
diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fa.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fa.yml
index b394977e..7a341e0b 100644
--- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fa.yml
+++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fa.yml
@@ -1,3 +1,4 @@
1# settings_changed: Configuration updated
1download_pictures: تصاویر را در کارگزار خودتان باربگیرید 2download_pictures: تصاویر را در کارگزار خودتان باربگیرید
2carrot: فعال‌سازی هم‌رسانی به Carrot 3carrot: فعال‌سازی هم‌رسانی به Carrot
3diaspora_url: نشانی Diaspora، اگر فعال بود 4diaspora_url: نشانی Diaspora، اگر فعال بود
@@ -15,6 +16,7 @@ share_diaspora: فعال‌سازی هم‌رسانی به Diaspora
15share_mail: فعال‌سازی هم‌رسانی با ایمیل 16share_mail: فعال‌سازی هم‌رسانی با ایمیل
16share_shaarli: فعال‌سازی هم‌رسانی به Shaarli 17share_shaarli: فعال‌سازی هم‌رسانی به Shaarli
17share_twitter: فعال‌سازی هم‌رسانی به Twitter 18share_twitter: فعال‌سازی هم‌رسانی به Twitter
19share_unmark: فعال‌سازی هم‌رسانی به Unmark.it
18show_printlink: نمایش پیوندی برای چاپ مطلب 20show_printlink: نمایش پیوندی برای چاپ مطلب
19wallabag_support_url: نشانی صفحهٔ پشتیبانی wallabag 21wallabag_support_url: نشانی صفحهٔ پشتیبانی wallabag
20wallabag_url: نشانی صفحهٔ wallabag *شما* 22wallabag_url: نشانی صفحهٔ wallabag *شما*
@@ -29,3 +31,5 @@ modify_settings: "اعمال"
29# demo_mode_enabled: "Enable demo mode ? (only used for the wallabag public demo)" 31# demo_mode_enabled: "Enable demo mode ? (only used for the wallabag public demo)"
30# demo_mode_username: "Demo user" 32# demo_mode_username: "Demo user"
31# share_public: Allow public url for entries 33# share_public: Allow public url for entries
34# download_images_enabled: Download images locally
35# restricted_access: Enable authentication for websites with paywall
diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fr.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fr.yml
index 31a80880..f5c886d6 100644
--- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fr.yml
+++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fr.yml
@@ -1,3 +1,4 @@
1settings_changed: Configuration mise à jour
1download_pictures: Télécharger les images sur le serveur 2download_pictures: Télécharger les images sur le serveur
2carrot: Activer le partage vers Carrot 3carrot: Activer le partage vers Carrot
3diaspora_url: URL de Diaspora, si le service Diaspora est activé 4diaspora_url: URL de Diaspora, si le service Diaspora est activé
@@ -15,6 +16,7 @@ share_diaspora: Activer le partage vers Diaspora
15share_mail: Activer le partage par email 16share_mail: Activer le partage par email
16share_shaarli: Activer le partage vers Shaarli 17share_shaarli: Activer le partage vers Shaarli
17share_twitter: Activer le partage vers Twitter 18share_twitter: Activer le partage vers Twitter
19share_unmark: Activer le partage vers Unmark.it
18show_printlink: Afficher un lien pour imprimer 20show_printlink: Afficher un lien pour imprimer
19wallabag_support_url: URL de support de wallabag 21wallabag_support_url: URL de support de wallabag
20wallabag_url: URL de *votre* instance de wallabag 22wallabag_url: URL de *votre* instance de wallabag
@@ -29,3 +31,5 @@ piwik_enabled: Activer Piwik
29demo_mode_enabled: "Activer le mode démo ? (utiliser uniquement pour la démo publique de wallabag)" 31demo_mode_enabled: "Activer le mode démo ? (utiliser uniquement pour la démo publique de wallabag)"
30demo_mode_username: "Utilisateur de la démo" 32demo_mode_username: "Utilisateur de la démo"
31share_public: Autoriser une URL publique pour les articles 33share_public: Autoriser une URL publique pour les articles
34download_images_enabled: Télécharger les images en local
35restricted_access: Activer l'authentification pour les articles derrière un paywall
diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.it.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.it.yml
index ba038556..88a1b4f6 100644
--- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.it.yml
+++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.it.yml
@@ -1,3 +1,4 @@
1# settings_changed: Configuration updated
1download_pictures: Scarica le immagini sul tuo server 2download_pictures: Scarica le immagini sul tuo server
2carrot: Abilita la condivisione con Carrot 3carrot: Abilita la condivisione con Carrot
3diaspora_url: Diaspora URL, se il servizio è abilitato 4diaspora_url: Diaspora URL, se il servizio è abilitato
@@ -15,6 +16,7 @@ share_diaspora: Abilita la condivisione con Diaspora
15share_mail: Abilita la condivisione per email 16share_mail: Abilita la condivisione per email
16share_shaarli: Abilita la condivisione con Shaarli 17share_shaarli: Abilita la condivisione con Shaarli
17share_twitter: Abilita la condivisione con Twitter 18share_twitter: Abilita la condivisione con Twitter
19share_unmark: Abilita la condivisione con Unmark.it
18show_printlink: Mostra un collegamento per stampare il contenuto 20show_printlink: Mostra un collegamento per stampare il contenuto
19wallabag_support_url: URL di supporto per wallabag 21wallabag_support_url: URL di supporto per wallabag
20wallabag_url: URL della *tua* installazione di wallabag 22wallabag_url: URL della *tua* installazione di wallabag
@@ -29,3 +31,5 @@ piwik_enabled: Abilita Piwik
29demo_mode_enabled: "Abilita modalità demo ? (usato solo per la demo pubblica di wallabag)" 31demo_mode_enabled: "Abilita modalità demo ? (usato solo per la demo pubblica di wallabag)"
30demo_mode_username: "Utente Demo" 32demo_mode_username: "Utente Demo"
31# share_public: Allow public url for entries 33# share_public: Allow public url for entries
34# download_images_enabled: Download images locally
35# restricted_access: Enable authentication for websites with paywall
diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.oc.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.oc.yml
index 55249e33..00deeade 100644
--- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.oc.yml
+++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.oc.yml
@@ -1,3 +1,4 @@
1# settings_changed: Configuration updated
1download_pictures: Telecargar los imatges sul servidor 2download_pictures: Telecargar los imatges sul servidor
2carrot: Activar lo partatge cap a Carrot 3carrot: Activar lo partatge cap a Carrot
3diaspora_url: URL de Diaspora, se lo servici Diaspora es activat 4diaspora_url: URL de Diaspora, se lo servici Diaspora es activat
@@ -15,6 +16,7 @@ share_diaspora: Activar lo partatge cap a Diaspora
15share_mail: Activar lo partatge per corrièl 16share_mail: Activar lo partatge per corrièl
16share_shaarli: Activar lo partatge cap a Shaarli 17share_shaarli: Activar lo partatge cap a Shaarli
17share_twitter: Activar lo partatge cap a Twitter 18share_twitter: Activar lo partatge cap a Twitter
19share_unmark: Activar lo partatge cap a Unmark.it
18show_printlink: Afichar un ligam per imprimir 20show_printlink: Afichar un ligam per imprimir
19wallabag_support_url: URL d'assisténcia de wallabag 21wallabag_support_url: URL d'assisténcia de wallabag
20wallabag_url: URL de *vòstra* instància de wallabag 22wallabag_url: URL de *vòstra* instància de wallabag
@@ -29,3 +31,5 @@ piwik_enabled: Activar Piwik
29demo_mode_enabled: "Activar lo mode demostracion ? (utilizar solament per la demostracion publica de wallabag)" 31demo_mode_enabled: "Activar lo mode demostracion ? (utilizar solament per la demostracion publica de wallabag)"
30demo_mode_username: "Utilizaire de la demostracion" 32demo_mode_username: "Utilizaire de la demostracion"
31# share_public: Allow public url for entries 33# share_public: Allow public url for entries
34# download_images_enabled: Download images locally
35# restricted_access: Enable authentication for websites with paywall
diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pl.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pl.yml
index 42cc5b52..744031e8 100644
--- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pl.yml
+++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pl.yml
@@ -1,3 +1,4 @@
1# settings_changed: Configuration updated
1download_pictures: Pobierz obrazy na swój serwer 2download_pictures: Pobierz obrazy na swój serwer
2carrot: Włącz udostępnianie dla Carrot 3carrot: Włącz udostępnianie dla Carrot
3diaspora_url: Adres URL Diaspora, jeżeli usługa jest włączona 4diaspora_url: Adres URL Diaspora, jeżeli usługa jest włączona
@@ -15,6 +16,7 @@ share_diaspora: Włącz udostępnianie dla Diaspora
15share_mail: Włącz udostępnianie przez email 16share_mail: Włącz udostępnianie przez email
16share_shaarli: Włącz udostępnianie dla Shaarli 17share_shaarli: Włącz udostępnianie dla Shaarli
17share_twitter: Włącz udostępnianie dla Twitter 18share_twitter: Włącz udostępnianie dla Twitter
19share_unmark: Włącz udostępnianie dla Unmark.it
18show_printlink: Pokaż link do wydrukowania zawartości 20show_printlink: Pokaż link do wydrukowania zawartości
19wallabag_support_url: Adres URL wsparcia dla wallabag 21wallabag_support_url: Adres URL wsparcia dla wallabag
20wallabag_url: Adres *twojej* instacji wallabag 22wallabag_url: Adres *twojej* instacji wallabag
@@ -29,3 +31,5 @@ piwik_enabled: Włacz Piwik
29demo_mode_enabled: "Włacz tryb demo? (używany wyłącznie dla publicznej demonstracji Wallabag)" 31demo_mode_enabled: "Włacz tryb demo? (używany wyłącznie dla publicznej demonstracji Wallabag)"
30demo_mode_username: "Użytkownik Demonstracyjny" 32demo_mode_username: "Użytkownik Demonstracyjny"
31share_public: Zezwalaj na publiczny adres url dla wpisow 33share_public: Zezwalaj na publiczny adres url dla wpisow
34# download_images_enabled: Download images locally
35# restricted_access: Enable authentication for websites with paywall
diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pt.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pt.yml
index e8260422..1edde87a 100644
--- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pt.yml
+++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pt.yml
@@ -1,3 +1,4 @@
1# settings_changed: Configuration updated
1download_pictures: Download imagens no seu servidor 2download_pictures: Download imagens no seu servidor
2carrot: Habilitar compartilhamento para o Carrot 3carrot: Habilitar compartilhamento para o Carrot
3diaspora_url: URL Diaspora, se o serviço está habilitado 4diaspora_url: URL Diaspora, se o serviço está habilitado
@@ -8,12 +9,14 @@ export_csv: Habilita exportação para CSV
8export_json: Habilita exportação para JSON 9export_json: Habilita exportação para JSON
9export_txt: Habilita exportação para TXT 10export_txt: Habilita exportação para TXT
10export_xml: Habilita exportação para XML 11export_xml: Habilita exportação para XML
11pocket_consumer_key: Chave de consumidor do Pocket para importar conteúdo (https://getpocket.com/developer/docs/authentication) 12# import_with_rabbitmq: Enable RabbitMQ to import data asynchronously
13# import_with_redis: Enable Redis to import data asynchronously
12shaarli_url: URL Shaarli, se o serviço está habilitado 14shaarli_url: URL Shaarli, se o serviço está habilitado
13share_diaspora: Habilitar compartilhamento para o Diaspora 15share_diaspora: Habilitar compartilhamento para o Diaspora
14share_mail: Habilitar compartilhamento por e-mail 16share_mail: Habilitar compartilhamento por e-mail
15share_shaarli: Habilitar compartilhamento para o Shaarli 17share_shaarli: Habilitar compartilhamento para o Shaarli
16share_twitter: Habilitar compartilhamento para o Twitter 18share_twitter: Habilitar compartilhamento para o Twitter
19share_unmark: Habilitar compartilhamento para o Unmark.it
17show_printlink: Mostrar um link para imprimir o conteúdo 20show_printlink: Mostrar um link para imprimir o conteúdo
18wallabag_support_url: URL de Suporte do wallabag 21wallabag_support_url: URL de Suporte do wallabag
19wallabag_url: URL de *sua* instância do wallabag 22wallabag_url: URL de *sua* instância do wallabag
@@ -27,3 +30,6 @@ piwik_site_id: ID de seu website Piwik
27piwik_enabled: Habilitar Piwik 30piwik_enabled: Habilitar Piwik
28demo_mode_enabled: "Habilitar modo demo? (somente usado para o demo público do wallabag)" 31demo_mode_enabled: "Habilitar modo demo? (somente usado para o demo público do wallabag)"
29demo_mode_username: "Usuário demo" 32demo_mode_username: "Usuário demo"
33# share_public: Allow public url for entries
34# download_images_enabled: Download images locally
35# restricted_access: Enable authentication for websites with paywall
diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.ro.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.ro.yml
index 8e72b955..f0c935d3 100644
--- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.ro.yml
+++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.ro.yml
@@ -1,3 +1,4 @@
1# settings_changed: Configuration updated
1download_pictures: Descarcă poze pe server 2download_pictures: Descarcă poze pe server
2carrot: Permite share către Carrot 3carrot: Permite share către Carrot
3diaspora_url: Diaspora URL, dacă serviciul este permis 4diaspora_url: Diaspora URL, dacă serviciul este permis
@@ -15,6 +16,7 @@ share_diaspora: Permite share către Diaspora
15share_mail: Permite share prin email 16share_mail: Permite share prin email
16share_shaarli: Permite share către Shaarli 17share_shaarli: Permite share către Shaarli
17share_twitter: Permite share către Twitter 18share_twitter: Permite share către Twitter
19share_unmark: Permite share către Unmark.it
18show_printlink: Afișează un link pentru a printa content-ul 20show_printlink: Afișează un link pentru a printa content-ul
19wallabag_support_url: URL-ul de suport pentru wallabag 21wallabag_support_url: URL-ul de suport pentru wallabag
20wallabag_url: URL-ul instanței tale wallabag 22wallabag_url: URL-ul instanței tale wallabag
@@ -29,3 +31,5 @@ modify_settings: "aplică"
29# demo_mode_enabled: "Enable demo mode ? (only used for the wallabag public demo)" 31# demo_mode_enabled: "Enable demo mode ? (only used for the wallabag public demo)"
30# demo_mode_username: "Demo user" 32# demo_mode_username: "Demo user"
31# share_public: Allow public url for entries 33# share_public: Allow public url for entries
34# download_images_enabled: Download images locally
35# restricted_access: Enable authentication for websites with paywall
diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.tr.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.tr.yml
index 55f70843..eb40fc5e 100644
--- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.tr.yml
+++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.tr.yml
@@ -1,3 +1,4 @@
1# settings_changed: Configuration updated
1# download_pictures: Download pictures on your server 2# download_pictures: Download pictures on your server
2# carrot: Enable share to Carrot 3# carrot: Enable share to Carrot
3# diaspora_url: Diaspora URL, if the service is enabled 4# diaspora_url: Diaspora URL, if the service is enabled
@@ -15,6 +16,7 @@
15# share_mail: Enable share by email 16# share_mail: Enable share by email
16# share_shaarli: Enable share to Shaarli 17# share_shaarli: Enable share to Shaarli
17# share_twitter: Enable share to Twitter 18# share_twitter: Enable share to Twitter
19# share_unmark: Enable share to Unmark.it
18# show_printlink: Display a link to print content 20# show_printlink: Display a link to print content
19# wallabag_support_url: Support URL for wallabag 21# wallabag_support_url: Support URL for wallabag
20# wallabag_url: URL of *your* wallabag instance 22# wallabag_url: URL of *your* wallabag instance
@@ -29,3 +31,5 @@
29# demo_mode_enabled: "Enable demo mode ? (only used for the wallabag public demo)" 31# demo_mode_enabled: "Enable demo mode ? (only used for the wallabag public demo)"
30# demo_mode_username: "Demo user" 32# demo_mode_username: "Demo user"
31# share_public: Allow public url for entries 33# share_public: Allow public url for entries
34# download_images_enabled: Download images locally
35# restricted_access: Enable authentication for websites with paywall
diff --git a/app/Resources/FOSUserBundle/translations/FOSUserBundle.da.yml b/app/Resources/FOSUserBundle/translations/FOSUserBundle.da.yml
deleted file mode 100644
index 015989ef..00000000
--- a/app/Resources/FOSUserBundle/translations/FOSUserBundle.da.yml
+++ /dev/null
@@ -1,2 +0,0 @@
1Login: "Log ind"
2Enter your email address below and we'll send you password reset instructions.: "Indtast din emailadresse nedenfor, så sender vi dig instrukser til at nulstille din adgangskode."
diff --git a/app/Resources/FOSUserBundle/translations/FOSUserBundle.de.yml b/app/Resources/FOSUserBundle/translations/FOSUserBundle.de.yml
deleted file mode 100644
index 944a0d41..00000000
--- a/app/Resources/FOSUserBundle/translations/FOSUserBundle.de.yml
+++ /dev/null
@@ -1,2 +0,0 @@
1Login: "Anmelden"
2Enter your email address below and we'll send you password reset instructions.: "Tippe deine E-Mail-Adresse unten ein und wir senden dir die Anweisungen, wie du dein Kennwort zurücksetzen kannst."
diff --git a/app/Resources/FOSUserBundle/translations/FOSUserBundle.es.yml b/app/Resources/FOSUserBundle/translations/FOSUserBundle.es.yml
deleted file mode 100644
index 968eb241..00000000
--- a/app/Resources/FOSUserBundle/translations/FOSUserBundle.es.yml
+++ /dev/null
@@ -1,2 +0,0 @@
1Login: "Logearse"
2Enter your email address below and we'll send you password reset instructions.: "Introduzca su dirección de email y le enviaremos las instrucciones para resetear su contraseña."
diff --git a/app/Resources/FOSUserBundle/translations/FOSUserBundle.fr.yml b/app/Resources/FOSUserBundle/translations/FOSUserBundle.fr.yml
deleted file mode 100644
index 1c5ea640..00000000
--- a/app/Resources/FOSUserBundle/translations/FOSUserBundle.fr.yml
+++ /dev/null
@@ -1,2 +0,0 @@
1Login: "Se connecter"
2Enter your email address below and we'll send you password reset instructions.: "Renseignez votre adresse courriel, nous vous enverrons les instructions pour réinitialiser votre mot de passe."
diff --git a/app/Resources/FOSUserBundle/translations/FOSUserBundle.oc.yml b/app/Resources/FOSUserBundle/translations/FOSUserBundle.oc.yml
deleted file mode 100644
index b8a75172..00000000
--- a/app/Resources/FOSUserBundle/translations/FOSUserBundle.oc.yml
+++ /dev/null
@@ -1,2 +0,0 @@
1Login: "Se connectar"
2Enter your email address below and we'll send you password reset instructions.: "Picatz vòstra adreça de corrièl çai-jos, vos mandarem las instruccions per reïnicializar vòstre senhal."
diff --git a/app/Resources/FOSUserBundle/translations/FOSUserBundle.pl.yml b/app/Resources/FOSUserBundle/translations/FOSUserBundle.pl.yml
deleted file mode 100644
index 7e0a2490..00000000
--- a/app/Resources/FOSUserBundle/translations/FOSUserBundle.pl.yml
+++ /dev/null
@@ -1,2 +0,0 @@
1Login: "Logowanie"
2Enter your email address below and we'll send you password reset instructions.: "Wpisz poniżej swój adres email, abyśmy mogli wysłać ci instrukcję resetowania hasła."
diff --git a/app/Resources/FOSUserBundle/translations/FOSUserBundle.pt.yml b/app/Resources/FOSUserBundle/translations/FOSUserBundle.pt.yml
deleted file mode 100644
index 85eadfd8..00000000
--- a/app/Resources/FOSUserBundle/translations/FOSUserBundle.pt.yml
+++ /dev/null
@@ -1,2 +0,0 @@
1Login: "Login"
2Enter your email address below and we'll send you password reset instructions.: "Digite seu endereço de e-mail para enviarmos as instruções de recupeção de sua senha."
diff --git a/app/Resources/static/themes/_global/img/icons/unmark-icon--black.png b/app/Resources/static/themes/_global/img/icons/unmark-icon--black.png
new file mode 100644
index 00000000..45f679ee
--- /dev/null
+++ b/app/Resources/static/themes/_global/img/icons/unmark-icon--black.png
Binary files differ
diff --git a/app/Resources/static/themes/_global/img/list.png b/app/Resources/static/themes/_global/img/list.png
new file mode 100755
index 00000000..bd5aff5a
--- /dev/null
+++ b/app/Resources/static/themes/_global/img/list.png
Binary files differ
diff --git a/app/Resources/static/themes/_global/img/table.png b/app/Resources/static/themes/_global/img/table.png
new file mode 100755
index 00000000..859c4cd8
--- /dev/null
+++ b/app/Resources/static/themes/_global/img/table.png
Binary files differ
diff --git a/app/Resources/static/themes/_global/js/bookmarklet.js b/app/Resources/static/themes/_global/js/bookmarklet.js
index 5174ff47..a497628b 100644
--- a/app/Resources/static/themes/_global/js/bookmarklet.js
+++ b/app/Resources/static/themes/_global/js/bookmarklet.js
@@ -1,4 +1,3 @@
1
2top['bookmarklet-url@wallabag.org'] = 1top['bookmarklet-url@wallabag.org'] =
3 '<!DOCTYPE html><html><head><title>bag it!</title>' + 2 '<!DOCTYPE html><html><head><title>bag it!</title>' +
4 '<link rel="icon" href="tpl/img/favicon.ico" />' + 3 '<link rel="icon" href="tpl/img/favicon.ico" />' +
diff --git a/app/Resources/static/themes/_global/js/shortcuts/entry.js b/app/Resources/static/themes/_global/js/shortcuts/entry.js
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/app/Resources/static/themes/_global/js/shortcuts/entry.js
diff --git a/app/Resources/static/themes/_global/js/shortcuts/main.js b/app/Resources/static/themes/_global/js/shortcuts/main.js
new file mode 100644
index 00000000..c81bf869
--- /dev/null
+++ b/app/Resources/static/themes/_global/js/shortcuts/main.js
@@ -0,0 +1,15 @@
1import Mousetrap from 'mousetrap';
2
3/** Shortcuts **/
4
5/* Go to */
6Mousetrap.bind('g u', () => { window.location.href = Routing.generate('homepage'); });
7Mousetrap.bind('g s', () => { window.location.href = Routing.generate('starred'); });
8Mousetrap.bind('g r', () => { window.location.href = Routing.generate('archive'); });
9Mousetrap.bind('g a', () => { window.location.href = Routing.generate('all'); });
10Mousetrap.bind('g t', () => { window.location.href = Routing.generate('tag'); });
11Mousetrap.bind('g c', () => { window.location.href = Routing.generate('config'); });
12Mousetrap.bind('g i', () => { window.location.href = Routing.generate('import'); });
13Mousetrap.bind('g d', () => { window.location.href = Routing.generate('developer'); });
14Mousetrap.bind('?', () => { window.location.href = Routing.generate('howto'); });
15Mousetrap.bind('g l', () => { window.location.href = Routing.generate('fos_user_security_logout'); });
diff --git a/app/Resources/static/themes/_global/js/tools.js b/app/Resources/static/themes/_global/js/tools.js
index ab30deb1..cee84fa8 100644
--- a/app/Resources/static/themes/_global/js/tools.js
+++ b/app/Resources/static/themes/_global/js/tools.js
@@ -1,4 +1,9 @@
1const $ = require('jquery'); 1import $ from 'jquery';
2import './shortcuts/main';
3import './shortcuts/entry';
4
5/* Allows inline call qr-code call */
6import jrQrcode from 'jr-qrcode'; // eslint-disable-line
2 7
3function supportsLocalStorage() { 8function supportsLocalStorage() {
4 try { 9 try {
@@ -30,7 +35,7 @@ function initFilters() {
30 // no display if filters not available 35 // no display if filters not available
31 if ($('div').is('#filters')) { 36 if ($('div').is('#filters')) {
32 $('#button_filters').show(); 37 $('#button_filters').show();
33 $('.button-collapse-right').sideNav({ edge: 'right' }); 38 $('.js-filters-action').sideNav({ edge: 'right' });
34 $('#clear_form_filters').on('click', () => { 39 $('#clear_form_filters').on('click', () => {
35 $('#filters input').val(''); 40 $('#filters input').val('');
36 $('#filters :checked').removeAttr('checked'); 41 $('#filters :checked').removeAttr('checked');
@@ -43,7 +48,7 @@ function initExport() {
43 // no display if export not available 48 // no display if export not available
44 if ($('div').is('#export')) { 49 if ($('div').is('#export')) {
45 $('#button_export').show(); 50 $('#button_export').show();
46 $('.button-collapse-right').sideNav({ edge: 'right' }); 51 $('.js-export-action').sideNav({ edge: 'right' });
47 } 52 }
48} 53}
49 54
diff --git a/app/Resources/static/themes/baggy/css/main.css b/app/Resources/static/themes/baggy/css/main.css
index 4dfa8790..e16846ea 100755
--- a/app/Resources/static/themes/baggy/css/main.css
+++ b/app/Resources/static/themes/baggy/css/main.css
@@ -297,18 +297,14 @@ h2::after {
297 text-decoration: none; 297 text-decoration: none;
298} 298}
299 299
300#listmode a:hover {
301 opacity: 1;
302}
303
304#listmode.tablemode { 300#listmode.tablemode {
305 background-image: url("../img/baggy/table.png"); 301 background-image: url("../../_global/img/table.png");
306 background-repeat: no-repeat; 302 background-repeat: no-repeat;
307 background-position: bottom; 303 background-position: bottom;
308} 304}
309 305
310#listmode.listmode { 306#listmode.listmode {
311 background-image: url("../img/baggy/list.png"); 307 background-image: url("../../_global/img/list.png");
312 background-repeat: no-repeat; 308 background-repeat: no-repeat;
313 background-position: bottom; 309 background-position: bottom;
314} 310}
@@ -352,9 +348,9 @@ footer a {
352 letter-spacing: -5px; 348 letter-spacing: -5px;
353} 349}
354 350
355.listmode .entry { 351.listmode.entry {
356 width: 100% !important; 352 width: 100%;
357 margin-left: 0 !important; 353 height: inherit;
358} 354}
359 355
360.card-entry-labels { 356.card-entry-labels {
@@ -588,6 +584,7 @@ div.pagination ul {
588 text-align: left; 584 text-align: left;
589 font-style: italic; 585 font-style: italic;
590 color: #999; 586 color: #999;
587 display: inline-flex;
591} 588}
592 589
593div.pagination ul > * { 590div.pagination ul > * {
@@ -620,6 +617,10 @@ div.pagination ul .current {
620 background-color: #ccc; 617 background-color: #ccc;
621} 618}
622 619
620.hide {
621 display: none;
622}
623
623/* ========================================================================== 624/* ==========================================================================
624 2.1 = "save a link" related styles 625 2.1 = "save a link" related styles
625 ========================================================================== */ 626 ========================================================================== */
@@ -936,6 +937,11 @@ a.add-to-wallabag-link-after::after {
936 background-image: url("../../_global/img/icons/diaspora-icon--black.png"); 937 background-image: url("../../_global/img/icons/diaspora-icon--black.png");
937} 938}
938 939
940/* Unmark.it */
941.icon-image--unmark {
942 background-image: url("../../_global/img/icons/unmark-icon--black.png");
943}
944
939/* shaarli */ 945/* shaarli */
940.icon-image--shaarli { 946.icon-image--shaarli {
941 background-image: url("../../_global/img/icons/shaarli.png"); 947 background-image: url("../../_global/img/icons/shaarli.png");
diff --git a/app/Resources/static/themes/baggy/js/autoCompleteTags.js b/app/Resources/static/themes/baggy/js/autoCompleteTags.js
index f287ebfa..64fdaa92 100755
--- a/app/Resources/static/themes/baggy/js/autoCompleteTags.js
+++ b/app/Resources/static/themes/baggy/js/autoCompleteTags.js
@@ -5,4 +5,4 @@ function extractLast(term) {
5 return split(term).pop(); 5 return split(term).pop();
6} 6}
7 7
8export { split, extractLast }; 8export default { split, extractLast };
diff --git a/app/Resources/static/themes/baggy/js/init.js b/app/Resources/static/themes/baggy/js/init.js
index dc11043a..05360a28 100755
--- a/app/Resources/static/themes/baggy/js/init.js
+++ b/app/Resources/static/themes/baggy/js/init.js
@@ -1,11 +1,26 @@
1import { savePercent, retrievePercent } from '../../_global/js/tools'; 1/* jQuery */
2import { toggleSaveLinkForm } from './uiTools'; 2import $ from 'jquery';
3
4/* eslint-disable no-unused-vars */
5/* jquery has default scope */
6import cookie from 'jquery.cookie';
7import ui from 'jquery-ui-browserify';
8/* eslint-enable no-unused-vars */
9
10/* Annotations */
11import annotator from 'annotator';
3 12
4const $ = global.jquery = require('jquery'); 13/* Shortcuts */
5require('jquery.cookie'); 14import './shortcuts/main';
6require('jquery-ui-browserify'); 15import './shortcuts/entry';
7const annotator = require('annotator'); 16import '../../_global/js/shortcuts/main';
17import '../../_global/js/shortcuts/entry';
18
19/* Tools */
20import { savePercent, retrievePercent } from '../../_global/js/tools';
21import toggleSaveLinkForm from './uiTools';
8 22
23global.jquery = $;
9 24
10$.fn.ready(() => { 25$.fn.ready(() => {
11 const $listmode = $('#listmode'); 26 const $listmode = $('#listmode');
diff --git a/app/Resources/static/themes/baggy/js/shortcuts/entry.js b/app/Resources/static/themes/baggy/js/shortcuts/entry.js
new file mode 100644
index 00000000..c87408b9
--- /dev/null
+++ b/app/Resources/static/themes/baggy/js/shortcuts/entry.js
@@ -0,0 +1,26 @@
1import Mousetrap from 'mousetrap';
2import $ from 'jquery';
3
4$(document).ready(() => {
5 if ($('#article').length > 0) {
6 /* Article view */
7 Mousetrap.bind('o', () => {
8 $('div#article_toolbar ul.links a.original')[0].click();
9 });
10
11 /* mark as favorite */
12 Mousetrap.bind('f', () => {
13 $('div#article_toolbar ul.links a.favorite')[0].click();
14 });
15
16 /* mark as read */
17 Mousetrap.bind('a', () => {
18 $('div#article_toolbar ul.links a.markasread')[0].click();
19 });
20
21 /* delete */
22 Mousetrap.bind('del', () => {
23 $('div#article_toolbar ul.links a.delete')[0].click();
24 });
25 }
26});
diff --git a/app/Resources/static/themes/baggy/js/shortcuts/main.js b/app/Resources/static/themes/baggy/js/shortcuts/main.js
new file mode 100644
index 00000000..aed09aee
--- /dev/null
+++ b/app/Resources/static/themes/baggy/js/shortcuts/main.js
@@ -0,0 +1,7 @@
1$(document).ready(() => {
2 Mousetrap.bind('s', () => {
3 $('#search').trigger('click');
4 $('#search_entry_term').focus();
5 return false;
6 });
7});
diff --git a/app/Resources/static/themes/baggy/js/uiTools.js b/app/Resources/static/themes/baggy/js/uiTools.js
index 900b2707..713c53f7 100644
--- a/app/Resources/static/themes/baggy/js/uiTools.js
+++ b/app/Resources/static/themes/baggy/js/uiTools.js
@@ -1,4 +1,4 @@
1const $ = require('jquery'); 1import $ from 'jquery';
2 2
3function toggleSaveLinkForm(url, event) { 3function toggleSaveLinkForm(url, event) {
4 $('#add-link-result').empty(); 4 $('#add-link-result').empty();
@@ -32,4 +32,4 @@ function toggleSaveLinkForm(url, event) {
32 plainUrl.focus(); 32 plainUrl.focus();
33} 33}
34 34
35export { toggleSaveLinkForm }; 35export default toggleSaveLinkForm;
diff --git a/app/Resources/static/themes/material/css/main.css b/app/Resources/static/themes/material/css/main.css
index 408fe14c..f43e6042 100755
--- a/app/Resources/static/themes/material/css/main.css
+++ b/app/Resources/static/themes/material/css/main.css
@@ -150,6 +150,11 @@
150 background-image: url("../../_global/img/icons/diaspora-icon--black.png"); 150 background-image: url("../../_global/img/icons/diaspora-icon--black.png");
151} 151}
152 152
153/* Unmark.it */
154.icon-image--unmark {
155 background-image: url("../../_global/img/icons/unmark-icon--black.png");
156}
157
153/* Shaarli */ 158/* Shaarli */
154.icon-image--shaarli { 159.icon-image--shaarli {
155 background-image: url("../../_global/img/icons/shaarli.png"); 160 background-image: url("../../_global/img/icons/shaarli.png");
@@ -159,7 +164,7 @@ body {
159 display: flex; 164 display: flex;
160 min-height: 100vh; 165 min-height: 100vh;
161 flex-direction: column; 166 flex-direction: column;
162 background: #f0f0f0; 167 background: #fafafa;
163} 168}
164 169
165body.login main { 170body.login main {
@@ -189,7 +194,6 @@ main,
189 194
190.results { 195.results {
191 height: 1em; 196 height: 1em;
192 line-height: 30px;
193} 197}
194 198
195.results .nb-results, 199.results .nb-results,
@@ -198,6 +202,14 @@ main,
198 margin-bottom: 0; 202 margin-bottom: 0;
199} 203}
200 204
205.results .nb-results {
206 display: inline-flex;
207}
208
209.results a {
210 color: #444;
211}
212
201.pagination { 213.pagination {
202 float: right; 214 float: right;
203} 215}
@@ -271,6 +283,16 @@ nav input {
271 color: #aaa; 283 color: #aaa;
272} 284}
273 285
286nav {
287 height: auto;
288}
289
290.nav-wrapper {
291 display: flex;
292 flex-wrap: wrap;
293 justify-content: space-between;
294}
295
274.nav-wrapper .button-collapse { 296.nav-wrapper .button-collapse {
275 padding: 0 15px; 297 padding: 0 15px;
276} 298}
@@ -279,8 +301,10 @@ nav input {
279 display: none; 301 display: none;
280} 302}
281 303
282.nav-panels { 304.nav-panel-buttom {
283 overflow: hidden; 305 display: flex;
306 flex-grow: 1;
307 justify-content: flex-end;
284} 308}
285 309
286.nav-panel-buttom li { 310.nav-panel-buttom li {
@@ -317,11 +341,13 @@ nav input {
317 color: #444; 341 color: #444;
318} 342}
319 343
320.input-field.nav-panel-add label { 344.input-field.nav-panel-add label,
345.input-field.nav-panel-search label {
321 left: 1rem; 346 left: 1rem;
322} 347}
323 348
324.input-field.nav-panel-add .close { 349.input-field.nav-panel-add .close,
350.input-field.nav-panel-search .close {
325 position: absolute; 351 position: absolute;
326 top: 0; 352 top: 0;
327 right: 1rem; 353 right: 1rem;
@@ -340,8 +366,10 @@ nav input {
340} 366}
341 367
342.input-field.nav-panel-add, 368.input-field.nav-panel-add,
343.input-field.nav-panel-add form { 369.input-field.nav-panel-add form,
344 height: 100%; 370.input-field.nav-panel-search,
371.input-field.nav-panel-search form {
372 flex-grow: 1;
345} 373}
346 374
347/* ========================================================================== 375/* ==========================================================================
@@ -411,7 +439,6 @@ nav ul a:hover {
411.side-nav.fixed.right-aligned { 439.side-nav.fixed.right-aligned {
412 right: -250px; 440 right: -250px;
413 left: auto !important; 441 left: auto !important;
414 overflow-y: visible;
415} 442}
416 443
417#filters div.with-checkbox { 444#filters div.with-checkbox {
@@ -535,6 +562,18 @@ a.original {
535 line-height: 24px; 562 line-height: 24px;
536} 563}
537 564
565.card .card-action ul.tools li a.tool {
566 margin-right: 5px !important;
567}
568
569.card-stacked:hover ul.tools-list {
570 display: block;
571}
572
573.card-stacked ul.tools-list {
574 display: none;
575}
576
538.card .card-action a { 577.card .card-action a {
539 color: #fff; 578 color: #fff;
540 margin: 0; 579 margin: 0;
@@ -587,7 +626,55 @@ a.original {
587#article { 626#article {
588 font-size: 20px; 627 font-size: 20px;
589 margin: 0 auto; 628 margin: 0 auto;
590 max-width: 40em; 629 max-width: 45em;
630}
631
632#article article {
633 color: #424242;
634 font-size: 18px;
635 line-height: 1.7em;
636}
637
638#article article h1,
639#article article h2,
640#article article h3,
641#article article h4,
642#article article h5,
643#article article h6 {
644 color: #212121;
645}
646
647#article article h1 strong,
648#article article h2 strong,
649#article article h3 strong,
650#article article h4 strong,
651#article article h5 strong,
652#article article h6 strong {
653 font-weight: 500;
654}
655
656#article article h6 {
657 font-size: 1.2rem;
658}
659
660#article article h5 {
661 font-size: 1.6rem;
662}
663
664#article article h4 {
665 font-size: 1.9rem;
666}
667
668#article article h3 {
669 font-size: 2.2rem;
670}
671
672#article article h2 {
673 font-size: 2.5rem;
674}
675
676#article article h1 {
677 font-size: 2.7rem;
591} 678}
592 679
593#article img, 680#article img,
@@ -596,6 +683,46 @@ a.original {
596 height: auto; 683 height: auto;
597} 684}
598 685
686#article article a {
687 border-bottom: 1px dotted #03a9f4;
688 text-decoration: none;
689}
690
691#article article a:hover {
692 border-bottom-style: solid;
693}
694
695#article article ul {
696 padding-left: 30px;
697}
698
699#article article ul,
700#article article ul li {
701 list-style-type: disc;
702}
703
704#article article blockquote {
705 font-style: italic;
706}
707
708#article article strong {
709 font-weight: bold;
710}
711
712#article article pre {
713 box-sizing: border-box;
714 margin: 0 0 1.75em;
715 border: #e3f2fd 1px solid;
716 width: 100%;
717 padding: 10px;
718 font-family: monospace;
719 font-size: 0.8em;
720 white-space: pre;
721 overflow: auto;
722 background: #f5f5f5;
723 border-radius: 3px;
724}
725
599#article > header > h1 { 726#article > header > h1 {
600 font-size: 2em; 727 font-size: 2em;
601 margin: 2.1rem 0 0.68rem; 728 margin: 2.1rem 0 0.68rem;
@@ -691,6 +818,14 @@ article aside .tools li {
691 width: auto; 818 width: auto;
692 } 819 }
693 820
821 .nav-panels .action {
822 padding-right: 0.75rem;
823 }
824
825 .nav-panel-buttom {
826 justify-content: space-around;
827 }
828
694 #article { 829 #article {
695 max-width: 35em; 830 max-width: 35em;
696 margin-left: auto; 831 margin-left: auto;
@@ -727,11 +862,13 @@ article aside .tools li {
727 .pagination li.next { 862 .pagination li.next {
728 width: auto; 863 width: auto;
729 } 864 }
730}
731 865
732@media only screen and (min-width: 400px) { 866 .drag-target + .drag-target {
733 .nav-panel-buttom { 867 height: 50%;
734 float: right; 868 }
869
870 .drag-target + .drag-target + .drag-target {
871 top: 50%;
735 } 872 }
736} 873}
737 874
diff --git a/app/Resources/static/themes/material/js/init.js b/app/Resources/static/themes/material/js/init.js
index a68269e0..0b2832c0 100755
--- a/app/Resources/static/themes/material/js/init.js
+++ b/app/Resources/static/themes/material/js/init.js
@@ -1,10 +1,21 @@
1/* jQuery */
2import $ from 'jquery';
3
4/* Annotations */
5import annotator from 'annotator';
6
7/* Tools */
1import { savePercent, retrievePercent, initFilters, initExport } from '../../_global/js/tools'; 8import { savePercent, retrievePercent, initFilters, initExport } from '../../_global/js/tools';
2 9
3const $ = require('jquery'); 10/* Import shortcuts */
11import './shortcuts/main';
12import './shortcuts/entry';
13import '../../_global/js/shortcuts/main';
14import '../../_global/js/shortcuts/entry';
4 15
5global.jQuery = $;
6require('materialize'); // eslint-disable-line 16require('materialize'); // eslint-disable-line
7const annotator = require('annotator'); 17
18global.jQuery = $;
8 19
9$(document).ready(() => { 20$(document).ready(() => {
10 // sideNav 21 // sideNav
@@ -44,7 +55,7 @@ $(document).ready(() => {
44 $('.nav-panels .action').hide(100); 55 $('.nav-panels .action').hide(100);
45 $('.nav-panel-menu').addClass('hidden'); 56 $('.nav-panel-menu').addClass('hidden');
46 $('.nav-panels').css('background', 'white'); 57 $('.nav-panels').css('background', 'white');
47 $('#searchfield').focus(); 58 $('#search_entry_term').focus();
48 return false; 59 return false;
49 }); 60 });
50 $('.close').on('click', () => { 61 $('.close').on('click', () => {
diff --git a/app/Resources/static/themes/material/js/shortcuts/entry.js b/app/Resources/static/themes/material/js/shortcuts/entry.js
new file mode 100644
index 00000000..e19800bd
--- /dev/null
+++ b/app/Resources/static/themes/material/js/shortcuts/entry.js
@@ -0,0 +1,26 @@
1import Mousetrap from 'mousetrap';
2import $ from 'jquery';
3
4$(document).ready(() => {
5 if ($('#article').length > 0) {
6 /* open original article */
7 Mousetrap.bind('o', () => {
8 $('ul.side-nav a.original i')[0].click();
9 });
10
11 /* mark as favorite */
12 Mousetrap.bind('f', () => {
13 $('ul.side-nav a.favorite i')[0].click();
14 });
15
16 /* mark as read */
17 Mousetrap.bind('a', () => {
18 $('ul.side-nav a.markasread i')[0].click();
19 });
20
21 /* delete */
22 Mousetrap.bind('del', () => {
23 $('ul.side-nav a.delete i')[0].click();
24 });
25 }
26});
diff --git a/app/Resources/static/themes/material/js/shortcuts/main.js b/app/Resources/static/themes/material/js/shortcuts/main.js
new file mode 100644
index 00000000..0a2d2a69
--- /dev/null
+++ b/app/Resources/static/themes/material/js/shortcuts/main.js
@@ -0,0 +1,75 @@
1import Mousetrap from 'mousetrap';
2import $ from 'jquery';
3
4function toggleFocus(cardToToogleFocus) {
5 if (cardToToogleFocus) {
6 $(cardToToogleFocus).toggleClass('z-depth-4');
7 }
8}
9
10$(document).ready(() => {
11 const cards = $('#content').find('.card');
12 const cardNumber = cards.length;
13 let cardIndex = 0;
14 /* If we come from next page */
15 if (window.location.hash === '#prev') {
16 cardIndex = cardNumber - 1;
17 }
18 let card = cards[cardIndex];
19 const pagination = $('.pagination');
20
21 /* Show nothing on quickstart */
22 if ($('#content > div.quickstart').length > 0) {
23 return;
24 }
25
26 /* Focus current card */
27 toggleFocus(card);
28
29 /* Actions */
30 Mousetrap.bind('g n', () => {
31 $('#nav-btn-add').trigger('click');
32 return false;
33 });
34
35 Mousetrap.bind('s', () => {
36 $('#nav-btn-search').trigger('click');
37 return false;
38 });
39
40 Mousetrap.bind('esc', () => {
41 $('.close').trigger('click');
42 });
43
44 /* Select right card. If there's a next page, go to next page */
45 Mousetrap.bind('right', () => {
46 if (cardIndex >= 0 && cardIndex < cardNumber - 1) {
47 toggleFocus(card);
48 cardIndex += 1;
49 card = cards[cardIndex];
50 toggleFocus(card);
51 return;
52 }
53 if (pagination.length > 0 && pagination.find('li.next:not(.disabled)').length > 0 && cardIndex === cardNumber - 1) {
54 window.location.href = window.location.origin + $(pagination).find('li.next a').attr('href');
55 }
56 });
57
58 /* Select previous card. If there's a previous page, go to next page */
59 Mousetrap.bind('left', () => {
60 if (cardIndex > 0 && cardIndex < cardNumber) {
61 toggleFocus(card);
62 cardIndex -= 1;
63 card = cards[cardIndex];
64 toggleFocus(card);
65 return;
66 }
67 if (pagination.length > 0 && $(pagination).find('li.prev:not(.disabled)').length > 0 && cardIndex === 0) {
68 window.location.href = `${window.location.origin + $(pagination).find('li.prev a').attr('href')}#prev`;
69 }
70 });
71
72 Mousetrap.bind('enter', () => {
73 window.location.href = window.location.origin + $(card).find('span.card-title a').attr('href');
74 });
75});
diff --git a/app/config/config.yml b/app/config/config.yml
index ca0ba1d8..68f70d67 100644
--- a/app/config/config.yml
+++ b/app/config/config.yml
@@ -51,6 +51,8 @@ wallabag_core:
51 rss_limit: 50 51 rss_limit: 50
52 reading_speed: 1 52 reading_speed: 1
53 cache_lifetime: 10 53 cache_lifetime: 10
54 action_mark_as_read: 1
55 list_mode: 1
54 fetching_error_message: | 56 fetching_error_message: |
55 wallabag can't retrieve contents for this article. Please <a href="http://doc.wallabag.org/en/master/user/errors_during_fetching.html#how-can-i-help-to-fix-that">troubleshoot this issue</a>. 57 wallabag can't retrieve contents for this article. Please <a href="http://doc.wallabag.org/en/master/user/errors_during_fetching.html#how-can-i-help-to-fix-that">troubleshoot this issue</a>.
56 58
@@ -78,7 +80,7 @@ doctrine:
78 dbname: "%database_name%" 80 dbname: "%database_name%"
79 user: "%database_user%" 81 user: "%database_user%"
80 password: "%database_password%" 82 password: "%database_password%"
81 charset: UTF8 83 charset: "%database_charset%"
82 path: "%database_path%" 84 path: "%database_path%"
83 unix_socket: "%database_socket%" 85 unix_socket: "%database_socket%"
84 server_version: 5.6 86 server_version: 5.6
@@ -115,12 +117,26 @@ swiftmailer:
115fos_rest: 117fos_rest:
116 param_fetcher_listener: true 118 param_fetcher_listener: true
117 body_listener: true 119 body_listener: true
118 format_listener: true
119 view: 120 view:
121 mime_types:
122 csv:
123 - 'text/csv'
124 - 'text/plain'
125 pdf:
126 - 'application/pdf'
127 epub:
128 - 'application/epub+zip'
129 mobi:
130 - 'application/x-mobipocket-ebook'
120 view_response_listener: 'force' 131 view_response_listener: 'force'
121 formats: 132 formats:
122 xml: true 133 xml: true
123 json : true 134 json: true
135 txt: true
136 csv: true
137 pdf: true
138 epub: true
139 mobi: true
124 templating_formats: 140 templating_formats:
125 html: true 141 html: true
126 force_redirects: 142 force_redirects:
@@ -129,10 +145,21 @@ fos_rest:
129 default_engine: twig 145 default_engine: twig
130 routing_loader: 146 routing_loader:
131 default_format: json 147 default_format: json
148 format_listener:
149 enabled: true
150 rules:
151 - { path: "^/api/entries/([0-9]+)/export.(.*)", priorities: ['epub', 'mobi', 'pdf', 'txt', 'csv'], fallback_format: json, prefer_extension: false }
152 - { path: "^/api", priorities: ['json', 'xml'], fallback_format: json, prefer_extension: false }
153 - { path: "^/annotations", priorities: ['json', 'xml'], fallback_format: json, prefer_extension: false }
154 # for an unknown reason, EACH REQUEST goes to FOS\RestBundle\EventListener\FormatListener
155 # so we need to add custom rule for custom api export but also for all other routes of the application...
156 - { path: '^/', priorities: ['text/html', '*/*'], fallback_format: html, prefer_extension: false }
132 157
133nelmio_api_doc: 158nelmio_api_doc:
134 sandbox: 159 sandbox:
135 enabled: false 160 enabled: false
161 cache:
162 enabled: true
136 name: wallabag API documentation 163 name: wallabag API documentation
137 164
138nelmio_cors: 165nelmio_cors:
@@ -185,6 +212,7 @@ fos_user:
185 from_email: 212 from_email:
186 address: "%from_email%" 213 address: "%from_email%"
187 sender_name: wallabag 214 sender_name: wallabag
215
188fos_oauth_server: 216fos_oauth_server:
189 db_driver: orm 217 db_driver: orm
190 client_class: Wallabag\ApiBundle\Entity\Client 218 client_class: Wallabag\ApiBundle\Entity\Client
@@ -192,7 +220,7 @@ fos_oauth_server:
192 refresh_token_class: Wallabag\ApiBundle\Entity\RefreshToken 220 refresh_token_class: Wallabag\ApiBundle\Entity\RefreshToken
193 auth_code_class: Wallabag\ApiBundle\Entity\AuthCode 221 auth_code_class: Wallabag\ApiBundle\Entity\AuthCode
194 service: 222 service:
195 user_provider: fos_user.user_manager 223 user_provider: fos_user.user_provider.username_email
196 options: 224 options:
197 refresh_token_lifetime: 1209600 225 refresh_token_lifetime: 1209600
198 226
@@ -213,16 +241,6 @@ kphoen_rulerz:
213 executors: 241 executors:
214 doctrine: true 242 doctrine: true
215 243
216lexik_maintenance:
217 authorized:
218 ips: ['127.0.0.1']
219 driver:
220 ttl: 3600
221 class: 'Lexik\Bundle\MaintenanceBundle\Drivers\DatabaseDriver'
222 response:
223 code: 503
224 status: "wallabag Service Temporarily Unavailable"
225
226old_sound_rabbit_mq: 244old_sound_rabbit_mq:
227 connections: 245 connections:
228 default: 246 default:
@@ -243,6 +261,11 @@ old_sound_rabbit_mq:
243 exchange_options: 261 exchange_options:
244 name: 'wallabag.import.readability' 262 name: 'wallabag.import.readability'
245 type: topic 263 type: topic
264 import_pinboard:
265 connection: default
266 exchange_options:
267 name: 'wallabag.import.pinboard'
268 type: topic
246 import_instapaper: 269 import_instapaper:
247 connection: default 270 connection: default
248 exchange_options: 271 exchange_options:
@@ -277,6 +300,7 @@ old_sound_rabbit_mq:
277 queue_options: 300 queue_options:
278 name: 'wallabag.import.pocket' 301 name: 'wallabag.import.pocket'
279 callback: wallabag_import.consumer.amqp.pocket 302 callback: wallabag_import.consumer.amqp.pocket
303 qos_options: {prefetch_count: "%rabbitmq_prefetch_count%"}
280 import_readability: 304 import_readability:
281 connection: default 305 connection: default
282 exchange_options: 306 exchange_options:
@@ -285,6 +309,7 @@ old_sound_rabbit_mq:
285 queue_options: 309 queue_options:
286 name: 'wallabag.import.readability' 310 name: 'wallabag.import.readability'
287 callback: wallabag_import.consumer.amqp.readability 311 callback: wallabag_import.consumer.amqp.readability
312 qos_options: {prefetch_count: "%rabbitmq_prefetch_count%"}
288 import_instapaper: 313 import_instapaper:
289 connection: default 314 connection: default
290 exchange_options: 315 exchange_options:
@@ -293,6 +318,16 @@ old_sound_rabbit_mq:
293 queue_options: 318 queue_options:
294 name: 'wallabag.import.instapaper' 319 name: 'wallabag.import.instapaper'
295 callback: wallabag_import.consumer.amqp.instapaper 320 callback: wallabag_import.consumer.amqp.instapaper
321 qos_options: {prefetch_count: "%rabbitmq_prefetch_count%"}
322 import_pinboard:
323 connection: default
324 exchange_options:
325 name: 'wallabag.import.pinboard'
326 type: topic
327 queue_options:
328 name: 'wallabag.import.pinboard'
329 callback: wallabag_import.consumer.amqp.pinboard
330 qos_options: {prefetch_count: "%rabbitmq_prefetch_count%"}
296 import_wallabag_v1: 331 import_wallabag_v1:
297 connection: default 332 connection: default
298 exchange_options: 333 exchange_options:
@@ -301,6 +336,7 @@ old_sound_rabbit_mq:
301 queue_options: 336 queue_options:
302 name: 'wallabag.import.wallabag_v1' 337 name: 'wallabag.import.wallabag_v1'
303 callback: wallabag_import.consumer.amqp.wallabag_v1 338 callback: wallabag_import.consumer.amqp.wallabag_v1
339 qos_options: {prefetch_count: "%rabbitmq_prefetch_count%"}
304 import_wallabag_v2: 340 import_wallabag_v2:
305 connection: default 341 connection: default
306 exchange_options: 342 exchange_options:
@@ -309,6 +345,7 @@ old_sound_rabbit_mq:
309 queue_options: 345 queue_options:
310 name: 'wallabag.import.wallabag_v2' 346 name: 'wallabag.import.wallabag_v2'
311 callback: wallabag_import.consumer.amqp.wallabag_v2 347 callback: wallabag_import.consumer.amqp.wallabag_v2
348 qos_options: {prefetch_count: "%rabbitmq_prefetch_count%"}
312 import_firefox: 349 import_firefox:
313 connection: default 350 connection: default
314 exchange_options: 351 exchange_options:
@@ -317,6 +354,7 @@ old_sound_rabbit_mq:
317 queue_options: 354 queue_options:
318 name: 'wallabag.import.firefox' 355 name: 'wallabag.import.firefox'
319 callback: wallabag_import.consumer.amqp.firefox 356 callback: wallabag_import.consumer.amqp.firefox
357 qos_options: {prefetch_count: "%rabbitmq_prefetch_count%"}
320 import_chrome: 358 import_chrome:
321 connection: default 359 connection: default
322 exchange_options: 360 exchange_options:
@@ -325,3 +363,18 @@ old_sound_rabbit_mq:
325 queue_options: 363 queue_options:
326 name: 'wallabag.import.chrome' 364 name: 'wallabag.import.chrome'
327 callback: wallabag_import.consumer.amqp.chrome 365 callback: wallabag_import.consumer.amqp.chrome
366 qos_options: {prefetch_count: "%rabbitmq_prefetch_count%"}
367
368fos_js_routing:
369 routes_to_expose:
370 - homepage
371 - starred
372 - archive
373 - all
374 - tag
375 - config
376 - import
377 - developer
378 - howto
379 - fos_user_security_logout
380 - new
diff --git a/app/config/config_test.yml b/app/config/config_test.yml
index 3eab6fb2..f5e2c25e 100644
--- a/app/config/config_test.yml
+++ b/app/config/config_test.yml
@@ -28,7 +28,7 @@ doctrine:
28 dbname: "%test_database_name%" 28 dbname: "%test_database_name%"
29 user: "%test_database_user%" 29 user: "%test_database_user%"
30 password: "%test_database_password%" 30 password: "%test_database_password%"
31 charset: UTF8 31 charset: "%test_database_charset%"
32 path: "%test_database_path%" 32 path: "%test_database_path%"
33 orm: 33 orm:
34 metadata_cache_driver: 34 metadata_cache_driver:
diff --git a/app/config/parameters.yml.dist b/app/config/parameters.yml.dist
index ece4903a..97f51ed1 100644
--- a/app/config/parameters.yml.dist
+++ b/app/config/parameters.yml.dist
@@ -19,16 +19,18 @@ parameters:
19 database_path: "%kernel.root_dir%/../data/db/wallabag.sqlite" 19 database_path: "%kernel.root_dir%/../data/db/wallabag.sqlite"
20 database_table_prefix: wallabag_ 20 database_table_prefix: wallabag_
21 database_socket: null 21 database_socket: null
22 # with MySQL, use "utf8mb4" if you got problem with content with emojis
23 database_charset: utf8
22 24
23 mailer_transport: smtp 25 mailer_transport: smtp
24 mailer_host: 127.0.0.1 26 mailer_host: 127.0.0.1
25 mailer_user: ~ 27 mailer_user: ~
26 mailer_password: ~ 28 mailer_password: ~
27 29
28 locale: en 30 locale: en
29 31
30 # A secret key that's used to generate certain security-related tokens 32 # A secret key that's used to generate certain security-related tokens
31 secret: ovmpmAWXRCabNlMgzlzFXDYmCFfzGv 33 secret: ovmpmAWXRCabNlMgzlzFXDYmCFfzGv
32 34
33 # two factor stuff 35 # two factor stuff
34 twofactor_auth: true 36 twofactor_auth: true
@@ -47,9 +49,14 @@ parameters:
47 rabbitmq_port: 5672 49 rabbitmq_port: 5672
48 rabbitmq_user: guest 50 rabbitmq_user: guest
49 rabbitmq_password: guest 51 rabbitmq_password: guest
52 rabbitmq_prefetch_count: 10
50 53
51 # Redis processing 54 # Redis processing
52 redis_scheme: tcp 55 redis_scheme: tcp
53 redis_host: localhost 56 redis_host: localhost
54 redis_port: 6379 57 redis_port: 6379
55 redis_path: null 58 redis_path: null
59 redis_password: null
60
61 # sites credentials
62 sites_credentials: {}
diff --git a/app/config/parameters_test.yml b/app/config/parameters_test.yml
index 2943b27a..5f2e25bb 100644
--- a/app/config/parameters_test.yml
+++ b/app/config/parameters_test.yml
@@ -6,3 +6,4 @@ parameters:
6 test_database_user: null 6 test_database_user: null
7 test_database_password: null 7 test_database_password: null
8 test_database_path: '%kernel.root_dir%/../data/db/wallabag_test.sqlite' 8 test_database_path: '%kernel.root_dir%/../data/db/wallabag_test.sqlite'
9 test_database_charset: utf8
diff --git a/app/config/routing.yml b/app/config/routing.yml
index 750ed435..0bd2d130 100644
--- a/app/config/routing.yml
+++ b/app/config/routing.yml
@@ -17,10 +17,6 @@ wallabag_api:
17 type: annotation 17 type: annotation
18 prefix: / 18 prefix: /
19 19
20wallabag_api:
21 resource: "@WallabagApiBundle/Resources/config/routing.yml"
22 prefix: /
23
24app: 20app:
25 resource: "@WallabagCoreBundle/Controller/" 21 resource: "@WallabagCoreBundle/Controller/"
26 type: annotation 22 type: annotation
@@ -52,3 +48,6 @@ craue_config_settings_modify:
52 path: /settings 48 path: /settings
53 defaults: 49 defaults:
54 _controller: CraueConfigBundle:Settings:modify 50 _controller: CraueConfigBundle:Settings:modify
51
52fos_js_routing:
53 resource: "@FOSJsRoutingBundle/Resources/config/routing/routing.xml"
diff --git a/app/config/routing_rest.yml b/app/config/routing_rest.yml
index 52d395dd..29f4ab14 100644
--- a/app/config/routing_rest.yml
+++ b/app/config/routing_rest.yml
@@ -1,4 +1,3 @@
1Rest_Wallabag: 1Rest_Wallabag:
2 type : rest 2 type : rest
3 resource: "@WallabagApiBundle/Resources/config/routing_rest.yml" 3 resource: "@WallabagApiBundle/Resources/config/routing_rest.yml"
4
diff --git a/app/config/services.yml b/app/config/services.yml
index a57ef0f3..9a1ce80b 100644
--- a/app/config/services.yml
+++ b/app/config/services.yml
@@ -32,13 +32,13 @@ services:
32 - { name: twig.extension } 32 - { name: twig.extension }
33 33
34 wallabag.locale_listener: 34 wallabag.locale_listener:
35 class: Wallabag\CoreBundle\EventListener\LocaleListener 35 class: Wallabag\CoreBundle\Event\Listener\LocaleListener
36 arguments: ["%kernel.default_locale%"] 36 arguments: ["%kernel.default_locale%"]
37 tags: 37 tags:
38 - { name: kernel.event_subscriber } 38 - { name: kernel.event_subscriber }
39 39
40 wallabag.user_locale_listener: 40 wallabag.user_locale_listener:
41 class: Wallabag\CoreBundle\EventListener\UserLocaleListener 41 class: Wallabag\CoreBundle\Event\Listener\UserLocaleListener
42 arguments: ["@session"] 42 arguments: ["@session"]
43 tags: 43 tags:
44 - { name: kernel.event_listener, event: security.interactive_login, method: onInteractiveLogin } 44 - { name: kernel.event_listener, event: security.interactive_login, method: onInteractiveLogin }
diff --git a/app/config/tests/parameters_test.mysql.yml b/app/config/tests/parameters_test.mysql.yml
index d8512845..bca2d466 100644
--- a/app/config/tests/parameters_test.mysql.yml
+++ b/app/config/tests/parameters_test.mysql.yml
@@ -6,3 +6,4 @@ parameters:
6 test_database_user: root 6 test_database_user: root
7 test_database_password: ~ 7 test_database_password: ~
8 test_database_path: ~ 8 test_database_path: ~
9 test_database_charset: utf8mb4
diff --git a/app/config/tests/parameters_test.pgsql.yml b/app/config/tests/parameters_test.pgsql.yml
index 41383868..3e18d4a0 100644
--- a/app/config/tests/parameters_test.pgsql.yml
+++ b/app/config/tests/parameters_test.pgsql.yml
@@ -6,3 +6,4 @@ parameters:
6 test_database_user: travis 6 test_database_user: travis
7 test_database_password: ~ 7 test_database_password: ~
8 test_database_path: ~ 8 test_database_path: ~
9 test_database_charset: utf8
diff --git a/app/config/tests/parameters_test.sqlite.yml b/app/config/tests/parameters_test.sqlite.yml
index 1952e3a6..b8a5f41a 100644
--- a/app/config/tests/parameters_test.sqlite.yml
+++ b/app/config/tests/parameters_test.sqlite.yml
@@ -6,3 +6,4 @@ parameters:
6 test_database_user: ~ 6 test_database_user: ~
7 test_database_password: ~ 7 test_database_password: ~
8 test_database_path: "%kernel.root_dir%/../data/db/wallabag_test.sqlite" 8 test_database_path: "%kernel.root_dir%/../data/db/wallabag_test.sqlite"
9 test_database_charset: utf8