From 65147550d4be676a7ef18f4bd248a7f878700ee9 Mon Sep 17 00:00:00 2001 From: Nicolas Le Goff Date: Thu, 24 Oct 2013 20:14:37 +0200 Subject: [PATCH 1/7] Fix input colors in IE --- www/skins/login/less/skin.less | 3 +++ 1 file changed, 3 insertions(+) diff --git a/www/skins/login/less/skin.less b/www/skins/login/less/skin.less index af6f419682..205aa2d726 100644 --- a/www/skins/login/less/skin.less +++ b/www/skins/login/less/skin.less @@ -856,6 +856,9 @@ form[name=registerForm] .multiselect-group { .lt-ie9 .input-table input, .lt-ie9 .input-table .input { background-color: @inputIEBackground !important; + color: contrast(@inputIEBackground) !important; + /** If font family is issued front google fonts hidden dot characters will always be white */ + font-family: Arial !important; } From e636d2ab3244511c07e8cf381c003606c3e90e41 Mon Sep 17 00:00:00 2001 From: Romain Neutron Date: Fri, 25 Oct 2013 13:51:38 +0200 Subject: [PATCH 2/7] Fix thumbnail access --- lib/Alchemy/Phrasea/Controller/Permalink.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/Alchemy/Phrasea/Controller/Permalink.php b/lib/Alchemy/Phrasea/Controller/Permalink.php index 151ccef71a..2b99864e7e 100644 --- a/lib/Alchemy/Phrasea/Controller/Permalink.php +++ b/lib/Alchemy/Phrasea/Controller/Permalink.php @@ -32,9 +32,7 @@ class Permalink extends AbstractDelivery $that = $this; $retrieveRecord = function ($app, $databox, $token, $record_id, $subdef) { - if (\databox_subdef::CLASS_THUMBNAIL === $subdef) { - $record = $databox->get_record($record_id); - } elseif (\databox_subdef::CLASS_PREVIEW === $subdef && \Feed_Entry_Item::is_record_in_public_feed($app, $databox->get_sbas_id(), $record_id)) { + if (in_array($subdef, array(\databox_subdef::CLASS_PREVIEW, \databox_subdef::CLASS_THUMBNAIL)) && \Feed_Entry_Item::is_record_in_public_feed($app, $databox->get_sbas_id(), $record_id)) { $record = $databox->get_record($record_id); } else { $record = \media_Permalink_Adapter::challenge_token($app, $databox, $token, $record_id, $subdef); From f26a85fca58ee9f9973758f6483ceb22d6ab3a3a Mon Sep 17 00:00:00 2001 From: Romain Neutron Date: Fri, 25 Oct 2013 15:07:56 +0200 Subject: [PATCH 3/7] Fix #1549 : Fix wording --- lib/classes/appbox.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/classes/appbox.php b/lib/classes/appbox.php index 8633ac5732..6eac47ad35 100644 --- a/lib/classes/appbox.php +++ b/lib/classes/appbox.php @@ -395,7 +395,7 @@ class appbox extends base if (version_compare($from_version, '3.7') < 0) { $upgrader->addRecommendation(_('Your install might need to re-read technical datas'), 'bin/console records:rescan-technical-datas'); - $upgrader->addRecommendation(_('Your install might need to re-read technical datas'), 'bin/console records:build-missing-subdefs'); + $upgrader->addRecommendation(_('Your install might need to build some sub-definitions'), 'bin/console records:build-missing-subdefs'); } return $advices; From 3e9f628003b39bbb6eeeaa28b20a86c11b4432dd Mon Sep 17 00:00:00 2001 From: Romain Neutron Date: Fri, 25 Oct 2013 15:12:46 +0200 Subject: [PATCH 4/7] Fix #1549 : recognize IE11 --- lib/classes/Browser.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/classes/Browser.php b/lib/classes/Browser.php index 129990b910..317276b3b1 100644 --- a/lib/classes/Browser.php +++ b/lib/classes/Browser.php @@ -737,6 +737,16 @@ class Browser } return true; + } else if(stripos($this->_agent, 'trident') !== false) { + // >= IE 11 + $this->setBrowser(self::BROWSER_IE); + + // version + $result = explode("rv:", $this->_agent); + $this->setVersion(preg_replace("/[^0-9.]+/", "", $result[1])); + + // remove Gecko out of the user-agent, otherwise the mozilla check will success + $this->_agent = str_replace(array("Mozilla", "Gecko"), "MSIE", $this->_agent); } return false; From 1b1c1ae87784e7ec789147b48f2e5790c9fe1c2f Mon Sep 17 00:00:00 2001 From: Romain Neutron Date: Fri, 25 Oct 2013 15:54:29 +0200 Subject: [PATCH 5/7] Fix #1546 : Disallow push when records can not be pushed --- templates/web/prod/actions/Push.html.twig | 32 +++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/templates/web/prod/actions/Push.html.twig b/templates/web/prod/actions/Push.html.twig index bdac5f8246..52eb1f4ee1 100644 --- a/templates/web/prod/actions/Push.html.twig +++ b/templates/web/prod/actions/Push.html.twig @@ -1,3 +1,17 @@ +{% if push.get_count_actionable() == 0 %} +
+
+ {% if 'Push' == context %} + {% trans %}None of the selected records can be pushed.{% endtrans %} + {% else %} + {% trans %}None of the selected records can be sent for feedback.{% endtrans %} + {% endif %} +
+
+ +
+
+{% else %}
@@ -162,6 +176,23 @@
+ {% if 'Push' == context %} + {% set nb_push_items = push.get_count_actionable() %} + {% if push.get_count_not_actionable() == 0 %} + {% trans %}You are about to push {{ nb_push_items }} records.{% endtrans %} + {% else %} + {% set nb_not_available = push.get_count_not_actionable() %} + {% trans %}You are about to push {{ nb_push_items }} records, {{ nb_not_available }} records can not be processed.{% endtrans %} + {% endif %} + {% else %} + {% set nb_push_items = push.get_count_actionable() %} + {% if push.get_count_not_actionable() == 0 %} + {% trans %}You are about to ask for feedback for {{ nb_push_items }} records.{% endtrans %} + {% else %} + {% set nb_not_available = push.get_count_not_actionable() %} + {% trans %}You are about to ask for feedback for {{ nb_push_items }} records, {{ nb_not_available }} records can not be processed.{% endtrans %} + {% endif %} + {% endif %} @@ -244,3 +275,4 @@ p4.ListManager = new ListManager($('#ListManager')); }); +{% endif %} From 8b510031a0db3333d740e6ef38362f14bb125197 Mon Sep 17 00:00:00 2001 From: Romain Neutron Date: Fri, 25 Oct 2013 16:02:53 +0200 Subject: [PATCH 6/7] Fix #1544 : Upgrade data command fails --- .../Phrasea/Command/UpgradeDBDatas.php | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/lib/Alchemy/Phrasea/Command/UpgradeDBDatas.php b/lib/Alchemy/Phrasea/Command/UpgradeDBDatas.php index ba8e2c377a..ce79e4ecb1 100644 --- a/lib/Alchemy/Phrasea/Command/UpgradeDBDatas.php +++ b/lib/Alchemy/Phrasea/Command/UpgradeDBDatas.php @@ -12,6 +12,9 @@ namespace Alchemy\Phrasea\Command; use Alchemy\Phrasea\Command\Command; +use Alchemy\Phrasea\Command\Upgrade\Step31; +use Alchemy\Phrasea\Command\Upgrade\Step35; +use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; @@ -43,19 +46,19 @@ Steps are EOF ); - $this->addOption('from', 'f', null, 'The version where to start upgrade'); - $this->addOption('at-version', null, null, 'The version step to upgrade'); + $this->addOption('from', 'f', InputOption::VALUE_REQUIRED, 'The version where to start upgrade'); + $this->addOption('at-version', null, InputOption::VALUE_REQUIRED, 'The version step to upgrade'); return $this; } protected function generateUpgradesFromOption(InputInterface $input) { - if (false === $input->getOption('from') && false === $input->getOption('at-version')) { + if (null === $input->getOption('from') && null === $input->getOption('at-version')) { throw new \Exception('You MUST provide a `from` or `at-version` option'); } - if (false !== $input->getOption('from') && false !== $input->getOption('at-version')) { + if (null !== $input->getOption('from') && null !== $input->getOption('at-version')) { throw new \Exception('You CAN NOT provide a `from` AND `at-version` option at the same time'); } @@ -74,6 +77,15 @@ EOF $this->upgrades[] = new $classname($this->container); } } + + if (null !== $input->getOption('at-version')) { + if ('3.1' === $input->getOption('at-version')) { + $this->upgrades[] = new Step31($this->container); + } + if ('3.5' === $input->getOption('at-version')) { + $this->upgrades[] = new Step35($this->container); + } + } } public function setUpgrades(array $upgrades) From 35e9e692d23b26b3867e62a256bc165f2b65af10 Mon Sep 17 00:00:00 2001 From: Romain Neutron Date: Fri, 25 Oct 2013 15:05:40 +0200 Subject: [PATCH 7/7] Fix ACL cache issue --- lib/classes/ACL.php | 5 +++++ lib/classes/User/Adapter.php | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/lib/classes/ACL.php b/lib/classes/ACL.php index cdd45a0dc7..8d14877ef6 100644 --- a/lib/classes/ACL.php +++ b/lib/classes/ACL.php @@ -119,6 +119,11 @@ class ACL implements cache_cacheableInterface return $this; } + public function set_app(Application $app) + { + $this->app = $app; + } + /** * Check if a hd grant has been received for a record * diff --git a/lib/classes/User/Adapter.php b/lib/classes/User/Adapter.php index 620a6956a7..ae1d0fdb1f 100644 --- a/lib/classes/User/Adapter.php +++ b/lib/classes/User/Adapter.php @@ -370,6 +370,8 @@ class User_Adapter implements User_Interface, cache_cacheableInterface self::$_instance[$id] = new self($id, $app); $app['phraseanet.appbox']->set_data_to_cache(self::$_instance[$id], '_user_' . $id); } + } else { + self::$_instance[$id]->set_app($app); } return array_key_exists($id, self::$_instance) ? self::$_instance[$id] : false; @@ -392,6 +394,9 @@ class User_Adapter implements User_Interface, cache_cacheableInterface protected function set_app(Application $app) { $this->app = $app; + if (null !== $this->ACL) { + $this->ACL->set_app($app); + } } /**