--- /dev/null
+<?php
+
+namespace Application\Migrations;
+
+use Doctrine\DBAL\Migrations\AbstractMigration;
+use Doctrine\DBAL\Schema\Schema;
+use Symfony\Component\DependencyInjection\ContainerAwareInterface;
+use Symfony\Component\DependencyInjection\ContainerInterface;
+
+class Version20161031132655 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)
+ {
+ $this->addSql("INSERT INTO \"".$this->getTable('craue_config_setting')."\" (name, value, section) VALUES ('download_images_enabled', 0, 'misc')");
+ }
+
+ /**
+ * @param Schema $schema
+ */
+ public function down(Schema $schema)
+ {
+ $this->abortIf($this->connection->getDatabasePlatform()->getName() == 'sqlite', 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.');
+
+ $this->addSql("DELETE FROM \"".$this->getTable('craue_config_setting')."\" WHERE name = 'download_images_enabled';");
+ }
+}
demo_mode_enabled: "Aktiver demo-indstilling? (anvendes kun til wallabags offentlige demo)"
demo_mode_username: "Demobruger"
# share_public: Allow public url for entries
+# download_images_enabled: Download images locally
demo_mode_enabled: "Test-Modus aktivieren? (nur für die öffentliche wallabag-Demo genutzt)"
demo_mode_username: "Test-Benutzer"
share_public: Erlaube eine öffentliche URL für Einträge
+# download_images_enabled: Download images locally
demo_mode_enabled: "Enable demo mode ? (only used for the wallabag public demo)"
demo_mode_username: "Demo user"
share_public: Allow public url for entries
+download_images_enabled: Download images locally
demo_mode_enabled: "Activar modo demo (sólo usado para la demo de wallabag)"
demo_mode_username: "Nombre de usuario demo"
# share_public: Allow public url for entries
+# download_images_enabled: Download images locally
# demo_mode_enabled: "Enable demo mode ? (only used for the wallabag public demo)"
# demo_mode_username: "Demo user"
# share_public: Allow public url for entries
+# download_images_enabled: Download images locally
demo_mode_enabled: "Activer le mode démo ? (utiliser uniquement pour la démo publique de wallabag)"
demo_mode_username: "Utilisateur de la démo"
share_public: Autoriser une URL publique pour les articles
+download_images_enabled: Télécharger les images en local
demo_mode_enabled: "Abilita modalità demo ? (usato solo per la demo pubblica di wallabag)"
demo_mode_username: "Utente Demo"
# share_public: Allow public url for entries
+# download_images_enabled: Download images locally
demo_mode_enabled: "Activar lo mode demostracion ? (utilizar solament per la demostracion publica de wallabag)"
demo_mode_username: "Utilizaire de la demostracion"
# share_public: Allow public url for entries
+# download_images_enabled: Download images locally
demo_mode_enabled: "Włacz tryb demo? (używany wyłącznie dla publicznej demonstracji Wallabag)"
demo_mode_username: "Użytkownik Demonstracyjny"
share_public: Zezwalaj na publiczny adres url dla wpisow
+# download_images_enabled: Download images locally
# demo_mode_enabled: "Enable demo mode ? (only used for the wallabag public demo)"
# demo_mode_username: "Demo user"
# share_public: Allow public url for entries
+# download_images_enabled: Download images locally
# demo_mode_enabled: "Enable demo mode ? (only used for the wallabag public demo)"
# demo_mode_username: "Demo user"
# share_public: Allow public url for entries
+# download_images_enabled: Download images locally
],
[
'name' => 'wallabag_url',
- 'value' => 'http://v2.wallabag.org',
+ 'value' => '',
'section' => 'misc',
],
[
[
'name' => 'download_images_enabled',
'value' => '0',
- 'section' => 'image',
- ],
- [
- 'name' => 'download_images_with_rabbitmq',
- 'value' => '0',
- 'section' => 'image',
- ],
- [
- 'name' => 'download_images_with_redis',
- 'value' => '0',
- 'section' => 'image',
+ 'section' => 'misc',
],
];
[
'name' => 'download_images_enabled',
'value' => '0',
- 'section' => 'image',
- ],
- [
- 'name' => 'download_images_with_rabbitmq',
- 'value' => '0',
- 'section' => 'image',
- ],
- [
- 'name' => 'download_images_with_redis',
- 'value' => '0',
- 'section' => 'image',
+ 'section' => 'misc',
],
];
/**
* Download all images from the html.
*
+ * @todo If we want to add async download, it should be done in that method
+ *
* @param Config $config
* @param Entry $entry
*
{
$this->downloadImages->setWallabagUrl($config->get('wallabag_url'));
- // if ($config->get('download_images_with_rabbitmq')) {
-
- // } else if ($config->get('download_images_with_redis')) {
-
- // }
-
return $this->downloadImages->processHtml(
$entry->getContent(),
$entry->getUrl()
/**
* Download the preview picture.
*
+ * @todo If we want to add async download, it should be done in that method
+ *
* @param Config $config
* @param Entry $entry
*
{
$this->downloadImages->setWallabagUrl($config->get('wallabag_url'));
- // if ($config->get('download_images_with_rabbitmq')) {
-
- // } else if ($config->get('download_images_with_redis')) {
-
- // }
-
return $this->downloadImages->processSingleImage(
$entry->getPreviewPicture(),
$entry->getUrl()