mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-18 15:33:15 +00:00
Merge branch 'master' into PHRAS-2564-permalink-video-start-url-parameter
This commit is contained in:
5
Vagrantfile
vendored
5
Vagrantfile
vendored
@@ -123,6 +123,11 @@ Vagrant.configure("2") do |config|
|
|||||||
config.vm.box = "alchemy/Phraseanet-vagrant-dev"
|
config.vm.box = "alchemy/Phraseanet-vagrant-dev"
|
||||||
#config.vm.box = "ubuntu/trusty64"
|
#config.vm.box = "ubuntu/trusty64"
|
||||||
|
|
||||||
|
# In case, Phraseanet box, choose the php version
|
||||||
|
# For php 7.0 use box 0.0.1
|
||||||
|
# For php 7.1 use box 0.0.2
|
||||||
|
config.vm.box_version = "0.0.1"
|
||||||
|
|
||||||
config.ssh.forward_agent = true
|
config.ssh.forward_agent = true
|
||||||
config_net(config)
|
config_net(config)
|
||||||
|
|
||||||
|
@@ -70,6 +70,10 @@ class ArchiveJob extends AbstractJob
|
|||||||
protected function doJob(JobData $data)
|
protected function doJob(JobData $data)
|
||||||
{
|
{
|
||||||
$app = $data->getApplication();
|
$app = $data->getApplication();
|
||||||
|
|
||||||
|
// quick fix to reconnect if mysql is lost
|
||||||
|
$app->getApplicationBox()->get_connection();
|
||||||
|
|
||||||
$task = $data->getTask();
|
$task = $data->getTask();
|
||||||
|
|
||||||
$settings = simplexml_load_string($task->getSettings());
|
$settings = simplexml_load_string($task->getSettings());
|
||||||
@@ -83,6 +87,9 @@ class ArchiveJob extends AbstractJob
|
|||||||
|
|
||||||
$databox = $app->findDataboxById($sbasId);
|
$databox = $app->findDataboxById($sbasId);
|
||||||
|
|
||||||
|
// quick fix to reconnect if mysql is lost
|
||||||
|
$databox->get_connection();
|
||||||
|
|
||||||
$TColls = [];
|
$TColls = [];
|
||||||
$collection = null;
|
$collection = null;
|
||||||
foreach ($databox->get_collections() as $coll) {
|
foreach ($databox->get_collections() as $coll) {
|
||||||
@@ -562,6 +569,10 @@ class ArchiveJob extends AbstractJob
|
|||||||
|
|
||||||
private function archive(Application $app, \databox $databox, \DOMDOcument $dom, \DOMElement $node, $path, $path_archived, $path_error, $depth, $moveError, $moveArchived, $stat0, $stat1)
|
private function archive(Application $app, \databox $databox, \DOMDOcument $dom, \DOMElement $node, $path, $path_archived, $path_error, $depth, $moveError, $moveArchived, $stat0, $stat1)
|
||||||
{
|
{
|
||||||
|
// quick fix to reconnect if mysql is lost
|
||||||
|
$app->getApplicationBox()->get_connection();
|
||||||
|
$databox->get_connection();
|
||||||
|
|
||||||
if ($node->getAttribute('temperature') == 'hot') {
|
if ($node->getAttribute('temperature') == 'hot') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -820,6 +831,10 @@ class ArchiveJob extends AbstractJob
|
|||||||
|
|
||||||
private function archiveGrp(Application $app, \databox $databox, \DOMDocument $dom, \DOMElement $node, $path, $path_archived, $path_error, array &$nodesToDel, $moveError, $moveArchived, $stat0, $stat1)
|
private function archiveGrp(Application $app, \databox $databox, \DOMDocument $dom, \DOMElement $node, $path, $path_archived, $path_error, array &$nodesToDel, $moveError, $moveArchived, $stat0, $stat1)
|
||||||
{
|
{
|
||||||
|
// quick fix to reconnect if mysql is lost
|
||||||
|
$app->getApplicationBox()->get_connection();
|
||||||
|
$databox->get_connection();
|
||||||
|
|
||||||
$xpath = new \DOMXPath($dom);
|
$xpath = new \DOMXPath($dom);
|
||||||
|
|
||||||
// grp folders stay in place
|
// grp folders stay in place
|
||||||
@@ -984,6 +999,10 @@ class ArchiveJob extends AbstractJob
|
|||||||
|
|
||||||
public function createStory(Application $app, \collection $collection, $pathfile, $captionFile, $stat0, $stat1)
|
public function createStory(Application $app, \collection $collection, $pathfile, $captionFile, $stat0, $stat1)
|
||||||
{
|
{
|
||||||
|
// quick fix to reconnect if mysql is lost
|
||||||
|
$app->getApplicationBox()->get_connection();
|
||||||
|
$databox->get_connection();
|
||||||
|
|
||||||
$status = \databox_status::operation_or($stat0, $stat1);
|
$status = \databox_status::operation_or($stat0, $stat1);
|
||||||
|
|
||||||
$media = $app->getMediaFromUri($pathfile);
|
$media = $app->getMediaFromUri($pathfile);
|
||||||
@@ -1032,6 +1051,10 @@ class ArchiveJob extends AbstractJob
|
|||||||
*/
|
*/
|
||||||
public function createRecord(Application $app, \collection $collection, $pathfile, $captionFile, $grp_rid, $force, $stat0, $stat1)
|
public function createRecord(Application $app, \collection $collection, $pathfile, $captionFile, $grp_rid, $force, $stat0, $stat1)
|
||||||
{
|
{
|
||||||
|
// quick fix to reconnect if mysql is lost
|
||||||
|
$app->getApplicationBox()->get_connection();
|
||||||
|
$collection->get_connection();
|
||||||
|
|
||||||
$status = \databox_status::operation_or($stat0, $stat1);
|
$status = \databox_status::operation_or($stat0, $stat1);
|
||||||
|
|
||||||
$media = $app->getMediaFromUri($pathfile);
|
$media = $app->getMediaFromUri($pathfile);
|
||||||
@@ -1097,6 +1120,10 @@ class ArchiveJob extends AbstractJob
|
|||||||
*/
|
*/
|
||||||
private function archiveFilesToGrp(Application $app, \databox $databox, \DOMDocument $dom, \DOMElement $node, $path, $path_archived, $path_error, $grp_rid, $stat0, $stat1, $moveError, $moveArchived)
|
private function archiveFilesToGrp(Application $app, \databox $databox, \DOMDocument $dom, \DOMElement $node, $path, $path_archived, $path_error, $grp_rid, $stat0, $stat1, $moveError, $moveArchived)
|
||||||
{
|
{
|
||||||
|
// quick fix to reconnect if mysql is lost
|
||||||
|
$app->getApplicationBox()->get_connection();
|
||||||
|
$databox->get_connection();
|
||||||
|
|
||||||
$nodesToDel = [];
|
$nodesToDel = [];
|
||||||
for ($n = $node->firstChild; $n; $n = $n->nextSibling) {
|
for ($n = $node->firstChild; $n; $n = $n->nextSibling) {
|
||||||
if (!$this->isStarted()) {
|
if (!$this->isStarted()) {
|
||||||
@@ -1134,6 +1161,10 @@ class ArchiveJob extends AbstractJob
|
|||||||
*/
|
*/
|
||||||
private function archiveFile(Application $app, \databox $databox, \DOMDocument $dom, \DOMElement $node, $path, $path_archived, $path_error, array &$nodesToDel, $grp_rid, $stat0, $stat1, $moveError, $moveArchived)
|
private function archiveFile(Application $app, \databox $databox, \DOMDocument $dom, \DOMElement $node, $path, $path_archived, $path_error, array &$nodesToDel, $grp_rid, $stat0, $stat1, $moveError, $moveArchived)
|
||||||
{
|
{
|
||||||
|
// quick fix to reconnect if mysql is lost
|
||||||
|
$app->getApplicationBox()->get_connection();
|
||||||
|
$databox->get_connection();
|
||||||
|
|
||||||
$match = $node->getAttribute('match');
|
$match = $node->getAttribute('match');
|
||||||
|
|
||||||
if ($match == '*') {
|
if ($match == '*') {
|
||||||
@@ -1188,6 +1219,10 @@ class ArchiveJob extends AbstractJob
|
|||||||
*/
|
*/
|
||||||
private function archiveFileAndCaption(Application $app, \databox $databox, \DOMDocument $dom, \DOMElement $node, \DOMElement $captionFileNode = null, $path, $path_archived, $path_error, $grp_rid, array &$nodesToDel, $stat0, $stat1, $moveError, $moveArchived)
|
private function archiveFileAndCaption(Application $app, \databox $databox, \DOMDocument $dom, \DOMElement $node, \DOMElement $captionFileNode = null, $path, $path_archived, $path_error, $grp_rid, array &$nodesToDel, $stat0, $stat1, $moveError, $moveArchived)
|
||||||
{
|
{
|
||||||
|
// quick fix to reconnect if mysql is lost
|
||||||
|
$app->getApplicationBox()->get_connection();
|
||||||
|
$databox->get_connection();
|
||||||
|
|
||||||
$file = $node->getAttribute('name');
|
$file = $node->getAttribute('name');
|
||||||
$cid = $node->getAttribute('cid');
|
$cid = $node->getAttribute('cid');
|
||||||
$captionFileName = $captionFileNode ? $captionFileNode->getAttribute('name') : null;
|
$captionFileName = $captionFileNode ? $captionFileNode->getAttribute('name') : null;
|
||||||
@@ -1361,6 +1396,9 @@ class ArchiveJob extends AbstractJob
|
|||||||
*/
|
*/
|
||||||
protected function getLazaretSession(Application $app)
|
protected function getLazaretSession(Application $app)
|
||||||
{
|
{
|
||||||
|
// quick fix to reconnect if mysql is lost
|
||||||
|
$app->getApplicationBox()->get_connection();
|
||||||
|
|
||||||
$lazaretSession = new LazaretSession();
|
$lazaretSession = new LazaretSession();
|
||||||
|
|
||||||
$app['orm.em']->persist($lazaretSession);
|
$app['orm.em']->persist($lazaretSession);
|
||||||
|
@@ -7,12 +7,12 @@
|
|||||||
# - server
|
# - server
|
||||||
# - repositories
|
# - repositories
|
||||||
# - vagrant_local
|
# - vagrant_local
|
||||||
# - nginx
|
- nginx
|
||||||
# - mariadb
|
# - mariadb
|
||||||
# - elasticsearch
|
# - elasticsearch
|
||||||
# - rabbitmq
|
# - rabbitmq
|
||||||
# - php
|
# - php
|
||||||
# - xdebug
|
- xdebug
|
||||||
# - composer
|
# - composer
|
||||||
# - mailcatcher
|
# - mailcatcher
|
||||||
# - node
|
# - node
|
||||||
|
Reference in New Issue
Block a user