mirror of
https://github.com/wallabag/wallabag.git
synced 2024-11-26 11:01:04 +00:00
Merge pull request #3173 from wallabag/domain-name-param
remove craueconfig domain name setting and add a proper one in parame…
This commit is contained in:
commit
679aaf0836
18 changed files with 60 additions and 20 deletions
53
app/DoctrineMigrations/Version20170606155640.php
Normal file
53
app/DoctrineMigrations/Version20170606155640.php
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Application\Migrations;
|
||||||
|
|
||||||
|
use Doctrine\DBAL\Migrations\AbstractMigration;
|
||||||
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
||||||
|
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove wallabag_url from craue_config_setting.
|
||||||
|
* It has been moved into the parameters.yml
|
||||||
|
*/
|
||||||
|
class Version20170606155640 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)
|
||||||
|
{
|
||||||
|
$apiUserRegistration = $this->container
|
||||||
|
->get('doctrine.orm.default_entity_manager')
|
||||||
|
->getConnection()
|
||||||
|
->fetchArray('SELECT * FROM '.$this->getTable('craue_config_setting')." WHERE name = 'wallabag_url'");
|
||||||
|
|
||||||
|
$this->skipIf(false === $apiUserRegistration, 'It seems that you already played this migration.');
|
||||||
|
|
||||||
|
$this->addSql('DELETE FROM '.$this->getTable('craue_config_setting')." WHERE name = 'wallabag_url'");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
|
*/
|
||||||
|
public function down(Schema $schema)
|
||||||
|
{
|
||||||
|
$this->addSql('INSERT INTO '.$this->getTable('craue_config_setting')." (name, value, section) VALUES ('wallabag_url', 'wallabag.me', 'misc')");
|
||||||
|
}
|
||||||
|
}
|
|
@ -20,7 +20,6 @@ share_twitter: Aktiver deling gennem Twitter
|
||||||
share_unmark: Aktiver deling gennem Unmark.it
|
share_unmark: Aktiver deling gennem Unmark.it
|
||||||
show_printlink: Vis et link til print-indhold
|
show_printlink: Vis et link til print-indhold
|
||||||
wallabag_support_url: Support-URL for wallabag
|
wallabag_support_url: Support-URL for wallabag
|
||||||
wallabag_url: URL for *sin* wallabag-installation
|
|
||||||
entry: "artikel"
|
entry: "artikel"
|
||||||
export: "eksport"
|
export: "eksport"
|
||||||
import: "import"
|
import: "import"
|
||||||
|
|
|
@ -20,7 +20,6 @@ share_twitter: Teilen zu Twitter aktiveren
|
||||||
share_unmark: Teilen zu Unmark.it aktiveren
|
share_unmark: Teilen zu Unmark.it aktiveren
|
||||||
show_printlink: Link anzeigen, um den Inhalt auszudrucken
|
show_printlink: Link anzeigen, um den Inhalt auszudrucken
|
||||||
wallabag_support_url: Support-URL für wallabag
|
wallabag_support_url: Support-URL für wallabag
|
||||||
wallabag_url: URL von *deiner* wallabag-Instanz
|
|
||||||
entry: "Artikel"
|
entry: "Artikel"
|
||||||
export: "Export"
|
export: "Export"
|
||||||
import: "Import"
|
import: "Import"
|
||||||
|
|
|
@ -20,7 +20,6 @@ share_twitter: Enable share to Twitter
|
||||||
share_unmark: Enable share to Unmark.it
|
share_unmark: Enable share to Unmark.it
|
||||||
show_printlink: Display a link to print content
|
show_printlink: Display a link to print content
|
||||||
wallabag_support_url: Support URL for wallabag
|
wallabag_support_url: Support URL for wallabag
|
||||||
wallabag_url: URL of *your* wallabag instance
|
|
||||||
entry: "article"
|
entry: "article"
|
||||||
export: "export"
|
export: "export"
|
||||||
import: "import"
|
import: "import"
|
||||||
|
|
|
@ -20,7 +20,6 @@ share_twitter: Activar compartir con Twitter
|
||||||
share_unmark: Activar compartir con Unmark.it
|
share_unmark: Activar compartir con Unmark.it
|
||||||
show_printlink: Mostrar un enlace para imprimir contenido
|
show_printlink: Mostrar un enlace para imprimir contenido
|
||||||
wallabag_support_url: URL de soporte de wallabag
|
wallabag_support_url: URL de soporte de wallabag
|
||||||
wallabag_url: URL de *tu* instancia de wallabag
|
|
||||||
entry: "artículo"
|
entry: "artículo"
|
||||||
export: "exportar"
|
export: "exportar"
|
||||||
import: "importar"
|
import: "importar"
|
||||||
|
|
|
@ -20,7 +20,6 @@ share_twitter: فعالسازی همرسانی به Twitter
|
||||||
share_unmark: فعالسازی همرسانی به Unmark.it
|
share_unmark: فعالسازی همرسانی به Unmark.it
|
||||||
show_printlink: نمایش پیوندی برای چاپ مطلب
|
show_printlink: نمایش پیوندی برای چاپ مطلب
|
||||||
wallabag_support_url: نشانی صفحهٔ پشتیبانی wallabag
|
wallabag_support_url: نشانی صفحهٔ پشتیبانی wallabag
|
||||||
wallabag_url: نشانی صفحهٔ wallabag *شما*
|
|
||||||
entry: "مقاله"
|
entry: "مقاله"
|
||||||
export: "برونسپاری"
|
export: "برونسپاری"
|
||||||
import: "درونریزی"
|
import: "درونریزی"
|
||||||
|
|
|
@ -20,7 +20,6 @@ share_twitter: Activer le partage vers Twitter
|
||||||
share_unmark: Activer le partage vers Unmark.it
|
share_unmark: Activer le partage vers Unmark.it
|
||||||
show_printlink: Afficher un lien pour imprimer
|
show_printlink: Afficher un lien pour imprimer
|
||||||
wallabag_support_url: URL de support de wallabag
|
wallabag_support_url: URL de support de wallabag
|
||||||
wallabag_url: URL de *votre* instance de wallabag
|
|
||||||
entry: "article"
|
entry: "article"
|
||||||
export: "export"
|
export: "export"
|
||||||
import: "import"
|
import: "import"
|
||||||
|
|
|
@ -20,7 +20,6 @@ share_twitter: Abilita la condivisione con Twitter
|
||||||
share_unmark: Abilita la condivisione con Unmark.it
|
share_unmark: Abilita la condivisione con Unmark.it
|
||||||
show_printlink: Mostra un collegamento per stampare il contenuto
|
show_printlink: Mostra un collegamento per stampare il contenuto
|
||||||
wallabag_support_url: URL di supporto per wallabag
|
wallabag_support_url: URL di supporto per wallabag
|
||||||
wallabag_url: URL della *tua* installazione di wallabag
|
|
||||||
entry: "contenuto"
|
entry: "contenuto"
|
||||||
export: "esporta"
|
export: "esporta"
|
||||||
import: "importa"
|
import: "importa"
|
||||||
|
|
|
@ -20,7 +20,6 @@ share_twitter: Activar lo partatge cap a Twitter
|
||||||
share_unmark: Activar lo partatge cap a Unmark.it
|
share_unmark: Activar lo partatge cap a Unmark.it
|
||||||
show_printlink: Afichar un ligam per imprimir
|
show_printlink: Afichar un ligam per imprimir
|
||||||
wallabag_support_url: URL d'assisténcia de wallabag
|
wallabag_support_url: URL d'assisténcia de wallabag
|
||||||
wallabag_url: URL de *vòstra* instància de wallabag
|
|
||||||
entry: "article"
|
entry: "article"
|
||||||
export: "expòrt"
|
export: "expòrt"
|
||||||
import: "impòrt"
|
import: "impòrt"
|
||||||
|
|
|
@ -20,7 +20,6 @@ share_twitter: Włącz udostępnianie dla Twitter
|
||||||
share_unmark: Włącz udostępnianie dla Unmark.it
|
share_unmark: Włącz udostępnianie dla Unmark.it
|
||||||
show_printlink: Pokaż link do wydrukowania zawartości
|
show_printlink: Pokaż link do wydrukowania zawartości
|
||||||
wallabag_support_url: Adres URL wsparcia dla wallabag
|
wallabag_support_url: Adres URL wsparcia dla wallabag
|
||||||
wallabag_url: Adres *twojej* instacji wallabag
|
|
||||||
entry: "artykuł"
|
entry: "artykuł"
|
||||||
export: "eksport"
|
export: "eksport"
|
||||||
import: "import"
|
import: "import"
|
||||||
|
|
|
@ -20,7 +20,6 @@ share_twitter: Habilitar compartilhamento para o Twitter
|
||||||
share_unmark: Habilitar compartilhamento para o Unmark.it
|
share_unmark: Habilitar compartilhamento para o Unmark.it
|
||||||
show_printlink: Mostrar um link para imprimir o conteúdo
|
show_printlink: Mostrar um link para imprimir o conteúdo
|
||||||
wallabag_support_url: URL de Suporte do wallabag
|
wallabag_support_url: URL de Suporte do wallabag
|
||||||
wallabag_url: URL de *sua* instância do wallabag
|
|
||||||
entry: "artigo"
|
entry: "artigo"
|
||||||
export: "exportar"
|
export: "exportar"
|
||||||
import: "importar"
|
import: "importar"
|
||||||
|
|
|
@ -20,7 +20,6 @@ share_twitter: Permite share către Twitter
|
||||||
share_unmark: Permite share către Unmark.it
|
share_unmark: Permite share către Unmark.it
|
||||||
show_printlink: Afișează un link pentru a printa content-ul
|
show_printlink: Afișează un link pentru a printa content-ul
|
||||||
wallabag_support_url: URL-ul de suport pentru wallabag
|
wallabag_support_url: URL-ul de suport pentru wallabag
|
||||||
wallabag_url: URL-ul instanței tale wallabag
|
|
||||||
entry: "alticol"
|
entry: "alticol"
|
||||||
export: "exportă"
|
export: "exportă"
|
||||||
import: "importă"
|
import: "importă"
|
||||||
|
|
|
@ -23,6 +23,8 @@ parameters:
|
||||||
# with PostgreSQL and SQLite, you must set "utf8"
|
# with PostgreSQL and SQLite, you must set "utf8"
|
||||||
database_charset: utf8mb4
|
database_charset: utf8mb4
|
||||||
|
|
||||||
|
domain_name: https://your-wallabag-url-instance.com
|
||||||
|
|
||||||
mailer_transport: smtp
|
mailer_transport: smtp
|
||||||
mailer_host: 127.0.0.1
|
mailer_host: 127.0.0.1
|
||||||
mailer_user: ~
|
mailer_user: ~
|
||||||
|
|
|
@ -147,10 +147,6 @@ wallabag_core:
|
||||||
name: wallabag_support_url
|
name: wallabag_support_url
|
||||||
value: https://www.wallabag.org/pages/support.html
|
value: https://www.wallabag.org/pages/support.html
|
||||||
section: misc
|
section: misc
|
||||||
-
|
|
||||||
name: wallabag_url
|
|
||||||
value: http://v2.wallabag.org
|
|
||||||
section: misc
|
|
||||||
-
|
-
|
||||||
name: api_user_registration
|
name: api_user_registration
|
||||||
value: 0
|
value: 0
|
||||||
|
|
|
@ -151,7 +151,7 @@ class ConfigController extends Controller
|
||||||
'token' => $config->getRssToken(),
|
'token' => $config->getRssToken(),
|
||||||
],
|
],
|
||||||
'twofactor_auth' => $this->getParameter('twofactor_auth'),
|
'twofactor_auth' => $this->getParameter('twofactor_auth'),
|
||||||
'wallabag_url' => $this->get('craue_config')->get('wallabag_url'),
|
'wallabag_url' => $this->getParameter('domain_name'),
|
||||||
'enabled_users' => $this->getDoctrine()
|
'enabled_users' => $this->getDoctrine()
|
||||||
->getRepository('WallabagUserBundle:User')
|
->getRepository('WallabagUserBundle:User')
|
||||||
->getSumEnabledUsers(),
|
->getSumEnabledUsers(),
|
||||||
|
|
|
@ -123,7 +123,7 @@ services:
|
||||||
wallabag_core.helper.entries_export:
|
wallabag_core.helper.entries_export:
|
||||||
class: Wallabag\CoreBundle\Helper\EntriesExport
|
class: Wallabag\CoreBundle\Helper\EntriesExport
|
||||||
arguments:
|
arguments:
|
||||||
- '@=service(''craue_config'').get(''wallabag_url'')'
|
- '%domain_name%'
|
||||||
- src/Wallabag/CoreBundle/Resources/public/themes/_global/img/appicon/apple-touch-icon-152.png
|
- src/Wallabag/CoreBundle/Resources/public/themes/_global/img/appicon/apple-touch-icon-152.png
|
||||||
|
|
||||||
wallabag.operator.array.matches:
|
wallabag.operator.array.matches:
|
||||||
|
@ -196,7 +196,7 @@ services:
|
||||||
arguments:
|
arguments:
|
||||||
- "@wallabag_core.entry.download_images.client"
|
- "@wallabag_core.entry.download_images.client"
|
||||||
- "%kernel.root_dir%/../web/assets/images"
|
- "%kernel.root_dir%/../web/assets/images"
|
||||||
- '@=service(''craue_config'').get(''wallabag_url'')'
|
- '%domain_name%'
|
||||||
- "@logger"
|
- "@logger"
|
||||||
|
|
||||||
wallabag_core.entry.download_images.client:
|
wallabag_core.entry.download_images.client:
|
||||||
|
|
|
@ -7,7 +7,7 @@ services:
|
||||||
- "%scheb_two_factor.email.sender_email%"
|
- "%scheb_two_factor.email.sender_email%"
|
||||||
- "%scheb_two_factor.email.sender_name%"
|
- "%scheb_two_factor.email.sender_name%"
|
||||||
- '@=service(''craue_config'').get(''wallabag_support_url'')'
|
- '@=service(''craue_config'').get(''wallabag_support_url'')'
|
||||||
- '@=service(''craue_config'').get(''wallabag_url'')'
|
- '%domain_name%'
|
||||||
|
|
||||||
wallabag_user.password_resetting:
|
wallabag_user.password_resetting:
|
||||||
class: Wallabag\UserBundle\EventListener\PasswordResettingListener
|
class: Wallabag\UserBundle\EventListener\PasswordResettingListener
|
||||||
|
|
|
@ -989,7 +989,7 @@ class EntryControllerTest extends WallabagCoreTestCase
|
||||||
$this->assertEquals($url, $entry->getUrl());
|
$this->assertEquals($url, $entry->getUrl());
|
||||||
$this->assertContains('Perpignan', $entry->getTitle());
|
$this->assertContains('Perpignan', $entry->getTitle());
|
||||||
// instead of checking for the filename (which might change) check that the image is now local
|
// instead of checking for the filename (which might change) check that the image is now local
|
||||||
$this->assertContains('http://v2.wallabag.org/assets/images/', $entry->getContent());
|
$this->assertContains('https://your-wallabag-url-instance.com/assets/images/', $entry->getContent());
|
||||||
|
|
||||||
$client->getContainer()->get('craue_config')->set('download_images_enabled', 0);
|
$client->getContainer()->get('craue_config')->set('download_images_enabled', 0);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue