Added migration for Scuttle sharing

This commit is contained in:
Nicolas Lœuillet 2017-03-27 22:13:13 +02:00 committed by Jeremy Benoist
parent fb9f100e8f
commit b5a5377af1
No known key found for this signature in database
GPG key ID: FB413A58C7715C86
9 changed files with 64 additions and 10 deletions

View file

@ -0,0 +1,54 @@
<?php
namespace Application\Migrations;
use Doctrine\DBAL\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
* Add the share_scuttle internal setting.
*/
class Version20170327194233 extends AbstractMigration implements ContainerAwareInterface
{
/**
* @var ContainerInterface
*/
private $container;
public function setContainer(ContainerInterface $container = null)
{
$this->container = $container;
}
private function getTable($tableName)
{
return $this->container->getParameter('database_table_prefix').$tableName;
}
/**
* @param Schema $schema
*/
public function up(Schema $schema)
{
$scuttle = $this->container
->get('doctrine.orm.default_entity_manager')
->getConnection()
->fetchArray('SELECT * FROM '.$this->getTable('craue_config_setting')." WHERE name = 'share_scuttle'");
$this->skipIf(false !== $scuttle, 'It seems that you already played this migration.');
$this->addSql('INSERT INTO '.$this->getTable('craue_config_setting')." (name, value, section) VALUES ('share_scuttle', '1', 'entry')");
$this->addSql('INSERT INTO '.$this->getTable('craue_config_setting')." (name, value, section) VALUES ('scuttle_url', 'http://scuttle.org', 'entry')");
}
/**
* @param Schema $schema
*/
public function down(Schema $schema)
{
$this->addSql('DELETE FROM '.$this->getTable('craue_config_setting')." WHERE name = 'share_scuttle';");
$this->addSql('DELETE FROM '.$this->getTable('craue_config_setting')." WHERE name = 'scuttle_url';");
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1 KiB

View file

@ -341,7 +341,7 @@ class InstallCommand extends ContainerAwareCommand
'name' => 'scuttle_url',
'value' => 'http://scuttle.org',
'section' => 'entry',
],
],
[
'name' => 'share_mail',
'value' => '1',

View file

@ -54,7 +54,7 @@ class LoadSettingData extends AbstractFixture implements OrderedFixtureInterface
'name' => 'share_scuttle',
'value' => '1',
'section' => 'entry',
],
],
[
'name' => 'shaarli_url',
'value' => 'http://myshaarli.com',
@ -64,7 +64,7 @@ class LoadSettingData extends AbstractFixture implements OrderedFixtureInterface
'name' => 'scuttle_url',
'value' => 'http://scuttle.org',
'section' => 'entry',
],
],
[
'name' => 'share_mail',
'value' => '1',

View file

@ -5,14 +5,14 @@
"2": "https://www.wallabag.org/features/",
"3": "0",
"4": "1",
"5": "\n\t\t<p>Here are some features. If one is missing, you can <a href=\"https://github.com/wallabag/wallabag\">open a new issue</a>.</p>\n<ul class=\"list-group\"><li class=\"list-group-item\"><span class=\"glyphicon glyphicon-ok\"></span> wallabag is free and open source. Forever.</li>\n<li class=\"list-group-item\"><span class=\"glyphicon glyphicon-ok\"></span> No time to read? Save a link in your wallabag to read it later</li>\n<li class=\"list-group-item\"><span class=\"glyphicon glyphicon-ok\"></span> Read the saved articles in a comfortable view: the content, only the content</li>\n<li class=\"list-group-item\"><span class=\"glyphicon glyphicon-ok\"></span> You save all the content: text and pictures</li>\n<li class=\"list-group-item\"><span class=\"glyphicon glyphicon-ok\"></span> You can easily migrate from others private services.</li>\n<li class=\"list-group-item\"><span class=\"glyphicon glyphicon-ok\"></span> You like an article? Share it by email, on twitter, <a href=\"http://scuttle.org\">Scuttle</a> or in your <a href=\"https://github.com/sebsauvage/Shaarli\">shaarli</a></li>\n<li class=\"list-group-item\"><span class=\"glyphicon glyphicon-ok\"></span> Because we are increasingly mobile, wallabag fits all your devices</li>\n<li class=\"list-group-item\"><span class=\"glyphicon glyphicon-ok\"></span> Saving a link is so easy because we provide you many tools: extensions for Chrome and Firefox, iOS, Android and Windows Phone application, a bookmarklet, a simple field in your config webpage. <a title=\"Download wallabag\" href=\"https://www.wallabag.org/downloads/\">You can download third-party applications here</a>.</li>\n<li class=\"list-group-item\"><span class=\"glyphicon glyphicon-ok\"></span> RSS feeds allows you to read your saved links in your RSS agregator</li>\n<li class=\"list-group-item\"><span class=\"glyphicon glyphicon-ok\"></span> You can set tags to your entries.</li>\n<li class=\"list-group-item\"><span class=\"glyphicon glyphicon-ok\"></span> wallabag is multilingual: french, english, spanish, german, italian, russian, persian, czech, polish, ukrainian and slovienian.</li>\n<li class=\"list-group-item\"><span class=\"glyphicon glyphicon-ok\"></span> Youre not the only one at home to use wallabag? its good, wallabag is multi users</li>\n<li class=\"list-group-item\"><span class=\"glyphicon glyphicon-ok\"></span> You prefer a dark template? Perfect, many templates are available in the configuration screen</li>\n<li class=\"list-group-item\"><span class=\"glyphicon glyphicon-ok\"></span> Many storage allowed: sqlite, mysql and postgresql</li>\n<li class=\"list-group-item\"><span class=\"glyphicon glyphicon-ok\"></span> Scroll position is saved: when you return on an article, you come back where you was. So convenient!</li>\n<li class=\"list-group-item\"><span class=\"glyphicon glyphicon-ok\"></span> You can flattr flattrable articles directly from your wallabag</li>\n<li class=\"list-group-item\"><span class=\"glyphicon glyphicon-ok\"></span> You want to retrieve your wallabag datas? hey, remember, wallabag is open source, you can export it</li>\n</ul>",
"5": "\n\t\t<p>Here are some features. If one is missing, you can <a href=\"https://github.com/wallabag/wallabag\">open a new issue</a>.</p>\n<ul class=\"list-group\"><li class=\"list-group-item\"><span class=\"glyphicon glyphicon-ok\"></span> wallabag is free and open source. Forever.</li>\n<li class=\"list-group-item\"><span class=\"glyphicon glyphicon-ok\"></span> No time to read? Save a link in your wallabag to read it later</li>\n<li class=\"list-group-item\"><span class=\"glyphicon glyphicon-ok\"></span> Read the saved articles in a comfortable view: the content, only the content</li>\n<li class=\"list-group-item\"><span class=\"glyphicon glyphicon-ok\"></span> You save all the content: text and pictures</li>\n<li class=\"list-group-item\"><span class=\"glyphicon glyphicon-ok\"></span> You can easily migrate from others private services.</li>\n<li class=\"list-group-item\"><span class=\"glyphicon glyphicon-ok\"></span> You like an article? Share it by email, on twitter or in your <a href=\"https://github.com/sebsauvage/Shaarli\">shaarli</a></li>\n<li class=\"list-group-item\"><span class=\"glyphicon glyphicon-ok\"></span> Because we are increasingly mobile, wallabag fits all your devices</li>\n<li class=\"list-group-item\"><span class=\"glyphicon glyphicon-ok\"></span> Saving a link is so easy because we provide you many tools: extensions for Chrome and Firefox, iOS, Android and Windows Phone application, a bookmarklet, a simple field in your config webpage. <a title=\"Download wallabag\" href=\"https://www.wallabag.org/downloads/\">You can download third-party applications here</a>.</li>\n<li class=\"list-group-item\"><span class=\"glyphicon glyphicon-ok\"></span> RSS feeds allows you to read your saved links in your RSS agregator</li>\n<li class=\"list-group-item\"><span class=\"glyphicon glyphicon-ok\"></span> You can set tags to your entries.</li>\n<li class=\"list-group-item\"><span class=\"glyphicon glyphicon-ok\"></span> wallabag is multilingual: french, english, spanish, german, italian, russian, persian, czech, polish, ukrainian and slovienian.</li>\n<li class=\"list-group-item\"><span class=\"glyphicon glyphicon-ok\"></span> Youre not the only one at home to use wallabag? its good, wallabag is multi users</li>\n<li class=\"list-group-item\"><span class=\"glyphicon glyphicon-ok\"></span> You prefer a dark template? Perfect, many templates are available in the configuration screen</li>\n<li class=\"list-group-item\"><span class=\"glyphicon glyphicon-ok\"></span> Many storage allowed: sqlite, mysql and postgresql</li>\n<li class=\"list-group-item\"><span class=\"glyphicon glyphicon-ok\"></span> Scroll position is saved: when you return on an article, you come back where you was. So convenient!</li>\n<li class=\"list-group-item\"><span class=\"glyphicon glyphicon-ok\"></span> You can flattr flattrable articles directly from your wallabag</li>\n<li class=\"list-group-item\"><span class=\"glyphicon glyphicon-ok\"></span> You want to retrieve your wallabag datas? hey, remember, wallabag is open source, you can export it</li>\n</ul>",
"6": "1",
"id": "3",
"title": "Features - wallabag",
"url": "https://www.wallabag.org/features/",
"is_read": "0",
"is_fav": "1",
"content": "\n\t\t<p>Here are some features. If one is missing, you can <a href=\"https://github.com/wallabag/wallabag\">open a new issue</a>.</p>\n<ul class=\"list-group\"><li class=\"list-group-item\"><span class=\"glyphicon glyphicon-ok\"></span> wallabag is free and open source. Forever.</li>\n<li class=\"list-group-item\"><span class=\"glyphicon glyphicon-ok\"></span> No time to read? Save a link in your wallabag to read it later</li>\n<li class=\"list-group-item\"><span class=\"glyphicon glyphicon-ok\"></span> Read the saved articles in a comfortable view: the content, only the content</li>\n<li class=\"list-group-item\"><span class=\"glyphicon glyphicon-ok\"></span> You save all the content: text and pictures</li>\n<li class=\"list-group-item\"><span class=\"glyphicon glyphicon-ok\"></span> You can easily migrate from others private services.</li>\n<li class=\"list-group-item\"><span class=\"glyphicon glyphicon-ok\"></span> You like an article? Share it by email, on twitter, <a href=\"http://scuttle.org\">Scuttle</a> or in your <a href=\"https://github.com/sebsauvage/Shaarli\">shaarli</a></li>\n<li class=\"list-group-item\"><span class=\"glyphicon glyphicon-ok\"></span> Because we are increasingly mobile, wallabag fits all your devices</li>\n<li class=\"list-group-item\"><span class=\"glyphicon glyphicon-ok\"></span> Saving a link is so easy because we provide you many tools: extensions for Chrome and Firefox, iOS, Android and Windows Phone application, a bookmarklet, a simple field in your config webpage. <a title=\"Download wallabag\" href=\"https://www.wallabag.org/downloads/\">You can download third-party applications here</a>.</li>\n<li class=\"list-group-item\"><span class=\"glyphicon glyphicon-ok\"></span> RSS feeds allows you to read your saved links in your RSS agregator</li>\n<li class=\"list-group-item\"><span class=\"glyphicon glyphicon-ok\"></span> You can set tags to your entries.</li>\n<li class=\"list-group-item\"><span class=\"glyphicon glyphicon-ok\"></span> wallabag is multilingual: french, english, spanish, german, italian, russian, persian, czech, polish, ukrainian and slovienian.</li>\n<li class=\"list-group-item\"><span class=\"glyphicon glyphicon-ok\"></span> Youre not the only one at home to use wallabag? its good, wallabag is multi users</li>\n<li class=\"list-group-item\"><span class=\"glyphicon glyphicon-ok\"></span> You prefer a dark template? Perfect, many templates are available in the configuration screen</li>\n<li class=\"list-group-item\"><span class=\"glyphicon glyphicon-ok\"></span> Many storage allowed: sqlite, mysql and postgresql</li>\n<li class=\"list-group-item\"><span class=\"glyphicon glyphicon-ok\"></span> Scroll position is saved: when you return on an article, you come back where you was. So convenient!</li>\n<li class=\"list-group-item\"><span class=\"glyphicon glyphicon-ok\"></span> You can flattr flattrable articles directly from your wallabag</li>\n<li class=\"list-group-item\"><span class=\"glyphicon glyphicon-ok\"></span> You want to retrieve your wallabag datas? hey, remember, wallabag is open source, you can export it</li>\n</ul>",
"content": "\n\t\t<p>Here are some features. If one is missing, you can <a href=\"https://github.com/wallabag/wallabag\">open a new issue</a>.</p>\n<ul class=\"list-group\"><li class=\"list-group-item\"><span class=\"glyphicon glyphicon-ok\"></span> wallabag is free and open source. Forever.</li>\n<li class=\"list-group-item\"><span class=\"glyphicon glyphicon-ok\"></span> No time to read? Save a link in your wallabag to read it later</li>\n<li class=\"list-group-item\"><span class=\"glyphicon glyphicon-ok\"></span> Read the saved articles in a comfortable view: the content, only the content</li>\n<li class=\"list-group-item\"><span class=\"glyphicon glyphicon-ok\"></span> You save all the content: text and pictures</li>\n<li class=\"list-group-item\"><span class=\"glyphicon glyphicon-ok\"></span> You can easily migrate from others private services.</li>\n<li class=\"list-group-item\"><span class=\"glyphicon glyphicon-ok\"></span> You like an article? Share it by email, on twitter or in your <a href=\"https://github.com/sebsauvage/Shaarli\">shaarli</a></li>\n<li class=\"list-group-item\"><span class=\"glyphicon glyphicon-ok\"></span> Because we are increasingly mobile, wallabag fits all your devices</li>\n<li class=\"list-group-item\"><span class=\"glyphicon glyphicon-ok\"></span> Saving a link is so easy because we provide you many tools: extensions for Chrome and Firefox, iOS, Android and Windows Phone application, a bookmarklet, a simple field in your config webpage. <a title=\"Download wallabag\" href=\"https://www.wallabag.org/downloads/\">You can download third-party applications here</a>.</li>\n<li class=\"list-group-item\"><span class=\"glyphicon glyphicon-ok\"></span> RSS feeds allows you to read your saved links in your RSS agregator</li>\n<li class=\"list-group-item\"><span class=\"glyphicon glyphicon-ok\"></span> You can set tags to your entries.</li>\n<li class=\"list-group-item\"><span class=\"glyphicon glyphicon-ok\"></span> wallabag is multilingual: french, english, spanish, german, italian, russian, persian, czech, polish, ukrainian and slovienian.</li>\n<li class=\"list-group-item\"><span class=\"glyphicon glyphicon-ok\"></span> Youre not the only one at home to use wallabag? its good, wallabag is multi users</li>\n<li class=\"list-group-item\"><span class=\"glyphicon glyphicon-ok\"></span> You prefer a dark template? Perfect, many templates are available in the configuration screen</li>\n<li class=\"list-group-item\"><span class=\"glyphicon glyphicon-ok\"></span> Many storage allowed: sqlite, mysql and postgresql</li>\n<li class=\"list-group-item\"><span class=\"glyphicon glyphicon-ok\"></span> Scroll position is saved: when you return on an article, you come back where you was. So convenient!</li>\n<li class=\"list-group-item\"><span class=\"glyphicon glyphicon-ok\"></span> You can flattr flattrable articles directly from your wallabag</li>\n<li class=\"list-group-item\"><span class=\"glyphicon glyphicon-ok\"></span> You want to retrieve your wallabag datas? hey, remember, wallabag is open source, you can export it</li>\n</ul>",
"user_id": "1",
"tags": ""
},

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long