aboutsummaryrefslogtreecommitdiffhomepage
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/DoctrineMigrations/Version20170501115751.php61
-rwxr-xr-xapp/Resources/static/themes/baggy/index.js3
-rwxr-xr-xapp/Resources/static/themes/material/css/layout.scss6
-rw-r--r--app/Resources/static/themes/material/css/media_queries.scss15
-rw-r--r--app/config/parameters.yml.dist3
-rw-r--r--app/config/security.yml1
-rw-r--r--app/config/wallabag.yml1
7 files changed, 73 insertions, 17 deletions
diff --git a/app/DoctrineMigrations/Version20170501115751.php b/app/DoctrineMigrations/Version20170501115751.php
new file mode 100644
index 00000000..7f068eb8
--- /dev/null
+++ b/app/DoctrineMigrations/Version20170501115751.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 * Add site credential table to store username & password for some website (behind authentication or paywall)
12 */
13class Version20170501115751 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($schema->hasTable($this->getTable('site_credential')), 'It seems that you already played this migration.');
36
37 $table = $schema->createTable($this->getTable('site_credential'));
38 $table->addColumn('id', 'integer', ['autoincrement' => true]);
39 $table->addColumn('user_id', 'integer');
40 $table->addColumn('host', 'string', ['length' => 255]);
41 $table->addColumn('username', 'text');
42 $table->addColumn('password', 'text');
43 $table->addColumn('createdAt', 'datetime');
44 $table->addIndex(['user_id'], 'idx_user');
45 $table->setPrimaryKey(['id']);
46 $table->addForeignKeyConstraint($this->getTable('user'), ['user_id'], ['id'], [], 'fk_user');
47
48 if ('postgresql' === $this->connection->getDatabasePlatform()->getName()) {
49 $schema->dropSequence('site_credential_id_seq');
50 $schema->createSequence('site_credential_id_seq');
51 }
52 }
53
54 /**
55 * @param Schema $schema
56 */
57 public function down(Schema $schema)
58 {
59 $schema->dropTable($this->getTable('site_credential'));
60 }
61}
diff --git a/app/Resources/static/themes/baggy/index.js b/app/Resources/static/themes/baggy/index.js
index 5d448018..39ad49aa 100755
--- a/app/Resources/static/themes/baggy/index.js
+++ b/app/Resources/static/themes/baggy/index.js
@@ -256,8 +256,7 @@ $(document).ready(() => {
256 ========================================================================== */ 256 ========================================================================== */
257 257
258 $('article a[href^="http"]').after( 258 $('article a[href^="http"]').after(
259 () => `<a href="${$(this).attr('href')}" class="add-to-wallabag-link-after" ` + 259 () => `<a href="${$(this).attr('href')}" class="add-to-wallabag-link-after" title="add to wallabag"></a>`,
260 'title="add to wallabag"></a>',
261 ); 260 );
262 261
263 $('.add-to-wallabag-link-after').click((event) => { 262 $('.add-to-wallabag-link-after').click((event) => {
diff --git a/app/Resources/static/themes/material/css/layout.scss b/app/Resources/static/themes/material/css/layout.scss
index ed32f125..cfdbf2b3 100755
--- a/app/Resources/static/themes/material/css/layout.scss
+++ b/app/Resources/static/themes/material/css/layout.scss
@@ -18,12 +18,6 @@ body {
18 border-bottom: 1px solid #ddd; 18 border-bottom: 1px solid #ddd;
19} 19}
20 20
21nav,
22body:not(.entry) main,
23footer {
24 padding-left: 240px;
25}
26
27main, 21main,
28#content, 22#content,
29.valign-wrapper { 23.valign-wrapper {
diff --git a/app/Resources/static/themes/material/css/media_queries.scss b/app/Resources/static/themes/material/css/media_queries.scss
index 96f34494..08c2d8ab 100644
--- a/app/Resources/static/themes/material/css/media_queries.scss
+++ b/app/Resources/static/themes/material/css/media_queries.scss
@@ -2,16 +2,19 @@
2 Media queries 2 Media queries
3 ========================================================================== */ 3 ========================================================================== */
4 4
5@media only screen and (max-width: 992px) { 5@media only screen and (min-width: 992px) {
6 header, 6 nav,
7 main, 7 body:not(.entry) main,
8 footer { 8 footer {
9 padding-left: 0; 9 padding-left: 240px;
10 } 10 }
11}
11 12
12 nav, 13@media only screen and (max-width: 992px) {
14 header,
13 main, 15 main,
14 footer { 16 footer,
17 nav {
15 padding-left: 0; 18 padding-left: 0;
16 } 19 }
17 20
diff --git a/app/config/parameters.yml.dist b/app/config/parameters.yml.dist
index 914fb1ef..b3fe11c8 100644
--- a/app/config/parameters.yml.dist
+++ b/app/config/parameters.yml.dist
@@ -60,6 +60,3 @@ parameters:
60 redis_port: 6379 60 redis_port: 6379
61 redis_path: null 61 redis_path: null
62 redis_password: null 62 redis_password: null
63
64 # sites credentials
65 sites_credentials: {}
diff --git a/app/config/security.yml b/app/config/security.yml
index ffb1d356..e14a0bd1 100644
--- a/app/config/security.yml
+++ b/app/config/security.yml
@@ -61,6 +61,7 @@ security:
61 - { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY } 61 - { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY }
62 - { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY } 62 - { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY }
63 - { path: /(unread|starred|archive).xml$, roles: IS_AUTHENTICATED_ANONYMOUSLY } 63 - { path: /(unread|starred|archive).xml$, roles: IS_AUTHENTICATED_ANONYMOUSLY }
64 - { path: /tags/(.*).xml$, roles: IS_AUTHENTICATED_ANONYMOUSLY }
64 - { path: ^/share, roles: IS_AUTHENTICATED_ANONYMOUSLY } 65 - { path: ^/share, roles: IS_AUTHENTICATED_ANONYMOUSLY }
65 - { path: ^/settings, roles: ROLE_SUPER_ADMIN } 66 - { path: ^/settings, roles: ROLE_SUPER_ADMIN }
66 - { path: ^/annotations, roles: ROLE_USER } 67 - { path: ^/annotations, roles: ROLE_USER }
diff --git a/app/config/wallabag.yml b/app/config/wallabag.yml
index 51b7e4e3..b45934e4 100644
--- a/app/config/wallabag.yml
+++ b/app/config/wallabag.yml
@@ -26,6 +26,7 @@ wallabag_core:
26 fetching_error_message: | 26 fetching_error_message: |
27 wallabag can't retrieve contents for this article. Please <a href="http://doc.wallabag.org/en/user/errors_during_fetching.html#how-can-i-help-to-fix-that">troubleshoot this issue</a>. 27 wallabag can't retrieve contents for this article. Please <a href="http://doc.wallabag.org/en/user/errors_during_fetching.html#how-can-i-help-to-fix-that">troubleshoot this issue</a>.
28 api_limit_mass_actions: 10 28 api_limit_mass_actions: 10
29 encryption_key_path: "%kernel.root_dir%/../data/site-credentials-secret-key.txt"
29 default_internal_settings: 30 default_internal_settings:
30 - 31 -
31 name: share_public 32 name: share_public