diff --git a/lang/paquet-roles_fr.php b/lang/paquet-roles_fr.php index bfc8b6f..5c83fdd 100644 --- a/lang/paquet-roles_fr.php +++ b/lang/paquet-roles_fr.php @@ -1,7 +1,9 @@ 'Rôles', 'roles_slogan' => 'Typer des liaisons', ); - -?> \ No newline at end of file diff --git a/lang/roles_fr.php b/lang/roles_fr.php index 6b4f1ff..a4b0f41 100644 --- a/lang/roles_fr.php +++ b/lang/roles_fr.php @@ -1,7 +1,9 @@ 'Indiquer un rôle…', 'saisir_valeur' => 'Valeur', ); - -?> diff --git a/prive/themes/spip/images/inserer-8.png b/prive/themes/spip/images/inserer-8.png index cfccfdd..b442bf9 100644 Binary files a/prive/themes/spip/images/inserer-8.png and b/prive/themes/spip/images/inserer-8.png differ diff --git a/prive/themes/spip/images/roles-128.png b/prive/themes/spip/images/roles-128.png index 4953089..eff6aec 100644 Binary files a/prive/themes/spip/images/roles-128.png and b/prive/themes/spip/images/roles-128.png differ diff --git a/prive/themes/spip/images/roles-32.png b/prive/themes/spip/images/roles-32.png index 0a81607..93050bd 100644 Binary files a/prive/themes/spip/images/roles-32.png and b/prive/themes/spip/images/roles-32.png differ diff --git a/prive/themes/spip/images/roles-64.png b/prive/themes/spip/images/roles-64.png index 4953089..eff6aec 100644 Binary files a/prive/themes/spip/images/roles-64.png and b/prive/themes/spip/images/roles-64.png differ diff --git a/roles_fonctions.php b/roles_fonctions.php index 6e3d558..0f368b6 100644 --- a/roles_fonctions.php +++ b/roles_fonctions.php @@ -5,12 +5,14 @@ * Licence GNU/GPL */ -if (!defined('_ECRIRE_INC_VERSION')) return; +if (!defined('_ECRIRE_INC_VERSION')) { + return; +} include_spip('inc/roles'); /** - * Retrouve la traduction d'un rôle dans un objet donné + * Retrouve la traduction d'un rôle dans un objet donné * * @param string $role * Le role dans la base de donnée @@ -18,11 +20,12 @@ include_spip('inc/roles'); * L'objet sur lequel est le rôle * @return string * Le texte du rôle dans la langue en cours - * + * **/ function filtre_role_dist($role, $objet) { - if (!$role) return ''; - if (!$objet) return $role; + if (!$role or !$objet) { + return ''; + } $roles = roles_presents(table_objet(objet_type($objet))); if (isset($roles['titres'][$role])) { return _T($roles['titres'][$role]); diff --git a/roles_pipelines.php b/roles_pipelines.php index ec44853..8176f65 100644 --- a/roles_pipelines.php +++ b/roles_pipelines.php @@ -9,10 +9,9 @@ if (!defined('_ECRIRE_INC_VERSION')) { return; } - /** * Ajoute Bootstrap dropdown aux plugins chargés - * + * * @param array $flux * Liste des js chargés * @return array @@ -27,10 +26,9 @@ function roles_jquery_plugins($flux) { return $flux; } - /** * Ajoute Bootstrap dropdown aux css chargées dans le privé - * + * * @param string $flux Contenu du head HTML concernant les CSS * @return string Contenu du head HTML concernant les CSS **/ @@ -50,11 +48,11 @@ function roles_header_prive_css($flux) { * @return string Contenu du head HTML concernant les CSS **/ function roles_insert_head_css($flux) { - + $config = lire_config('chosen', array()); if (isset($config['active']) and $config['active']=='oui') { $css = find_in_path('css/bootstrap-button-dropdown.css'); $flux .= '' . "\n"; } return $flux; -} \ No newline at end of file +}