mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 06:53:15 +00:00
Merge branch 'master' into PHRAS-2979-41-fix-right-access
This commit is contained in:
@@ -160,9 +160,9 @@ $cli->command(new QueryParseCommand());
|
|||||||
$cli->command(new QuerySampleCommand());
|
$cli->command(new QuerySampleCommand());
|
||||||
$cli->command(new FindConceptsCommand());
|
$cli->command(new FindConceptsCommand());
|
||||||
|
|
||||||
$cli->command($cli['alchemy_worker.commands.run_dispatcher_command']);
|
//$cli->command($cli['alchemy_worker.commands.run_dispatcher_command']);
|
||||||
$cli->command($cli['alchemy_worker.commands.run_worker_command']);
|
//$cli->command($cli['alchemy_worker.commands.run_worker_command']);
|
||||||
$cli->command($cli['alchemy_worker.commands.show_configuration']);
|
//$cli->command($cli['alchemy_worker.commands.show_configuration']);
|
||||||
|
|
||||||
$cli->loadPlugins();
|
$cli->loadPlugins();
|
||||||
|
|
||||||
|
@@ -14,6 +14,8 @@ namespace Alchemy\Phrasea\Border;
|
|||||||
use Alchemy\Phrasea\Application;
|
use Alchemy\Phrasea\Application;
|
||||||
use Alchemy\Phrasea\Border\Checker\CheckerInterface;
|
use Alchemy\Phrasea\Border\Checker\CheckerInterface;
|
||||||
use Alchemy\Phrasea\Border\Attribute\AttributeInterface;
|
use Alchemy\Phrasea\Border\Attribute\AttributeInterface;
|
||||||
|
use Alchemy\Phrasea\Core\Event\Record\RecordEvents;
|
||||||
|
use Alchemy\Phrasea\Core\Event\Record\SubdefinitionCreateEvent;
|
||||||
use Alchemy\Phrasea\Exception\RuntimeException;
|
use Alchemy\Phrasea\Exception\RuntimeException;
|
||||||
use Alchemy\Phrasea\Metadata\Tag\TfArchivedate;
|
use Alchemy\Phrasea\Metadata\Tag\TfArchivedate;
|
||||||
use Alchemy\Phrasea\Metadata\Tag\TfQuarantine;
|
use Alchemy\Phrasea\Metadata\Tag\TfQuarantine;
|
||||||
@@ -333,7 +335,7 @@ class Manager
|
|||||||
$this->app['phraseanet.metadata-setter']->replaceMetadata($newMetadata, $element);
|
$this->app['phraseanet.metadata-setter']->replaceMetadata($newMetadata, $element);
|
||||||
|
|
||||||
if(!$nosubdef) {
|
if(!$nosubdef) {
|
||||||
$element->rebuild_subdefs();
|
$this->app['dispatcher']->dispatch(RecordEvents::SUBDEFINITION_CREATE, new SubdefinitionCreateEvent($element, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
return $element;
|
return $element;
|
||||||
|
@@ -15,6 +15,7 @@ use Alchemy\Phrasea\Application\Helper\FilesystemAware;
|
|||||||
use Alchemy\Phrasea\Application\Helper\NotifierAware;
|
use Alchemy\Phrasea\Application\Helper\NotifierAware;
|
||||||
use Alchemy\Phrasea\Controller\Controller;
|
use Alchemy\Phrasea\Controller\Controller;
|
||||||
use Alchemy\Phrasea\Core\Event\ExportFailureEvent;
|
use Alchemy\Phrasea\Core\Event\ExportFailureEvent;
|
||||||
|
use Alchemy\Phrasea\Core\Event\ExportMailEvent;
|
||||||
use Alchemy\Phrasea\Core\PhraseaEvents;
|
use Alchemy\Phrasea\Core\PhraseaEvents;
|
||||||
use Alchemy\Phrasea\Exception\InvalidArgumentException;
|
use Alchemy\Phrasea\Exception\InvalidArgumentException;
|
||||||
use Alchemy\Phrasea\Model\Manipulator\TokenManipulator;
|
use Alchemy\Phrasea\Model\Manipulator\TokenManipulator;
|
||||||
@@ -193,42 +194,26 @@ class ExportController extends Controller
|
|||||||
$token = $this->getTokenManipulator()->createEmailExportToken(serialize($list));
|
$token = $this->getTokenManipulator()->createEmailExportToken(serialize($list));
|
||||||
|
|
||||||
if (count($destMails) > 0) {
|
if (count($destMails) > 0) {
|
||||||
//zip documents
|
$emitterId = $this->getAuthenticatedUser()->getId();
|
||||||
\set_export::build_zip(
|
|
||||||
$this->app,
|
|
||||||
$token,
|
|
||||||
$list,
|
|
||||||
$this->app['tmp.download.path'].'/'. $token->getValue() . '.zip'
|
|
||||||
);
|
|
||||||
|
|
||||||
$remaingEmails = $destMails;
|
$tokenValue = $token->getValue();
|
||||||
|
|
||||||
$url = $this->app->url('prepare_download', ['token' => $token->getValue(), 'anonymous' => false, 'type' => \Session_Logger::EVENT_EXPORTMAIL]);
|
$url = $this->app->url('prepare_download', ['token' => $token->getValue(), 'anonymous' => false, 'type' => \Session_Logger::EVENT_EXPORTMAIL]);
|
||||||
|
|
||||||
$user = $this->getAuthenticatedUser();
|
$params = [
|
||||||
$emitter = new Emitter($user->getDisplayName(), $user->getEmail());
|
'url' => $url,
|
||||||
|
'textmail' => $request->request->get('textmail'),
|
||||||
|
'reading_confirm' => !!$request->request->get('reading_confirm', false),
|
||||||
|
'ssttid' => $ssttid = $request->request->get('ssttid', ''),
|
||||||
|
'lst' => $lst = $request->request->get('lst', ''),
|
||||||
|
];
|
||||||
|
|
||||||
foreach ($destMails as $key => $mail) {
|
$this->dispatch(PhraseaEvents::EXPORT_MAIL_CREATE, new ExportMailEvent(
|
||||||
try {
|
$emitterId,
|
||||||
$receiver = new Receiver(null, trim($mail));
|
$tokenValue,
|
||||||
} catch (InvalidArgumentException $e) {
|
$destMails,
|
||||||
continue;
|
$params
|
||||||
}
|
));
|
||||||
|
|
||||||
$mail = MailRecordsExport::create($this->app, $receiver, $emitter, $request->request->get('textmail'));
|
|
||||||
$mail->setButtonUrl($url);
|
|
||||||
$mail->setExpiration($token->getExpiration());
|
|
||||||
|
|
||||||
$this->deliver($mail, !!$request->request->get('reading_confirm', false));
|
|
||||||
unset($remaingEmails[$key]);
|
|
||||||
}
|
|
||||||
|
|
||||||
//some mails failed
|
|
||||||
if (count($remaingEmails) > 0) {
|
|
||||||
foreach ($remaingEmails as $mail) {
|
|
||||||
$this->dispatch(PhraseaEvents::EXPORT_MAIL_FAILURE, new ExportFailureEvent($this->getAuthenticatedUser(), $ssttid, $lst, \eventsmanager_notify_downloadmailfail::MAIL_FAIL, $mail));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->app->json([
|
return $this->app->json([
|
||||||
|
@@ -14,6 +14,8 @@ use Alchemy\Phrasea\Application\Helper\EntityManagerAware;
|
|||||||
use Alchemy\Phrasea\Application\Helper\SearchEngineAware;
|
use Alchemy\Phrasea\Application\Helper\SearchEngineAware;
|
||||||
use Alchemy\Phrasea\Controller\Controller;
|
use Alchemy\Phrasea\Controller\Controller;
|
||||||
use Alchemy\Phrasea\Controller\RecordsRequest;
|
use Alchemy\Phrasea\Controller\RecordsRequest;
|
||||||
|
use Alchemy\Phrasea\Core\Event\Record\DeleteEvent;
|
||||||
|
use Alchemy\Phrasea\Core\Event\Record\RecordEvents;
|
||||||
use Alchemy\Phrasea\Core\Event\RecordEdit;
|
use Alchemy\Phrasea\Core\Event\RecordEdit;
|
||||||
use Alchemy\Phrasea\Core\PhraseaEvents;
|
use Alchemy\Phrasea\Core\PhraseaEvents;
|
||||||
use Alchemy\Phrasea\Model\Entities\BasketElement;
|
use Alchemy\Phrasea\Model\Entities\BasketElement;
|
||||||
@@ -234,7 +236,7 @@ class RecordController extends Controller
|
|||||||
if($trashCollectionsBySbasId[$sbasId] !== null) {
|
if($trashCollectionsBySbasId[$sbasId] !== null) {
|
||||||
if($record->getCollection()->get_coll_id() == $trashCollectionsBySbasId[$sbasId]->get_coll_id()) {
|
if($record->getCollection()->get_coll_id() == $trashCollectionsBySbasId[$sbasId]->get_coll_id()) {
|
||||||
// record is already in trash so delete it
|
// record is already in trash so delete it
|
||||||
$record->delete();
|
$this->getEventDispatcher()->dispatch(RecordEvents::DELETE, new DeleteEvent($record));
|
||||||
} else {
|
} else {
|
||||||
// move to trash collection
|
// move to trash collection
|
||||||
$record->move_to_collection($trashCollectionsBySbasId[$sbasId], $this->getApplicationBox());
|
$record->move_to_collection($trashCollectionsBySbasId[$sbasId], $this->getApplicationBox());
|
||||||
@@ -247,7 +249,7 @@ class RecordController extends Controller
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// no trash collection, delete
|
// no trash collection, delete
|
||||||
$record->delete();
|
$this->getEventDispatcher()->dispatch(RecordEvents::DELETE, new DeleteEvent($record));
|
||||||
}
|
}
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
}
|
}
|
||||||
|
@@ -14,6 +14,8 @@ use Alchemy\Phrasea\Application\Helper\EntityManagerAware;
|
|||||||
use Alchemy\Phrasea\Controller\Controller;
|
use Alchemy\Phrasea\Controller\Controller;
|
||||||
use Alchemy\Phrasea\Controller\RecordsRequest;
|
use Alchemy\Phrasea\Controller\RecordsRequest;
|
||||||
use Alchemy\Phrasea\Controller\Exception as ControllerException;
|
use Alchemy\Phrasea\Controller\Exception as ControllerException;
|
||||||
|
use Alchemy\Phrasea\Core\Event\Record\RecordEvents;
|
||||||
|
use Alchemy\Phrasea\Core\Event\Record\SubdefinitionCreateEvent;
|
||||||
use Alchemy\Phrasea\Core\Event\RecordEdit;
|
use Alchemy\Phrasea\Core\Event\RecordEdit;
|
||||||
use Alchemy\Phrasea\Core\PhraseaEvents;
|
use Alchemy\Phrasea\Core\PhraseaEvents;
|
||||||
use Alchemy\Phrasea\Model\Entities\StoryWZ;
|
use Alchemy\Phrasea\Model\Entities\StoryWZ;
|
||||||
@@ -68,7 +70,9 @@ class StoryController extends Controller
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
$story->set_metadatas($metadatas)->rebuild_subdefs();
|
$recordAdapter = $story->set_metadatas($metadatas);
|
||||||
|
// tell phraseanet to rebuild subdef
|
||||||
|
$this->dispatch(RecordEvents::SUBDEFINITION_CREATE, new SubdefinitionCreateEvent($recordAdapter));
|
||||||
|
|
||||||
$storyWZ = new StoryWZ();
|
$storyWZ = new StoryWZ();
|
||||||
$storyWZ->setUser($this->getAuthenticatedUser());
|
$storyWZ->setUser($this->getAuthenticatedUser());
|
||||||
|
@@ -16,6 +16,7 @@ use Alchemy\Phrasea\Application\Helper\SubDefinitionSubstituerAware;
|
|||||||
use Alchemy\Phrasea\Controller\Controller;
|
use Alchemy\Phrasea\Controller\Controller;
|
||||||
use Alchemy\Phrasea\Controller\RecordsRequest;
|
use Alchemy\Phrasea\Controller\RecordsRequest;
|
||||||
use Alchemy\Phrasea\Core\Event\Record\RecordEvents;
|
use Alchemy\Phrasea\Core\Event\Record\RecordEvents;
|
||||||
|
use Alchemy\Phrasea\Core\Event\Record\SubdefinitionCreateEvent;
|
||||||
use Alchemy\Phrasea\Exception\RuntimeException;
|
use Alchemy\Phrasea\Exception\RuntimeException;
|
||||||
use Alchemy\Phrasea\Metadata\PhraseanetMetadataReader;
|
use Alchemy\Phrasea\Metadata\PhraseanetMetadataReader;
|
||||||
use Alchemy\Phrasea\Metadata\PhraseanetMetadataSetter;
|
use Alchemy\Phrasea\Metadata\PhraseanetMetadataSetter;
|
||||||
@@ -156,7 +157,7 @@ class ToolsController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!$substituted || $force) {
|
if (!$substituted || $force) {
|
||||||
$record->rebuild_subdefs();
|
$this->dispatch(RecordEvents::SUBDEFINITION_CREATE, new SubdefinitionCreateEvent($record));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
53
lib/Alchemy/Phrasea/Core/Event/ExportMailEvent.php
Normal file
53
lib/Alchemy/Phrasea/Core/Event/ExportMailEvent.php
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Phraseanet
|
||||||
|
*
|
||||||
|
* (c) 2005-2019 Alchemy
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Alchemy\Phrasea\Core\Event;
|
||||||
|
|
||||||
|
use Symfony\Component\EventDispatcher\Event as SfEvent;
|
||||||
|
|
||||||
|
class ExportMailEvent extends SfEvent
|
||||||
|
{
|
||||||
|
private $emitterUserId;
|
||||||
|
private $tokenValue;
|
||||||
|
/** @var array */
|
||||||
|
private $destinationMails;
|
||||||
|
/** @var array */
|
||||||
|
private $params;
|
||||||
|
|
||||||
|
|
||||||
|
public function __construct($emitterUserId, $tokenValue, array $destMails, array $params)
|
||||||
|
{
|
||||||
|
$this->emitterUserId = $emitterUserId;
|
||||||
|
$this->tokenValue = $tokenValue;
|
||||||
|
$this->destinationMails = $destMails;
|
||||||
|
$this->params = $params;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getTokenValue()
|
||||||
|
{
|
||||||
|
return $this->tokenValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getDestinationMails()
|
||||||
|
{
|
||||||
|
return $this->destinationMails;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getEmitterUserId()
|
||||||
|
{
|
||||||
|
return $this->emitterUserId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getParams()
|
||||||
|
{
|
||||||
|
return $this->params;
|
||||||
|
}
|
||||||
|
}
|
7
lib/Alchemy/Phrasea/Core/Event/Record/DeleteEvent.php
Normal file
7
lib/Alchemy/Phrasea/Core/Event/Record/DeleteEvent.php
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Alchemy\Phrasea\Core\Event\Record;
|
||||||
|
|
||||||
|
class DeleteEvent extends RecordEvent
|
||||||
|
{
|
||||||
|
}
|
@@ -13,8 +13,10 @@ namespace Alchemy\Phrasea\Core\Event\Record;
|
|||||||
|
|
||||||
final class RecordEvents
|
final class RecordEvents
|
||||||
{
|
{
|
||||||
const CREATED = 'record.created';
|
const CREATED = 'record.created';
|
||||||
const DELETED = 'record.deleted';
|
const DELETED = 'record.deleted';
|
||||||
|
const DELETE = 'record.delete';
|
||||||
|
|
||||||
// Change
|
// Change
|
||||||
const COLLECTION_CHANGED = 'record.collection_changed';
|
const COLLECTION_CHANGED = 'record.collection_changed';
|
||||||
const METADATA_CHANGED = 'record.metadata_changed';
|
const METADATA_CHANGED = 'record.metadata_changed';
|
||||||
@@ -29,6 +31,8 @@ final class RecordEvents
|
|||||||
const SUB_DEFINITIONS_CREATED = 'record.sub_definitions_created';
|
const SUB_DEFINITIONS_CREATED = 'record.sub_definitions_created';
|
||||||
const SUB_DEFINITION_CREATION_FAILED = 'record.sub_definition_creation_failed';
|
const SUB_DEFINITION_CREATION_FAILED = 'record.sub_definition_creation_failed';
|
||||||
|
|
||||||
|
const SUBDEFINITION_CREATE = 'record.subdefinition_create';
|
||||||
|
|
||||||
const MEDIA_SUBSTITUTED = 'record.media_substituted';
|
const MEDIA_SUBSTITUTED = 'record.media_substituted';
|
||||||
|
|
||||||
const STORY_COVER_CHANGED = 'record.story_cover_changed';
|
const STORY_COVER_CHANGED = 'record.story_cover_changed';
|
||||||
|
@@ -0,0 +1,34 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Phraseanet
|
||||||
|
*
|
||||||
|
* (c) 2005-2014 Alchemy
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Alchemy\Phrasea\Core\Event\Record;
|
||||||
|
|
||||||
|
use Alchemy\Phrasea\Model\RecordInterface;
|
||||||
|
|
||||||
|
class SubdefinitionCreateEvent extends RecordEvent
|
||||||
|
{
|
||||||
|
private $isNewRecord;
|
||||||
|
|
||||||
|
public function __construct(RecordInterface $record, $isNewRecord = false)
|
||||||
|
{
|
||||||
|
parent::__construct($record);
|
||||||
|
|
||||||
|
$this->isNewRecord = $isNewRecord;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function isNewRecord()
|
||||||
|
{
|
||||||
|
return $this->isNewRecord;
|
||||||
|
}
|
||||||
|
}
|
@@ -12,7 +12,15 @@
|
|||||||
namespace Alchemy\Phrasea\Core\Event\Subscriber;
|
namespace Alchemy\Phrasea\Core\Event\Subscriber;
|
||||||
|
|
||||||
use Alchemy\Phrasea\Core\Event\ExportFailureEvent;
|
use Alchemy\Phrasea\Core\Event\ExportFailureEvent;
|
||||||
|
use Alchemy\Phrasea\Core\Event\ExportMailEvent;
|
||||||
use Alchemy\Phrasea\Core\PhraseaEvents;
|
use Alchemy\Phrasea\Core\PhraseaEvents;
|
||||||
|
use Alchemy\Phrasea\Exception\InvalidArgumentException;
|
||||||
|
use Alchemy\Phrasea\Model\Entities\Token;
|
||||||
|
use Alchemy\Phrasea\Model\Repositories\TokenRepository;
|
||||||
|
use Alchemy\Phrasea\Model\Repositories\UserRepository;
|
||||||
|
use Alchemy\Phrasea\Notification\Emitter;
|
||||||
|
use Alchemy\Phrasea\Notification\Mail\MailRecordsExport;
|
||||||
|
use Alchemy\Phrasea\Notification\Receiver;
|
||||||
|
|
||||||
class ExportSubscriber extends AbstractNotificationSubscriber
|
class ExportSubscriber extends AbstractNotificationSubscriber
|
||||||
{
|
{
|
||||||
@@ -39,10 +47,65 @@ class ExportSubscriber extends AbstractNotificationSubscriber
|
|||||||
$this->app['event-manager']->notify($params['usr_id'], 'eventsmanager_notify_downloadmailfail', $datas, $mailed);
|
$this->app['event-manager']->notify($params['usr_id'], 'eventsmanager_notify_downloadmailfail', $datas, $mailed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function onCreateExportMail(ExportMailEvent $event)
|
||||||
|
{
|
||||||
|
$destMails = $event->getDestinationMails();
|
||||||
|
|
||||||
|
$params = $event->getParams();
|
||||||
|
|
||||||
|
/** @var UserRepository $userRepository */
|
||||||
|
$userRepository = $this->app['repo.users'];
|
||||||
|
|
||||||
|
$user = $userRepository->find($event->getEmitterUserId());
|
||||||
|
|
||||||
|
/** @var TokenRepository $tokenRepository */
|
||||||
|
$tokenRepository = $this->app['repo.tokens'];
|
||||||
|
|
||||||
|
/** @var Token $token */
|
||||||
|
$token = $tokenRepository->findValidToken($event->getTokenValue());
|
||||||
|
|
||||||
|
$list = unserialize($token->getData());
|
||||||
|
|
||||||
|
//zip documents
|
||||||
|
\set_export::build_zip(
|
||||||
|
$this->app,
|
||||||
|
$token,
|
||||||
|
$list,
|
||||||
|
$this->app['tmp.download.path'].'/'. $token->getValue() . '.zip'
|
||||||
|
);
|
||||||
|
|
||||||
|
$remaingEmails = $destMails;
|
||||||
|
|
||||||
|
$emitter = new Emitter($user->getDisplayName(), $user->getEmail());
|
||||||
|
|
||||||
|
foreach ($destMails as $key => $mail) {
|
||||||
|
try {
|
||||||
|
$receiver = new Receiver(null, trim($mail));
|
||||||
|
} catch (InvalidArgumentException $e) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$mail = MailRecordsExport::create($this->app, $receiver, $emitter, $params['textmail']);
|
||||||
|
$mail->setButtonUrl($params['url']);
|
||||||
|
$mail->setExpiration($token->getExpiration());
|
||||||
|
|
||||||
|
$this->deliver($mail, $params['reading_confirm']);
|
||||||
|
unset($remaingEmails[$key]);
|
||||||
|
}
|
||||||
|
|
||||||
|
//some mails failed
|
||||||
|
if (count($remaingEmails) > 0) {
|
||||||
|
foreach ($remaingEmails as $mail) {
|
||||||
|
$this->app['dispatcher']->dispatch(PhraseaEvents::EXPORT_MAIL_FAILURE, new ExportFailureEvent($user, $params['ssttid'], $params['lst'], \eventsmanager_notify_downloadmailfail::MAIL_FAIL, $mail));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static function getSubscribedEvents()
|
public static function getSubscribedEvents()
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
PhraseaEvents::EXPORT_MAIL_FAILURE => 'onMailExportFailure'
|
PhraseaEvents::EXPORT_MAIL_FAILURE => 'onMailExportFailure',
|
||||||
|
PhraseaEvents::EXPORT_MAIL_CREATE => 'onCreateExportMail',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -11,8 +11,10 @@
|
|||||||
namespace Alchemy\Phrasea\Core\Event\Subscriber;
|
namespace Alchemy\Phrasea\Core\Event\Subscriber;
|
||||||
|
|
||||||
use Alchemy\Phrasea\Core\Event\Record\CollectionChangedEvent;
|
use Alchemy\Phrasea\Core\Event\Record\CollectionChangedEvent;
|
||||||
|
use Alchemy\Phrasea\Core\Event\Record\DeleteEvent;
|
||||||
use Alchemy\Phrasea\Core\Event\Record\RecordEvent;
|
use Alchemy\Phrasea\Core\Event\Record\RecordEvent;
|
||||||
use Alchemy\Phrasea\Core\Event\Record\RecordEvents;
|
use Alchemy\Phrasea\Core\Event\Record\RecordEvents;
|
||||||
|
use Alchemy\Phrasea\Core\Event\Record\SubdefinitionCreateEvent;
|
||||||
use Alchemy\Phrasea\Core\Event\RecordEdit;
|
use Alchemy\Phrasea\Core\Event\RecordEdit;
|
||||||
use Alchemy\Phrasea\Core\PhraseaEvents;
|
use Alchemy\Phrasea\Core\PhraseaEvents;
|
||||||
use Alchemy\Phrasea\Metadata\Tag\TfEditdate;
|
use Alchemy\Phrasea\Metadata\Tag\TfEditdate;
|
||||||
@@ -26,10 +28,12 @@ class RecordEditSubscriber implements EventSubscriberInterface
|
|||||||
public static function getSubscribedEvents()
|
public static function getSubscribedEvents()
|
||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
PhraseaEvents::RECORD_EDIT => 'onEdit',
|
PhraseaEvents::RECORD_EDIT => 'onEdit',
|
||||||
PhraseaEvents::RECORD_UPLOAD => 'onEdit',
|
PhraseaEvents::RECORD_UPLOAD => 'onEdit',
|
||||||
RecordEvents::ROTATE => 'onRecordChange',
|
RecordEvents::ROTATE => 'onRecordChange',
|
||||||
RecordEvents::COLLECTION_CHANGED => 'onCollectionChanged',
|
RecordEvents::COLLECTION_CHANGED => 'onCollectionChanged',
|
||||||
|
RecordEvents::SUBDEFINITION_CREATE => 'onSubdefinitionCreate',
|
||||||
|
RecordEvents::DELETE => 'onDelete',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -49,6 +53,18 @@ class RecordEditSubscriber implements EventSubscriberInterface
|
|||||||
$recordAdapter->clearStampCache();
|
$recordAdapter->clearStampCache();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function onSubdefinitionCreate(SubdefinitionCreateEvent $event)
|
||||||
|
{
|
||||||
|
$recordAdapter = $this->convertToRecordAdapter($event->getRecord());
|
||||||
|
$recordAdapter->rebuild_subdefs();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function onDelete(DeleteEvent $event)
|
||||||
|
{
|
||||||
|
$recordAdapter = $this->convertToRecordAdapter($event->getRecord());
|
||||||
|
$recordAdapter->delete();
|
||||||
|
}
|
||||||
|
|
||||||
public function onEdit(RecordEdit $event)
|
public function onEdit(RecordEdit $event)
|
||||||
{
|
{
|
||||||
static $into = false;
|
static $into = false;
|
||||||
|
@@ -48,7 +48,8 @@ final class PhraseaEvents
|
|||||||
const BRIDGE_UPLOAD_FAILURE = 'bridge.upload-failure';
|
const BRIDGE_UPLOAD_FAILURE = 'bridge.upload-failure';
|
||||||
|
|
||||||
const EXPORT_MAIL_FAILURE = 'export.mail-failure';
|
const EXPORT_MAIL_FAILURE = 'export.mail-failure';
|
||||||
const EXPORT_CREATE = 'export.create';
|
const EXPORT_CREATE = 'export.create';
|
||||||
|
const EXPORT_MAIL_CREATE = 'export.mail-create';
|
||||||
|
|
||||||
const RECORD_EDIT = 'record.edit';
|
const RECORD_EDIT = 'record.edit';
|
||||||
const RECORD_UPLOAD = 'record.upload';
|
const RECORD_UPLOAD = 'record.upload';
|
||||||
|
@@ -32,11 +32,12 @@ class WorkerConfigurationServiceProvider implements ServiceProviderInterface
|
|||||||
$app['alchemy_queues.queues'] = $app->share(function (Application $app) {
|
$app['alchemy_queues.queues'] = $app->share(function (Application $app) {
|
||||||
$defaultConfiguration = [
|
$defaultConfiguration = [
|
||||||
'worker-queue' => [
|
'worker-queue' => [
|
||||||
'registry' => 'alchemy_worker.queue_registry',
|
'registry' => 'alchemy_worker.queue_registry',
|
||||||
'host' => 'localhost',
|
'host' => 'localhost',
|
||||||
'port' => 5672,
|
'port' => 5672,
|
||||||
'user' => 'guest',
|
'user' => 'guest',
|
||||||
'vhost' => '/'
|
'password' => 'guest',
|
||||||
|
'vhost' => '/'
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -46,19 +47,22 @@ class WorkerConfigurationServiceProvider implements ServiceProviderInterface
|
|||||||
|
|
||||||
$queueConfigurations = $configuration->get(['workers', 'queue'], $defaultConfiguration);
|
$queueConfigurations = $configuration->get(['workers', 'queue'], $defaultConfiguration);
|
||||||
|
|
||||||
$queueConfiguration = reset($queueConfigurations);
|
$config = [];
|
||||||
$queueKey = key($queueConfigurations);
|
|
||||||
|
|
||||||
if (! isset($queueConfiguration['name'])) {
|
foreach($queueConfigurations as $name => $queueConfiguration) {
|
||||||
if (! is_string($queueKey)) {
|
$queueKey = $name;
|
||||||
throw new \RuntimeException('Invalid queue configuration: configuration has no key or name.');
|
|
||||||
|
if (! isset($queueConfiguration['name'])) {
|
||||||
|
if (! is_string($queueKey)) {
|
||||||
|
throw new \RuntimeException('Invalid queue configuration: configuration has no key or name.');
|
||||||
|
}
|
||||||
|
|
||||||
|
$queueConfiguration['name'] = $queueKey;
|
||||||
}
|
}
|
||||||
|
|
||||||
$queueConfiguration['name'] = $queueKey;
|
$config[$queueConfiguration['name']] = $queueConfiguration ;
|
||||||
}
|
}
|
||||||
|
|
||||||
$config = [ $queueConfiguration['name'] => $queueConfiguration ];
|
|
||||||
|
|
||||||
return $config;
|
return $config;
|
||||||
}
|
}
|
||||||
catch (RuntimeException $exception) {
|
catch (RuntimeException $exception) {
|
||||||
|
@@ -18,6 +18,7 @@ use Alchemy\Phrasea\Core\Event\Record\SubDefinitionCreationEvent;
|
|||||||
use Alchemy\Phrasea\Core\Event\Record\SubDefinitionsCreationEvent;
|
use Alchemy\Phrasea\Core\Event\Record\SubDefinitionsCreationEvent;
|
||||||
use Alchemy\Phrasea\Core\Event\Record\SubDefinitionCreationFailedEvent;
|
use Alchemy\Phrasea\Core\Event\Record\SubDefinitionCreationFailedEvent;
|
||||||
use Alchemy\Phrasea\Core\Event\Record\RecordEvents;
|
use Alchemy\Phrasea\Core\Event\Record\RecordEvents;
|
||||||
|
use Alchemy\Phrasea\Databox\Subdef\MediaSubdefRepository;
|
||||||
use Alchemy\Phrasea\Filesystem\FilesystemService;
|
use Alchemy\Phrasea\Filesystem\FilesystemService;
|
||||||
use Alchemy\Phrasea\Media\Subdef\Specification\PdfSpecification;
|
use Alchemy\Phrasea\Media\Subdef\Specification\PdfSpecification;
|
||||||
use MediaAlchemyst\Alchemyst;
|
use MediaAlchemyst\Alchemyst;
|
||||||
@@ -170,13 +171,53 @@ class SubdefGenerator
|
|||||||
unset($this->tmpFilePath);
|
unset($this->tmpFilePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->dispatch(
|
// if we created subdef one by one
|
||||||
RecordEvents::SUB_DEFINITIONS_CREATED,
|
if (count($wanted_subdefs) == 1) {
|
||||||
new SubDefinitionsCreatedEvent(
|
$mediaSubdefRepository = $this->getMediaSubdefRepository($record->getDataboxId());
|
||||||
$record,
|
$mediaSubdefs = $mediaSubdefRepository->findByRecordIdsAndNames([$record->getRecordId()]);
|
||||||
$mediaCreated
|
$medias = [];
|
||||||
)
|
foreach ($mediaSubdefs as $subdef) {
|
||||||
);
|
try {
|
||||||
|
$medias[$subdef->get_name()] = $this->mediavorus->guess($subdef->getRealPath());
|
||||||
|
} catch (MediaVorusFileNotFoundException $e) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->dispatch(
|
||||||
|
RecordEvents::SUB_DEFINITIONS_CREATED,
|
||||||
|
new SubDefinitionsCreatedEvent(
|
||||||
|
$record,
|
||||||
|
$medias
|
||||||
|
)
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
$this->dispatch(
|
||||||
|
RecordEvents::SUB_DEFINITIONS_CREATED,
|
||||||
|
new SubDefinitionsCreatedEvent(
|
||||||
|
$record,
|
||||||
|
$mediaCreated
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* set a logger to use
|
||||||
|
* @param LoggerInterface $logger
|
||||||
|
*/
|
||||||
|
public function setLogger(LoggerInterface $logger)
|
||||||
|
{
|
||||||
|
$this->logger = $logger;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* to get the logger
|
||||||
|
* @return LoggerInterface
|
||||||
|
*/
|
||||||
|
public function getLogger()
|
||||||
|
{
|
||||||
|
return $this->logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function generateSubdef(\record_adapter $record, \databox_subdef $subdef_class, $pathdest)
|
private function generateSubdef(\record_adapter $record, \databox_subdef $subdef_class, $pathdest)
|
||||||
@@ -276,4 +317,14 @@ class SubdefGenerator
|
|||||||
$i = floor(log($bytes, 1024));
|
$i = floor(log($bytes, 1024));
|
||||||
return round($bytes / pow(1024, $i), [0,0,2,2,3][$i]).['B','kB','MB','GB'][$i];
|
return round($bytes / pow(1024, $i), [0,0,2,2,3][$i]).['B','kB','MB','GB'][$i];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param $databoxId
|
||||||
|
*
|
||||||
|
* @return MediaSubdefRepository|Object
|
||||||
|
*/
|
||||||
|
private function getMediaSubdefRepository($databoxId)
|
||||||
|
{
|
||||||
|
return $this->app['provider.repo.media_subdef']->getRepositoryForDatabox($databoxId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -13,6 +13,7 @@ namespace Alchemy\Phrasea\Media;
|
|||||||
use Alchemy\Phrasea\Application;
|
use Alchemy\Phrasea\Application;
|
||||||
use Alchemy\Phrasea\Core\Event\Record\MediaSubstitutedEvent;
|
use Alchemy\Phrasea\Core\Event\Record\MediaSubstitutedEvent;
|
||||||
use Alchemy\Phrasea\Core\Event\Record\RecordEvents;
|
use Alchemy\Phrasea\Core\Event\Record\RecordEvents;
|
||||||
|
use Alchemy\Phrasea\Core\Event\Record\SubdefinitionCreateEvent;
|
||||||
use Alchemy\Phrasea\Filesystem\FilesystemService;
|
use Alchemy\Phrasea\Filesystem\FilesystemService;
|
||||||
use MediaAlchemyst\Alchemyst;
|
use MediaAlchemyst\Alchemyst;
|
||||||
use MediaAlchemyst\Exception\ExceptionInterface as MediaAlchemystException;
|
use MediaAlchemyst\Exception\ExceptionInterface as MediaAlchemystException;
|
||||||
@@ -79,7 +80,7 @@ class SubdefSubstituer
|
|||||||
$record->write_metas();
|
$record->write_metas();
|
||||||
|
|
||||||
if ($shouldSubdefsBeRebuilt) {
|
if ($shouldSubdefsBeRebuilt) {
|
||||||
$record->rebuild_subdefs();
|
$this->dispatcher->dispatch(RecordEvents::SUBDEFINITION_CREATE, new SubdefinitionCreateEvent($record));
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->dispatcher->dispatch(RecordEvents::MEDIA_SUBSTITUTED, new MediaSubstitutedEvent($record));
|
$this->dispatcher->dispatch(RecordEvents::MEDIA_SUBSTITUTED, new MediaSubstitutedEvent($record));
|
||||||
|
@@ -12,7 +12,7 @@
|
|||||||
namespace Alchemy\Phrasea\Model\Manipulator;
|
namespace Alchemy\Phrasea\Model\Manipulator;
|
||||||
|
|
||||||
use Alchemy\Phrasea\Model\Entities\WebhookEvent;
|
use Alchemy\Phrasea\Model\Entities\WebhookEvent;
|
||||||
use Alchemy\Phrasea\Webhook\WebhookPublisher;
|
use Alchemy\Phrasea\Webhook\WebhookPublisherInterface;
|
||||||
use Doctrine\Common\Persistence\ObjectManager;
|
use Doctrine\Common\Persistence\ObjectManager;
|
||||||
use Doctrine\ORM\EntityRepository;
|
use Doctrine\ORM\EntityRepository;
|
||||||
|
|
||||||
@@ -29,11 +29,11 @@ class WebhookEventManipulator implements ManipulatorInterface
|
|||||||
private $repository;
|
private $repository;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var WebhookPublisher
|
* @var WebhookPublisherInterface
|
||||||
*/
|
*/
|
||||||
private $publisher;
|
private $publisher;
|
||||||
|
|
||||||
public function __construct(ObjectManager $om, EntityRepository $repo, WebhookPublisher $publisher)
|
public function __construct(ObjectManager $om, EntityRepository $repo, WebhookPublisherInterface $publisher)
|
||||||
{
|
{
|
||||||
$this->om = $om;
|
$this->om = $om;
|
||||||
$this->repository = $repo;
|
$this->repository = $repo;
|
||||||
|
@@ -12,6 +12,8 @@
|
|||||||
namespace Alchemy\Phrasea\TaskManager\Job;
|
namespace Alchemy\Phrasea\TaskManager\Job;
|
||||||
|
|
||||||
use Alchemy\Phrasea\Application;
|
use Alchemy\Phrasea\Application;
|
||||||
|
use Alchemy\Phrasea\Core\Event\Record\RecordEvents;
|
||||||
|
use Alchemy\Phrasea\Core\Event\Record\SubdefinitionCreateEvent;
|
||||||
use Alchemy\Phrasea\Exception\RuntimeException;
|
use Alchemy\Phrasea\Exception\RuntimeException;
|
||||||
use Alchemy\Phrasea\Border\File;
|
use Alchemy\Phrasea\Border\File;
|
||||||
use Alchemy\Phrasea\Border\Manager as borderManager;
|
use Alchemy\Phrasea\Border\Manager as borderManager;
|
||||||
@@ -1001,7 +1003,7 @@ class ArchiveJob extends AbstractJob
|
|||||||
{
|
{
|
||||||
// quick fix to reconnect if mysql is lost
|
// quick fix to reconnect if mysql is lost
|
||||||
$app->getApplicationBox()->get_connection();
|
$app->getApplicationBox()->get_connection();
|
||||||
$databox->get_connection();
|
$collection->get_connection();
|
||||||
|
|
||||||
$status = \databox_status::operation_or($stat0, $stat1);
|
$status = \databox_status::operation_or($stat0, $stat1);
|
||||||
|
|
||||||
@@ -1032,7 +1034,8 @@ class ArchiveJob extends AbstractJob
|
|||||||
}
|
}
|
||||||
|
|
||||||
$story->setStatus(\databox_status::operation_or($stat0, $stat1));
|
$story->setStatus(\databox_status::operation_or($stat0, $stat1));
|
||||||
$story->rebuild_subdefs();
|
|
||||||
|
$app['dispatcher']->dispatch(RecordEvents::SUBDEFINITION_CREATE, new SubdefinitionCreateEvent($story));
|
||||||
|
|
||||||
unset($media);
|
unset($media);
|
||||||
|
|
||||||
|
@@ -19,7 +19,7 @@ use Alchemy\Queue\MessageQueueRegistry;
|
|||||||
* Class WebhookPublisher publishes webhook event notifications in message queues
|
* Class WebhookPublisher publishes webhook event notifications in message queues
|
||||||
* @package Alchemy\Phrasea\Webhook
|
* @package Alchemy\Phrasea\Webhook
|
||||||
*/
|
*/
|
||||||
class WebhookPublisher
|
class WebhookPublisher implements WebhookPublisherInterface
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @var MessageQueueRegistry
|
* @var MessageQueueRegistry
|
||||||
|
10
lib/Alchemy/Phrasea/Webhook/WebhookPublisherInterface.php
Normal file
10
lib/Alchemy/Phrasea/Webhook/WebhookPublisherInterface.php
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Alchemy\Phrasea\Webhook;
|
||||||
|
|
||||||
|
use Alchemy\Phrasea\Model\Entities\WebhookEvent;
|
||||||
|
|
||||||
|
interface WebhookPublisherInterface
|
||||||
|
{
|
||||||
|
public function publishWebhookEvent(WebhookEvent $event);
|
||||||
|
}
|
@@ -19,6 +19,7 @@ use Alchemy\Phrasea\Core\Event\Record\OriginalNameChangedEvent;
|
|||||||
use Alchemy\Phrasea\Core\Event\Record\RecordEvent;
|
use Alchemy\Phrasea\Core\Event\Record\RecordEvent;
|
||||||
use Alchemy\Phrasea\Core\Event\Record\RecordEvents;
|
use Alchemy\Phrasea\Core\Event\Record\RecordEvents;
|
||||||
use Alchemy\Phrasea\Core\Event\Record\StatusChangedEvent;
|
use Alchemy\Phrasea\Core\Event\Record\StatusChangedEvent;
|
||||||
|
use Alchemy\Phrasea\Core\Event\Record\SubdefinitionCreateEvent;
|
||||||
use Alchemy\Phrasea\Core\PhraseaTokens;
|
use Alchemy\Phrasea\Core\PhraseaTokens;
|
||||||
use Alchemy\Phrasea\Databox\Subdef\MediaSubdefRepository;
|
use Alchemy\Phrasea\Databox\Subdef\MediaSubdefRepository;
|
||||||
use Alchemy\Phrasea\Filesystem\FilesystemService;
|
use Alchemy\Phrasea\Filesystem\FilesystemService;
|
||||||
@@ -284,7 +285,7 @@ class record_adapter implements RecordInterface, cache_cacheableInterface
|
|||||||
$this->getDataboxConnection()->executeUpdate($sql, ['type' => $type, 'record_id' => $this->getRecordId()]);
|
$this->getDataboxConnection()->executeUpdate($sql, ['type' => $type, 'record_id' => $this->getRecordId()]);
|
||||||
|
|
||||||
if ($old_type !== $type) {
|
if ($old_type !== $type) {
|
||||||
$this->rebuild_subdefs();
|
$this->dispatch(RecordEvents::SUBDEFINITION_CREATE, new SubdefinitionCreateEvent($this));
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->type = $type;
|
$this->type = $type;
|
||||||
@@ -341,7 +342,8 @@ class record_adapter implements RecordInterface, cache_cacheableInterface
|
|||||||
array(':mime' => $mime, ':record_id' => $this->getRecordId())
|
array(':mime' => $mime, ':record_id' => $this->getRecordId())
|
||||||
)) {
|
)) {
|
||||||
|
|
||||||
$this->rebuild_subdefs();
|
$this->dispatch(RecordEvents::SUBDEFINITION_CREATE, new SubdefinitionCreateEvent($this));
|
||||||
|
|
||||||
$this->delete_data_from_cache();
|
$this->delete_data_from_cache();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:jms="urn:jms:translation" version="1.2">
|
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:jms="urn:jms:translation" version="1.2">
|
||||||
<file date="2020-03-17T12:44:55Z" source-language="en" target-language="en" datatype="plaintext" original="not.available">
|
<file date="2020-03-17T12:44:55Z" source-language="en" target-language="en" datatype="plaintext" original="not.available">
|
||||||
<header>
|
<header>
|
||||||
@@ -7,8 +7,8 @@
|
|||||||
</header>
|
</header>
|
||||||
<body>
|
<body>
|
||||||
<trans-unit id="da39a3ee5e6b4b0d3255bfef95601890afd80709" resname="">
|
<trans-unit id="da39a3ee5e6b4b0d3255bfef95601890afd80709" resname="">
|
||||||
<source></source>
|
<source/>
|
||||||
<target state="new"></target>
|
<target state="new"/>
|
||||||
<jms:reference-file line="60">Form/Login/PhraseaAuthenticationForm.php</jms:reference-file>
|
<jms:reference-file line="60">Form/Login/PhraseaAuthenticationForm.php</jms:reference-file>
|
||||||
<jms:reference-file line="47">Form/Configuration/EmailFormType.php</jms:reference-file>
|
<jms:reference-file line="47">Form/Configuration/EmailFormType.php</jms:reference-file>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
@@ -13432,14 +13432,14 @@ It is possible to place several search areas</target>
|
|||||||
<target state="translated">August</target>
|
<target state="translated">August</target>
|
||||||
<jms:reference-file line="170">prod/WorkZone/Basket.html.twig</jms:reference-file>
|
<jms:reference-file line="170">prod/WorkZone/Basket.html.twig</jms:reference-file>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
<trans-unit id="63c83f397c51202a27320349456ec75b844a75e6" resname="workzone:datepicker:closeText">
|
<trans-unit id="63c83f397c51202a27320349456ec75b844a75e6" resname="workzone:datepicker:closeText" approved="no">
|
||||||
<source>workzone:datepicker:closeText</source>
|
<source>workzone:datepicker:closeText</source>
|
||||||
<target state="new">workzone:datepicker:closeText</target>
|
<target state="needs-translation">Close</target>
|
||||||
<jms:reference-file line="165">prod/WorkZone/Basket.html.twig</jms:reference-file>
|
<jms:reference-file line="165">prod/WorkZone/Basket.html.twig</jms:reference-file>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
<trans-unit id="32037015798672f75f469624c847da64e5953a27" resname="workzone:datepicker:currentText">
|
<trans-unit id="32037015798672f75f469624c847da64e5953a27" resname="workzone:datepicker:currentText" approved="no">
|
||||||
<source>workzone:datepicker:currentText</source>
|
<source>workzone:datepicker:currentText</source>
|
||||||
<target state="new">workzone:datepicker:currentText</target>
|
<target state="needs-translation">Current</target>
|
||||||
<jms:reference-file line="168">prod/WorkZone/Basket.html.twig</jms:reference-file>
|
<jms:reference-file line="168">prod/WorkZone/Basket.html.twig</jms:reference-file>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
<trans-unit id="7e55bc758f272d38198385584d6f50c2dd0eae13" resname="workzone:datepicker:december" approved="yes">
|
<trans-unit id="7e55bc758f272d38198385584d6f50c2dd0eae13" resname="workzone:datepicker:december" approved="yes">
|
||||||
@@ -13543,9 +13543,9 @@ It is possible to place several search areas</target>
|
|||||||
<jms:reference-file line="105">prod/WorkZone/Basket.html.twig</jms:reference-file>
|
<jms:reference-file line="105">prod/WorkZone/Basket.html.twig</jms:reference-file>
|
||||||
<jms:reference-file line="15">prod/Tooltip/Basket.html.twig</jms:reference-file>
|
<jms:reference-file line="15">prod/Tooltip/Basket.html.twig</jms:reference-file>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
<trans-unit id="32285b1e113decb0a3fdf090b0698c5508a2bd09" resname="workzone:feedback:expiration-open">
|
<trans-unit id="32285b1e113decb0a3fdf090b0698c5508a2bd09" resname="workzone:feedback:expiration-open" approved="no">
|
||||||
<source>workzone:feedback:expiration-open</source>
|
<source>workzone:feedback:expiration-open</source>
|
||||||
<target state="new">workzone:feedback:expiration-open</target>
|
<target state="needs-translation">Feedback open until</target>
|
||||||
<jms:reference-file line="107">prod/WorkZone/Basket.html.twig</jms:reference-file>
|
<jms:reference-file line="107">prod/WorkZone/Basket.html.twig</jms:reference-file>
|
||||||
<jms:reference-file line="17">prod/Tooltip/Basket.html.twig</jms:reference-file>
|
<jms:reference-file line="17">prod/Tooltip/Basket.html.twig</jms:reference-file>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:jms="urn:jms:translation" version="1.2">
|
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:jms="urn:jms:translation" version="1.2">
|
||||||
<file date="2020-03-17T12:45:08Z" source-language="en" target-language="fr" datatype="plaintext" original="not.available">
|
<file date="2020-03-17T12:45:08Z" source-language="en" target-language="fr" datatype="plaintext" original="not.available">
|
||||||
<header>
|
<header>
|
||||||
@@ -7,8 +7,8 @@
|
|||||||
</header>
|
</header>
|
||||||
<body>
|
<body>
|
||||||
<trans-unit id="da39a3ee5e6b4b0d3255bfef95601890afd80709" resname="">
|
<trans-unit id="da39a3ee5e6b4b0d3255bfef95601890afd80709" resname="">
|
||||||
<source></source>
|
<source/>
|
||||||
<target state="new"></target>
|
<target state="new"/>
|
||||||
<jms:reference-file line="60">Form/Login/PhraseaAuthenticationForm.php</jms:reference-file>
|
<jms:reference-file line="60">Form/Login/PhraseaAuthenticationForm.php</jms:reference-file>
|
||||||
<jms:reference-file line="47">Form/Configuration/EmailFormType.php</jms:reference-file>
|
<jms:reference-file line="47">Form/Configuration/EmailFormType.php</jms:reference-file>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
@@ -13540,15 +13540,15 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le
|
|||||||
<target state="translated">Mercredi</target>
|
<target state="translated">Mercredi</target>
|
||||||
<jms:reference-file line="171">prod/WorkZone/Basket.html.twig</jms:reference-file>
|
<jms:reference-file line="171">prod/WorkZone/Basket.html.twig</jms:reference-file>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
<trans-unit id="cbfb58c29147c5881e828d18a477f922211873a0" resname="workzone:feedback:expiration-closed">
|
<trans-unit id="cbfb58c29147c5881e828d18a477f922211873a0" resname="workzone:feedback:expiration-closed" approved="no">
|
||||||
<source>workzone:feedback:expiration-closed</source>
|
<source>workzone:feedback:expiration-closed</source>
|
||||||
<target state="new">workzone:feedback:expiration-closed</target>
|
<target state="needs-translation">Validation close depuis</target>
|
||||||
<jms:reference-file line="105">prod/WorkZone/Basket.html.twig</jms:reference-file>
|
<jms:reference-file line="105">prod/WorkZone/Basket.html.twig</jms:reference-file>
|
||||||
<jms:reference-file line="15">prod/Tooltip/Basket.html.twig</jms:reference-file>
|
<jms:reference-file line="15">prod/Tooltip/Basket.html.twig</jms:reference-file>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
<trans-unit id="32285b1e113decb0a3fdf090b0698c5508a2bd09" resname="workzone:feedback:expiration-open">
|
<trans-unit id="32285b1e113decb0a3fdf090b0698c5508a2bd09" resname="workzone:feedback:expiration-open" approved="no">
|
||||||
<source>workzone:feedback:expiration-open</source>
|
<source>workzone:feedback:expiration-open</source>
|
||||||
<target state="new">workzone:feedback:expiration-open</target>
|
<target state="needs-translation">validation ouverte jusqu'au</target>
|
||||||
<jms:reference-file line="107">prod/WorkZone/Basket.html.twig</jms:reference-file>
|
<jms:reference-file line="107">prod/WorkZone/Basket.html.twig</jms:reference-file>
|
||||||
<jms:reference-file line="17">prod/Tooltip/Basket.html.twig</jms:reference-file>
|
<jms:reference-file line="17">prod/Tooltip/Basket.html.twig</jms:reference-file>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
|
@@ -169,7 +169,8 @@ class ExportTest extends \PhraseanetAuthenticatedWebTestCase
|
|||||||
*/
|
*/
|
||||||
public function testExportMail()
|
public function testExportMail()
|
||||||
{
|
{
|
||||||
$this->mockNotificationDeliverer('Alchemy\Phrasea\Notification\Mail\MailRecordsExport');
|
// deliver method removed in the listener
|
||||||
|
// $this->mockNotificationDeliverer('Alchemy\Phrasea\Notification\Mail\MailRecordsExport');
|
||||||
|
|
||||||
$this->getClient()->request('POST', '/prod/export/mail/', [
|
$this->getClient()->request('POST', '/prod/export/mail/', [
|
||||||
'lst' => $this->getRecord1()->getId(),
|
'lst' => $this->getRecord1()->getId(),
|
||||||
|
Reference in New Issue
Block a user