diff --git a/lib/Alchemy/Phrasea/Application/OAuth2.php b/lib/Alchemy/Phrasea/Application/OAuth2.php index 6c943c940a..65c122fd26 100644 --- a/lib/Alchemy/Phrasea/Application/OAuth2.php +++ b/lib/Alchemy/Phrasea/Application/OAuth2.php @@ -339,7 +339,7 @@ return call_user_func(function() } catch (Exception $e) { - + } $Serializer = $app['Core']['Serializer']; @@ -374,7 +374,7 @@ return call_user_func(function() } catch (Exception $e) { - + } $Serializer = $app['Core']['Serializer']; @@ -400,7 +400,7 @@ return call_user_func(function() } catch (Exception $e) { - + } $Serializer = $app['Core']['Serializer']; @@ -424,7 +424,7 @@ return call_user_func(function() } catch (\Exception $e) { - + } $Serializer = $app['Core']['Serializer']; diff --git a/lib/Alchemy/Phrasea/Controller/Prod/Language.php b/lib/Alchemy/Phrasea/Controller/Prod/Language.php index 0453ff4eb9..ccc181d5db 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/Language.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/Language.php @@ -92,7 +92,7 @@ class Language implements ControllerProviderInterface $out['FeedBackName'] = _('Name'); $out['FeedBackMessage'] = _('Message'); $out['FeedBackNoUsersSelected'] = _('No users selected'); - + $Serializer = $app['Core']['Serializer']; return new Response( diff --git a/lib/Alchemy/Phrasea/Controller/Prod/Push.php b/lib/Alchemy/Phrasea/Controller/Prod/Push.php index 29730851db..306f8c484b 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/Push.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/Push.php @@ -334,7 +334,7 @@ class Push implements ControllerProviderInterface } catch (\Exception_NotFound $e) { - + } $Participant = new \Entities\ValidationParticipant(); @@ -507,7 +507,7 @@ class Push implements ControllerProviderInterface } catch (\Exception $e) { - + } if (!$user instanceof \User_Adapter) @@ -638,10 +638,10 @@ class Push implements ControllerProviderInterface { $query->havePositions($request->get('Position')); } - + $sort = $request->get('srt', 'usr_creationdate'); $ord = $request->get('ord', 'desc'); - + $query->sort_by($sort, $ord); $results = $query->include_phantoms() diff --git a/lib/Alchemy/Phrasea/Controller/Prod/UsrLists.php b/lib/Alchemy/Phrasea/Controller/Prod/UsrLists.php index 69ddf048fd..6dcac21e10 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/UsrLists.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/UsrLists.php @@ -113,7 +113,7 @@ class UsrLists implements ControllerProviderInterface } catch (\Exception $e) { - + } if ($request->getRequestFormat() == 'json') @@ -183,7 +183,7 @@ class UsrLists implements ControllerProviderInterface } catch (\Exception $e) { - + } $Json = $app['Core']['Serializer']->serialize($datas, 'json'); @@ -298,7 +298,7 @@ class UsrLists implements ControllerProviderInterface } catch (\Exception $e) { - + } $Json = $app['Core']['Serializer']->serialize($datas, 'json'); diff --git a/lib/Alchemy/Phrasea/Controller/Utils/ConnectionTest.php b/lib/Alchemy/Phrasea/Controller/Utils/ConnectionTest.php index d77ea41f13..27e52e3d40 100644 --- a/lib/Alchemy/Phrasea/Controller/Utils/ConnectionTest.php +++ b/lib/Alchemy/Phrasea/Controller/Utils/ConnectionTest.php @@ -52,7 +52,7 @@ class ConnectionTest implements ControllerProviderInterface } catch (\Exception $e) { - + } if ($dbname && $connection_ok === true) @@ -85,7 +85,7 @@ class ConnectionTest implements ControllerProviderInterface } catch (\Exception $e) { - + } } diff --git a/lib/classes/API/OAuth2/Adapter.class.php b/lib/classes/API/OAuth2/Adapter.class.php index 8a36bfc717..15d6eee145 100644 --- a/lib/classes/API/OAuth2/Adapter.class.php +++ b/lib/classes/API/OAuth2/Adapter.class.php @@ -411,17 +411,17 @@ class API_OAuth2_Adapter extends OAuth2 $scope = $request->get('scope', false); $state = $request->get('state', false); - + if($state) { $datas["state"] = $state; } - + if($scope) { $datas["scope"] = $scope; } - + $filters = array( "client_id" => array( "filter" => FILTER_VALIDATE_REGEXP diff --git a/lib/classes/User/Adapter.class.php b/lib/classes/User/Adapter.class.php index 19b49ebaab..1f071314ec 100644 --- a/lib/classes/User/Adapter.class.php +++ b/lib/classes/User/Adapter.class.php @@ -907,6 +907,7 @@ class User_Adapter implements User_Interface, cache_cacheableInterface public static function get_usr_id_from_email($email) { if (is_null($email)) + return false; $conn = connection::getPDOConnection(); @@ -1277,6 +1278,7 @@ class User_Adapter implements User_Interface, cache_cacheableInterface protected function load_preferences() { if ($this->_prefs) + return $this; $registry = \registry::get_instance(); @@ -1379,7 +1381,7 @@ class User_Adapter implements User_Interface, cache_cacheableInterface } catch (Exception $e) { - + } return $this; @@ -1485,6 +1487,7 @@ class User_Adapter implements User_Interface, cache_cacheableInterface { $this->load_preferences(); if (isset($this->_prefs[$prop]) && $this->_prefs[$prop] === $value) + return $value; $ok = true; @@ -1522,6 +1525,7 @@ class User_Adapter implements User_Interface, cache_cacheableInterface $appbox = appbox::get_instance(); $session = $appbox->get_session(); if (!$session->is_authenticated()) + return; $ses_id = $session->get_ses_id(); @@ -1580,7 +1584,7 @@ class User_Adapter implements User_Interface, cache_cacheableInterface } catch (Exception $e) { - + } } } @@ -1644,7 +1648,7 @@ class User_Adapter implements User_Interface, cache_cacheableInterface } catch (Exception $e) { - + } return false; @@ -1730,7 +1734,7 @@ class User_Adapter implements User_Interface, cache_cacheableInterface } catch (Exception $e) { - + } return $locale; @@ -1796,6 +1800,7 @@ class User_Adapter implements User_Interface, cache_cacheableInterface public function get_nonce() { if ($this->nonce) + return $this->nonce; $nonce = false; diff --git a/lib/classes/User/Query.class.php b/lib/classes/User/Query.class.php index d25418e838..b5f2a3faaa 100644 --- a/lib/classes/User/Query.class.php +++ b/lib/classes/User/Query.class.php @@ -542,6 +542,7 @@ class User_Query implements User_QueryInterface public function get_total() { if ($this->total) + return $this->total; $conn = $this->appbox->get_connection(); @@ -702,6 +703,7 @@ class User_Query implements User_QueryInterface public function on_base_ids(Array $base_ids = null) { if (!$base_ids) + return $this; $this->bases_restrictions = true; @@ -726,6 +728,7 @@ class User_Query implements User_QueryInterface public function on_sbas_ids(Array $sbas_ids = null) { if (!$sbas_ids) + return $this; $this->sbas_restrictions = true; diff --git a/lib/classes/cache/databox.class.php b/lib/classes/cache/databox.class.php index c219d071c1..6535e19b66 100644 --- a/lib/classes/cache/databox.class.php +++ b/lib/classes/cache/databox.class.php @@ -43,7 +43,7 @@ class cache_databox } catch (\Exception $e) { - + } if ($last_update) diff --git a/lib/classes/connection.class.php b/lib/classes/connection.class.php index 7318d72216..13d7a12228 100755 --- a/lib/classes/connection.class.php +++ b/lib/classes/connection.class.php @@ -192,6 +192,7 @@ class connection self::$_PDO_instance[$name] = null; unset(self::$_PDO_instance[$name]); } + return; } diff --git a/lib/classes/databox/status.class.php b/lib/classes/databox/status.class.php index fe5c0f5e9a..88a3b1cfa3 100644 --- a/lib/classes/databox/status.class.php +++ b/lib/classes/databox/status.class.php @@ -159,13 +159,13 @@ class databox_status $statuses = array(); $sbas_ids = $user->ACL()->get_granted_sbas(); - + $see_all = array(); foreach ($sbas_ids as $databox) { $see_all[$databox->get_sbas_id()] = false; - + foreach($databox->get_collections() as $collection) { if($user->ACL()->has_right_on_base($collection->get_base_id(), 'chgstatus')) @@ -193,7 +193,7 @@ class databox_status if ($user->ACL()->has_right_on_sbas($sbas_id, 'bas_modify_struct')) $see_this = true; - + foreach ($status as $bit => $props) { diff --git a/lib/classes/record/adapter.class.php b/lib/classes/record/adapter.class.php index 4c609116d2..750570ba0d 100644 --- a/lib/classes/record/adapter.class.php +++ b/lib/classes/record/adapter.class.php @@ -1935,16 +1935,16 @@ class record_adapter implements record_Interface, cache_cacheableInterface public function get_data_from_cache($option = null) { \cache_databox::refresh($this->get_sbas_id()); - + $databox = $this->get_databox(); - + return $databox->get_data_from_cache($this->get_cache_key($option)); } public function set_data_to_cache($value, $option = null, $duration = 0) { $databox = $this->get_databox(); - + return $databox->set_data_to_cache($value, $this->get_cache_key($option), $duration); } @@ -1962,7 +1962,7 @@ class record_adapter implements record_Interface, cache_cacheableInterface break; } $databox = $this->get_databox(); - + \cache_databox::update($this->get_sbas_id(), 'record', $this->get_record_id()); return $databox->delete_data_from_cache($this->get_cache_key($option)); diff --git a/lib/classes/task/period/archive.class.php b/lib/classes/task/period/archive.class.php index 8f725e90ef..0f7f8438f0 100644 --- a/lib/classes/task/period/archive.class.php +++ b/lib/classes/task/period/archive.class.php @@ -829,12 +829,14 @@ class task_period_archive extends task_abstract { $magicmethod = strtoupper($sxDotPhrasea->magicfile['method']); if($magicmethod == 'LOCK' && file_exists($path . '/' . $magicfile)) + return; elseif($magicmethod == 'UNLOCK' && !file_exists($path . '/' . $magicfile)) + return; } } - + while(($file = $listFolder->read()) !== NULL) { if ($this->isIgnoredFile($file)) diff --git a/lib/unitTest/Alchemy/Phrasea/Controller/Prod/PushTest.php b/lib/unitTest/Alchemy/Phrasea/Controller/Prod/PushTest.php index c25fa75435..cf7d561110 100644 --- a/lib/unitTest/Alchemy/Phrasea/Controller/Prod/PushTest.php +++ b/lib/unitTest/Alchemy/Phrasea/Controller/Prod/PushTest.php @@ -53,7 +53,7 @@ class ControllerPushTest extends \PhraseanetWebTestCaseAuthenticatedAbstract $this->assertEquals(200, $response->getStatusCode()); $this->assertEquals('UTF-8', $response->getCharset()); } - + public function testRoutePOSTValidateSlash() { $route = '/push/validateform/'; diff --git a/templates/web/prod/actions/Feedback.html.twig b/templates/web/prod/actions/Feedback.html.twig index 8ad40bc29d..7a1cc816de 100644 --- a/templates/web/prod/actions/Feedback.html.twig +++ b/templates/web/prod/actions/Feedback.html.twig @@ -38,11 +38,11 @@

{% trans 'Push::une validation est une demande d\'appreciation a d\'autres personnes' %}

- + {% trans 'Add user' %} - + @@ -110,8 +110,8 @@
- - + +
-{% endmacro %} \ No newline at end of file +{% endmacro %} diff --git a/templates/web/prod/actions/Feedback/ResultTable.html.twig b/templates/web/prod/actions/Feedback/ResultTable.html.twig index b074621d28..a4faf01f8c 100644 --- a/templates/web/prod/actions/Feedback/ResultTable.html.twig +++ b/templates/web/prod/actions/Feedback/ResultTable.html.twig @@ -1,3 +1,3 @@ {% import 'prod/actions/Feedback/ListsMacros.html.twig' as ListsMacros %} -{{ ListsMacros.ResultTable(results, list, sort, ord) }} \ No newline at end of file +{{ ListsMacros.ResultTable(results, list, sort, ord) }} diff --git a/templates/web/prod/actions/Feedback/list.html.twig b/templates/web/prod/actions/Feedback/list.html.twig index 93eef03f73..4ae878c475 100644 --- a/templates/web/prod/actions/Feedback/list.html.twig +++ b/templates/web/prod/actions/Feedback/list.html.twig @@ -21,7 +21,7 @@
- + diff --git a/templates/web/prod/actions/Push.html.twig b/templates/web/prod/actions/Push.html.twig index 4ee7190d52..2dbe1c8210 100644 --- a/templates/web/prod/actions/Push.html.twig +++ b/templates/web/prod/actions/Push.html.twig @@ -26,11 +26,11 @@

{% trans 'Push::unpush permet d\'envoyer un lot d\'image a des destinataires' %}

- + {% trans 'Add user' %} - +
@@ -98,8 +98,8 @@
- - + +