From 7ea5cdf834d8153d1ce9e4067b8bcd522580b93e Mon Sep 17 00:00:00 2001 From: Nicolas Le Goff Date: Fri, 5 Dec 2014 15:06:06 +0100 Subject: [PATCH 1/9] Fix download --- .../Phrasea/Controller/Report/Activity.php | 2 - lib/classes/module/report/activity.php | 38 ++++--------------- lib/classes/module/report/sqldownload.php | 27 +++++-------- 3 files changed, 17 insertions(+), 50 deletions(-) diff --git a/lib/Alchemy/Phrasea/Controller/Report/Activity.php b/lib/Alchemy/Phrasea/Controller/Report/Activity.php index a07e7d2291..6bdacae200 100644 --- a/lib/Alchemy/Phrasea/Controller/Report/Activity.php +++ b/lib/Alchemy/Phrasea/Controller/Report/Activity.php @@ -131,9 +131,7 @@ class Activity implements ControllerProviderInterface $conf = array( 'user' => array(_('report:: utilisateur'), 0, 1, 0, 0), 'nbdoc' => array(_('report:: nombre de documents'), 0, 0, 0, 0), - 'poiddoc' => array(_('report:: poids des documents'), 0, 0, 0, 0), 'nbprev' => array(_('report:: nombre de preview'), 0, 0, 0, 0), - 'poidprev' => array(_('report:: poids des previews'), 0, 0, 0, 0) ); $activity = new \module_report_activity( diff --git a/lib/classes/module/report/activity.php b/lib/classes/module/report/activity.php index 0c6cfcf62d..608f85d539 100644 --- a/lib/classes/module/report/activity.php +++ b/lib/classes/module/report/activity.php @@ -290,13 +290,11 @@ class module_report_activity extends module_report SELECT DISTINCT(log.id), log_docs.date AS the_date, log_docs.final, log_docs.record_id FROM (log_docs) INNER JOIN log FORCE INDEX (date_site) ON (log.id = log_docs.log_id) + LEFT JOIN record ON (log_docs.record_id = record.record_id) WHERE (" . $filter['sql'] . ") AND !ISNULL(usrid) AND (log_docs.action = 'download' OR log_docs.action = 'mail') AND (log_docs.final = 'preview' OR log_docs.final = 'document') ) AS tt - LEFT JOIN record ON (record.record_id = tt.record_id) - LEFT JOIN subdef AS s ON (s.record_id = tt.record_id) - WHERE s.name = tt.final GROUP BY tt.final, ddate ORDER BY tt.the_date DESC"; @@ -472,19 +470,14 @@ class module_report_activity extends module_report $params = array_merge(array(), $filter['params']); $sql = " - SELECT tt.usrid, TRIM(" . $on . ") AS " . $on . ", tt.final, sum(1) AS nb, sum(size) AS poid - FROM ( - SELECT DISTINCT(log.id), TRIM(" . $on . ") AS " . $on . ", log_docs.record_id, log_docs.final, log.usrid + SELECT TRIM(" . $on . ") AS " . $on . ", SUM( log_docs.record_id ) AS nb, log_docs.final, log.usrid FROM log_docs INNER JOIN log FORCE INDEX (date_site) ON (log.id = log_docs.log_id) + LEFT JOIN record ON (record.record_id = log_docs.record_id) WHERE (" . $filter['sql'] . ") AND !ISNULL(usrid) AND (log_docs.action = 'download' OR log_docs.action = 'mail') - ) AS tt - LEFT JOIN record ON (record.record_id = tt.record_id) - LEFT JOIN subdef FORCE INDEX (unicite) ON (tt.record_id = subdef.record_id) - WHERE subdef.name = tt.final - GROUP BY " . $on . ", usrid - ORDER BY nb DESC;"; + AND (log_docs.final = 'preview' OR log_docs.final = 'document') + GROUP BY usrid"; // no_file_put_contents("/tmp/report.txt", sprintf("%s (%s)\n%s\n\n", __FILE__, __LINE__, $sql), FILE_APPEND); @@ -497,9 +490,7 @@ class module_report_activity extends module_report $i = -1; $total = array( 'nbdoc' => 0, - 'poiddoc' => 0, 'nbprev' => 0, - 'poidprev' => 0 ); $this->setChamp($rs); @@ -510,47 +501,36 @@ class module_report_activity extends module_report $user = $row[$on]; if (($save_user != $user) && ! is_null($user) && ! empty($user)) { if ($i >= 0) { - if (($this->result[$i]['nbprev'] + $this->result[$i]['nbdoc']) == 0 || ($this->result[$i]['poiddoc'] + $this->result[$i]['poidprev']) == 0) { + if (($this->result[$i]['nbprev'] + $this->result[$i]['nbdoc']) == 0) { unset($this->result[$i]); } - - if (isset($this->result[$i]['poiddoc']) && isset($this->result[$i]['poidprev'])) { - $this->result[$i]['poiddoc'] = p4string::format_octets($this->result[$i]['poiddoc']); - $this->result[$i]['poidprev'] = p4string::format_octets($this->result[$i]['poidprev']); - } } $i ++; $this->result[$i]['nbprev'] = 0; - $this->result[$i]['poidprev'] = 0; $this->result[$i]['nbdoc'] = 0; - $this->result[$i]['poiddoc'] = 0; } //doc info if ($row['final'] == 'document' && ! is_null($user) && ! is_null($row['usrid'])) { $this->result[$i]['nbdoc'] = ( ! is_null($row['nb']) ? $row['nb'] : 0); - $this->result[$i]['poiddoc'] = ( ! is_null($row['poid']) ? $row['poid'] : 0); $this->result[$i]['user'] = empty($row[$on]) ? "" . _('report:: non-renseigne') . "" : $row[$on]; $total['nbdoc'] += $this->result[$i]['nbdoc']; - $total['poiddoc'] += ( ! is_null($row['poid']) ? $row['poid'] : 0); $this->result[$i]['usrid'] = $row['usrid']; } //preview info - if (($row['final'] == 'preview' || $row['final'] == 'thumbnail') && + if (($row['final'] == 'preview') && ! is_null($user) && ! is_null($row['usrid'])) { $this->result[$i]['nbprev'] += ( ! is_null($row['nb']) ? $row['nb'] : 0); - $this->result[$i]['poidprev'] += ( ! is_null($row['poid']) ? $row['poid'] : 0); $this->result[$i]['user'] = empty($row[$on]) ? "" . _('report:: non-renseigne') . "" : $row[$on]; $total['nbprev'] += ( ! is_null($row['nb']) ? $row['nb'] : 0); - $total['poidprev'] += ( ! is_null($row['poid']) ? $row['poid'] : 0); $this->result[$i]['usrid'] = $row['usrid']; } @@ -564,11 +544,7 @@ class module_report_activity extends module_report if ($this->total > 0) { $this->result[$nb_row]['user'] = 'TOTAL'; $this->result[$nb_row]['nbdoc'] = '' . $total['nbdoc'] . ''; - $this->result[$nb_row]['poiddoc'] = - '' . p4string::format_octets($total['poiddoc']) . ''; $this->result[$nb_row]['nbprev'] = '' . $total['nbprev'] . ''; - $this->result[$nb_row]['poidprev'] = - '' . p4string::format_octets($total['poidprev']) . ''; } foreach($this->result as $k=>$row) { diff --git a/lib/classes/module/report/sqldownload.php b/lib/classes/module/report/sqldownload.php index 23ec03bdc4..4fa75ed47b 100644 --- a/lib/classes/module/report/sqldownload.php +++ b/lib/classes/module/report/sqldownload.php @@ -49,7 +49,6 @@ class module_report_sqldownload extends module_report_sql implements module_repo FROM log_docs INNER JOIN log FORCE INDEX (date_site) ON (log.id = log_docs.log_id) LEFT JOIN record ON (record.record_id=log_docs.record_id) - LEFT JOIN subdef ON (log_docs.record_id = subdef.record_id) WHERE (" .$filter['sql'] . ") AND !ISNULL(usrid) AND (log_docs.action = 'download' OR log_docs.action = 'mail') @@ -62,21 +61,16 @@ class module_report_sqldownload extends module_report_sql implements module_repo if ($name == 'record_id' && $this->on == 'DOC') { $this->sql = ' - SELECT ' . $name . ', SUM(1) AS telechargement, tt.comment, tt.size, tt.file, tt.mime, tt.final + SELECT ' . $name . ', SUM(1) AS telechargement, tt.comment, tt.final FROM ( - SELECT log.id, TRIM( ' . $field . ' ) AS ' . $name . ', log_docs.comment, subdef.size, subdef.file, subdef.mime, log_docs.final + SELECT log.id, TRIM( ' . $field . ' ) AS ' . $name . ', log_docs.comment, log_docs.final FROM log FORCE INDEX (date_site) INNER JOIN log_docs ON (log.id = log_docs.log_id) - - LEFT JOIN record ON (log_docs.record_id = record.record_id) - LEFT JOIN subdef ON (log_docs.record_id = subdef.record_id)'; + LEFT JOIN record ON (log_docs.record_id = record.record_id)'; $customFieldMap = array( $field => $name, 'log_docs.comment' => 'tt.comment', - 'subdef.size' => 'tt.size', - 'subdef.file' => 'tt.file', - 'subdef.mime' => 'tt.mime', 'log_docs.final' => 'tt.final', ); // no_file_put_contents("/tmp/report.txt", sprintf("%s (%s)\n%s\n\n", __FILE__, __LINE__, $this->sql), FILE_APPEND); @@ -88,8 +82,7 @@ class module_report_sqldownload extends module_report_sql implements module_repo SELECT DISTINCT(log.id), TRIM(' . $field . ') AS ' . $name . ' FROM log FORCE INDEX (date_site) INNER JOIN log_docs ON (log.id = log_docs.log_id) - LEFT JOIN record ON (log_docs.record_id = record.record_id) - LEFT JOIN subdef ON ( log_docs.record_id = subdef.record_id)'; + LEFT JOIN record ON (log_docs.record_id = record.record_id)'; // no_file_put_contents("/tmp/report.txt", sprintf("%s (%s)\n%s\n\n", __FILE__, __LINE__, $this->sql), FILE_APPEND); } else { $this->sql = ' @@ -98,14 +91,14 @@ class module_report_sqldownload extends module_report_sql implements module_repo SELECT DISTINCT(log.id), TRIM( ' . $this->getTransQuery($this->groupby) . ') AS ' . $name . ' FROM log FORCE INDEX (date_site) INNER JOIN log_docs ON (log.id = log_docs.log_id) - LEFT JOIN record ON (log_docs.record_id = record.record_id) - LEFT JOIN subdef ON (record.record_id = subdef.record_id)'; + LEFT JOIN record ON (log_docs.record_id = record.record_id)'; // no_file_put_contents("/tmp/report.txt", sprintf("%s (%s)\n%s\n\n", __FILE__, __LINE__, $this->sql), FILE_APPEND); } $this->sql .= ' WHERE ' . $filter['sql'] . ' '; - $this->sql .= 'AND ( log_docs.action = \'download\' OR log_docs.action = \'mail\') '; - $this->sql .= $this->on == 'DOC' ? 'AND subdef.name = \'document\' ' : ''; + $this->sql .= ' AND !ISNULL(usrid)'; + $this->sql .= ' AND (log_docs.action = \'download\' OR log_docs.action = \'mail\') '; + $this->sql .= $this->on == 'DOC' ? ' AND (log_docs.final = "document") ' : ' AND (log_docs.final = "preview" OR log_docs.final = "document")'; $this->sql .= ') as tt'; $this->sql .= ' GROUP BY ' . $name . ' ' . ($name == 'record_id' && $this->on == 'DOC' ? ', final' : ''); // no_file_put_contents("/tmp/report.txt", sprintf("%s (%s)\n%s\n\n", __FILE__, __LINE__, $this->sql), FILE_APPEND); @@ -144,10 +137,10 @@ class module_report_sqldownload extends module_report_sql implements module_repo FROM log FORCE INDEX (date_site) INNER JOIN log_docs ON (log.id = log_docs.log_id) LEFT JOIN record ON (log_docs.record_id = record.record_id) - LEFT JOIN subdef ON (log_docs.record_id = subdef.record_id) WHERE (' . $filter['sql'] . ') + AND !ISNULL(log.usrid) AND (log_docs.action = "download" OR log_docs.action = "mail")' . - ($this->on == 'DOC' ? ' AND subdef.name = "document"' : '') . + ($this->on == 'DOC' ? ' AND (log_docs.final = "document") ' : ' AND (log_docs.final = "preview" OR log_docs.final = "document")') . ') AS tt'; $this->sql .= $this->filter->getOrderFilter() ? : ''; From d4792cd473618886eb6bf442ebc977729414c7f4 Mon Sep 17 00:00:00 2001 From: Nicolas Le Goff Date: Tue, 9 Dec 2014 14:36:28 +0100 Subject: [PATCH 2/9] Fix sql downloads --- lib/classes/module/report/activity.php | 2 +- lib/classes/module/report/download.php | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/classes/module/report/activity.php b/lib/classes/module/report/activity.php index 608f85d539..320431fbeb 100644 --- a/lib/classes/module/report/activity.php +++ b/lib/classes/module/report/activity.php @@ -470,7 +470,7 @@ class module_report_activity extends module_report $params = array_merge(array(), $filter['params']); $sql = " - SELECT TRIM(" . $on . ") AS " . $on . ", SUM( log_docs.record_id ) AS nb, log_docs.final, log.usrid + SELECT TRIM(" . $on . ") AS " . $on . ", SUM(1) AS nb, log_docs.final, log.usrid FROM log_docs INNER JOIN log FORCE INDEX (date_site) ON (log.id = log_docs.log_id) LEFT JOIN record ON (record.record_id = log_docs.record_id) diff --git a/lib/classes/module/report/download.php b/lib/classes/module/report/download.php index cb7217bbd5..f1b49c5843 100644 --- a/lib/classes/module/report/download.php +++ b/lib/classes/module/report/download.php @@ -26,10 +26,7 @@ class module_report_download extends module_report 'log_id' => 'log_docs.log_id', 'record_id' => 'log_docs.record_id', 'final' => 'log_docs.final', - 'comment' => 'log_docs.comment', - 'size' => 'subdef.size', - 'mime' => 'subdef.mime', - 'file' => 'subdef.file' + 'comment' => 'log_docs.comment' ); /** From 2b243a041b7048af0517f1c0039d1f23b4b78b18 Mon Sep 17 00:00:00 2001 From: Nicolas Le Goff Date: Wed, 10 Dec 2014 18:54:29 +0100 Subject: [PATCH 3/9] Fix date edit for record --- lib/Alchemy/Phrasea/Controller/Prod/Edit.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Alchemy/Phrasea/Controller/Prod/Edit.php b/lib/Alchemy/Phrasea/Controller/Prod/Edit.php index 71d84e4280..7fbc65050a 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/Edit.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/Edit.php @@ -297,6 +297,7 @@ class Edit implements ControllerProviderInterface $media = $app['mediavorus']->guess($value->get_pathfile()); $reg_record->substitute_subdef($name, $media, $app); + $app['dispatcher']->dispatch(PhraseaEvents::RECORD_EDIT, new RecordEdit($reg_record)); $app['phraseanet.logger']($reg_record->get_databox())->log( $reg_record, \Session_Logger::EVENT_SUBSTITUTE, @@ -313,8 +314,6 @@ class Edit implements ControllerProviderInterface return $app->json(array('message' => '', 'error' => false)); } - $app['dispatcher']->dispatch(PhraseaEvents::RECORD_EDIT, new RecordEdit($records)); - $databoxes = $records->databoxes(); $databox = array_pop($databoxes); @@ -344,6 +343,7 @@ class Edit implements ControllerProviderInterface if (isset($rec['metadatas']) && is_array($rec['metadatas'])) { $record->set_metadatas($rec['metadatas']); + $app['dispatcher']->dispatch(PhraseaEvents::RECORD_EDIT, new RecordEdit($record)); } $newstat = $record->get_status(); From a97f97a46959cff4bff313f04760554618eb221a Mon Sep 17 00:00:00 2001 From: Jean-Yves Gaulier Date: Thu, 11 Dec 2014 14:30:57 +0100 Subject: [PATCH 4/9] Allows to add attachments to a mail --- .../Phrasea/Notification/Attachment.php | 38 +++++++++++++++++++ .../Phrasea/Notification/Deliverer.php | 8 +++- 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 lib/Alchemy/Phrasea/Notification/Attachment.php diff --git a/lib/Alchemy/Phrasea/Notification/Attachment.php b/lib/Alchemy/Phrasea/Notification/Attachment.php new file mode 100644 index 0000000000..13fd9a0ab6 --- /dev/null +++ b/lib/Alchemy/Phrasea/Notification/Attachment.php @@ -0,0 +1,38 @@ +path = $path; + $this->filename = $filename; + $this->contentType = $contentType; + } + + public function As_Swift_Attachment() + { + $swa = \Swift_Attachment::fromPath($this->path); + if($this->filename !== '') { + $swa->setFilename($this->filename); + } + if($this->contentType !== '') { + $swa->setContentType($this->contentType); + } + return $swa; + } +} diff --git a/lib/Alchemy/Phrasea/Notification/Deliverer.php b/lib/Alchemy/Phrasea/Notification/Deliverer.php index 79534b4d00..5a7daf1c56 100644 --- a/lib/Alchemy/Phrasea/Notification/Deliverer.php +++ b/lib/Alchemy/Phrasea/Notification/Deliverer.php @@ -47,7 +47,7 @@ class Deliverer * @throws LogicException In case no Receiver provided * @throws LogicException In case a read-receipt is asked but no Emitter provided */ - public function deliver(MailInterface $mail, $readReceipt = false) + public function deliver(MailInterface $mail, $readReceipt = false, array $attachments = null) { if (!$mail->getReceiver()) { throw new LogicException('You must provide a receiver for a mail notification'); @@ -63,6 +63,12 @@ class Deliverer $message->setReplyTo($mail->getEmitter()->getEmail(), $mail->getEmitter()->getName()); } + if(is_array($attachments)) { + foreach($attachments as $attachment) { + $message->attach($attachment->As_Swift_Attachment()); + } + } + if ($readReceipt) { if (!$mail->getEmitter()) { throw new LogicException('You must provide an emitter for a ReadReceipt'); From acf641547a90617f3d1783e0ec11bc53be32f1a1 Mon Sep 17 00:00:00 2001 From: Jean-Yves Gaulier Date: Thu, 11 Dec 2014 14:43:52 +0100 Subject: [PATCH 5/9] add comments --- lib/Alchemy/Phrasea/Notification/Attachment.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/Alchemy/Phrasea/Notification/Attachment.php b/lib/Alchemy/Phrasea/Notification/Attachment.php index 13fd9a0ab6..237c7f3ed1 100644 --- a/lib/Alchemy/Phrasea/Notification/Attachment.php +++ b/lib/Alchemy/Phrasea/Notification/Attachment.php @@ -11,12 +11,21 @@ namespace Alchemy\Phrasea\Notification; +/** + * Class Attachment attach file to a mail + * @package Alchemy\Phrasea\Notification + */ class Attachment { private $path; private $filename; private $contentType; + /** + * @param string $path path to an existing file to be added as attachment + * @param string $filename change the name of attachment, (default to '' to use filename from path) + * @param string $contentType change mime, (default to '' to get from path) + */ public function __construct($path, $filename='', $contentType='') { $this->path = $path; @@ -24,6 +33,9 @@ class Attachment $this->contentType = $contentType; } + /** + * @return \Swift_Mime_Attachment the attachment as a swift attachment + */ public function As_Swift_Attachment() { $swa = \Swift_Attachment::fromPath($this->path); From 5d8c11c8868bfd76b39bc2013609d54457cf0a53 Mon Sep 17 00:00:00 2001 From: Jean-Yves Gaulier Date: Thu, 11 Dec 2014 15:26:54 +0100 Subject: [PATCH 6/9] add test --- .../Phrasea/Notification/AttachmentTest.php | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 tests/Alchemy/Tests/Phrasea/Notification/AttachmentTest.php diff --git a/tests/Alchemy/Tests/Phrasea/Notification/AttachmentTest.php b/tests/Alchemy/Tests/Phrasea/Notification/AttachmentTest.php new file mode 100644 index 0000000000..1895c6809f --- /dev/null +++ b/tests/Alchemy/Tests/Phrasea/Notification/AttachmentTest.php @@ -0,0 +1,41 @@ +tempFile = tempnam(null, 'attachment'); + $this->object = new Attachment($this->tempFile, 'test.txt', 'text/plain'); + } + + /** + * @covers Alchemy\Phrasea\Notification\Attachment::As_Swift_Attachment + */ + public function testAsSwiftAttachment() + { + /** @var $a \Swift_Mime_Attachment */ + $swa = $this->object->As_Swift_Attachment(); + + $this->assertInstanceOf('Swift_Attachment', $swa); + $this->assertEquals($swa->getContentType(), 'text/plain'); + $this->assertEquals($swa->getFilename(), 'test.txt'); + + unset($swa); + } + + public function tearDown() + { + unlink($this->tempFile); + } +} From 1f7c5718be38dcfb05b494e8525f93532e6492ee Mon Sep 17 00:00:00 2001 From: Jean-Yves Gaulier Date: Thu, 11 Dec 2014 15:31:49 +0100 Subject: [PATCH 7/9] nop --- tests/Alchemy/Tests/Phrasea/Notification/AttachmentTest.php | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/Alchemy/Tests/Phrasea/Notification/AttachmentTest.php b/tests/Alchemy/Tests/Phrasea/Notification/AttachmentTest.php index 1895c6809f..546eb2c011 100644 --- a/tests/Alchemy/Tests/Phrasea/Notification/AttachmentTest.php +++ b/tests/Alchemy/Tests/Phrasea/Notification/AttachmentTest.php @@ -3,7 +3,6 @@ namespace Alchemy\Tests\Phrasea\Notification; use Alchemy\Phrasea\Notification\Attachment; -use Alchemy\Phrasea\Exception\InvalidArgumentException; class AttachmentTest extends \PHPUnit_Framework_TestCase { From edac914c8fda8ab1ddaabff98b388afd50e0c577 Mon Sep 17 00:00:00 2001 From: Nicolas Le Goff Date: Fri, 12 Dec 2014 16:58:07 +0100 Subject: [PATCH 8/9] Fix missing argument in rename_all_metadata function --- lib/classes/caption/field.php | 6 +----- lib/classes/databox/field.php | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/classes/caption/field.php b/lib/classes/caption/field.php index 2ca484ff58..604436442d 100644 --- a/lib/classes/caption/field.php +++ b/lib/classes/caption/field.php @@ -288,7 +288,7 @@ class caption_field implements cache_cacheableInterface return $values; } - public static function rename_all_metadatas(databox_field $databox_field) + public static function rename_all_metadatas(Application $app, databox_field $databox_field) { $sql = 'SELECT count(id) as count_id FROM metadatas WHERE meta_struct_id = :meta_struct_id'; @@ -323,10 +323,6 @@ class caption_field implements cache_cacheableInterface try { $record = $databox_field->get_databox()->get_record($row['record_id']); $record->set_metadatas(array()); - - /** - * TODO NEUTRON add App - */ $app['phraseanet.SE']->updateRecord($record); unset($record); } catch (\Exception $e) { diff --git a/lib/classes/databox/field.php b/lib/classes/databox/field.php index 04e241201a..f80df177fc 100644 --- a/lib/classes/databox/field.php +++ b/lib/classes/databox/field.php @@ -416,7 +416,7 @@ class databox_field implements cache_cacheableInterface $stmt->closeCursor(); if ($this->renamed) { - caption_field::rename_all_metadatas($this); + caption_field::rename_all_metadatas($this->app, $this); $this->renamed = false; } From b83bce0254764f63bbcb14832a45df9c30afe135 Mon Sep 17 00:00:00 2001 From: Nicolas Le Goff Date: Mon, 15 Dec 2014 15:33:29 +0100 Subject: [PATCH 9/9] Fix flickr --- composer.json | 2 +- composer.lock | 12 ++++++------ lib/classes/task/period/apibridge.php | 1 + 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/composer.json b/composer.json index 87b6ed9d97..6ac76508a6 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,7 @@ "require": { "php" : ">=5.3.3", "alchemy/oauth2php" : "1.0.0", - "alchemy/phlickr" : "0.2.8", + "alchemy/phlickr" : "0.2.9", "dailymotion/sdk" : "~1.5", "data-uri/data-uri" : "~0.1.0", "doctrine/orm" : "~2.3.0", diff --git a/composer.lock b/composer.lock index 27341994f2..50576ec33f 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "21f40dfe13f0a9507d9c36b25c54d4f1", + "hash": "fadb1c02db78a5cbeec681a90b45fdf8", "packages": [ { "name": "alchemy-fr/tcpdf-clone", @@ -282,16 +282,16 @@ }, { "name": "alchemy/phlickr", - "version": "0.2.8", + "version": "0.2.9", "source": { "type": "git", "url": "https://github.com/alchemy-fr/Phlickr.git", - "reference": "26b7764fd45c15062cb1b21c9389aff919e8c2bd" + "reference": "f9af93e27e9235db43e61ce2f9588d8ce9859b68" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/alchemy-fr/Phlickr/zipball/26b7764fd45c15062cb1b21c9389aff919e8c2bd", - "reference": "26b7764fd45c15062cb1b21c9389aff919e8c2bd", + "url": "https://api.github.com/repos/alchemy-fr/Phlickr/zipball/f9af93e27e9235db43e61ce2f9588d8ce9859b68", + "reference": "f9af93e27e9235db43e61ce2f9588d8ce9859b68", "shasum": "" }, "type": "library", @@ -301,7 +301,7 @@ } }, "notification-url": "https://packagist.org/downloads/", - "time": "2014-07-07 16:25:07" + "time": "2014-12-15 14:27:57" }, { "name": "dailymotion/sdk", diff --git a/lib/classes/task/period/apibridge.php b/lib/classes/task/period/apibridge.php index 0e7ed02bfd..3b92cbaafa 100644 --- a/lib/classes/task/period/apibridge.php +++ b/lib/classes/task/period/apibridge.php @@ -78,6 +78,7 @@ class task_period_apibridge extends task_appboxAbstract $this->update_element($element); } } catch (\Exception $e) { + $this->log("process error: " . $e->getMessage()); $sql = 'UPDATE bridge_elements SET status = :status WHERE id = :id'; $params = array(