@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | $champs['source'] = $source ? $source : 'spip'; |
| 96 | 96 | |
| 97 | 97 | $champs['login'] = ''; |
| 98 | - $champs['statut'] = '5poubelle'; // inutilisable tant qu'il n'a pas ete renseigne et institue |
|
| 98 | + $champs['statut'] = '5poubelle'; // inutilisable tant qu'il n'a pas ete renseigne et institue |
|
| 99 | 99 | $champs['webmestre'] = 'non'; |
| 100 | 100 | |
| 101 | 101 | if ($set) { |
@@ -321,7 +321,7 @@ discard block |
||
| 321 | 321 | $champs['pass'] = $c['pass']; |
| 322 | 322 | } |
| 323 | 323 | |
| 324 | - $statut = $statut_ancien = sql_getfetsel('statut', 'spip_auteurs', 'id_auteur=' . intval($id_auteur)); |
|
| 324 | + $statut = $statut_ancien = sql_getfetsel('statut', 'spip_auteurs', 'id_auteur='.intval($id_auteur)); |
|
| 325 | 325 | |
| 326 | 326 | if (isset($c['statut']) |
| 327 | 327 | and (autoriser('modifier', 'auteur', $id_auteur, null, array('statut' => $c['statut']))) |
@@ -377,7 +377,7 @@ discard block |
||
| 377 | 377 | // commencer par traiter les cas particuliers des logins et pass |
| 378 | 378 | // avant les autres ecritures en base |
| 379 | 379 | if (isset($champs['login']) or isset($champs['pass'])) { |
| 380 | - $auth_methode = sql_getfetsel('source', 'spip_auteurs', 'id_auteur=' . intval($id_auteur)); |
|
| 380 | + $auth_methode = sql_getfetsel('source', 'spip_auteurs', 'id_auteur='.intval($id_auteur)); |
|
| 381 | 381 | include_spip('inc/auth'); |
| 382 | 382 | if (isset($champs['login']) and strlen($champs['login'])) { |
| 383 | 383 | if (!auth_modifier_login($auth_methode, $champs['login'], $id_auteur)) { |
@@ -385,7 +385,7 @@ discard block |
||
| 385 | 385 | } |
| 386 | 386 | } |
| 387 | 387 | if (isset($champs['pass']) and strlen($champs['pass'])) { |
| 388 | - $champs['login'] = sql_getfetsel('login', 'spip_auteurs', 'id_auteur=' . intval($id_auteur)); |
|
| 388 | + $champs['login'] = sql_getfetsel('login', 'spip_auteurs', 'id_auteur='.intval($id_auteur)); |
|
| 389 | 389 | if (!auth_modifier_pass($auth_methode, $champs['login'], $champs['pass'], $id_auteur)) { |
| 390 | 390 | $erreurs[] = 'ecrire:impossible_modifier_pass_auteur'; |
| 391 | 391 | } |
@@ -398,7 +398,7 @@ discard block |
||
| 398 | 398 | if (!count($champs)) { |
| 399 | 399 | return implode(' ', array_map('_T', $erreurs)); |
| 400 | 400 | } |
| 401 | - sql_updateq('spip_auteurs', $champs, 'id_auteur=' . $id_auteur); |
|
| 401 | + sql_updateq('spip_auteurs', $champs, 'id_auteur='.$id_auteur); |
|
| 402 | 402 | |
| 403 | 403 | // .. mettre a jour les fichiers .htpasswd et .htpasswd-admin |
| 404 | 404 | if ($flag_ecrire_acces |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | $type = type_du_logo($primary); |
| 64 | 64 | |
| 65 | 65 | // nom du logo |
| 66 | - $nom = $type . $etat . $id_objet; |
|
| 66 | + $nom = $type.$etat.$id_objet; |
|
| 67 | 67 | |
| 68 | 68 | // supprimer le logo eventueel existant |
| 69 | 69 | logo_supprimer($objet, $id_objet, $etat); |
@@ -78,14 +78,14 @@ discard block |
||
| 78 | 78 | return $erreur; |
| 79 | 79 | } |
| 80 | 80 | |
| 81 | - $file_tmp = _DIR_LOGOS . $nom . '.tmp'; |
|
| 81 | + $file_tmp = _DIR_LOGOS.$nom.'.tmp'; |
|
| 82 | 82 | |
| 83 | 83 | $ok = false; |
| 84 | 84 | // fichier dans upload/ |
| 85 | 85 | if (is_string($source)) { |
| 86 | 86 | if (file_exists($source)) { |
| 87 | 87 | $ok = @copy($source, $file_tmp); |
| 88 | - } elseif (file_exists($f = determine_upload() . $source)) { |
|
| 88 | + } elseif (file_exists($f = determine_upload().$source)) { |
|
| 89 | 89 | $ok = @copy($f, $file_tmp); |
| 90 | 90 | } |
| 91 | 91 | } elseif (!$erreur = check_upload_error($source['error'], '', true)) { |
@@ -107,8 +107,8 @@ discard block |
||
| 107 | 107 | $size = @getimagesize($file_tmp); |
| 108 | 108 | $extension = !$size ? '' : ($size[2] > 3 ? '' : $GLOBALS['formats_logos'][$size[2] - 1]); |
| 109 | 109 | if ($extension) { |
| 110 | - @rename($file_tmp, $file_tmp . ".$extension"); |
|
| 111 | - $file_tmp = $file_tmp . ".$extension"; |
|
| 110 | + @rename($file_tmp, $file_tmp.".$extension"); |
|
| 111 | + $file_tmp = $file_tmp.".$extension"; |
|
| 112 | 112 | $poids = filesize($file_tmp); |
| 113 | 113 | |
| 114 | 114 | if (defined('_LOGO_MAX_WIDTH') or defined('_LOGO_MAX_HEIGHT')) { |
@@ -173,7 +173,7 @@ discard block |
||
| 173 | 173 | } |
| 174 | 174 | |
| 175 | 175 | if (!$erreur) { |
| 176 | - @rename($file_tmp, _DIR_LOGOS . $nom . ".$extension"); |
|
| 176 | + @rename($file_tmp, _DIR_LOGOS.$nom.".$extension"); |
|
| 177 | 177 | } |
| 178 | 178 | } else { |
| 179 | 179 | spip_unlink($file_tmp); |
@@ -32,11 +32,11 @@ discard block |
||
| 32 | 32 | // recuperer les plugins dans l'ordre des $_POST |
| 33 | 33 | $test = array(); |
| 34 | 34 | foreach (liste_plugin_files() as $file) { |
| 35 | - $test['s' . substr(md5(_DIR_PLUGINS . $file), 0, 16)] = $file; |
|
| 35 | + $test['s'.substr(md5(_DIR_PLUGINS.$file), 0, 16)] = $file; |
|
| 36 | 36 | } |
| 37 | 37 | if (defined('_DIR_PLUGINS_SUPPL')) { |
| 38 | 38 | foreach (liste_plugin_files(_DIR_PLUGINS_SUPPL) as $file) { |
| 39 | - $test['s' . substr(md5(_DIR_PLUGINS_SUPPL . $file), 0, 16)] = $file; |
|
| 39 | + $test['s'.substr(md5(_DIR_PLUGINS_SUPPL.$file), 0, 16)] = $file; |
|
| 40 | 40 | } |
| 41 | 41 | } |
| 42 | 42 | |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | } |
| 49 | 49 | } |
| 50 | 50 | |
| 51 | - spip_log("Changement des plugins actifs par l'auteur " . $GLOBALS['visiteur_session']['id_auteur'] . ": " . join(',', |
|
| 51 | + spip_log("Changement des plugins actifs par l'auteur ".$GLOBALS['visiteur_session']['id_auteur'].": ".join(',', |
|
| 52 | 52 | $plugin)); |
| 53 | 53 | ecrire_plugin_actifs($plugin); |
| 54 | 54 | |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | if ($err = objet_modifier_champs('rubrique', $id_rubrique, |
| 143 | 143 | array( |
| 144 | 144 | 'data' => $set, |
| 145 | - 'nonvide' => array('titre' => _T('titre_nouvelle_rubrique') . " " . _T('info_numero_abbreviation') . $id_rubrique) |
|
| 145 | + 'nonvide' => array('titre' => _T('titre_nouvelle_rubrique')." "._T('info_numero_abbreviation').$id_rubrique) |
|
| 146 | 146 | ), |
| 147 | 147 | $c) |
| 148 | 148 | ) { |
@@ -240,7 +240,7 @@ discard block |
||
| 240 | 240 | ) |
| 241 | 241 | ) { |
| 242 | 242 | if ($s['statut'] != 'new') { |
| 243 | - spip_log("deplacement de $id_rubrique vers $id_parent refuse a " . $GLOBALS['visiteur_session']['id_auteur'] . ' ' . $GLOBALS['visiteur_session']['statut']); |
|
| 243 | + spip_log("deplacement de $id_rubrique vers $id_parent refuse a ".$GLOBALS['visiteur_session']['id_auteur'].' '.$GLOBALS['visiteur_session']['statut']); |
|
| 244 | 244 | } |
| 245 | 245 | } elseif (editer_rubrique_breves($id_rubrique, $id_parent, $c)) { |
| 246 | 246 | $statut_ancien = $s['statut']; |
@@ -75,8 +75,8 @@ discard block |
||
| 75 | 75 | * @return mixed|string |
| 76 | 76 | */ |
| 77 | 77 | function objet_modifier($objet, $id, $set = null) { |
| 78 | - if (include_spip('action/editer_' . $objet) |
|
| 79 | - and function_exists($modifier = $objet . "_modifier") |
|
| 78 | + if (include_spip('action/editer_'.$objet) |
|
| 79 | + and function_exists($modifier = $objet."_modifier") |
|
| 80 | 80 | ) { |
| 81 | 81 | return $modifier($id, $set); |
| 82 | 82 | } |
@@ -159,8 +159,8 @@ discard block |
||
| 159 | 159 | * @return bool|int |
| 160 | 160 | */ |
| 161 | 161 | function objet_inserer($objet, $id_parent = null, $set = null) { |
| 162 | - if (include_spip('action/editer_' . $objet) |
|
| 163 | - and function_exists($inserer = $objet . "_inserer") |
|
| 162 | + if (include_spip('action/editer_'.$objet) |
|
| 163 | + and function_exists($inserer = $objet."_inserer") |
|
| 164 | 164 | ) { |
| 165 | 165 | return $inserer($id_parent, $set); |
| 166 | 166 | } |
@@ -181,7 +181,7 @@ discard block |
||
| 181 | 181 | $row = sql_fetsel("id_rubrique, id_secteur, lang", "spip_rubriques", "id_parent=0", '', '0+titre,titre', "1"); |
| 182 | 182 | $id_rubrique = $row['id_rubrique']; |
| 183 | 183 | } else { |
| 184 | - $row = sql_fetsel("lang, id_secteur", "spip_rubriques", "id_rubrique=" . intval($id_rubrique)); |
|
| 184 | + $row = sql_fetsel("lang, id_secteur", "spip_rubriques", "id_rubrique=".intval($id_rubrique)); |
|
| 185 | 185 | } |
| 186 | 186 | |
| 187 | 187 | $champs['id_rubrique'] = $id_rubrique; |
@@ -287,8 +287,8 @@ discard block |
||
| 287 | 287 | * @return string |
| 288 | 288 | */ |
| 289 | 289 | function objet_instituer($objet, $id, $c, $calcul_rub = true) { |
| 290 | - if (include_spip('action/editer_' . $objet) |
|
| 291 | - and function_exists($instituer = $objet . "_instituer") |
|
| 290 | + if (include_spip('action/editer_'.$objet) |
|
| 291 | + and function_exists($instituer = $objet."_instituer") |
|
| 292 | 292 | ) { |
| 293 | 293 | return $instituer($id, $c, $calcul_rub); |
| 294 | 294 | } |
@@ -317,7 +317,7 @@ discard block |
||
| 317 | 317 | $sel[] = ($champ_date ? "$champ_date as date" : "'' as date"); |
| 318 | 318 | $sel[] = (isset($desc['field']['id_rubrique']) ? 'id_rubrique' : "0 as id_rubrique"); |
| 319 | 319 | |
| 320 | - $row = sql_fetsel($sel, $table_sql, id_table_objet($objet) . '=' . intval($id)); |
|
| 320 | + $row = sql_fetsel($sel, $table_sql, id_table_objet($objet).'='.intval($id)); |
|
| 321 | 321 | |
| 322 | 322 | $id_rubrique = $row['id_rubrique']; |
| 323 | 323 | $statut_ancien = $statut = $row['statut']; |
@@ -339,7 +339,7 @@ discard block |
||
| 339 | 339 | if ($s != 'publie' and autoriser('modifier', $objet, $id)) { |
| 340 | 340 | $statut = $champs['statut'] = $s; |
| 341 | 341 | } else { |
| 342 | - spip_log("editer_objet $id refus " . join(' ', $c)); |
|
| 342 | + spip_log("editer_objet $id refus ".join(' ', $c)); |
|
| 343 | 343 | } |
| 344 | 344 | } |
| 345 | 345 | |
@@ -367,7 +367,7 @@ discard block |
||
| 367 | 367 | and isset($c['id_parent']) |
| 368 | 368 | and $id_parent = $c['id_parent'] |
| 369 | 369 | and $id_parent != $id_rubrique |
| 370 | - and (sql_fetsel('1', "spip_rubriques", "id_rubrique=" . intval($id_parent))) |
|
| 370 | + and (sql_fetsel('1', "spip_rubriques", "id_rubrique=".intval($id_parent))) |
|
| 371 | 371 | ) { |
| 372 | 372 | $champs['id_rubrique'] = $id_parent; |
| 373 | 373 | |
@@ -462,7 +462,7 @@ discard block |
||
| 462 | 462 | // changer aussi son secteur et sa langue (si heritee) |
| 463 | 463 | if (isset($champs['id_rubrique'])) { |
| 464 | 464 | |
| 465 | - $row_rub = sql_fetsel("id_secteur, lang", "spip_rubriques", "id_rubrique=" . sql_quote($champs['id_rubrique'])); |
|
| 465 | + $row_rub = sql_fetsel("id_secteur, lang", "spip_rubriques", "id_rubrique=".sql_quote($champs['id_rubrique'])); |
|
| 466 | 466 | $langue = $row_rub['lang']; |
| 467 | 467 | |
| 468 | 468 | if (isset($desc['field']['id_secteur'])) { |
@@ -471,7 +471,7 @@ discard block |
||
| 471 | 471 | |
| 472 | 472 | if (isset($desc['field']['lang']) and isset($desc['field']['langue_choisie'])) { |
| 473 | 473 | if (sql_fetsel('1', $table_sql, |
| 474 | - id_table_objet($objet) . "=" . intval($id) . " AND langue_choisie<>'oui' AND lang<>" . sql_quote($langue))) { |
|
| 474 | + id_table_objet($objet)."=".intval($id)." AND langue_choisie<>'oui' AND lang<>".sql_quote($langue))) { |
|
| 475 | 475 | $champs['lang'] = $langue; |
| 476 | 476 | } |
| 477 | 477 | } |
@@ -480,7 +480,7 @@ discard block |
||
| 480 | 480 | if (!$champs) { |
| 481 | 481 | return; |
| 482 | 482 | } |
| 483 | - sql_updateq($table_sql, $champs, id_table_objet($objet) . '=' . intval($id)); |
|
| 483 | + sql_updateq($table_sql, $champs, id_table_objet($objet).'='.intval($id)); |
|
| 484 | 484 | |
| 485 | 485 | // Changer le statut des rubriques concernees |
| 486 | 486 | if ($cond) { |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | if ($change_session == 'oui') { |
| 60 | 60 | $session = charger_fonction('session', 'inc'); |
| 61 | 61 | $session(true); |
| 62 | - spip_log("statut 204 pour " . $_SERVER['REQUEST_URI']); |
|
| 62 | + spip_log("statut 204 pour ".$_SERVER['REQUEST_URI']); |
|
| 63 | 63 | http_status(204); // No Content |
| 64 | 64 | return; |
| 65 | 65 | } |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | ask_php_auth(_T('info_connexion_refusee'), |
| 78 | 78 | _T('login_login_pass_incorrect'), |
| 79 | 79 | _T('login_retour_site'), |
| 80 | - "url=" . rawurlencode($redirect), |
|
| 80 | + "url=".rawurlencode($redirect), |
|
| 81 | 81 | _T('login_nouvelle_tentative'), |
| 82 | 82 | (strpos($url, _DIR_RESTREINT_ABS) !== false)); |
| 83 | 83 | } |
@@ -42,8 +42,8 @@ |
||
| 42 | 42 | isset($parts['port']) ? $parts['port'] : 80, |
| 43 | 43 | $errno, $errstr, 30); |
| 44 | 44 | if ($fp) { |
| 45 | - $out = "GET " . $parts['path'] . "?" . $parts['query'] . " HTTP/1.1\r\n"; |
|
| 46 | - $out .= "Host: " . $parts['host'] . "\r\n"; |
|
| 45 | + $out = "GET ".$parts['path']."?".$parts['query']." HTTP/1.1\r\n"; |
|
| 46 | + $out .= "Host: ".$parts['host']."\r\n"; |
|
| 47 | 47 | $out .= "Connection: Close\r\n\r\n"; |
| 48 | 48 | fwrite($fp, $out); |
| 49 | 49 | fclose($fp); |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | // verifier avant de rediriger pour invalider le message de confirmation |
| 40 | 40 | // si ca n'a pas marche |
| 41 | 41 | if ($redirect = _request('redirect') and !$arg == sql_getfetsel('email', 'spip_auteurs', |
| 42 | - 'id_auteur=' . intval($GLOBALS['visiteur_session'])) |
|
| 42 | + 'id_auteur='.intval($GLOBALS['visiteur_session'])) |
|
| 43 | 43 | ) { |
| 44 | 44 | $GLOBALS['redirect'] = parametre_url($redirect, 'email_modif', ''); |
| 45 | 45 | } |
@@ -55,7 +55,7 @@ |
||
| 55 | 55 | if (autoriser('ecrire', '', '', $auteur['id_auteur'])) { |
| 56 | 56 | // poser un cookie admin aussi |
| 57 | 57 | $cookie = charger_fonction('cookie', 'action'); |
| 58 | - $cookie("@" . $GLOBALS['visiteur_session']['login']); |
|
| 58 | + $cookie("@".$GLOBALS['visiteur_session']['login']); |
|
| 59 | 59 | $GLOBALS['redirect'] = _DIR_RESTREINT_ABS; |
| 60 | 60 | } else { |
| 61 | 61 | $GLOBALS['redirect'] = $GLOBALS['meta']['adresse_site']; |