@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | $result = sql_select( |
| 43 | 43 | 'id_rubrique, id_parent, titre, descriptif, lang', |
| 44 | 44 | 'spip_rubriques', |
| 45 | - 'id_parent=' . (int) $collection, |
|
| 45 | + 'id_parent='.(int) $collection, |
|
| 46 | 46 | '', |
| 47 | 47 | '0+titre,titre', |
| 48 | 48 | $debut == -1 ? '' : "$debut,$limite" |
@@ -73,13 +73,13 @@ discard block |
||
| 73 | 73 | |
| 74 | 74 | $lib_bouton = (acces_restreint_rubrique($id_rubrique) |
| 75 | 75 | ? http_img_pack('auteur-0minirezo-16.png', '', " width='16' height='16'", _T('image_administrer_rubrique')) |
| 76 | - : '') . |
|
| 77 | - " <a class='titremlien' dir='$lang_dir'" . |
|
| 78 | - ($row['lang'] !== $GLOBALS['spip_lang'] ? " hreflang='" . $row['lang'] . "'" : '') . |
|
| 79 | - " href='" . |
|
| 80 | - generer_objet_url($id_rubrique, 'rubrique') . |
|
| 81 | - "'><span class='titre'>" . |
|
| 82 | - $rang . $titre |
|
| 76 | + : ''). |
|
| 77 | + " <a class='titremlien' dir='$lang_dir'". |
|
| 78 | + ($row['lang'] !== $GLOBALS['spip_lang'] ? " hreflang='".$row['lang']."'" : ''). |
|
| 79 | + " href='". |
|
| 80 | + generer_objet_url($id_rubrique, 'rubrique'). |
|
| 81 | + "'><span class='titre'>". |
|
| 82 | + $rang.$titre |
|
| 83 | 83 | . '</span>' |
| 84 | 84 | . (is_string($logo) ? $logo : '') |
| 85 | 85 | . '</a>'; |
@@ -89,8 +89,8 @@ discard block |
||
| 89 | 89 | ; |
| 90 | 90 | |
| 91 | 91 | $res[] = |
| 92 | - debut_cadre_sous_rub(($id_parent ? 'rubrique-24.png' : 'secteur-24.png'), true, '', $titre) . |
|
| 93 | - $les_sous_enfants . |
|
| 92 | + debut_cadre_sous_rub(($id_parent ? 'rubrique-24.png' : 'secteur-24.png'), true, '', $titre). |
|
| 93 | + $les_sous_enfants. |
|
| 94 | 94 | fin_cadre_sous_rub(); |
| 95 | 95 | } |
| 96 | 96 | } |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | * Le contenu du bloc dépliable |
| 110 | 110 | */ |
| 111 | 111 | function sous_enfant_rub($collection2) { |
| 112 | - $nb = sql_countsel('spip_rubriques', 'id_parent=' . (int) $collection2); |
|
| 112 | + $nb = sql_countsel('spip_rubriques', 'id_parent='.(int) $collection2); |
|
| 113 | 113 | |
| 114 | 114 | $retour = ''; |
| 115 | 115 | $pagination = ''; |
@@ -121,23 +121,23 @@ discard block |
||
| 121 | 121 | * Si > 500 on affiche une pagination |
| 122 | 122 | */ |
| 123 | 123 | if ($nb > $limite) { |
| 124 | - $debut = _request('debut_rubrique' . $collection2) ?: $debut; |
|
| 124 | + $debut = _request('debut_rubrique'.$collection2) ?: $debut; |
|
| 125 | 125 | $pagination = chercher_filtre('pagination'); |
| 126 | - $pagination = '<nav class="pagination">' . $pagination( |
|
| 126 | + $pagination = '<nav class="pagination">'.$pagination( |
|
| 127 | 127 | $nb, |
| 128 | - '_rubrique' . $collection2, |
|
| 128 | + '_rubrique'.$collection2, |
|
| 129 | 129 | $debut, |
| 130 | 130 | $limite, |
| 131 | 131 | true, |
| 132 | 132 | 'prive' |
| 133 | - ) . '</nav>'; |
|
| 133 | + ).'</nav>'; |
|
| 134 | 134 | $limite = $debut + $limite; |
| 135 | 135 | } |
| 136 | 136 | |
| 137 | 137 | $result = sql_select( |
| 138 | 138 | 'id_rubrique, id_parent, titre, lang', |
| 139 | 139 | 'spip_rubriques', |
| 140 | - 'id_parent=' . (int) $collection2, |
|
| 140 | + 'id_parent='.(int) $collection2, |
|
| 141 | 141 | '', |
| 142 | 142 | '0+titre,titre', |
| 143 | 143 | $debut == -1 ? '' : "$debut,$limite" |
@@ -157,14 +157,14 @@ discard block |
||
| 157 | 157 | changer_typo($row['lang']); |
| 158 | 158 | $lang_dir = lang_dir($row['lang']); |
| 159 | 159 | if (autoriser('voir', 'rubrique', $id_rubrique2)) { |
| 160 | - $retour .= "\n<li class='item' dir='$lang_dir'><a href='" . generer_objet_url( |
|
| 160 | + $retour .= "\n<li class='item' dir='$lang_dir'><a href='".generer_objet_url( |
|
| 161 | 161 | $id_rubrique2, |
| 162 | 162 | 'rubrique' |
| 163 | - ) . "'>" . $rang2 . $titre2 . "</a></li>\n"; |
|
| 163 | + )."'>".$rang2.$titre2."</a></li>\n"; |
|
| 164 | 164 | } |
| 165 | 165 | } |
| 166 | 166 | |
| 167 | - $retour = $pagination . $retour . $pagination; |
|
| 167 | + $retour = $pagination.$retour.$pagination; |
|
| 168 | 168 | |
| 169 | 169 | if (!$retour) { |
| 170 | 170 | return ''; |
@@ -173,7 +173,7 @@ discard block |
||
| 173 | 173 | return debut_block_depliable($debut > 0, "enfants$collection2") |
| 174 | 174 | . "\n<ul class='liste-items sous-sous-rub'>\n" |
| 175 | 175 | . $retour |
| 176 | - . "</ul>\n" . fin_block() . "\n\n"; |
|
| 176 | + . "</ul>\n".fin_block()."\n\n"; |
|
| 177 | 177 | } |
| 178 | 178 | |
| 179 | 179 | /** |
@@ -192,13 +192,13 @@ discard block |
||
| 192 | 192 | $debut = 0; |
| 193 | 193 | $limite = 500; |
| 194 | 194 | |
| 195 | - $nb = sql_countsel('spip_rubriques', 'id_parent=' . (int) $id_rubrique); |
|
| 195 | + $nb = sql_countsel('spip_rubriques', 'id_parent='.(int) $id_rubrique); |
|
| 196 | 196 | |
| 197 | 197 | if ($nb > $limite) { |
| 198 | - $debut = _request('debut_rubrique' . $id_rubrique) ?: $debut; |
|
| 198 | + $debut = _request('debut_rubrique'.$id_rubrique) ?: $debut; |
|
| 199 | 199 | $pagination = chercher_filtre('pagination'); |
| 200 | - $pagination = '<br class="nettoyeur"><nav class="pagination">' . |
|
| 201 | - $pagination($nb, '_rubrique' . $id_rubrique, $debut, $limite, true, 'prive') . |
|
| 200 | + $pagination = '<br class="nettoyeur"><nav class="pagination">'. |
|
| 201 | + $pagination($nb, '_rubrique'.$id_rubrique, $debut, $limite, true, 'prive'). |
|
| 202 | 202 | '</nav>'; |
| 203 | 203 | } |
| 204 | 204 | |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | $id_rubrique = $GLOBALS['connect_id_rubrique'][0]; |
| 42 | 42 | } elseif ( |
| 43 | 43 | is_int(_AUTO_SELECTION_RUBRIQUE) |
| 44 | - && sql_fetsel('id_rubrique', 'spip_rubriques', 'id_rubrique=' . (int) _AUTO_SELECTION_RUBRIQUE) |
|
| 44 | + && sql_fetsel('id_rubrique', 'spip_rubriques', 'id_rubrique='.(int) _AUTO_SELECTION_RUBRIQUE) |
|
| 45 | 45 | ) { |
| 46 | 46 | $id_rubrique = _AUTO_SELECTION_RUBRIQUE; |
| 47 | 47 | } else { |
@@ -50,12 +50,12 @@ discard block |
||
| 50 | 50 | $id_rubrique = $row_rub['id_rubrique']; |
| 51 | 51 | } |
| 52 | 52 | // si le choix ne convient pas, on cherche dans un secteur |
| 53 | - if (!autoriser('creer' . $objet . 'dans', 'rubrique', $id_rubrique)) { |
|
| 53 | + if (!autoriser('creer'.$objet.'dans', 'rubrique', $id_rubrique)) { |
|
| 54 | 54 | $id_rubrique = ''; |
| 55 | 55 | // manque de chance, la rubrique n'est pas autorisee, on cherche un des secteurs autorises |
| 56 | 56 | $res = sql_select('id_rubrique', 'spip_rubriques', 'id_parent=0'); |
| 57 | 57 | while (!$id_rubrique && ($row_rub = sql_fetch($res))) { |
| 58 | - if (autoriser('creer' . $objet . 'dans', 'rubrique', $row_rub['id_rubrique'])) { |
|
| 58 | + if (autoriser('creer'.$objet.'dans', 'rubrique', $row_rub['id_rubrique'])) { |
|
| 59 | 59 | $id_rubrique = $row_rub['id_rubrique']; |
| 60 | 60 | } |
| 61 | 61 | } |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | if (!$max_age) { |
| 107 | 107 | $max_age = _DEFAULT_LOCKTIME; |
| 108 | 108 | } |
| 109 | - $lock_file = _DIR_TMP . _NAME_LOCK . '-' . substr(md5($fichier), 0, 8); |
|
| 109 | + $lock_file = _DIR_TMP._NAME_LOCK.'-'.substr(md5($fichier), 0, 8); |
|
| 110 | 110 | |
| 111 | 111 | |
| 112 | 112 | /* |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | */ |
| 116 | 116 | |
| 117 | 117 | $id = creer_uniqid(); |
| 118 | - $tpath = _DIR_TMP . "slock.$id"; |
|
| 118 | + $tpath = _DIR_TMP."slock.$id"; |
|
| 119 | 119 | $tmpfd = @fopen($tpath, 'w'); // hum, le 'x' necessite php4,3,2 ... |
| 120 | 120 | if (!$tmpfd) { /* open failed */ |
| 121 | 121 | @fclose($tmpfd); |
@@ -241,7 +241,7 @@ discard block |
||
| 241 | 241 | * thinks the current time is (our_tmp.st_ctime).. |
| 242 | 242 | */ |
| 243 | 243 | |
| 244 | - $tpath = _DIR_TMP . "stime.$id"; |
|
| 244 | + $tpath = _DIR_TMP."stime.$id"; |
|
| 245 | 245 | $tmpfd = @fopen($tpath, 'w'); |
| 246 | 246 | if (!$tmpfd || @fwrite($tmpfd, 'zz', 2) != 2 || !($our_tmp = fstat($tmpfd))) { |
| 247 | 247 | /* The open failed, or we can't write the file, or we can't stat it */ |
@@ -251,14 +251,14 @@ discard block |
||
| 251 | 251 | return false; //(NFSL_SYSF); |
| 252 | 252 | } |
| 253 | 253 | |
| 254 | - @fclose($tmpfd); /* We don't need this once we have our_tmp.st_ctime. */ |
|
| 254 | + @fclose($tmpfd); /* We don't need this once we have our_tmp.st_ctime. */ |
|
| 255 | 255 | spip_unlink($tpath); |
| 256 | 256 | |
| 257 | 257 | /* |
| 258 | 258 | * 2. make fullpath, a buffer for the full pathname of the lock file |
| 259 | 259 | */ |
| 260 | 260 | |
| 261 | - $lock_file = _DIR_TMP . _NAME_LOCK . '-' . substr(md5($fichier), 0, 8); |
|
| 261 | + $lock_file = _DIR_TMP._NAME_LOCK.'-'.substr(md5($fichier), 0, 8); |
|
| 262 | 262 | |
| 263 | 263 | /* |
| 264 | 264 | * 3. If the ctime hasn't been modified, unlink the file and return. If the |
@@ -278,10 +278,10 @@ discard block |
||
| 278 | 278 | if (!$test) { |
| 279 | 279 | return false; |
| 280 | 280 | } //(NFSL_LOST); |
| 281 | - sleep(1 + (random_int(0, 4))); /* so sleep a bit */ |
|
| 281 | + sleep(1 + (random_int(0, 4))); /* so sleep a bit */ |
|
| 282 | 282 | } |
| 283 | 283 | |
| 284 | - return true;//(NFSL_OK); /* success */ |
|
| 284 | + return true; //(NFSL_OK); /* success */ |
|
| 285 | 285 | } |
| 286 | 286 | |
| 287 | 287 | /* |
@@ -389,7 +389,7 @@ discard block |
||
| 389 | 389 | $out .= afficher_script_statut($id, $type, -$zero - $i++ * $unit, statut_image($type, $s), $s, _T($t)); |
| 390 | 390 | } |
| 391 | 391 | |
| 392 | - return $out . '</span>'; |
|
| 392 | + return $out.'</span>'; |
|
| 393 | 393 | } else { |
| 394 | 394 | $nom = 'puce_statut_'; |
| 395 | 395 | $action = generer_url_ecrire('puce_statut', '', true); |
@@ -406,7 +406,7 @@ discard block |
||
| 406 | 406 | $h = generer_action_auteur('instituer_objet', "$type-$id-$statut"); |
| 407 | 407 | $t = supprimer_tags($titre); |
| 408 | 408 | |
| 409 | - return "<a href=\"#\" data-puce-id=\"$id\" data-puce-type=\"$type\" data-puce-decal=\"$n\" data-puce-action=\"$h\" title=\"$t\"$act>" . http_img_pack($img, $t) . '</a>'; |
|
| 409 | + return "<a href=\"#\" data-puce-id=\"$id\" data-puce-type=\"$type\" data-puce-decal=\"$n\" data-puce-action=\"$h\" title=\"$t\"$act>".http_img_pack($img, $t).'</a>'; |
|
| 410 | 410 | } |
| 411 | 411 | |
| 412 | 412 | // compat |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | static $dirs = []; |
| 43 | 43 | $liste = []; |
| 44 | 44 | foreach (creer_chemin() as $dir) { |
| 45 | - if (!isset($dirs[$a = $dir . $dirname])) { |
|
| 45 | + if (!isset($dirs[$a = $dir.$dirname])) { |
|
| 46 | 46 | $dirs[$a] = (is_dir($a) || !$a); |
| 47 | 47 | } |
| 48 | 48 | if ($dirs[$a] && is_readable($a .= $file)) { |
@@ -66,21 +66,21 @@ discard block |
||
| 66 | 66 | **/ |
| 67 | 67 | function chercher_module_lang($module, $lang = '') { |
| 68 | 68 | if ($lang) { |
| 69 | - $lang = '_' . $lang; |
|
| 69 | + $lang = '_'.$lang; |
|
| 70 | 70 | } |
| 71 | 71 | |
| 72 | 72 | // 1) dans un repertoire nomme lang/ se trouvant sur le chemin |
| 73 | 73 | if ( |
| 74 | 74 | $f = ($module == 'local' |
| 75 | - ? find_in_path($module . $lang . '.php', 'lang/') |
|
| 76 | - : find_langs_in_path($module . $lang . '.php', 'lang/')) |
|
| 75 | + ? find_in_path($module.$lang.'.php', 'lang/') |
|
| 76 | + : find_langs_in_path($module.$lang.'.php', 'lang/')) |
|
| 77 | 77 | ) { |
| 78 | 78 | return is_array($f) ? $f : [$f]; |
| 79 | 79 | } |
| 80 | 80 | |
| 81 | 81 | // 2) directement dans le chemin (old style, uniquement pour local) |
| 82 | 82 | return ($module == 'local' || strpos($module, '/')) |
| 83 | - ? (($f = find_in_path($module . $lang . '.php')) ? [$f] : false) |
|
| 83 | + ? (($f = find_in_path($module.$lang.'.php')) ? [$f] : false) |
|
| 84 | 84 | : false; |
| 85 | 85 | } |
| 86 | 86 | |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | **/ |
| 105 | 105 | function charger_langue($lang, $module = 'spip') { |
| 106 | 106 | static $langs = []; |
| 107 | - $var = 'i18n_' . $module . '_' . $lang; |
|
| 107 | + $var = 'i18n_'.$module.'_'.$lang; |
|
| 108 | 108 | if (!isset($langs[$lang])) { |
| 109 | 109 | $langs[$lang] = []; |
| 110 | 110 | if ($lang) { |
@@ -119,13 +119,13 @@ discard block |
||
| 119 | 119 | } |
| 120 | 120 | foreach ($langs[$lang] as $l) { |
| 121 | 121 | if ($fichiers_lang = chercher_module_lang($module, $l)) { |
| 122 | - $GLOBALS['idx_lang'] = 'i18n_' . $module . '_' . $l; |
|
| 122 | + $GLOBALS['idx_lang'] = 'i18n_'.$module.'_'.$l; |
|
| 123 | 123 | $GLOBALS[$GLOBALS['idx_lang']] = lire_fichier_langue(array_shift($fichiers_lang)); |
| 124 | 124 | surcharger_langue($fichiers_lang); |
| 125 | 125 | if ($l !== $lang) { |
| 126 | - $GLOBALS[$var] = &$GLOBALS['i18n_' . $module . '_' . $l]; |
|
| 126 | + $GLOBALS[$var] = &$GLOBALS['i18n_'.$module.'_'.$l]; |
|
| 127 | 127 | } |
| 128 | - $GLOBALS['lang_' . $var] = $l; |
|
| 128 | + $GLOBALS['lang_'.$var] = $l; |
|
| 129 | 129 | #spip_log("module de langue : {$module}_$l.php", 'traduire'); |
| 130 | 130 | break; |
| 131 | 131 | } |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | */ |
| 144 | 144 | function lire_fichier_langue(string $fichier): array { |
| 145 | 145 | $idx_lang_before = $GLOBALS['idx_lang'] ?? null; |
| 146 | - $idx_lang_tmp = ($GLOBALS['idx_lang'] ?? 'lang') . '@temporaire'; |
|
| 146 | + $idx_lang_tmp = ($GLOBALS['idx_lang'] ?? 'lang').'@temporaire'; |
|
| 147 | 147 | $GLOBALS['idx_lang'] = $idx_lang_tmp; |
| 148 | 148 | $idx_lang = include $fichier; |
| 149 | 149 | $GLOBALS['idx_lang'] = $idx_lang_before; |
@@ -254,27 +254,27 @@ discard block |
||
| 254 | 254 | } else { |
| 255 | 255 | $modules = ['spip', 'ecrire']; |
| 256 | 256 | $code = $ori; |
| 257 | - $ori_complet = implode('|', $modules) . ':' . $ori; |
|
| 257 | + $ori_complet = implode('|', $modules).':'.$ori; |
|
| 258 | 258 | } |
| 259 | 259 | |
| 260 | 260 | $desc = new Description(); |
| 261 | 261 | |
| 262 | 262 | // parcourir tous les modules jusqu'a ce qu'on trouve |
| 263 | 263 | foreach ($modules as $module) { |
| 264 | - $var = 'i18n_' . $module . '_' . $lang; |
|
| 264 | + $var = 'i18n_'.$module.'_'.$lang; |
|
| 265 | 265 | |
| 266 | 266 | if (empty($GLOBALS[$var])) { |
| 267 | 267 | charger_langue($lang, $module); |
| 268 | 268 | // surcharges persos -- on cherche |
| 269 | 269 | // (lang/)local_xx.php et/ou (lang/)local.php ... |
| 270 | - if (!isset($local['local_' . $lang])) { |
|
| 270 | + if (!isset($local['local_'.$lang])) { |
|
| 271 | 271 | // redéfinir la langue en cours pour les surcharges (chercher_langue a pu le changer) |
| 272 | 272 | $GLOBALS['idx_lang'] = $var; |
| 273 | 273 | // ... (lang/)local_xx.php |
| 274 | - $local['local_' . $lang] = chercher_module_lang('local', $lang); |
|
| 274 | + $local['local_'.$lang] = chercher_module_lang('local', $lang); |
|
| 275 | 275 | } |
| 276 | - if ($local['local_' . $lang]) { |
|
| 277 | - surcharger_langue($local['local_' . $lang]); |
|
| 276 | + if ($local['local_'.$lang]) { |
|
| 277 | + surcharger_langue($local['local_'.$lang]); |
|
| 278 | 278 | } |
| 279 | 279 | // ... puis (lang/)local.php |
| 280 | 280 | if (!isset($local['local'])) { |
@@ -288,7 +288,7 @@ discard block |
||
| 288 | 288 | if (isset($GLOBALS[$var][$code])) { |
| 289 | 289 | $desc->code = $code; |
| 290 | 290 | $desc->module = $module; |
| 291 | - $desc->langue = $GLOBALS['lang_' . $var] ?? $lang; |
|
| 291 | + $desc->langue = $GLOBALS['lang_'.$var] ?? $lang; |
|
| 292 | 292 | $desc->texte = $GLOBALS[$var][$code]; |
| 293 | 293 | break; |
| 294 | 294 | } |
@@ -346,13 +346,13 @@ discard block |
||
| 346 | 346 | if (!$desc->mode && $desc->texte) { |
| 347 | 347 | // ne pas modifier 2 fois l'affichage |
| 348 | 348 | $desc->mode = 'traduction'; |
| 349 | - $classe = 'debug-traduction' . ($desc->module == 'ecrire' ? '-prive' : ''); |
|
| 349 | + $classe = 'debug-traduction'.($desc->module == 'ecrire' ? '-prive' : ''); |
|
| 350 | 350 | $desc->texte = '<span ' |
| 351 | - . 'lang=' . $desc->langue |
|
| 352 | - . ' class=' . $classe |
|
| 353 | - . ' data-module=' . $desc->module |
|
| 354 | - . ' data-code=' . $desc->code |
|
| 355 | - . ' title=' . $modules . '(' . $desc->langue . ')>' |
|
| 351 | + . 'lang='.$desc->langue |
|
| 352 | + . ' class='.$classe |
|
| 353 | + . ' data-module='.$desc->module |
|
| 354 | + . ' data-code='.$desc->code |
|
| 355 | + . ' title='.$modules.'('.$desc->langue.')>' |
|
| 356 | 356 | . $desc->texte |
| 357 | 357 | . '</span>'; |
| 358 | 358 | $desc->texte = str_replace( |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | $_id = $e['id_table_objet']; |
| 52 | 52 | if (isset($contexte[$_id]) && ($id = (int) $contexte[$_id])) { |
| 53 | 53 | $table = $e['table_objet_sql']; |
| 54 | - $row = sql_fetsel('*', $table, "$_id=" . (int) $id); |
|
| 54 | + $row = sql_fetsel('*', $table, "$_id=".(int) $id); |
|
| 55 | 55 | if (isset($row['id_rubrique'])) { |
| 56 | 56 | $contexte['id_rubrique'] = $row['id_rubrique']; |
| 57 | 57 | if (isset($row['id_secteur'])) { |
@@ -115,8 +115,8 @@ discard block |
||
| 115 | 115 | $boutons_admin[$parent]->sousmenu = array_slice($boutons_admin[$parent]->sousmenu, 0, $position) |
| 116 | 116 | + [ |
| 117 | 117 | $id => new Bouton( |
| 118 | - ($icones && !empty($infos['icone'])) ? find_in_theme($infos['icone']) : '', // icone |
|
| 119 | - $infos['titre'], // titre |
|
| 118 | + ($icones && !empty($infos['icone'])) ? find_in_theme($infos['icone']) : '', // icone |
|
| 119 | + $infos['titre'], // titre |
|
| 120 | 120 | (isset($infos['action']) && $infos['action']) ? $infos['action'] : null, |
| 121 | 121 | (isset($infos['parametres']) && $infos['parametres']) ? $infos['parametres'] : null |
| 122 | 122 | ) |
@@ -133,8 +133,8 @@ discard block |
||
| 133 | 133 | $boutons_admin = array_slice($boutons_admin, 0, $position) |
| 134 | 134 | + [ |
| 135 | 135 | $id => new Bouton( |
| 136 | - ($icones && isset($infos['icone']) && $infos['icone']) ? find_in_theme($infos['icone']) : '', // icone |
|
| 137 | - $infos['titre'], // titre |
|
| 136 | + ($icones && isset($infos['icone']) && $infos['icone']) ? find_in_theme($infos['icone']) : '', // icone |
|
| 137 | + $infos['titre'], // titre |
|
| 138 | 138 | (isset($infos['action']) && $infos['action']) ? $infos['action'] : null, |
| 139 | 139 | (isset($infos['parametres']) && $infos['parametres']) ? $infos['parametres'] : null |
| 140 | 140 | ) |
@@ -221,7 +221,7 @@ discard block |
||
| 221 | 221 | $url = str_replace('&', '&', $url); |
| 222 | 222 | while (preg_match(',[&?]([a-z_]+)=@([a-z_]+)@,i', $url, $matches)) { |
| 223 | 223 | if ($matches[2] == 'id_secteur' && !isset($contexte['id_secteur']) && isset($contexte['id_rubrique'])) { |
| 224 | - $contexte['id_secteur'] = sql_getfetsel('id_secteur', 'spip_rubriques', 'id_rubrique=' . (int) $contexte['id_rubrique']); |
|
| 224 | + $contexte['id_secteur'] = sql_getfetsel('id_secteur', 'spip_rubriques', 'id_rubrique='.(int) $contexte['id_rubrique']); |
|
| 225 | 225 | } |
| 226 | 226 | $val = _request($matches[2], $contexte); |
| 227 | 227 | $url = parametre_url($url, $matches[1], $val ?: '', '&'); |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | |
| 101 | 101 | // in fine renommer le prefixe si besoin |
| 102 | 102 | if (str_starts_with($name, 'spip_')) { |
| 103 | - $name = $GLOBALS['cookie_prefix'] . '_' . substr($name, 5); |
|
| 103 | + $name = $GLOBALS['cookie_prefix'].'_'.substr($name, 5); |
|
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 | #spip_log("cookie('$name', '$value', " . json_encode($options, true) . ")", "cookies"); |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | } |
| 159 | 159 | foreach ($_COOKIE as $name => $value) { |
| 160 | 160 | if (substr($name, 0, $prefix_long) == $cookie_prefix) { |
| 161 | - $spipname = preg_replace('/^' . $cookie_prefix . '_/', 'spip_', $name); |
|
| 161 | + $spipname = preg_replace('/^'.$cookie_prefix.'_/', 'spip_', $name); |
|
| 162 | 162 | $_COOKIE[$spipname] = $value; |
| 163 | 163 | $GLOBALS[$spipname] = $value; |
| 164 | 164 | } |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | |
| 54 | 54 | if ($aff_racine) { |
| 55 | 55 | $info = generer_url_ecrire('informer', "type=rubrique&rac=$idom&do=$do&id="); |
| 56 | - $idom3 = $idom . '_selection'; |
|
| 56 | + $idom3 = $idom.'_selection'; |
|
| 57 | 57 | |
| 58 | 58 | $onClick = "jQuery(this).parent().addClass('on');jQuery('#choix_parent_principal .on').removeClass('on'); aff_selection(0, '$idom3', '$info', event);return false;"; |
| 59 | 59 | |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | ' ' |
| 72 | 72 | ); |
| 73 | 73 | |
| 74 | - $js_func = $do . '_selection_titre'; |
|
| 74 | + $js_func = $do.'_selection_titre'; |
|
| 75 | 75 | $ondbClick = "$js_func('$ondbClick',0,'selection_rubrique','id_parent');"; |
| 76 | 76 | |
| 77 | 77 | $aff_racine = "<div class='petit-item petite-racine item'>" |
@@ -112,12 +112,12 @@ discard block |
||
| 112 | 112 | **/ |
| 113 | 113 | function construire_selectionner_hierarchie($idom, $liste, $racine, $url, $name, $url_init = '') { |
| 114 | 114 | |
| 115 | - $idom1 = $idom . '_champ_recherche'; |
|
| 116 | - $idom2 = $idom . '_principal'; |
|
| 117 | - $idom3 = $idom . '_selection'; |
|
| 118 | - $idom4 = $idom . '_col_1'; |
|
| 119 | - $idom5 = 'img_' . $idom4; |
|
| 120 | - $idom6 = $idom . '_fonc'; |
|
| 115 | + $idom1 = $idom.'_champ_recherche'; |
|
| 116 | + $idom2 = $idom.'_principal'; |
|
| 117 | + $idom3 = $idom.'_selection'; |
|
| 118 | + $idom4 = $idom.'_col_1'; |
|
| 119 | + $idom5 = 'img_'.$idom4; |
|
| 120 | + $idom6 = $idom.'_fonc'; |
|
| 121 | 121 | |
| 122 | 122 | return "<div id='$idom'>" |
| 123 | 123 | . "<a id='$idom6' style='visibility: hidden;'" |
@@ -127,10 +127,10 @@ discard block |
||
| 127 | 127 | . http_img_pack( |
| 128 | 128 | 'loader.svg', |
| 129 | 129 | '', |
| 130 | - "class='loader' style='visibility: hidden;float:" . $GLOBALS['spip_lang_right'] . "' id='$idom5'" |
|
| 130 | + "class='loader' style='visibility: hidden;float:".$GLOBALS['spip_lang_right']."' id='$idom5'" |
|
| 131 | 131 | ) |
| 132 | 132 | . '' |
| 133 | - . "<input style='width: 10em;float:" . $GLOBALS['spip_lang_right'] . ";' type='text' class='text search' id='$idom1' placeholder='" . _T('info_rechercher') . "'" |
|
| 133 | + . "<input style='width: 10em;float:".$GLOBALS['spip_lang_right'].";' type='text' class='text search' id='$idom1' placeholder='"._T('info_rechercher')."'" |
|
| 134 | 134 | // eliminer Return car il provoque la soumission (balise unique) |
| 135 | 135 | // et eliminer Tab pour la navigation au clavier |
| 136 | 136 | // ce serait encore mieux de ne le faire que s'il y a encore plusieurs |
@@ -177,8 +177,8 @@ discard block |
||
| 177 | 177 | |
| 178 | 178 | $liste = $id_rubrique; |
| 179 | 179 | $id_rubrique = (int) $id_rubrique; |
| 180 | - while ($id_rubrique = sql_getfetsel('id_parent', 'spip_rubriques', 'id_rubrique = ' . $id_rubrique)) { |
|
| 181 | - $liste = $id_rubrique . ",$liste"; |
|
| 180 | + while ($id_rubrique = sql_getfetsel('id_parent', 'spip_rubriques', 'id_rubrique = '.$id_rubrique)) { |
|
| 181 | + $liste = $id_rubrique.",$liste"; |
|
| 182 | 182 | } |
| 183 | 183 | |
| 184 | 184 | return explode(',', "0,$liste"); |
@@ -54,7 +54,7 @@ |
||
| 54 | 54 | $champs[] = 'virtuel'; |
| 55 | 55 | } |
| 56 | 56 | |
| 57 | - $data = sql_fetsel('*', $desc['table'], $_id_table . '=' . (int) $id_trad); |
|
| 57 | + $data = sql_fetsel('*', $desc['table'], $_id_table.'='.(int) $id_trad); |
|
| 58 | 58 | |
| 59 | 59 | foreach ($champs as $c) { |
| 60 | 60 | $set[$c] = $data[$c]; |