Completed
Push — master ( c4432e...7a7b60 )
by cam
01:03
created
ecrire/inc/bandeau.php 1 patch
Indentation   +149 added lines, -149 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
  **/
18 18
 
19 19
 if (!defined('_ECRIRE_INC_VERSION')) {
20
-	return;
20
+    return;
21 21
 }
22 22
 
23 23
 include_spip('inc/boutons');
@@ -37,33 +37,33 @@  discard block
 block discarded – undo
37 37
  *     Contexte
38 38
  **/
39 39
 function definir_barre_contexte($contexte = null) {
40
-	if (is_null($contexte)) {
41
-		$contexte = $_GET;
42
-	} elseif (is_string($contexte)) {
43
-		$contexte = unserialize($contexte);
44
-	}
45
-	if (!isset($contexte['id_rubrique']) and isset($contexte['exec'])) {
46
-		if (!function_exists('trouver_objet_exec')) {
47
-			include_spip('inc/pipelines_ecrire');
48
-		}
49
-		if ($e = trouver_objet_exec($contexte['exec'])) {
50
-			$_id = $e['id_table_objet'];
51
-			if (isset($contexte[$_id]) and $id = intval($contexte[$_id])) {
52
-				$table = $e['table_objet_sql'];
53
-				$row = sql_fetsel('*', $table, "$_id=" . intval($id));
54
-				if (isset($row['id_rubrique'])) {
55
-					$contexte['id_rubrique'] = $row['id_rubrique'];
56
-					if (isset($row['id_secteur'])) {
57
-						$contexte['id_secteur'] = $row['id_secteur'];
58
-					}
59
-				} elseif (isset($row['id_groupe'])) {
60
-					// TODO supprimer ce bloc quand https://core.spip.net/issues/3844 sera réalisé
61
-					$contexte['id_groupe'] = $row['id_groupe'];
62
-				}
63
-			}
64
-		}
65
-	}
66
-	return $contexte;
40
+    if (is_null($contexte)) {
41
+        $contexte = $_GET;
42
+    } elseif (is_string($contexte)) {
43
+        $contexte = unserialize($contexte);
44
+    }
45
+    if (!isset($contexte['id_rubrique']) and isset($contexte['exec'])) {
46
+        if (!function_exists('trouver_objet_exec')) {
47
+            include_spip('inc/pipelines_ecrire');
48
+        }
49
+        if ($e = trouver_objet_exec($contexte['exec'])) {
50
+            $_id = $e['id_table_objet'];
51
+            if (isset($contexte[$_id]) and $id = intval($contexte[$_id])) {
52
+                $table = $e['table_objet_sql'];
53
+                $row = sql_fetsel('*', $table, "$_id=" . intval($id));
54
+                if (isset($row['id_rubrique'])) {
55
+                    $contexte['id_rubrique'] = $row['id_rubrique'];
56
+                    if (isset($row['id_secteur'])) {
57
+                        $contexte['id_secteur'] = $row['id_secteur'];
58
+                    }
59
+                } elseif (isset($row['id_groupe'])) {
60
+                    // TODO supprimer ce bloc quand https://core.spip.net/issues/3844 sera réalisé
61
+                    $contexte['id_groupe'] = $row['id_groupe'];
62
+                }
63
+            }
64
+        }
65
+    }
66
+    return $contexte;
67 67
 }
68 68
 
69 69
 /**
@@ -79,89 +79,89 @@  discard block
 block discarded – undo
79 79
  * @return array
80 80
  */
81 81
 function definir_barre_boutons($contexte = [], $icones = true, $autorise = true) {
82
-	include_spip('inc/autoriser');
83
-	$boutons_admin = [];
82
+    include_spip('inc/autoriser');
83
+    $boutons_admin = [];
84 84
 
85
-	// les boutons du core, issus de ecrire/paquet.xml
86
-	$liste_boutons = [];
85
+    // les boutons du core, issus de ecrire/paquet.xml
86
+    $liste_boutons = [];
87 87
 
88
-	// ajouter les boutons issus des plugin via paquet.xml
89
-	if (
90
-		function_exists('boutons_plugins')
91
-		and is_array($liste_boutons_plugins = boutons_plugins())
92
-	) {
93
-		$liste_boutons = &$liste_boutons_plugins;
94
-	}
88
+    // ajouter les boutons issus des plugin via paquet.xml
89
+    if (
90
+        function_exists('boutons_plugins')
91
+        and is_array($liste_boutons_plugins = boutons_plugins())
92
+    ) {
93
+        $liste_boutons = &$liste_boutons_plugins;
94
+    }
95 95
 
96
-	foreach ($liste_boutons as $id => $infos) {
97
-		$parent = '';
98
-		// les boutons principaux ne sont pas soumis a autorisation
99
-		if (
100
-			!isset($infos['parent'])
101
-			or !($parent = $infos['parent'])
102
-			or !$autorise
103
-			or autoriser('menu', "_$id", 0, null, ['contexte' => $contexte])
104
-		) {
105
-			if (
106
-				$parent
107
-				and $parent = preg_replace(',^bando_,', 'menu_', $parent)
108
-				and isset($boutons_admin[$parent])
109
-			) {
110
-				$position = (isset($infos['position']) and strlen($infos['position'])) ? intval($infos['position']) : count($boutons_admin[$parent]->sousmenu);
111
-				if ($position < 0) {
112
-					$position = count($boutons_admin[$parent]->sousmenu) + 1 + $position;
113
-				}
114
-				$boutons_admin[$parent]->sousmenu = array_slice($boutons_admin[$parent]->sousmenu, 0, $position)
115
-					+ [
116
-						$id => new Bouton(
117
-							($icones and !empty($infos['icone'])) ? find_in_theme($infos['icone']) : '',  // icone
118
-							$infos['titre'],  // titre
119
-							(isset($infos['action']) and $infos['action']) ? $infos['action'] : null,
120
-							(isset($infos['parametres']) and $infos['parametres']) ? $infos['parametres'] : null
121
-						)
122
-					]
123
-					+ array_slice($boutons_admin[$parent]->sousmenu, $position, 100);
124
-			}
125
-			if (
126
-				!$parent
127
-				// provisoire, eviter les vieux boutons
128
-				and (!in_array($id, ['forum', 'statistiques_visites']))
129
-				and (!$autorise or autoriser('menugrandeentree', "_$id", 0, null, ['contexte' => $contexte]))
130
-			) {
131
-				$position = (isset($infos['position']) and $infos['position']) ? $infos['position'] : count($boutons_admin);
132
-				$boutons_admin = array_slice($boutons_admin, 0, $position)
133
-					+ [
134
-						$id => new Bouton(
135
-							($icones and isset($infos['icone']) and $infos['icone']) ? find_in_theme($infos['icone']) : '',  // icone
136
-							$infos['titre'],  // titre
137
-							(isset($infos['action']) and $infos['action']) ? $infos['action'] : null,
138
-							(isset($infos['parametres']) and $infos['parametres']) ? $infos['parametres'] : null
139
-						)
140
-					]
141
-					+ array_slice($boutons_admin, $position, 100);
142
-			}
143
-		}
144
-	}
145
-	$boutons_admin = pipeline('ajouter_menus', $boutons_admin);
96
+    foreach ($liste_boutons as $id => $infos) {
97
+        $parent = '';
98
+        // les boutons principaux ne sont pas soumis a autorisation
99
+        if (
100
+            !isset($infos['parent'])
101
+            or !($parent = $infos['parent'])
102
+            or !$autorise
103
+            or autoriser('menu', "_$id", 0, null, ['contexte' => $contexte])
104
+        ) {
105
+            if (
106
+                $parent
107
+                and $parent = preg_replace(',^bando_,', 'menu_', $parent)
108
+                and isset($boutons_admin[$parent])
109
+            ) {
110
+                $position = (isset($infos['position']) and strlen($infos['position'])) ? intval($infos['position']) : count($boutons_admin[$parent]->sousmenu);
111
+                if ($position < 0) {
112
+                    $position = count($boutons_admin[$parent]->sousmenu) + 1 + $position;
113
+                }
114
+                $boutons_admin[$parent]->sousmenu = array_slice($boutons_admin[$parent]->sousmenu, 0, $position)
115
+                    + [
116
+                        $id => new Bouton(
117
+                            ($icones and !empty($infos['icone'])) ? find_in_theme($infos['icone']) : '',  // icone
118
+                            $infos['titre'],  // titre
119
+                            (isset($infos['action']) and $infos['action']) ? $infos['action'] : null,
120
+                            (isset($infos['parametres']) and $infos['parametres']) ? $infos['parametres'] : null
121
+                        )
122
+                    ]
123
+                    + array_slice($boutons_admin[$parent]->sousmenu, $position, 100);
124
+            }
125
+            if (
126
+                !$parent
127
+                // provisoire, eviter les vieux boutons
128
+                and (!in_array($id, ['forum', 'statistiques_visites']))
129
+                and (!$autorise or autoriser('menugrandeentree', "_$id", 0, null, ['contexte' => $contexte]))
130
+            ) {
131
+                $position = (isset($infos['position']) and $infos['position']) ? $infos['position'] : count($boutons_admin);
132
+                $boutons_admin = array_slice($boutons_admin, 0, $position)
133
+                    + [
134
+                        $id => new Bouton(
135
+                            ($icones and isset($infos['icone']) and $infos['icone']) ? find_in_theme($infos['icone']) : '',  // icone
136
+                            $infos['titre'],  // titre
137
+                            (isset($infos['action']) and $infos['action']) ? $infos['action'] : null,
138
+                            (isset($infos['parametres']) and $infos['parametres']) ? $infos['parametres'] : null
139
+                        )
140
+                    ]
141
+                    + array_slice($boutons_admin, $position, 100);
142
+            }
143
+        }
144
+    }
145
+    $boutons_admin = pipeline('ajouter_menus', $boutons_admin);
146 146
 
147
-	// définir les favoris et positions d’origine
148
-	if ($boutons_admin) {
149
-		$menus_favoris = obtenir_menus_favoris();
150
-		$i = 1;
151
-		foreach ($boutons_admin as $key => $menu) {
152
-			$menu->favori = (int) table_valeur($menus_favoris, $key, false);
153
-			$menu->position = $i++;
154
-			if ($menu->sousmenu) {
155
-				$j = 1;
156
-				foreach ($menu->sousmenu as $key => $bouton) {
157
-					$bouton->favori = (int) table_valeur($menus_favoris, $key, false);
158
-					$bouton->position = $j++;
159
-				}
160
-			}
161
-		}
162
-	}
147
+    // définir les favoris et positions d’origine
148
+    if ($boutons_admin) {
149
+        $menus_favoris = obtenir_menus_favoris();
150
+        $i = 1;
151
+        foreach ($boutons_admin as $key => $menu) {
152
+            $menu->favori = (int) table_valeur($menus_favoris, $key, false);
153
+            $menu->position = $i++;
154
+            if ($menu->sousmenu) {
155
+                $j = 1;
156
+                foreach ($menu->sousmenu as $key => $bouton) {
157
+                    $bouton->favori = (int) table_valeur($menus_favoris, $key, false);
158
+                    $bouton->position = $j++;
159
+                }
160
+            }
161
+        }
162
+    }
163 163
 
164
-	return $boutons_admin;
164
+    return $boutons_admin;
165 165
 }
166 166
 
167 167
 /**
@@ -173,22 +173,22 @@  discard block
 block discarded – undo
173 173
  * @return Bouton[]
174 174
  */
175 175
 function trier_boutons_enfants_par_alpha($menus, $avec_favoris = false) {
176
-	foreach ($menus as $menu) {
177
-		if ($menu->sousmenu) {
178
-			$libelles = $isfavoris = $favoris = [];
179
-			foreach ($menu->sousmenu as $key => $item) {
180
-				$libelles[$key] = strtolower(translitteration(_T($item->libelle)));
181
-				$isfavoris[$key] = (bool) $item->favori;
182
-				$favoris[$key] = $item->favori;
183
-			}
184
-			if ($avec_favoris) {
185
-				array_multisort($isfavoris, SORT_DESC, $favoris, SORT_ASC, $libelles, SORT_ASC, $menu->sousmenu);
186
-			} else {
187
-				array_multisort($libelles, SORT_ASC, $menu->sousmenu);
188
-			}
189
-		}
190
-	}
191
-	return $menus;
176
+    foreach ($menus as $menu) {
177
+        if ($menu->sousmenu) {
178
+            $libelles = $isfavoris = $favoris = [];
179
+            foreach ($menu->sousmenu as $key => $item) {
180
+                $libelles[$key] = strtolower(translitteration(_T($item->libelle)));
181
+                $isfavoris[$key] = (bool) $item->favori;
182
+                $favoris[$key] = $item->favori;
183
+            }
184
+            if ($avec_favoris) {
185
+                array_multisort($isfavoris, SORT_DESC, $favoris, SORT_ASC, $libelles, SORT_ASC, $menu->sousmenu);
186
+            } else {
187
+                array_multisort($libelles, SORT_ASC, $menu->sousmenu);
188
+            }
189
+        }
190
+    }
191
+    return $menus;
192 192
 }
193 193
 
194 194
 /**
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
  * @return Bouton[]
200 200
  */
201 201
 function trier_boutons_enfants_par_favoris_alpha($menus) {
202
-	return trier_boutons_enfants_par_alpha($menus, true);
202
+    return trier_boutons_enfants_par_alpha($menus, true);
203 203
 }
204 204
 
205 205
 
@@ -212,23 +212,23 @@  discard block
 block discarded – undo
212 212
  * @return string
213 213
  */
214 214
 function bandeau_creer_url($url, $args = '', $contexte = null) {
215
-	if (!preg_match(',[\/\?],', $url)) {
216
-		$url = generer_url_ecrire($url, $args, true);
217
-		// recuperer les parametres du contexte demande par l'url sous la forme
218
-		// &truc=@machin@
219
-		// @machin@ etant remplace par _request('machin')
220
-		$url = str_replace('&amp;', '&', $url);
221
-		while (preg_match(',[&?]([a-z_]+)=@([a-z_]+)@,i', $url, $matches)) {
222
-			if ($matches[2] == 'id_secteur' and !isset($contexte['id_secteur']) and isset($contexte['id_rubrique'])) {
223
-				$contexte['id_secteur'] = sql_getfetsel('id_secteur', 'spip_rubriques', 'id_rubrique=' . intval($contexte['id_rubrique']));
224
-			}
225
-			$val = _request($matches[2], $contexte);
226
-			$url = parametre_url($url, $matches[1], $val ?: '', '&');
227
-		}
228
-		$url = str_replace('&', '&amp;', $url);
229
-	}
215
+    if (!preg_match(',[\/\?],', $url)) {
216
+        $url = generer_url_ecrire($url, $args, true);
217
+        // recuperer les parametres du contexte demande par l'url sous la forme
218
+        // &truc=@machin@
219
+        // @machin@ etant remplace par _request('machin')
220
+        $url = str_replace('&amp;', '&', $url);
221
+        while (preg_match(',[&?]([a-z_]+)=@([a-z_]+)@,i', $url, $matches)) {
222
+            if ($matches[2] == 'id_secteur' and !isset($contexte['id_secteur']) and isset($contexte['id_rubrique'])) {
223
+                $contexte['id_secteur'] = sql_getfetsel('id_secteur', 'spip_rubriques', 'id_rubrique=' . intval($contexte['id_rubrique']));
224
+            }
225
+            $val = _request($matches[2], $contexte);
226
+            $url = parametre_url($url, $matches[1], $val ?: '', '&');
227
+        }
228
+        $url = str_replace('&', '&amp;', $url);
229
+    }
230 230
 
231
-	return $url;
231
+    return $url;
232 232
 }
233 233
 
234 234
 /**
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
  *     Code HTML du bandeau
239 239
  */
240 240
 function inc_bandeau_dist() {
241
-	return recuperer_fond('prive/squelettes/inclure/barre-nav', $_GET);
241
+    return recuperer_fond('prive/squelettes/inclure/barre-nav', $_GET);
242 242
 }
243 243
 
244 244
 
@@ -247,13 +247,13 @@  discard block
 block discarded – undo
247 247
  * @return array
248 248
  */
249 249
 function obtenir_menus_favoris() {
250
-	if (
251
-		isset($GLOBALS['visiteur_session']['prefs']['menus_favoris'])
252
-		and is_array($GLOBALS['visiteur_session']['prefs']['menus_favoris'])
253
-		and $GLOBALS['visiteur_session']['prefs']['menus_favoris']
254
-	) {
255
-		return $GLOBALS['visiteur_session']['prefs']['menus_favoris'];
256
-	}
257
-	$definir_menus_favoris = charger_fonction('definir_menus_favoris', 'inc');
258
-	return $definir_menus_favoris();
250
+    if (
251
+        isset($GLOBALS['visiteur_session']['prefs']['menus_favoris'])
252
+        and is_array($GLOBALS['visiteur_session']['prefs']['menus_favoris'])
253
+        and $GLOBALS['visiteur_session']['prefs']['menus_favoris']
254
+    ) {
255
+        return $GLOBALS['visiteur_session']['prefs']['menus_favoris'];
256
+    }
257
+    $definir_menus_favoris = charger_fonction('definir_menus_favoris', 'inc');
258
+    return $definir_menus_favoris();
259 259
 }
Please login to merge, or discard this patch.
ecrire/inc/boutons.php 1 patch
Indentation   +89 added lines, -89 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
  */
18 18
 
19 19
 if (!defined('_ECRIRE_INC_VERSION')) {
20
-	return;
20
+    return;
21 21
 }
22 22
 
23 23
 /**
@@ -25,58 +25,58 @@  discard block
 block discarded – undo
25 25
  * privée ou dans un de ses sous menus
26 26
  */
27 27
 class Bouton {
28
-	/** L'icone à mettre dans le bouton */
29
-	public string $icone;
30
-
31
-	/** Le nom de l'entrée d'i18n associé */
32
-	public string $libelle;
33
-
34
-	/** @var null|string L'URL de la page (null => ?exec=nom) */
35
-	public $url = null;
36
-
37
-	/** @var null|string|array Arguments supplementaires de l'URL */
38
-	public $urlArg = null;
39
-
40
-	/** @var null|string URL du javascript */
41
-	public $url2 = null;
42
-
43
-	/** @var null|string Pour ouvrir dans une fenetre a part */
44
-	public $target = null;
45
-
46
-	/** Sous-barre de boutons / onglets */
47
-	public array $sousmenu = [];
48
-
49
-	/** Position dans le menu */
50
-	public int $position = 0;
51
-
52
-	/** Entrée favorite (sa position dans les favoris) ? */
53
-	public int $favori = 0;
54
-
55
-
56
-	/**
57
-	 * Définit un bouton
58
-	 *
59
-	 * @param string $icone
60
-	 *    L'icone à mettre dans le bouton
61
-	 * @param string $libelle
62
-	 *    Le nom de l'entrée i18n associé
63
-	 * @param null|string $url
64
-	 *    L'URL de la page
65
-	 * @param null|string|array $urlArg
66
-	 *    Arguments supplémentaires de l'URL
67
-	 * @param null|string $url2
68
-	 *    URL du javascript
69
-	 * @param null|mixed $target
70
-	 *    Pour ouvrir une fenêtre à part
71
-	 */
72
-	public function __construct($icone, $libelle, $url = null, $urlArg = null, $url2 = null, $target = null) {
73
-		$this->icone = $icone;
74
-		$this->libelle = $libelle;
75
-		$this->url = $url;
76
-		$this->urlArg = $urlArg;
77
-		$this->url2 = $url2;
78
-		$this->target = $target;
79
-	}
28
+    /** L'icone à mettre dans le bouton */
29
+    public string $icone;
30
+
31
+    /** Le nom de l'entrée d'i18n associé */
32
+    public string $libelle;
33
+
34
+    /** @var null|string L'URL de la page (null => ?exec=nom) */
35
+    public $url = null;
36
+
37
+    /** @var null|string|array Arguments supplementaires de l'URL */
38
+    public $urlArg = null;
39
+
40
+    /** @var null|string URL du javascript */
41
+    public $url2 = null;
42
+
43
+    /** @var null|string Pour ouvrir dans une fenetre a part */
44
+    public $target = null;
45
+
46
+    /** Sous-barre de boutons / onglets */
47
+    public array $sousmenu = [];
48
+
49
+    /** Position dans le menu */
50
+    public int $position = 0;
51
+
52
+    /** Entrée favorite (sa position dans les favoris) ? */
53
+    public int $favori = 0;
54
+
55
+
56
+    /**
57
+     * Définit un bouton
58
+     *
59
+     * @param string $icone
60
+     *    L'icone à mettre dans le bouton
61
+     * @param string $libelle
62
+     *    Le nom de l'entrée i18n associé
63
+     * @param null|string $url
64
+     *    L'URL de la page
65
+     * @param null|string|array $urlArg
66
+     *    Arguments supplémentaires de l'URL
67
+     * @param null|string $url2
68
+     *    URL du javascript
69
+     * @param null|mixed $target
70
+     *    Pour ouvrir une fenêtre à part
71
+     */
72
+    public function __construct($icone, $libelle, $url = null, $urlArg = null, $url2 = null, $target = null) {
73
+        $this->icone = $icone;
74
+        $this->libelle = $libelle;
75
+        $this->url = $url;
76
+        $this->urlArg = $urlArg;
77
+        $this->url2 = $url2;
78
+        $this->target = $target;
79
+    }
80 80
 }
81 81
 
82 82
 
@@ -93,35 +93,35 @@  discard block
 block discarded – undo
93 93
  */
94 94
 function definir_barre_onglets($script) {
95 95
 
96
-	$onglets = [];
97
-	$liste_onglets = [];
98
-
99
-	// ajouter les onglets issus des plugin via paquet.xml
100
-	if (function_exists('onglets_plugins')) {
101
-		$liste_onglets = onglets_plugins();
102
-	}
103
-
104
-
105
-	foreach ($liste_onglets as $id => $infos) {
106
-		if (
107
-			($parent = $infos['parent'])
108
-			&& $parent == $script
109
-			&& autoriser('onglet', "_$id")
110
-		) {
111
-			$onglets[$id] = new Bouton(
112
-				isset($infos['icone']) ? find_in_theme($infos['icone']) : '',  // icone
113
-				$infos['titre'],  // titre
114
-				(isset($infos['action']) and $infos['action'])
115
-					? generer_url_ecrire(
116
-						$infos['action'],
117
-						(isset($infos['parametres']) and $infos['parametres']) ? $infos['parametres'] : ''
118
-					)
119
-					: null
120
-			);
121
-		}
122
-	}
123
-
124
-	return pipeline('ajouter_onglets', ['data' => $onglets, 'args' => $script]);
96
+    $onglets = [];
97
+    $liste_onglets = [];
98
+
99
+    // ajouter les onglets issus des plugin via paquet.xml
100
+    if (function_exists('onglets_plugins')) {
101
+        $liste_onglets = onglets_plugins();
102
+    }
103
+
104
+
105
+    foreach ($liste_onglets as $id => $infos) {
106
+        if (
107
+            ($parent = $infos['parent'])
108
+            && $parent == $script
109
+            && autoriser('onglet', "_$id")
110
+        ) {
111
+            $onglets[$id] = new Bouton(
112
+                isset($infos['icone']) ? find_in_theme($infos['icone']) : '',  // icone
113
+                $infos['titre'],  // titre
114
+                (isset($infos['action']) and $infos['action'])
115
+                    ? generer_url_ecrire(
116
+                        $infos['action'],
117
+                        (isset($infos['parametres']) and $infos['parametres']) ? $infos['parametres'] : ''
118
+                    )
119
+                    : null
120
+            );
121
+        }
122
+    }
123
+
124
+    return pipeline('ajouter_onglets', ['data' => $onglets, 'args' => $script]);
125 125
 }
126 126
 
127 127
 
@@ -140,14 +140,14 @@  discard block
 block discarded – undo
140 140
  * @return string
141 141
  */
142 142
 function barre_onglets($rubrique, $ongletCourant, $class = 'barre_onglet') {
143
-	include_spip('inc/presentation');
143
+    include_spip('inc/presentation');
144 144
 
145
-	$res = '';
145
+    $res = '';
146 146
 
147
-	foreach (definir_barre_onglets($rubrique) as $exec => $onglet) {
148
-		$url = $onglet->url ?: generer_url_ecrire($exec);
149
-		$res .= onglet(_T($onglet->libelle), $url, $exec, $ongletCourant, $onglet->icone);
150
-	}
147
+    foreach (definir_barre_onglets($rubrique) as $exec => $onglet) {
148
+        $url = $onglet->url ?: generer_url_ecrire($exec);
149
+        $res .= onglet(_T($onglet->libelle), $url, $exec, $ongletCourant, $onglet->icone);
150
+    }
151 151
 
152
-	return !$res ? '' : (debut_onglet($class) . $res . fin_onglet());
152
+    return !$res ? '' : (debut_onglet($class) . $res . fin_onglet());
153 153
 }
Please login to merge, or discard this patch.