From 25abceb11614cf6fc223565ec4e0c28511e87a80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sat, 2 Feb 2019 08:59:37 +0100 Subject: [PATCH] remove psr2 warning for else if usage --- htdocs/core/lib/files.lib.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index 848381d5b39..09a35b364c5 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -4,6 +4,7 @@ * Copyright (C) 2012-2016 Juanjo Menent * Copyright (C) 2015 Marcos García * Copyright (C) 2016 Raphaël Doursenaud + * Copyright (C) 2019 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -2654,10 +2655,10 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, if (! empty($conf->productbatch->enabled)) $original_file=$conf->productbatch->multidir_output[$entity].'/'.$original_file; } - // Wrapping pour les mouvements stocks - else if ($modulepart == 'movement' || $modulepart == 'mouvement' ) + // Wrapping for stock movements + elseif ($modulepart == 'movement' || $modulepart == 'mouvement') { - if (empty($entity) || (empty($conf->stock->multidir_output[$entity]) )) return array('accessallowed'=>0, 'error'=>'Value entity must be provided'); + if (empty($entity) || (empty($conf->stock->multidir_output[$entity]))) return array('accessallowed'=>0, 'error'=>'Value entity must be provided'); if (($fuser->rights->stock->{$lire} || $fuser->rights->stock->movement->{$lire} || $fuser->rights->stock->mouvement->{$lire}) || preg_match('/^specimen/i',$original_file)) { $accessallowed=1;