[SPIP][PLUGINS] v3.0-->v3.2
[lhc/web/www.git] / www / prive / echafaudage / hierarchie / objet_fonctions.php
index 96a12f6..6ef4be6 100644 (file)
@@ -3,14 +3,16 @@
 /***************************************************************************\
  *  SPIP, Systeme de publication pour l'internet                           *
  *                                                                         *
- *  Copyright (c) 2001-2016                                                *
+ *  Copyright (c) 2001-2017                                                *
  *  Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James  *
  *                                                                         *
  *  Ce programme est un logiciel libre distribue sous licence GNU/GPL.     *
  *  Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne.   *
 \***************************************************************************/
 
-if (!defined('_ECRIRE_INC_VERSION')) return;
+if (!defined('_ECRIRE_INC_VERSION')) {
+       return;
+}
 
 /**
  * Tester le deplacement restreint ou non
@@ -20,7 +22,7 @@ if (!defined('_ECRIRE_INC_VERSION')) return;
  * @param string $statut
  * @return bool
  */
-function deplacement_restreint($objet,$statut) {
+function deplacement_restreint($objet, $statut) {
 
        switch ($objet) {
                case 'rubrique':
@@ -30,13 +32,12 @@ function deplacement_restreint($objet,$statut) {
                case 'site':
                case 'syndic':
                case 'breve':
-                       return ($statut=='publie');
+                       return ($statut == 'publie');
                        break;
-               default :
-                       return ($statut?$statut=='publie':false);
+               default:
+                       return ($statut ? $statut == 'publie' : false);
                        break;
        }
+
        return false;
 }
-
-?>