1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-08-26 18:21:02 +00:00

Rename wallabag_import to wallabag_core

This commit is contained in:
Yassine Guedidi 2024-01-01 17:15:20 +01:00
parent 2c65169127
commit bda26c21cf
15 changed files with 128 additions and 128 deletions

View file

@ -39,13 +39,13 @@ class RedisWorkerCommand extends Command
$serviceName = $input->getArgument('serviceName');
if (!$this->container->has('wallabag_import.queue.redis.' . $serviceName) || !$this->container->has('wallabag_import.consumer.redis.' . $serviceName)) {
if (!$this->container->has('wallabag_core.queue.redis.' . $serviceName) || !$this->container->has('wallabag_core.consumer.redis.' . $serviceName)) {
throw new Exception(sprintf('No queue or consumer found for service name: "%s"', $input->getArgument('serviceName')));
}
$worker = new QueueWorker(
$this->container->get('wallabag_import.queue.redis.' . $serviceName),
$this->container->get('wallabag_import.consumer.redis.' . $serviceName),
$this->container->get('wallabag_core.queue.redis.' . $serviceName),
$this->container->get('wallabag_core.consumer.redis.' . $serviceName),
(int) $input->getOption('maxIterations')
);

View file

@ -30,9 +30,9 @@ abstract class BrowserController extends AbstractController
$markAsRead = $form->get('mark_as_read')->getData();
$name = $this->getUser()->getId() . '.json';
if (null !== $file && \in_array($file->getClientMimeType(), $this->getParameter('wallabag_import.allow_mimetypes'), true) && $file->move($this->getParameter('wallabag_import.resource_dir'), $name)) {
if (null !== $file && \in_array($file->getClientMimeType(), $this->getParameter('wallabag_core.allow_mimetypes'), true) && $file->move($this->getParameter('wallabag_core.resource_dir'), $name)) {
$res = $wallabag
->setFilepath($this->getParameter('wallabag_import.resource_dir') . '/' . $name)
->setFilepath($this->getParameter('wallabag_core.resource_dir') . '/' . $name)
->setMarkAsRead($markAsRead)
->import();
@ -51,7 +51,7 @@ abstract class BrowserController extends AbstractController
]);
}
unlink($this->getParameter('wallabag_import.resource_dir') . '/' . $name);
unlink($this->getParameter('wallabag_core.resource_dir') . '/' . $name);
}
$this->addFlash('notice', $message);

View file

@ -44,9 +44,9 @@ class DeliciousController extends AbstractController
$markAsRead = $form->get('mark_as_read')->getData();
$name = 'delicious_' . $this->getUser()->getId() . '.json';
if (null !== $file && \in_array($file->getClientMimeType(), $this->getParameter('wallabag_import.allow_mimetypes'), true) && $file->move($this->getParameter('wallabag_import.resource_dir'), $name)) {
if (null !== $file && \in_array($file->getClientMimeType(), $this->getParameter('wallabag_core.allow_mimetypes'), true) && $file->move($this->getParameter('wallabag_core.resource_dir'), $name)) {
$res = $delicious
->setFilepath($this->getParameter('wallabag_import.resource_dir') . '/' . $name)
->setFilepath($this->getParameter('wallabag_core.resource_dir') . '/' . $name)
->setMarkAsRead($markAsRead)
->import();
@ -65,7 +65,7 @@ class DeliciousController extends AbstractController
]);
}
unlink($this->getParameter('wallabag_import.resource_dir') . '/' . $name);
unlink($this->getParameter('wallabag_core.resource_dir') . '/' . $name);
}
$this->addFlash('notice', $message);

View file

@ -30,9 +30,9 @@ abstract class HtmlController extends AbstractController
$markAsRead = $form->get('mark_as_read')->getData();
$name = $this->getUser()->getId() . '.html';
if (null !== $file && \in_array($file->getClientMimeType(), $this->getParameter('wallabag_import.allow_mimetypes'), true) && $file->move($this->getParameter('wallabag_import.resource_dir'), $name)) {
if (null !== $file && \in_array($file->getClientMimeType(), $this->getParameter('wallabag_core.allow_mimetypes'), true) && $file->move($this->getParameter('wallabag_core.resource_dir'), $name)) {
$res = $wallabag
->setFilepath($this->getParameter('wallabag_import.resource_dir') . '/' . $name)
->setFilepath($this->getParameter('wallabag_core.resource_dir') . '/' . $name)
->setMarkAsRead($markAsRead)
->import();
@ -51,7 +51,7 @@ abstract class HtmlController extends AbstractController
]);
}
unlink($this->getParameter('wallabag_import.resource_dir') . '/' . $name);
unlink($this->getParameter('wallabag_core.resource_dir') . '/' . $name);
}
$this->addFlash('notice', $message);

View file

@ -44,9 +44,9 @@ class InstapaperController extends AbstractController
$markAsRead = $form->get('mark_as_read')->getData();
$name = 'instapaper_' . $this->getUser()->getId() . '.csv';
if (null !== $file && \in_array($file->getClientMimeType(), $this->getParameter('wallabag_import.allow_mimetypes'), true) && $file->move($this->getParameter('wallabag_import.resource_dir'), $name)) {
if (null !== $file && \in_array($file->getClientMimeType(), $this->getParameter('wallabag_core.allow_mimetypes'), true) && $file->move($this->getParameter('wallabag_core.resource_dir'), $name)) {
$res = $instapaper
->setFilepath($this->getParameter('wallabag_import.resource_dir') . '/' . $name)
->setFilepath($this->getParameter('wallabag_core.resource_dir') . '/' . $name)
->setMarkAsRead($markAsRead)
->import();
@ -65,7 +65,7 @@ class InstapaperController extends AbstractController
]);
}
unlink($this->getParameter('wallabag_import.resource_dir') . '/' . $name);
unlink($this->getParameter('wallabag_core.resource_dir') . '/' . $name);
}
$this->addFlash('notice', $message);

View file

@ -44,9 +44,9 @@ class PinboardController extends AbstractController
$markAsRead = $form->get('mark_as_read')->getData();
$name = 'pinboard_' . $this->getUser()->getId() . '.json';
if (null !== $file && \in_array($file->getClientMimeType(), $this->getParameter('wallabag_import.allow_mimetypes'), true) && $file->move($this->getParameter('wallabag_import.resource_dir'), $name)) {
if (null !== $file && \in_array($file->getClientMimeType(), $this->getParameter('wallabag_core.allow_mimetypes'), true) && $file->move($this->getParameter('wallabag_core.resource_dir'), $name)) {
$res = $pinboard
->setFilepath($this->getParameter('wallabag_import.resource_dir') . '/' . $name)
->setFilepath($this->getParameter('wallabag_core.resource_dir') . '/' . $name)
->setMarkAsRead($markAsRead)
->import();
@ -65,7 +65,7 @@ class PinboardController extends AbstractController
]);
}
unlink($this->getParameter('wallabag_import.resource_dir') . '/' . $name);
unlink($this->getParameter('wallabag_core.resource_dir') . '/' . $name);
}
$this->addFlash('notice', $message);

View file

@ -44,9 +44,9 @@ class ReadabilityController extends AbstractController
$markAsRead = $form->get('mark_as_read')->getData();
$name = 'readability_' . $this->getUser()->getId() . '.json';
if (null !== $file && \in_array($file->getClientMimeType(), $this->getParameter('wallabag_import.allow_mimetypes'), true) && $file->move($this->getParameter('wallabag_import.resource_dir'), $name)) {
if (null !== $file && \in_array($file->getClientMimeType(), $this->getParameter('wallabag_core.allow_mimetypes'), true) && $file->move($this->getParameter('wallabag_core.resource_dir'), $name)) {
$res = $readability
->setFilepath($this->getParameter('wallabag_import.resource_dir') . '/' . $name)
->setFilepath($this->getParameter('wallabag_core.resource_dir') . '/' . $name)
->setMarkAsRead($markAsRead)
->import();
@ -65,7 +65,7 @@ class ReadabilityController extends AbstractController
]);
}
unlink($this->getParameter('wallabag_import.resource_dir') . '/' . $name);
unlink($this->getParameter('wallabag_core.resource_dir') . '/' . $name);
}
$this->addFlash('notice', $message);

View file

@ -33,9 +33,9 @@ abstract class WallabagController extends AbstractController
$markAsRead = $form->get('mark_as_read')->getData();
$name = $this->getUser()->getId() . '.json';
if (null !== $file && \in_array($file->getClientMimeType(), $this->getParameter('wallabag_import.allow_mimetypes'), true) && $file->move($this->getParameter('wallabag_import.resource_dir'), $name)) {
if (null !== $file && \in_array($file->getClientMimeType(), $this->getParameter('wallabag_core.allow_mimetypes'), true) && $file->move($this->getParameter('wallabag_core.resource_dir'), $name)) {
$res = $wallabag
->setFilepath($this->getParameter('wallabag_import.resource_dir') . '/' . $name)
->setFilepath($this->getParameter('wallabag_core.resource_dir') . '/' . $name)
->setMarkAsRead($markAsRead)
->import();
@ -54,7 +54,7 @@ abstract class WallabagController extends AbstractController
]);
}
unlink($this->getParameter('wallabag_import.resource_dir') . '/' . $name);
unlink($this->getParameter('wallabag_core.resource_dir') . '/' . $name);
}
$this->addFlash('notice', $message);

View file

@ -30,8 +30,8 @@ class WallabagCoreExtension extends Extension
$container->setParameter('wallabag_core.site_credentials.encryption_key_path', $config['encryption_key_path']);
$container->setParameter('wallabag_core.default_ignore_origin_instance_rules', $config['default_ignore_origin_instance_rules']);
$container->setParameter('wallabag_core.fonts', $config['fonts']);
$container->setParameter('wallabag_import.allow_mimetypes', $config['allow_mimetypes']);
$container->setParameter('wallabag_import.resource_dir', $config['resource_dir']);
$container->setParameter('wallabag_core.allow_mimetypes', $config['allow_mimetypes']);
$container->setParameter('wallabag_core.resource_dir', $config['resource_dir']);
}
public function getAlias()

View file

@ -19,7 +19,7 @@ class ImportCompilerPass implements CompilerPassInterface
);
$taggedServices = $container->findTaggedServiceIds(
'wallabag_import.import'
'wallabag_core.import'
);
foreach ($taggedServices as $id => $tagAttributes) {
foreach ($tagAttributes as $attributes) {