Merge pull request #1117 from nlegoff/fix384

[3.8.5] Fix some bugs
This commit is contained in:
Nicolas Le Goff
2014-07-07 20:57:32 +02:00
13 changed files with 74 additions and 80 deletions

View File

@@ -21,13 +21,17 @@
{
"type": "vcs",
"url": "https://github.com/nlegoff/Media-Alchemyst"
},
{
"type": "vcs",
"url": "https://github.com/nlegoff/Imagine"
}
],
"minimum-stability" : "dev",
"require": {
"php" : ">=5.3.3",
"alchemy/oauth2php" : "1.0.0",
"alchemy/phlickr" : "0.2.7",
"alchemy/phlickr" : "0.2.8",
"dailymotion/sdk" : "~1.5",
"data-uri/data-uri" : "~0.1.0",
"doctrine/orm" : "~2.3.0",
@@ -37,7 +41,7 @@
"alchemy/geonames-api-consumer" : "~0.1.0",
"goodby/csv" : "~1.0",
"guzzle/guzzle" : "~3.0",
"imagine/imagine" : "0.6.x-dev@dev",
"imagine/imagine" : "dev-flatten-layer as 0.6.1",
"jms/serializer" : "~0.10",
"justinrainbow/json-schema" : "~1.3",
"mediavorus/mediavorus" : "dev-fix-video-dim as 0.4.3",

44
composer.lock generated
View File

@@ -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": "6dbba3e72a44255a6292ee8fedbce88e",
"hash": "748dacbcdc2199ab5eed1a237bf4fd17",
"packages": [
{
"name": "alchemy-fr/tcpdf-clone",
@@ -272,16 +272,16 @@
},
{
"name": "alchemy/phlickr",
"version": "0.2.7",
"version": "0.2.8",
"source": {
"type": "git",
"url": "https://github.com/alchemy-fr/Phlickr.git",
"reference": "9f228cabf924bdd5913fdb59514904d0d4c8e40a"
"reference": "26b7764fd45c15062cb1b21c9389aff919e8c2bd"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/alchemy-fr/Phlickr/zipball/9f228cabf924bdd5913fdb59514904d0d4c8e40a",
"reference": "9f228cabf924bdd5913fdb59514904d0d4c8e40a",
"url": "https://api.github.com/repos/alchemy-fr/Phlickr/zipball/26b7764fd45c15062cb1b21c9389aff919e8c2bd",
"reference": "26b7764fd45c15062cb1b21c9389aff919e8c2bd",
"shasum": ""
},
"type": "library",
@@ -291,7 +291,7 @@
}
},
"notification-url": "https://packagist.org/downloads/",
"time": "2013-07-01 09:47:54"
"time": "2014-07-07 14:01:51"
},
{
"name": "dailymotion/sdk",
@@ -1214,16 +1214,16 @@
},
{
"name": "imagine/imagine",
"version": "dev-develop",
"version": "dev-flatten-layer",
"source": {
"type": "git",
"url": "https://github.com/avalanche123/Imagine.git",
"reference": "237ccf205dd5ece7a00a574b4f18bd118aa08a5d"
"url": "https://github.com/nlegoff/Imagine.git",
"reference": "df2d9d8834d32943082fc52b89c5b11fde279b5a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/avalanche123/Imagine/zipball/237ccf205dd5ece7a00a574b4f18bd118aa08a5d",
"reference": "237ccf205dd5ece7a00a574b4f18bd118aa08a5d",
"url": "https://api.github.com/repos/nlegoff/Imagine/zipball/df2d9d8834d32943082fc52b89c5b11fde279b5a",
"reference": "df2d9d8834d32943082fc52b89c5b11fde279b5a",
"shasum": ""
},
"require": {
@@ -1240,7 +1240,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-develop": "0.6-dev"
"dev-develop": "0.7-dev"
}
},
"autoload": {
@@ -1248,7 +1248,6 @@
"Imagine": "lib/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
@@ -1267,7 +1266,10 @@
"image manipulation",
"image processing"
],
"time": "2013-10-26 10:53:02"
"support": {
"source": "https://github.com/nlegoff/Imagine/tree/flatten-layer"
},
"time": "2014-07-07 17:04:15"
},
{
"name": "jms/metadata",
@@ -1496,12 +1498,12 @@
"source": {
"type": "git",
"url": "https://github.com/nlegoff/Media-Alchemyst.git",
"reference": "e812e631b74ebb0c7b3dd5f4e981d84a7b3c4029"
"reference": "be5c7cd4e207c469fb88d88397bd220c4db323d8"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nlegoff/Media-Alchemyst/zipball/e812e631b74ebb0c7b3dd5f4e981d84a7b3c4029",
"reference": "e812e631b74ebb0c7b3dd5f4e981d84a7b3c4029",
"url": "https://api.github.com/repos/nlegoff/Media-Alchemyst/zipball/be5c7cd4e207c469fb88d88397bd220c4db323d8",
"reference": "be5c7cd4e207c469fb88d88397bd220c4db323d8",
"shasum": ""
},
"require": {
@@ -1563,7 +1565,7 @@
"support": {
"source": "https://github.com/nlegoff/Media-Alchemyst/tree/master"
},
"time": "2014-06-10 13:51:13"
"time": "2014-07-07 16:54:32"
},
{
"name": "mediavorus/mediavorus",
@@ -4014,6 +4016,12 @@
}
],
"aliases": [
{
"alias": "0.6.1",
"alias_normalized": "0.6.1.0",
"version": "dev-flatten-layer",
"package": "imagine/imagine"
},
{
"alias": "0.4.3",
"alias_normalized": "0.4.3.0",

View File

@@ -285,14 +285,14 @@ class Edit implements ControllerProviderInterface
$newsubdef_reg = new \record_adapter($app, $reg_record->get_sbas_id(), $request->request->get('newrepresent'));
if ($newsubdef_reg->get_type() !== 'image') {
throw new \Exception('A reg image must come from image data');
}
foreach ($newsubdef_reg->get_subdefs() as $name => $value) {
if (!in_array($name, array('thumbnail', 'preview'))) {
continue;
}
if ($value->get_type() !== \media_subdef::TYPE_IMAGE) {
continue;
}
$media = $app['mediavorus']->guess($value->get_pathfile());
$reg_record->substitute_subdef($name, $media, $app);
$app['phraseanet.logger']($reg_record->get_databox())->log(

View File

@@ -416,15 +416,18 @@ class Push implements ControllerProviderInterface
$app['EM']->flush();
$url = $app->url('lightbox_validation', array(
'ssel_id' => $Basket->getId(),
'LOG' => $app['tokens']->getUrlToken(
$arguments = array('ssel_id' => $Basket->getId());
if (!$app['phraseanet.registry']->get('GV_enable_push_authentication') || !$request->get('force_authentication')) {
$arguments['LOG'] = $app['tokens']->getUrlToken(
\random::TYPE_VALIDATE,
$participant_user->get_id(),
null,
$Basket->getId()
)
));
);
}
$url = $app->url('lightbox_validation', $arguments);
$receipt = $request->get('recept') ? $app['authentication']->getUser()->get_email() : '';

View File

@@ -191,7 +191,7 @@ class Records implements ControllerProviderInterface
'record' => $record
)),
"pos" => $record->get_number(),
"title" => $record->get_title($query, $searchEngine)
"title" => str_replace(array('[[em]]', '[[/em]]'), array('<em>', '</em>'), $record->get_title($query, $searchEngine))
));
}

View File

@@ -25,6 +25,7 @@ class Image extends Provider
const OPTION_RESOLUTION = 'resolution';
const OPTION_STRIP = 'strip';
const OPTION_QUALITY = 'quality';
const OPTION_FLATTEN = 'flatten';
protected $options = array();
@@ -33,6 +34,7 @@ class Image extends Provider
$this->registerOption(new OptionType\Range(_('Dimension'), self::OPTION_SIZE, 20, 3000, 800));
$this->registerOption(new OptionType\Range(_('Resolution'), self::OPTION_RESOLUTION, 50, 300, 72));
$this->registerOption(new OptionType\Boolean(_('Remove ICC Profile'), self::OPTION_STRIP, false));
$this->registerOption(new OptionType\Boolean(_('Flatten layers'), self::OPTION_FLATTEN, false));
$this->registerOption(new OptionType\Range(_('Quality'), self::OPTION_QUALITY, 0, 100, 75));
}
@@ -59,6 +61,7 @@ class Image extends Provider
$this->spec->setDimensions($size, $size);
$this->spec->setQuality($this->getOption(self::OPTION_QUALITY)->getValue());
$this->spec->setStrip($this->getOption(self::OPTION_STRIP)->getValue());
$this->spec->setFlatten($this->getOption(self::OPTION_FLATTEN)->getValue());
$this->spec->setResolution($resolution, $resolution);
return $this->spec;

View File

@@ -305,6 +305,9 @@ class databox_subdef
if ($sd->dpi) {
$image->setOptionValue(Image::OPTION_RESOLUTION, (int) $sd->dpi);
}
if ($sd->flatten) {
$image->setOptionValue(Image::OPTION_FLATTEN, p4field::isyes($sd->flatten));
}
return $image;
}

View File

@@ -3,7 +3,7 @@ msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-11-14 14:10+0100\n"
"PO-Revision-Date: 2014-06-25 12:08+0100\n"
"PO-Revision-Date: 2014-07-07 15:36+0100\n"
"Last-Translator: Anthony <acabot@alchemy.fr>\n"
"Language-Team: \n"
"Language: en_GB\n"
@@ -16,7 +16,7 @@ msgstr ""
"X-Poedit-SourceCharset: utf-8\n"
"X-Poedit-Basepath: /Users/romain/Documents/workspace/Phraseanet\n"
"X-Poedit-KeywordsList: _e;__\n"
"X-POOTLE-MTIME: 1401802195.000000\n"
"X-POOTLE-MTIME: 1404404647.000000\n"
"X-Poedit-SearchPath-0: config\n"
"X-Poedit-SearchPath-1: lib/classes\n"
"X-Poedit-SearchPath-2: lib/conf.d\n"
@@ -5624,7 +5624,7 @@ msgstr "Records statut"
#: tmp/cache_twig/74/3d/4b2851d1f18c8ae4b91891284ae6d293c84c4718d08f94fe9a506e8ba6d7.php:45
msgid "Records type"
msgstr "Records type"
msgstr "Type of documents"
#: tmp/cache_twig/74/3d/4b2851d1f18c8ae4b91891284ae6d293c84c4718d08f94fe9a506e8ba6d7.php:57
msgid "You have selected one record."
@@ -11331,9 +11331,7 @@ msgstr "Enable the force authentication option for Push and Feedbacks sessions"
msgid ""
"Adds an option to the push form submission to restrict push recipient(s) to "
"Phraseanet users only."
msgstr ""
"Adds an option for Push and Feedbacks submission forms to limit recipients "
"to trusted Phraseanet users only."
msgstr "Force authentication for Push and Feedbacks recipients."
#: ../lib/classes/task/period/apiwebhooks.php:18
msgid "Api Webhook"
@@ -11501,9 +11499,6 @@ msgstr "Unable to create template, its given name is already used."
msgid "Unable to create the user."
msgstr "Unable to create the user."
msgid "Set force authentication option to see push content as mandatory"
msgstr "Set 'force authentication option' for push as mandatory"
#~ msgid "Enable H264 stream mode"
#~ msgstr "Enable H264 stream mode"

View File

@@ -3,7 +3,7 @@ msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-11-14 14:10+0100\n"
"PO-Revision-Date: 2014-06-25 12:07+0100\n"
"PO-Revision-Date: 2014-07-07 15:36+0100\n"
"Last-Translator: Anthony <acabot@alchemy.fr>\n"
"Language-Team: \n"
"Language: fr_FR\n"
@@ -16,7 +16,7 @@ msgstr ""
"X-Poedit-SourceCharset: utf-8\n"
"X-Poedit-Basepath: /Users/romain/Documents/workspace/Phraseanet\n"
"X-Poedit-KeywordsList: _e;__\n"
"X-POOTLE-MTIME: 1401802000.000000\n"
"X-POOTLE-MTIME: 1404404560.000000\n"
"X-Poedit-SearchPath-0: config\n"
"X-Poedit-SearchPath-1: lib/classes\n"
"X-Poedit-SearchPath-2: lib/conf.d\n"
@@ -5678,7 +5678,7 @@ msgstr "Statut des enregistrements"
#: tmp/cache_twig/74/3d/4b2851d1f18c8ae4b91891284ae6d293c84c4718d08f94fe9a506e8ba6d7.php:45
msgid "Records type"
msgstr "Type des enregistrements"
msgstr "Type des documents"
#: tmp/cache_twig/74/3d/4b2851d1f18c8ae4b91891284ae6d293c84c4718d08f94fe9a506e8ba6d7.php:57
msgid "You have selected one record."
@@ -8797,7 +8797,7 @@ msgstr "Message automatique de Phraseanet"
#: tmp/cache_twig/e9/1a/9e2396dbfd0df38fa3c35df138bcc0606bacbbd117d37b40fb246fa6aaf6.php:228
msgid "Pour gérer l'envoi d'email automatique, connectez-vous à %link%"
msgstr ""
"Pour régler les préférences de reception d'e-mails automatiques, connectez-"
"Pour régler les préférences de réception d'e-mails automatiques, connectez-"
"vous à %link%."
#: tmp/cache_twig/e9/49/406e6d61efed296d58e5356a77a622909c068b709020709aa697c9fd4c69.php:59
@@ -11508,8 +11508,8 @@ msgid ""
"Adds an option to the push form submission to restrict push recipient(s) to "
"Phraseanet users only."
msgstr ""
"Ajoute une option permettant de limiter la diffusion des Push et Validations "
"auprès d'utilisateurs Phraseanet dans les formulaires d'envoi."
"Force les utilisateurs destinataires d'un Push et d'une validation à "
"s'authentifier."
#: ../lib/classes/task/period/apiwebhooks.php:18
msgid "Api Webhook"
@@ -11678,9 +11678,6 @@ msgstr "Impossible le créer ce modèle, le nom donné est déjà utilisé."
msgid "Unable to create the user."
msgstr "Impossible de créer cet utilisateur."
msgid "Set force authentication option to see push content as mandatory"
msgstr "Rendre obligatoire l'option d'authentification forcée"
#~ msgid "Enable H264 stream mode"
#~ msgstr "Activer H264 en mode flux continu (lecture en streaming)"

View File

@@ -7,10 +7,7 @@
<div class="bloc">
<div class="insidebloc">
{% set content = WorkZone.getContent(srt) %}
{% for basket in content.get(constant('\\Alchemy\\Phrasea\\Helper\\WorkZone::VALIDATIONS')) %}
<div tooltipsrc="{{ path('prod_tooltip_basket', { 'basket_id' : basket.getId() }) }}"
id="SSTT_{{basket.getId()}}"
class="basketTips ui-accordion-header ui-state-default
@@ -48,11 +45,13 @@
onclick="downloadThis('ssel={{basket.getId()}}');">{% trans 'action::exporter' %}
</div>
</div>
<div title="" class="context-menu-item menu3-custom-item">
<div onclick="editThis('SSTT','{{basket.getId()}}');" style=""
class="context-menu-item-inner">{% trans 'action::editer' %}
</div>
</div>
{% if app['authentication'].getUser().ACL().has_right('modifyrecord') %}
<div title="" class="context-menu-item menu3-custom-item">
<div onclick="editThis('SSTT','{{basket.getId()}}');" style=""
class="context-menu-item-inner">{% trans 'action::editer' %}
</div>
</div>
{% endif %}
<div title="" class="context-menu-item">
<div class="context-menu-item-inner">
<a href="{{ path('lightbox_compare', { 'ssel_id' : basket.getId() }) }}" target="_blank">Lightbox</a>
@@ -75,17 +74,10 @@
</table>
</div>
</div>
<div id="SSTT_content_{{basket.getId()}}" class="content basket" style="overflow:hidden;">
</div>
<div id="SSTT_content_{{basket.getId()}}" class="content basket" style="overflow:hidden;"></div>
{% endfor %}
{% for basket in content.get(constant('\\Alchemy\\Phrasea\\Helper\\WorkZone::BASKETS')) %}
<div tooltipsrc="{{ path('prod_tooltip_basket', { 'basket_id' : basket.getId() }) }}"
id="SSTT_{{basket.getId()}}"
class="basketTips ui-accordion-header ui-state-default
@@ -189,17 +181,12 @@
</table>
</div>
</div>
<div id="SSTT_content_{{basket.getId()}}" class="content basket" style="overflow:hidden;">
</div>
<div id="SSTT_content_{{basket.getId()}}" class="content basket" style="overflow:hidden;"> </div>
{% endfor %}
{% for story in content.get(constant('\\Alchemy\\Phrasea\\Helper\\WorkZone::STORIES')) %}
<div tooltipsrc="{{ path('prod_tooltip_story', { 'sbas_id' : story.getRecord(app).get_sbas_id(), 'record_id' : story.getRecord(app).get_record_id() }) }}"
id="SSWZ_{{story.getId()}}" sbas="{{story.getSbasId()}}"
class="STORY_{{ story.getRecord(app).get_serialize_key() }} basketTips ui-accordion-header ui-state-default
@@ -232,12 +219,13 @@
onclick="downloadThis('lst={{story.getRecord(app).get_serialize_key()}}');">{% trans 'action::exporter' %}
</div>
</div>
{% if app['authentication'].getUser().ACL().has_right('modifyrecord') %}
<div title="" class="context-menu-item menu3-custom-item">
<div onclick="editThis('IMGT','{{story.getRecord(app).get_serialize_key()}}');" style=""
class="context-menu-item-inner">{% trans 'action::editer' %}
</div>
</div>
{% endif %}
<div title="" class="context-menu-item menu3-custom-item">
<div class="context-menu-item-inner">
<a class="story_unfix" href="{{ path('prod_workzone_detach_story', { 'sbas_id' : story.getRecord(app).get_sbas_id(), 'record_id' : story.getRecord(app).get_record_id()}) }}">
@@ -260,15 +248,8 @@
</table>
</div>
</div>
<div sbas="{{story.getSbasId()}}" id="SSTT_content_{{story.getId()}}" class="content grouping" style="overflow:hidden;">
</div>
<div sbas="{{story.getSbasId()}}" id="SSTT_content_{{story.getId()}}" class="content grouping" style="overflow:hidden;"></div>
{% endfor %}
</div>
</div>
{% endmacro %}

View File

@@ -184,7 +184,7 @@ function submiterAction(domSubmiter) {
request = $.ajax({
type: "POST",
url: "/index_dev.php/report/init",
url: "/report/init",
data: data,
beforeSend: function () {
container.find('.content').empty();