diff --git a/composer.json b/composer.json index 69720b6e71..db4415cfb6 100644 --- a/composer.json +++ b/composer.json @@ -28,7 +28,7 @@ "neutron/silex-filesystem-provider": "~1.0", "neutron/sphinxsearch-api" : "~2.0.6", "neutron/recaptcha" : "~0.1.0", - "neutron/temporary-filesystem" : "~2.0", + "neutron/temporary-filesystem" : "~2.1", "php-xpdf/php-xpdf" : "~0.2.1", "phpexiftool/phpexiftool" : "~0.3", "silex/silex" : "~1.0.0", diff --git a/lib/Alchemy/Phrasea/Command/RecordAdd.php b/lib/Alchemy/Phrasea/Command/RecordAdd.php index c3c0ef36c6..ba5184266b 100644 --- a/lib/Alchemy/Phrasea/Command/RecordAdd.php +++ b/lib/Alchemy/Phrasea/Command/RecordAdd.php @@ -81,7 +81,7 @@ class RecordAdd extends Command if ($input->getOption('in-place') !== '1') { $originalName = pathinfo($file, PATHINFO_BASENAME); - $tempfile = tempnam(sys_get_temp_dir(), 'addrecord') . '.' . pathinfo($file, PATHINFO_EXTENSION); + $tempfile = $this->container['temporary-filesystem']->createTemporaryFile('add_record', null, pathinfo($file, PATHINFO_EXTENSION)); $this->container['monolog']->addInfo(sprintf('copy file from `%s` to temporary `%s`', $file, $tempfile)); $this->container['filesystem']->copy($file, $tempfile, true); $file = $tempfile; @@ -97,6 +97,7 @@ class RecordAdd extends Command if ($input->getOption('force')) { switch ($input->getOption('force')) { default: + $this->container['temporary-filesystem']->clean('add_record'); throw new \InvalidArgumentException(sprintf('`%s` is not a valid force option', $input->getOption('force'))); break; case 'record': @@ -130,7 +131,7 @@ class RecordAdd extends Command if ($tempfile) { $this->container['monolog']->addInfo(sprintf('Remove temporary file `%s`', $tempfile)); - $this->container['filesystem']->remove($tempfile); + $this->container['temporary-filesystem']->clean('add_record'); } return; diff --git a/lib/Alchemy/Phrasea/Core/Configuration/Configuration.php b/lib/Alchemy/Phrasea/Core/Configuration/Configuration.php index e5c74875e7..e393cf481d 100644 --- a/lib/Alchemy/Phrasea/Core/Configuration/Configuration.php +++ b/lib/Alchemy/Phrasea/Core/Configuration/Configuration.php @@ -231,6 +231,7 @@ class Configuration implements ConfigurationInterface } } + unlink($tmpFile); throw new RuntimeException(sprintf('Unable to write %s', $file)); } diff --git a/lib/Alchemy/Phrasea/Core/Provider/TemporaryFilesystemServiceProvider.php b/lib/Alchemy/Phrasea/Core/Provider/TemporaryFilesystemServiceProvider.php index 33ebf9d38a..73e933b32b 100644 --- a/lib/Alchemy/Phrasea/Core/Provider/TemporaryFilesystemServiceProvider.php +++ b/lib/Alchemy/Phrasea/Core/Provider/TemporaryFilesystemServiceProvider.php @@ -12,6 +12,7 @@ namespace Alchemy\Phrasea\Core\Provider; use Neutron\TemporaryFilesystem\TemporaryFilesystem; +use Neutron\TemporaryFilesystem\Manager; use Silex\Application; use Silex\ServiceProviderInterface; @@ -19,9 +20,12 @@ class TemporaryFilesystemServiceProvider implements ServiceProviderInterface { public function register(Application $app) { - $app['temporary-filesystem'] = $app->share(function (Application $app) { + $app['temporary-filesystem.temporary-fs'] = $app->share(function (Application $app) { return new TemporaryFilesystem($app['filesystem']); }); + $app['temporary-filesystem'] = $app->share(function (Application $app) { + return new Manager($app['temporary-filesystem.temporary-fs'], $app['filesystem']); + }); } public function boot(Application $app) diff --git a/lib/conf.d/bases_structure.xml b/lib/conf.d/bases_structure.xml index c94c838aa1..bafcefb40b 100644 --- a/lib/conf.d/bases_structure.xml +++ b/lib/conf.d/bases_structure.xml @@ -3518,11 +3518,9 @@ usr_sexe int(1) unsigned - + YES - - - 0 + @@ -4013,7 +4011,7 @@ null 2 - 0 + null autoregister autoregister NOW() @@ -4032,7 +4030,7 @@ null 2 - 0 + null invite invite NOW() diff --git a/templates/web/account/account.html.twig b/templates/web/account/account.html.twig index 20adeb9b1f..9b579b6d83 100644 --- a/templates/web/account/account.html.twig +++ b/templates/web/account/account.html.twig @@ -46,6 +46,7 @@
diff --git a/templates/web/prod/upload/upload.html.twig b/templates/web/prod/upload/upload.html.twig index da8f480bbd..f9cc5145fc 100644 --- a/templates/web/prod/upload/upload.html.twig +++ b/templates/web/prod/upload/upload.html.twig @@ -386,7 +386,8 @@ $(document).ready(function () { //get form datas attached to the file data.formData = $.extend( data.context.find('input, select').serializeArray(), - UploaderManager.getSettingsBox().find('.collection-status:visible input, select').serializeArray() + $("input", $('.collection-status:visible', UploaderManager.getSettingsBox())).serializeArray(), + $("select", UploaderManager.getSettingsBox()).serializeArray() ); //remove current context diff --git a/tests/Alchemy/Tests/Phrasea/Core/Provider/TemporaryFilesystemServiceProviderTest.php b/tests/Alchemy/Tests/Phrasea/Core/Provider/TemporaryFilesystemServiceProviderTest.php index 89b39e1c47..b3535f5682 100644 --- a/tests/Alchemy/Tests/Phrasea/Core/Provider/TemporaryFilesystemServiceProviderTest.php +++ b/tests/Alchemy/Tests/Phrasea/Core/Provider/TemporaryFilesystemServiceProviderTest.php @@ -10,7 +10,7 @@ class TemporaryFilesystemServiceProvidertest extends ServiceProviderTestCase public function provideServiceDescription() { return array( - array('Alchemy\Phrasea\Core\Provider\TemporaryFilesystemServiceProvider', 'temporary-filesystem', 'Neutron\TemporaryFilesystem\TemporaryFilesystem'), + array('Alchemy\Phrasea\Core\Provider\TemporaryFilesystemServiceProvider', 'temporary-filesystem', 'Neutron\TemporaryFilesystem\TemporaryFilesystemInterface'), ); } } diff --git a/www/skins/lightbox/jquery.lightbox.ie6.js b/www/skins/lightbox/jquery.lightbox.ie6.js index 375ee723ec..c113182262 100644 --- a/www/skins/lightbox/jquery.lightbox.ie6.js +++ b/www/skins/lightbox/jquery.lightbox.ie6.js @@ -42,7 +42,7 @@ $(document).ready(function(){ // $('.right_column_wrapper').height(right_column_wrapper_height); $('.record_display_box').each(function(i,n){ - $('.container',n).height($(n).innerHeight() - $('.header').outerHeight()); + $('.lightbox_container',n).height($(n).innerHeight() - $('.header').outerHeight()); }); display_record($('#record_compare').css('visibility') != 'hidden'); } @@ -100,7 +100,7 @@ $(document).ready(function(){ } - set_sizeable($('#record_main .container, #record_compare .container')); + set_sizeable($('#record_main .lightbox_container, #record_compare .lightbox_container')); $('#navigation') .bind('change', @@ -347,7 +347,7 @@ function display_basket_element(compare, sselcont_id) text : true }).bind('click',function() { - if($('.container', container).hasClass('note_editing')) + if($('.lightbox_container', container).hasClass('note_editing')) { hide_notes(container); } @@ -393,7 +393,7 @@ function display_basket_element(compare, sselcont_id) get_next(); }); - $('.container', container).bind('dblclick',function(event){ + $('.lightbox_container', container).bind('dblclick',function(event){ display_record(); }); @@ -430,7 +430,7 @@ function display_basket_element(compare, sselcont_id) }); display_record(compare); $('#record_infos, #right_column').show(); - $('#record_compare .container').empty(); + $('#record_compare .lightbox_container').empty(); } } @@ -450,13 +450,13 @@ function set_container_status(status) function show_notes(container) { $('.notes_wrapper', container).animate({top:0}); - $('.container', container).addClass('note_editing'); + $('.lightbox_container', container).addClass('note_editing'); } function hide_notes(container) { $('.notes_wrapper', container).animate({top:'-100%'}); - $('.container', container).removeClass('note_editing'); + $('.lightbox_container', container).removeClass('note_editing'); } function activate_notes(container) @@ -516,8 +516,8 @@ function display_record(compare) var main_box = $('#record_main'); var compare_box = $('#record_compare'); - var main_record = $('.container .record', main_box); - var compare_record = $('.container .record', compare_box); + var main_record = $('.lightbox_container .record', main_box); + var compare_record = $('.lightbox_container .record', compare_box); var main_record_width = parseInt($('input[name=width]', main_box).val()); var main_record_height = parseInt($('input[name=height]', main_box).val()); @@ -867,7 +867,7 @@ function save_note(container, button) success: function(datas){ hide_notes(container); $('.notes_wrapper', container).remove(); - $('.container', container).append(datas.datas); + $('.lightbox_container', container).append(datas.datas); activate_notes(container); return; } @@ -975,7 +975,7 @@ function scid_click(event, el) { container = $('#record_main'); - $('#record_infos .container') + $('#record_infos .lightbox_container') .empty() .append(data.caption); @@ -998,7 +998,7 @@ function scid_click(event, el) .empty() .append(data.options_html); - $('.container', container).empty() + $('.lightbox_container', container).empty() .append(data.preview+data.selector_html+data.note_html); diff --git a/www/skins/lightbox/jquery.lightbox.js b/www/skins/lightbox/jquery.lightbox.js index 6cd38b36c4..2c655e4a11 100644 --- a/www/skins/lightbox/jquery.lightbox.js +++ b/www/skins/lightbox/jquery.lightbox.js @@ -11,7 +11,7 @@ $(document).ready(function(){ bodySize.y = $('#mainContainer').height(); bodySize.x = $('#mainContainer').width(); - + $(this).data('slideshow',false); $(this).data('slideshow_ctime', false); @@ -68,7 +68,7 @@ $(document).ready(function(){ } - set_sizeable($('#record_main .container, #record_compare .container')); + set_sizeable($('#record_main .lightbox_container, #record_compare .lightbox_container')); $('#navigation') .bind('change', @@ -350,7 +350,7 @@ function scid_click(event, el) { container = $('#record_main'); - $('#record_infos .container') + $('#record_infos .lightbox_container') .empty() .append(data.caption); @@ -373,7 +373,7 @@ function scid_click(event, el) .empty() .append(data.options_html); - $('.container', container).empty() + $('.lightbox_container', container).empty() .append(data.preview+data.selector_html+data.note_html); @@ -401,7 +401,7 @@ function save_note(container, button) success: function(datas){ hide_notes(container); $('.notes_wrapper', container).remove(); - $('.container', container).append(datas.datas); + $('.lightbox_container', container).append(datas.datas); activate_notes(container); return; } @@ -433,7 +433,7 @@ function display_basket_element(compare, sselcont_id) $('.comment_button', options_container).bind('click',function() { // $(this).blur(); - if($('.container', container).hasClass('note_editing')) + if($('.lightbox_container', container).hasClass('note_editing')) { hide_notes(container); } @@ -477,7 +477,7 @@ function display_basket_element(compare, sselcont_id) }); - $('.container', container).bind('dblclick',function(event){ + $('.lightbox_container', container).bind('dblclick',function(event){ display_record(); }); @@ -520,7 +520,7 @@ function display_basket_element(compare, sselcont_id) }); display_record(compare); $('#right_column').show(); - $('#record_compare .container').empty(); + $('#record_compare .lightbox_container').empty(); } } @@ -536,7 +536,7 @@ function show_notes(container) $('.notes_wrapper', container).animate({ top:0 }); - $('.container', container).addClass('note_editing'); + $('.lightbox_container', container).addClass('note_editing'); } function hide_notes(container) @@ -544,7 +544,7 @@ function hide_notes(container) $('.notes_wrapper', container).animate({ top:'-100%' }); - $('.container', container).removeClass('note_editing'); + $('.lightbox_container', container).removeClass('note_editing'); } function activate_notes(container) @@ -808,8 +808,8 @@ function display_record(compare) var main_box = $('#record_main'); var compare_box = $('#record_compare'); - var main_record = $('.container .record', main_box); - var compare_record = $('.container .record', compare_box); + var main_record = $('.lightbox_container .record', main_box); + var compare_record = $('.lightbox_container .record', compare_box); var main_record_width = parseInt($('input[name=width]', main_box).val()); var main_record_height = parseInt($('input[name=height]', main_box).val()); diff --git a/www/skins/lightbox/lightbox.css b/www/skins/lightbox/lightbox.css index 405125c27b..5cfbef592d 100644 --- a/www/skins/lightbox/lightbox.css +++ b/www/skins/lightbox/lightbox.css @@ -81,7 +81,7 @@ img { overflow: hidden; } -.record_display_box .container { +.record_display_box .lightbox_container { top: 30px; overflow: hidden; } @@ -299,11 +299,11 @@ img { left: auto; } -#record_compare .header, #record_compare .container { +#record_compare .header, #record_compare .lightbox_container { left: 5px; } -#record_wrapper.comparison #record_main .header, #record_wrapper.comparison #record_main .container { +#record_wrapper.comparison #record_main .header, #record_wrapper.comparison #record_main .lightbox_container { right: 5px; } diff --git a/www/skins/lightbox/lightboxie6.css b/www/skins/lightbox/lightboxie6.css index b210eb8294..5d5fa1236c 100644 --- a/www/skins/lightbox/lightboxie6.css +++ b/www/skins/lightbox/lightboxie6.css @@ -43,7 +43,7 @@ ul{ } -.record_display_box .container{ +.record_display_box .lightbox_container{ overflow:hidden; } diff --git a/www/skins/prod/000000/prodcolor.css b/www/skins/prod/000000/prodcolor.css index 8d02999634..fcd50a378c 100644 --- a/www/skins/prod/000000/prodcolor.css +++ b/www/skins/prod/000000/prodcolor.css @@ -490,34 +490,16 @@ span.ww_winTitle { /******* FORMULAIRE DE RECHERCHE **********************************************/ -#searchForm > button.btn { - font-family: verdana,"Helvetica Neue",Helvetica,Arial,sans-serif; - font-size: 12px; - font-weight: bold; - -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); - -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); - box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); +#searchForm .input-append .btn { + border:none; } -#searchForm > button.btn-inverse { - width: 110px; +#searchForm .input-append a.btn { + height: 22px; +} + +#searchForm .input-append button.btn { height: 30px; - margin-left: 4px; - *border: 1px solid #515151; - color: #AAAAAA; - font-weight: bold; -} - -#searchForm > button.btn-inverse:hover { - color: #FFFFFF; -} - -#searchForm label { - color: #FFFFFF; -} - -#searchForm #recordtype_sel { - margin-left: 10px; } /******* PRESENTATION DE MINIATURES *******************************************/ @@ -4087,6 +4069,9 @@ dans l'onglet thesaurus : arbres, menus contextuels } #uploadBox .upload-record .infos-doc { + overflow: hidden; + -o-text-overflow: ellipsis; /* pour Opera 9 */ + text-overflow: ellipsis; color: #777777; height: 40px; } diff --git a/www/skins/prod/959595/prodcolor.css b/www/skins/prod/959595/prodcolor.css index 5e3d88eef5..6a79396f57 100644 --- a/www/skins/prod/959595/prodcolor.css +++ b/www/skins/prod/959595/prodcolor.css @@ -29,7 +29,7 @@ label { } legend { - #333333; + color: #333333; width: auto; border: none; } @@ -501,49 +501,16 @@ span.ww_winTitle { /******* FORMULAIRE DE RECHERCHE **********************************************/ -#searchForm > button.btn { - font-family: verdana,"Helvetica Neue",Helvetica,Arial,sans-serif; - font-size: 12px; - font-weight: bold; - -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); - -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); - box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); +#searchForm .input-append .btn { + border:none; } -#searchForm > button.btn-inverse { - width: 110px; +#searchForm .input-append a.btn { + height: 22px; +} + +#searchForm .input-append button.btn { height: 30px; - margin-left: 4px; - background-color: #D6D6D6; - *background-color: #D6D6D6; - background-image: -ms-linear-gradient(top, #FFFFFF, #D6D6D6); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#FFFFFF), to(#D6D6D6)); - background-image: -webkit-linear-gradient(top, #FFFFFF, #D6D6D6); - background-image: -o-linear-gradient(top, #FFFFFF, #D6D6D6); - background-image: linear-gradient(top, #FFFFFF, #D6D6D6); - background-image: -moz-linear-gradient(top, #FFFFFF, #D6D6D6); - border-color: #D6D6D6 #D6D6D6 #bfbfbf; - border-bottom-color: #b3b3b3; - filter: progid:dximagetransform.microsoft.gradient(startColorstr='#FFFFFF', endColorstr='#D6D6D6', GradientType=0); - filter: progid:dximagetransform.microsoft.gradient(enabled=false); - *border: 1px solid #666666; - text-shadow: none; - color: #777777; -} - -#searchForm > button.btn-inverse:hover { - background-color: #D6D6D6; - *background-color: #D6D6D6; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - color: #FFFFFF; -} - -#searchForm label { - color: #333333; -} - -#searchForm #recordtype_sel { - margin-left: 10px; } /******* PRESENTATION DE MINIATURES *******************************************/ @@ -4221,6 +4188,9 @@ dans l'onglet thesaurus : arbres, menus contextuels } #uploadBox .upload-record .infos-doc { + overflow: hidden; + -o-text-overflow: ellipsis; /* pour Opera 9 */ + text-overflow: ellipsis; color: #777777; height: 40px; }