@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | static $filecache = ''; |
| 39 | 39 | |
| 40 | 40 | if ($cache === '') { |
| 41 | - $filecache = _DIR_TMP . 'plugin_xml_cache.gz'; |
|
| 41 | + $filecache = _DIR_TMP.'plugin_xml_cache.gz'; |
|
| 42 | 42 | if (is_file($filecache)) { |
| 43 | 43 | lire_fichier($filecache, $contenu); |
| 44 | 44 | $cache = unserialize($contenu); |
@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | if (isset($ret['prefix']) && $ret['prefix'] == 'spip') { |
| 128 | 128 | $ret['procure']['php'] = ['nom' => 'php', 'version' => phpversion()]; |
| 129 | 129 | foreach (get_loaded_extensions() as $ext) { |
| 130 | - $ret['procure']['php:' . $ext] = ['nom' => 'php:' . $ext, 'version' => phpversion($ext)]; |
|
| 130 | + $ret['procure']['php:'.$ext] = ['nom' => 'php:'.$ext, 'version' => phpversion($ext)]; |
|
| 131 | 131 | } |
| 132 | 132 | } |
| 133 | 133 | $diff = ($ret != $pcache); |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | asort($liste_plugins); |
| 64 | 64 | $exposed = urldecode(_request('plugin') ?? ''); |
| 65 | 65 | |
| 66 | - $block_par_lettre = false;//count($liste_plugins)>10; |
|
| 66 | + $block_par_lettre = false; //count($liste_plugins)>10; |
|
| 67 | 67 | $fast_liste_plugins_actifs = []; |
| 68 | 68 | $fast_liste_plugins_checked = []; |
| 69 | 69 | if (is_array($liste_plugins_actifs)) { |
@@ -88,11 +88,11 @@ discard block |
||
| 88 | 88 | $actif = isset($fast_liste_plugins_actifs[$plug]); |
| 89 | 89 | $checked = isset($fast_liste_plugins_checked[$plug]); |
| 90 | 90 | $block_actif |= $actif; |
| 91 | - $expose = ($exposed && ($exposed == $plug || $exposed === $dir_plugins . $plug || $exposed === substr( |
|
| 91 | + $expose = ($exposed && ($exposed == $plug || $exposed === $dir_plugins.$plug || $exposed === substr( |
|
| 92 | 92 | $dir_plugins, |
| 93 | 93 | strlen(_DIR_RACINE) |
| 94 | - ) . $plug)); |
|
| 95 | - $block .= $ligne_plug($url_page, $plug, $checked, $actif, $expose, 'item', $dir_plugins) . "\n"; |
|
| 94 | + ).$plug)); |
|
| 95 | + $block .= $ligne_plug($url_page, $plug, $checked, $actif, $expose, 'item', $dir_plugins)."\n"; |
|
| 96 | 96 | } |
| 97 | 97 | $res .= $block_par_lettre ? affiche_block_initiale($initiale, $block, $block_actif) : $block; |
| 98 | 98 | $class = basename($dir_plugins); |
@@ -125,5 +125,5 @@ |
||
| 125 | 125 | return ''; |
| 126 | 126 | } |
| 127 | 127 | |
| 128 | - return generer_url_action('tester', "arg=$process&time=" . time()); |
|
| 128 | + return generer_url_action('tester', "arg=$process&time=".time()); |
|
| 129 | 129 | } |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | if (defined('_DECLARER_CHOIX_DB')) { |
| 30 | 30 | $nom_connect = _DECLARER_CHOIX_DB; |
| 31 | 31 | $n = ''; |
| 32 | - while (in_array($nom_connect . $n, $deja)) { |
|
| 32 | + while (in_array($nom_connect.$n, $deja)) { |
|
| 33 | 33 | $n = ($n ? $n + 1 : 1); |
| 34 | 34 | } |
| 35 | 35 | $nom_connect .= $n; |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | |
| 58 | 58 | function liste_serveurs() { |
| 59 | 59 | $options = []; |
| 60 | - $dir = _DIR_RESTREINT . 'req/'; |
|
| 60 | + $dir = _DIR_RESTREINT.'req/'; |
|
| 61 | 61 | $d = opendir($dir); |
| 62 | 62 | if (!$d) { |
| 63 | 63 | return []; |
@@ -65,11 +65,11 @@ discard block |
||
| 65 | 65 | while ($f = readdir($d)) { |
| 66 | 66 | if ( |
| 67 | 67 | preg_match('/^(.*)[.]php$/', $f, $s) |
| 68 | - && is_readable($f = $dir . $f) |
|
| 68 | + && is_readable($f = $dir.$f) |
|
| 69 | 69 | ) { |
| 70 | 70 | require_once($f); |
| 71 | 71 | $s = $s[1]; |
| 72 | - $v = 'spip_versions_' . $s; |
|
| 72 | + $v = 'spip_versions_'.$s; |
|
| 73 | 73 | if (function_exists($v) && $v()) { |
| 74 | 74 | $options[$s] = "install_select_type_$s"; |
| 75 | 75 | } else { |
@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | |
| 128 | 128 | $link = spip_connect_db($adresse_db, '', $login_db, $pass_db, '@test@', $serveur_db); |
| 129 | 129 | if ($link) { |
| 130 | - $GLOBALS['connexions'][$serveur_db][$GLOBALS['spip_sql_version']] = $GLOBALS['spip_' . $serveur_db . '_functions_' . $GLOBALS['spip_sql_version']]; |
|
| 130 | + $GLOBALS['connexions'][$serveur_db][$GLOBALS['spip_sql_version']] = $GLOBALS['spip_'.$serveur_db.'_functions_'.$GLOBALS['spip_sql_version']]; |
|
| 131 | 131 | $GLOBALS['connexions'][$serveur_db] = $link; |
| 132 | 132 | define('_DECLARER_SERVEUR_DB', $serveur_db); |
| 133 | 133 | define('_DECLARER_ADRESSE_DB', $adresse_db); |
@@ -177,7 +177,7 @@ discard block |
||
| 177 | 177 | $f = preg_replace(',[^\w],', '', (string) $nom_connect); |
| 178 | 178 | if ($f !== $nom_connect) { |
| 179 | 179 | $erreurs['nom_connect'] = _T('erreur_nom_connect_incorrect'); |
| 180 | - } elseif (file_exists(_DIR_CONNECT . $nom_connect . '.php')) { |
|
| 180 | + } elseif (file_exists(_DIR_CONNECT.$nom_connect.'.php')) { |
|
| 181 | 181 | $erreurs['nom_connect'] = _T('erreur_connect_deja_existant'); |
| 182 | 182 | } else { |
| 183 | 183 | define('_DECLARER_NOM_CONNECT', $nom_connect); |
@@ -211,9 +211,9 @@ discard block |
||
| 211 | 211 | '' |
| 212 | 212 | ); |
| 213 | 213 | |
| 214 | - install_fichier_connexion(_DIR_CONNECT . _DECLARER_NOM_CONNECT . '.php', $conn); |
|
| 214 | + install_fichier_connexion(_DIR_CONNECT._DECLARER_NOM_CONNECT.'.php', $conn); |
|
| 215 | 215 | |
| 216 | 216 | return [ |
| 217 | - 'message_ok' => _T('install_connect_ok', ['connect' => '<strong>' . _DECLARER_NOM_CONNECT . '</strong>']) |
|
| 217 | + 'message_ok' => _T('install_connect_ok', ['connect' => '<strong>'._DECLARER_NOM_CONNECT.'</strong>']) |
|
| 218 | 218 | ]; |
| 219 | 219 | } |
@@ -173,7 +173,7 @@ discard block |
||
| 173 | 173 | unset($erreurs['new_login']); |
| 174 | 174 | } |
| 175 | 175 | |
| 176 | - $auth_methode = sql_getfetsel('source', 'spip_auteurs', 'id_auteur=' . (int) $id_auteur); |
|
| 176 | + $auth_methode = sql_getfetsel('source', 'spip_auteurs', 'id_auteur='.(int) $id_auteur); |
|
| 177 | 177 | $auth_methode = ($auth_methode ?: 'spip'); |
| 178 | 178 | include_spip('inc/auth'); |
| 179 | 179 | |
@@ -189,7 +189,7 @@ discard block |
||
| 189 | 189 | !autoriser('modifier', 'auteur', $id_auteur, null, ['email' => '?']) |
| 190 | 190 | && $GLOBALS['visiteur_session']['id_auteur'] == $id_auteur |
| 191 | 191 | && !strlen(trim((string) $email)) |
| 192 | - && $email != ($email_ancien = sql_getfetsel('email', 'spip_auteurs', 'id_auteur=' . (int) $id_auteur)) |
|
| 192 | + && $email != ($email_ancien = sql_getfetsel('email', 'spip_auteurs', 'id_auteur='.(int) $id_auteur)) |
|
| 193 | 193 | ) { |
| 194 | 194 | $erreurs['email'] = (($id_auteur == $GLOBALS['visiteur_session']['id_auteur']) ? _T('form_email_non_valide') : _T('form_prop_indiquer_email')); |
| 195 | 195 | } else { |
@@ -204,7 +204,7 @@ discard block |
||
| 204 | 204 | #Nouvel auteur |
| 205 | 205 | if ((int) $id_auteur == 0) { |
| 206 | 206 | #Un auteur existe deja avec cette adresse ? |
| 207 | - if (sql_countsel('spip_auteurs', 'email=' . sql_quote($email)) > 0) { |
|
| 207 | + if (sql_countsel('spip_auteurs', 'email='.sql_quote($email)) > 0) { |
|
| 208 | 208 | $erreurs['email'] = _T('erreur_email_deja_existant'); |
| 209 | 209 | } |
| 210 | 210 | } else { |
@@ -212,12 +212,12 @@ discard block |
||
| 212 | 212 | if ( |
| 213 | 213 | sql_countsel( |
| 214 | 214 | 'spip_auteurs', |
| 215 | - 'email=' . sql_quote($email) |
|
| 215 | + 'email='.sql_quote($email) |
|
| 216 | 216 | ) > 0 |
| 217 | 217 | && $id_auteur != ($id_auteur_ancien = sql_getfetsel( |
| 218 | 218 | 'id_auteur', |
| 219 | 219 | 'spip_auteurs', |
| 220 | - 'email=' . sql_quote($email) |
|
| 220 | + 'email='.sql_quote($email) |
|
| 221 | 221 | )) |
| 222 | 222 | ) { |
| 223 | 223 | $erreurs['email'] = _T('erreur_email_deja_existant'); |
@@ -238,7 +238,7 @@ discard block |
||
| 238 | 238 | && (!str_contains((string) $url, ':') |
| 239 | 239 | && strncasecmp((string) $url, 'www.', 4) === 0) |
| 240 | 240 | ) { |
| 241 | - $url = 'http://' . $url; |
|
| 241 | + $url = 'http://'.$url; |
|
| 242 | 242 | set_request('url_site', $url); |
| 243 | 243 | } |
| 244 | 244 | // traiter les liens implicites avant de tester l'url |
@@ -253,11 +253,11 @@ discard block |
||
| 253 | 253 | $erreurs['login'] = _T('info_non_modifiable'); |
| 254 | 254 | } |
| 255 | 255 | elseif ( |
| 256 | - ($login = _request('new_login')) && $login !== sql_getfetsel('login', 'spip_auteurs', 'id_auteur=' . (int) $id_auteur) |
|
| 256 | + ($login = _request('new_login')) && $login !== sql_getfetsel('login', 'spip_auteurs', 'id_auteur='.(int) $id_auteur) |
|
| 257 | 257 | ) { |
| 258 | 258 | // on verifie la meme chose que dans auteurs_edit_config() |
| 259 | 259 | if ( |
| 260 | - ! auth_autoriser_modifier_login($auth_methode) |
|
| 260 | + !auth_autoriser_modifier_login($auth_methode) |
|
| 261 | 261 | || !autoriser('modifier', 'auteur', (int) $id_auteur, null, ['login' => true]) |
| 262 | 262 | // legacy : ne pas risquer d'autoriser la modif login si fonction d'autorisation pas mise a jour et ne teste que l'option email |
| 263 | 263 | || !autoriser('modifier', 'auteur', (int) $id_auteur, null, ['email' => true]) |
@@ -384,7 +384,7 @@ discard block |
||
| 384 | 384 | // et de revenir sur son profil |
| 385 | 385 | if ( |
| 386 | 386 | $GLOBALS['visiteur_session']['id_auteur'] == $id_auteur |
| 387 | - && $email_nouveau != ($email_ancien = sql_getfetsel('email', 'spip_auteurs', 'id_auteur=' . (int) $id_auteur)) |
|
| 387 | + && $email_nouveau != ($email_ancien = sql_getfetsel('email', 'spip_auteurs', 'id_auteur='.(int) $id_auteur)) |
|
| 388 | 388 | ) { |
| 389 | 389 | $envoyer_mail = charger_fonction('envoyer_mail', 'inc'); |
| 390 | 390 | $texte = _T( |
@@ -423,12 +423,12 @@ discard block |
||
| 423 | 423 | if (isset($erreurs['message_ok'])) { |
| 424 | 424 | if (!isset($res['message_ok'])) { $res['message_ok'] = ''; |
| 425 | 425 | } |
| 426 | - $res['message_ok'] = trim($res['message_ok'] . ' ' . $erreurs['message_ok']); |
|
| 426 | + $res['message_ok'] = trim($res['message_ok'].' '.$erreurs['message_ok']); |
|
| 427 | 427 | } |
| 428 | 428 | if (isset($erreurs['message_erreur']) && $erreurs['message_erreur']) { |
| 429 | 429 | if (!isset($res['message_erreur'])) { $res['message_erreur'] = ''; |
| 430 | 430 | } |
| 431 | - $res['message_erreur'] = trim($res['message_erreur'] . ' ' . $erreurs['message_erreur']); |
|
| 431 | + $res['message_erreur'] = trim($res['message_erreur'].' '.$erreurs['message_erreur']); |
|
| 432 | 432 | } |
| 433 | 433 | } |
| 434 | 434 | |
@@ -455,7 +455,7 @@ discard block |
||
| 455 | 455 | |
| 456 | 456 | |
| 457 | 457 | function auteur_reset_password($id_auteur, $erreurs = []) { |
| 458 | - $auteur = sql_fetsel('*', 'spip_auteurs', 'id_auteur=' . (int) $id_auteur); |
|
| 458 | + $auteur = sql_fetsel('*', 'spip_auteurs', 'id_auteur='.(int) $id_auteur); |
|
| 459 | 459 | $config = auteurs_edit_config($auteur); |
| 460 | 460 | |
| 461 | 461 | if ($config['edit_pass']) { |
@@ -490,7 +490,7 @@ discard block |
||
| 490 | 490 | include_spip('action/editer_auteur'); |
| 491 | 491 | auteur_modifier($id_auteur, $set); |
| 492 | 492 | |
| 493 | - $row = sql_fetsel('*', 'spip_auteurs', 'id_auteur=' . (int) $id_auteur); |
|
| 493 | + $row = sql_fetsel('*', 'spip_auteurs', 'id_auteur='.(int) $id_auteur); |
|
| 494 | 494 | include_spip('inc/filtres'); |
| 495 | 495 | if ( |
| 496 | 496 | $notifier |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | # preparer un lien pour quand redirige_formulaire ne fonctionne pas |
| 144 | 144 | $m = redirige_formulaire($res['redirect']); |
| 145 | 145 | $valeurs['_deja_loge'] = inserer_attribut( |
| 146 | - '<a>' . _T('login_par_ici') . "</a>$m", |
|
| 146 | + '<a>'._T('login_par_ici')."</a>$m", |
|
| 147 | 147 | 'href', |
| 148 | 148 | $res['redirect'] |
| 149 | 149 | ); |
@@ -290,7 +290,7 @@ discard block |
||
| 290 | 290 | function login_autoriser() { |
| 291 | 291 | include_spip('inc/autoriser'); |
| 292 | 292 | if (!autoriser('ecrire')) { |
| 293 | - $h = generer_url_action('logout', 'logout=prive&url=' . urlencode((string) self())); |
|
| 293 | + $h = generer_url_action('logout', 'logout=prive&url='.urlencode((string) self())); |
|
| 294 | 294 | |
| 295 | 295 | return [ |
| 296 | 296 | 'message_erreur' => '<h1>' |
@@ -298,7 +298,7 @@ discard block |
||
| 298 | 298 | . '</h1><p>' |
| 299 | 299 | . _T('texte_erreur_visiteur') |
| 300 | 300 | . "</p><p class='retour'>[<a href='$h'>" |
| 301 | - . _T('icone_deconnecter') . '</a>]</p>' |
|
| 301 | + . _T('icone_deconnecter').'</a>]</p>' |
|
| 302 | 302 | ]; |
| 303 | 303 | } |
| 304 | 304 | |
@@ -350,7 +350,7 @@ discard block |
||
| 350 | 350 | // transformer la cible absolue en cible relative |
| 351 | 351 | // pour pas echouer quand la meta adresse_site est foireuse |
| 352 | 352 | if (strncmp((string) $cible, (string) ($u = url_de_base()), strlen((string) $u)) == 0) { |
| 353 | - $cible = './' . substr((string) $cible, strlen((string) $u)); |
|
| 353 | + $cible = './'.substr((string) $cible, strlen((string) $u)); |
|
| 354 | 354 | } elseif (tester_url_absolue($cible) && !defined('_AUTORISER_LOGIN_ABS_REDIRECT')) { |
| 355 | 355 | // si c'est une url absolue, refuser la redirection |
| 356 | 356 | // sauf si cette securite est levee volontairement par le webmestre |
@@ -362,7 +362,7 @@ discard block |
||
| 362 | 362 | if ($cible && $cible != self('&') && $cible != self()) { |
| 363 | 363 | $res['redirect'] = $cible; |
| 364 | 364 | $res['message_ok'] = inserer_attribut( |
| 365 | - '<a>' . _T('login_par_ici') . '</a>', |
|
| 365 | + '<a>'._T('login_par_ici').'</a>', |
|
| 366 | 366 | 'href', |
| 367 | 367 | $cible |
| 368 | 368 | ); |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | } |
| 16 | 16 | } |
| 17 | 17 | krsort($items); |
| 18 | - $texte = str_replace($placeholder, implode("\n\t", $items) . "\n", (string) $texte); |
|
| 18 | + $texte = str_replace($placeholder, implode("\n\t", $items)."\n", (string) $texte); |
|
| 19 | 19 | } |
| 20 | 20 | |
| 21 | 21 | return $texte; |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | $test_dir .= '/'; |
| 77 | 77 | } |
| 78 | 78 | if (!in_array($test_dir, $GLOBALS['test_dirs'])) { |
| 79 | - $GLOBALS['test_dirs'][] = _DIR_RACINE . $test_dir; |
|
| 79 | + $GLOBALS['test_dirs'][] = _DIR_RACINE.$test_dir; |
|
| 80 | 80 | } |
| 81 | 81 | } else { |
| 82 | 82 | if (!_FILE_CONNECT) { |
@@ -91,11 +91,11 @@ discard block |
||
| 91 | 91 | foreach ($GLOBALS['test_dirs'] as $i => $my_dir) { |
| 92 | 92 | $test = test_ecrire($my_dir); |
| 93 | 93 | if (!$test) { |
| 94 | - $m = preg_replace(',^' . _DIR_RACINE . ',', '', (string) $my_dir); |
|
| 94 | + $m = preg_replace(',^'._DIR_RACINE.',', '', (string) $my_dir); |
|
| 95 | 95 | if (@file_exists($my_dir)) { |
| 96 | - $bad_dirs['<li>' . $m . '</li>'] = 1; |
|
| 96 | + $bad_dirs['<li>'.$m.'</li>'] = 1; |
|
| 97 | 97 | } else { |
| 98 | - $absent_dirs['<li>' . $m . '</li>'] = 1; |
|
| 98 | + $absent_dirs['<li>'.$m.'</li>'] = 1; |
|
| 99 | 99 | } |
| 100 | 100 | } else { |
| 101 | 101 | $chmod = max($chmod, $test); |
@@ -105,21 +105,21 @@ discard block |
||
| 105 | 105 | if ($bad_dirs || $absent_dirs) { |
| 106 | 106 | if (!_FILE_CONNECT) { |
| 107 | 107 | $titre = _T('dirs_preliminaire'); |
| 108 | - $continuer = ' ' . _T('dirs_commencer') . '.'; |
|
| 108 | + $continuer = ' '._T('dirs_commencer').'.'; |
|
| 109 | 109 | } else { |
| 110 | 110 | $titre = _T('dirs_probleme_droits'); |
| 111 | 111 | } |
| 112 | 112 | |
| 113 | 113 | |
| 114 | - $res = "<div align='right'>" . menu_langues('var_lang_ecrire') . "</div>\n"; |
|
| 114 | + $res = "<div align='right'>".menu_langues('var_lang_ecrire')."</div>\n"; |
|
| 115 | 115 | |
| 116 | 116 | if ($bad_dirs) { |
| 117 | 117 | $res .= |
| 118 | 118 | _T( |
| 119 | 119 | 'dirs_repertoires_suivants', |
| 120 | 120 | ['bad_dirs' => implode("\n", array_keys($bad_dirs))] |
| 121 | - ) . |
|
| 122 | - '<b>' . _T('login_recharger') . '</b>.'; |
|
| 121 | + ). |
|
| 122 | + '<b>'._T('login_recharger').'</b>.'; |
|
| 123 | 123 | } |
| 124 | 124 | |
| 125 | 125 | if ($absent_dirs) { |
@@ -127,22 +127,21 @@ discard block |
||
| 127 | 127 | _T( |
| 128 | 128 | 'dirs_repertoires_absents', |
| 129 | 129 | ['bad_dirs' => implode("\n", array_keys($absent_dirs))] |
| 130 | - ) . |
|
| 131 | - '<b>' . _T('login_recharger') . '</b>.'; |
|
| 130 | + ). |
|
| 131 | + '<b>'._T('login_recharger').'</b>.'; |
|
| 132 | 132 | } |
| 133 | - $res = '<p>' . $continuer . $res . aider('install0', true) . '</p>'; |
|
| 133 | + $res = '<p>'.$continuer.$res.aider('install0', true).'</p>'; |
|
| 134 | 134 | |
| 135 | 135 | $t = _T('login_recharger'); |
| 136 | - $t = ($test_dir ? "<input type='hidden' name='test_dir' value='" . spip_htmlspecialchars($test_dir, ENT_QUOTES) . "' />" : |
|
| 137 | - '') |
|
| 136 | + $t = ($test_dir ? "<input type='hidden' name='test_dir' value='".spip_htmlspecialchars($test_dir, ENT_QUOTES)."' />" : '') |
|
| 138 | 137 | . "<input type='hidden' name='etape' value='chmod' />" |
| 139 | - . "<div style='text-align: right'><input type='submit' value='" . attribut_html($t) . "' /></div>"; |
|
| 138 | + . "<div style='text-align: right'><input type='submit' value='".attribut_html($t)."' /></div>"; |
|
| 140 | 139 | |
| 141 | - echo minipres($titre, $res . generer_form_ecrire('install', $t)); |
|
| 140 | + echo minipres($titre, $res.generer_form_ecrire('install', $t)); |
|
| 142 | 141 | } else { |
| 143 | 142 | $deja = (_FILE_CONNECT && analyse_fichier_connection(_FILE_CONNECT)); |
| 144 | 143 | if (!$deja) { |
| 145 | - redirige_url_ecrire('install', 'etape=1&chmod=' . $chmod); |
|
| 144 | + redirige_url_ecrire('install', 'etape=1&chmod='.$chmod); |
|
| 146 | 145 | } else { |
| 147 | 146 | redirige_url_ecrire(); |
| 148 | 147 | } |
@@ -51,29 +51,28 @@ discard block |
||
| 51 | 51 | $conn = "\$GLOBALS['ldap_base'] = '$base_ldap';\n" |
| 52 | 52 | . "\$GLOBALS['ldap_link'] = @ldap_connect('$adresse_ldap','$port_ldap');\n" |
| 53 | 53 | . "@ldap_set_option(\$GLOBALS['ldap_link'],LDAP_OPT_PROTOCOL_VERSION,'$protocole_ldap');\n" |
| 54 | - . (($tls_ldap != 'oui') ? '' : |
|
| 55 | - "@ldap_start_tls(\$GLOBALS['ldap_link']);\n") |
|
| 54 | + . (($tls_ldap != 'oui') ? '' : "@ldap_start_tls(\$GLOBALS['ldap_link']);\n") |
|
| 56 | 55 | . "@ldap_bind(\$GLOBALS['ldap_link'],'$login_ldap','$pass_ldap');\n"; |
| 57 | 56 | |
| 58 | 57 | $champs = is_array($GLOBALS['ldap_attributes']) ? $GLOBALS['ldap_attributes'] : []; |
| 59 | 58 | $res = ''; |
| 60 | 59 | foreach (array_keys($champs) as $champ) { |
| 61 | - $nom = 'ldap_' . $champ; |
|
| 60 | + $nom = 'ldap_'.$champ; |
|
| 62 | 61 | $val = trim((string) _request($nom)); |
| 63 | 62 | if (preg_match('/^\w*$/', $val)) { |
| 64 | 63 | if ($val) { |
| 65 | 64 | $val = _q($val); |
| 66 | 65 | } |
| 67 | 66 | } else { |
| 68 | - $val = 'array(' . _q(preg_split('/\W+/', $val)) . ')'; |
|
| 67 | + $val = 'array('._q(preg_split('/\W+/', $val)).')'; |
|
| 69 | 68 | }; |
| 70 | 69 | if ($val) { |
| 71 | - $res .= "'$champ' => " . $val . ','; |
|
| 70 | + $res .= "'$champ' => ".$val.','; |
|
| 72 | 71 | } |
| 73 | 72 | } |
| 74 | 73 | $conn .= "\$GLOBALS['ldap_champs'] = array($res);\n"; |
| 75 | 74 | |
| 76 | - install_fichier_connexion(_DIR_CONNECT . _FILE_LDAP, $conn); |
|
| 75 | + install_fichier_connexion(_DIR_CONNECT._FILE_LDAP, $conn); |
|
| 77 | 76 | } |
| 78 | 77 | |
| 79 | 78 | function etape_ldap5_suite() { |
@@ -86,7 +85,7 @@ discard block |
||
| 86 | 85 | ); |
| 87 | 86 | |
| 88 | 87 | echo generer_form_ecrire('install', ( |
| 89 | - "<input type='hidden' name='etape' value='3' />" . |
|
| 88 | + "<input type='hidden' name='etape' value='3' />". |
|
| 90 | 89 | "<input type='hidden' name='ldap_present' value='true' />" |
| 91 | 90 | . bouton_suivant())); |
| 92 | 91 | |