@@ -333,7 +333,7 @@ discard block |
||
| 333 | 333 | * @return string |
| 334 | 334 | */ |
| 335 | 335 | function _sqlite_func_preg_replace($quoi, $cherche, $remplace) { |
| 336 | - $return = preg_replace('%' . $cherche . '%', $remplace, $quoi); |
|
| 336 | + $return = preg_replace('%'.$cherche.'%', $remplace, $quoi); |
|
| 337 | 337 | |
| 338 | 338 | #spip_log("preg_replace : $quoi, $cherche, $remplace, $return",'sqlite.'._LOG_DEBUG); |
| 339 | 339 | return $return; |
@@ -409,7 +409,7 @@ discard block |
||
| 409 | 409 | // il faut enlever un niveau d'echappement pour être homogène à mysql |
| 410 | 410 | $cherche = str_replace('\\\\', '\\', $cherche); |
| 411 | 411 | $u = isset($GLOBALS['meta']['pcre_u']) ? $GLOBALS['meta']['pcre_u'] : 'u'; |
| 412 | - $return = preg_match('%' . $cherche . '%imsS' . $u, $quoi); |
|
| 412 | + $return = preg_match('%'.$cherche.'%imsS'.$u, $quoi); |
|
| 413 | 413 | |
| 414 | 414 | #spip_log("regexp_replace : $quoi, $cherche, $remplace, $return",'sqlite.'._LOG_DEBUG); |
| 415 | 415 | return $return; |
@@ -461,7 +461,7 @@ discard block |
||
| 461 | 461 | $count = 0; |
| 462 | 462 | str_replace($mysql_to_strftime_not_ok, '', $conv, $count); |
| 463 | 463 | if ($count > 0) { |
| 464 | - spip_log("DATE_FORMAT : At least one parameter can't be parsed by strftime with format '$conv'", 'sqlite.' . _LOG_ERREUR); |
|
| 464 | + spip_log("DATE_FORMAT : At least one parameter can't be parsed by strftime with format '$conv'", 'sqlite.'._LOG_ERREUR); |
|
| 465 | 465 | } |
| 466 | 466 | $to_strftime[$conv] = str_replace(array_keys($mysql_to_strftime), $mysql_to_strftime, $conv); |
| 467 | 467 | } |
@@ -480,7 +480,7 @@ discard block |
||
| 480 | 480 | */ |
| 481 | 481 | function _sqlite_func_to_days($d) { |
| 482 | 482 | static $offset = 719528; // nb de jour entre 0000-00-00 et timestamp 0=1970-01-01 |
| 483 | - $result = $offset + (int)ceil(_sqlite_func_unix_timestamp($d) / (24 * 3600)); |
|
| 483 | + $result = $offset + (int) ceil(_sqlite_func_unix_timestamp($d) / (24 * 3600)); |
|
| 484 | 484 | |
| 485 | 485 | #spip_log("Passage avec TO_DAYS : $d, $result",'sqlite.'._LOG_DEBUG); |
| 486 | 486 | return $result; |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | function generer_nom_fichier_cache($contexte, $page) { |
| 30 | 30 | $u = md5(var_export([$contexte, $page], true)); |
| 31 | 31 | |
| 32 | - return $u . '.cache'; |
|
| 32 | + return $u.'.cache'; |
|
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | /** |
@@ -61,10 +61,10 @@ discard block |
||
| 61 | 61 | } |
| 62 | 62 | else { |
| 63 | 63 | // en lecture on essaye pas de creer les repertoires, on va au plus vite |
| 64 | - $rep = _DIR_CACHE . "calcul/$d/"; |
|
| 64 | + $rep = _DIR_CACHE."calcul/$d/"; |
|
| 65 | 65 | } |
| 66 | 66 | |
| 67 | - return $rep . $u . '.cache'; |
|
| 67 | + return $rep.$u.'.cache'; |
|
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | /** |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | ); |
| 116 | 116 | } |
| 117 | 117 | |
| 118 | - return crc32($GLOBALS['meta']['cache_signature'] . $page['texte']); |
|
| 118 | + return crc32($GLOBALS['meta']['cache_signature'].$page['texte']); |
|
| 119 | 119 | } |
| 120 | 120 | |
| 121 | 121 | /** |
@@ -271,7 +271,7 @@ discard block |
||
| 271 | 271 | // "cache sessionne" ; sa date indique la date de validite |
| 272 | 272 | // des caches sessionnes |
| 273 | 273 | if (!$tmp = lire_cache($chemin_cache)) { |
| 274 | - spip_log('Creation cache sessionne ' . $chemin_cache); |
|
| 274 | + spip_log('Creation cache sessionne '.$chemin_cache); |
|
| 275 | 275 | $tmp = [ |
| 276 | 276 | 'invalideurs' => ['session' => ''], |
| 277 | 277 | 'lastmodified' => $_SERVER['REQUEST_TIME'] |
@@ -297,8 +297,8 @@ discard block |
||
| 297 | 297 | // l'enregistrer, compresse ou non... |
| 298 | 298 | $ok = ecrire_cache($chemin_cache, $pagez); |
| 299 | 299 | |
| 300 | - spip_log((_IS_BOT ? 'Bot:' : '') . "Creation du cache $chemin_cache pour " |
|
| 301 | - . $page['entetes']['X-Spip-Cache'] . ' secondes' . ($ok ? '' : ' (erreur!)'), _LOG_INFO); |
|
| 300 | + spip_log((_IS_BOT ? 'Bot:' : '')."Creation du cache $chemin_cache pour " |
|
| 301 | + . $page['entetes']['X-Spip-Cache'].' secondes'.($ok ? '' : ' (erreur!)'), _LOG_INFO); |
|
| 302 | 302 | |
| 303 | 303 | // Inserer ses invalideurs |
| 304 | 304 | include_spip('inc/invalideur'); |
@@ -319,7 +319,7 @@ discard block |
||
| 319 | 319 | function nettoyer_petit_cache($prefix, $duree = 300) { |
| 320 | 320 | // determiner le repertoire a purger : 'tmp/CACHE/rech/' |
| 321 | 321 | $dircache = sous_repertoire(_DIR_CACHE, $prefix); |
| 322 | - if (spip_touch($dircache . 'purger_' . $prefix, $duree, true)) { |
|
| 322 | + if (spip_touch($dircache.'purger_'.$prefix, $duree, true)) { |
|
| 323 | 323 | foreach (preg_files($dircache, '[.]txt$') as $f) { |
| 324 | 324 | if ($_SERVER['REQUEST_TIME'] - (@file_exists($f) ? @filemtime($f) : 0) > $duree) { |
| 325 | 325 | spip_unlink($f); |
@@ -414,9 +414,9 @@ discard block |
||
| 414 | 414 | if (spip_connect()) { |
| 415 | 415 | include_spip('inc/invalideur'); |
| 416 | 416 | retire_caches($chemin_cache); # API invalideur inutile |
| 417 | - supprimer_fichier(_DIR_CACHE . $chemin_cache); |
|
| 417 | + supprimer_fichier(_DIR_CACHE.$chemin_cache); |
|
| 418 | 418 | if (isset($chemin_cache_session) and $chemin_cache_session) { |
| 419 | - supprimer_fichier(_DIR_CACHE . $chemin_cache_session); |
|
| 419 | + supprimer_fichier(_DIR_CACHE.$chemin_cache_session); |
|
| 420 | 420 | } |
| 421 | 421 | } |
| 422 | 422 | } |
@@ -433,9 +433,9 @@ discard block |
||
| 433 | 433 | $page = ['contexte_implicite' => $contexte_implicite]; // ignorer le cache deja lu |
| 434 | 434 | include_spip('inc/invalideur'); |
| 435 | 435 | retire_caches($chemin_cache); # API invalideur inutile |
| 436 | - supprimer_fichier(_DIR_CACHE . $chemin_cache); |
|
| 436 | + supprimer_fichier(_DIR_CACHE.$chemin_cache); |
|
| 437 | 437 | if (isset($chemin_cache_session) and $chemin_cache_session) { |
| 438 | - supprimer_fichier(_DIR_CACHE . $chemin_cache_session); |
|
| 438 | + supprimer_fichier(_DIR_CACHE.$chemin_cache_session); |
|
| 439 | 439 | } |
| 440 | 440 | } |
| 441 | 441 | |
@@ -312,7 +312,7 @@ |
||
| 312 | 312 | foreach ($erreurs as $k => $v) { |
| 313 | 313 | if (is_string($v) and strlen(trim($v)) and strpos($k, '_') !== 0) { |
| 314 | 314 | // on encapsule dans un span car ces messages sont en general simple, juste du texte, et deja dans un span dans le form |
| 315 | - $valeurs['erreurs'][$k] = "<span role='alert'>" . $erreurs[$k] . '</span>'; |
|
| 315 | + $valeurs['erreurs'][$k] = "<span role='alert'>".$erreurs[$k].'</span>'; |
|
| 316 | 316 | } |
| 317 | 317 | } |
| 318 | 318 | } |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | ) { |
| 29 | 29 | // si l'url est une url du site, on la laisse passer sans rien faire |
| 30 | 30 | // c'est encore le plus simple |
| 31 | - $base = $GLOBALS['meta']['adresse_site'] . '/'; |
|
| 31 | + $base = $GLOBALS['meta']['adresse_site'].'/'; |
|
| 32 | 32 | if (strlen($base) and strncmp($redirect, $base, strlen($base)) == 0) { |
| 33 | 33 | return $redirect; |
| 34 | 34 | } |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | if ($ancre = _request('var_ajax_ancre')) { |
| 157 | 157 | // pas n'importe quoi quand meme dans la variable ! |
| 158 | 158 | $ancre = str_replace(['<', '"', "'"], ['<', '"', ''], $ancre); |
| 159 | - $texte = "<a href='#$ancre' name='ajax_ancre' style='display:none;'>anchor</a>" . $texte; |
|
| 159 | + $texte = "<a href='#$ancre' name='ajax_ancre' style='display:none;'>anchor</a>".$texte; |
|
| 160 | 160 | } |
| 161 | 161 | } else { |
| 162 | 162 | include_spip('inc/headers'); |
@@ -199,26 +199,26 @@ discard block |
||
| 199 | 199 | $sign = _request('formulaire_action_sign'); |
| 200 | 200 | if (!empty($GLOBALS['visiteur_session']['id_auteur'])) { |
| 201 | 201 | if (empty($sign)) { |
| 202 | - spip_log("signature ajax form incorrecte : $form (formulaire non signe mais on a une session)", 'formulaires' . _LOG_ERREUR); |
|
| 202 | + spip_log("signature ajax form incorrecte : $form (formulaire non signe mais on a une session)", 'formulaires'._LOG_ERREUR); |
|
| 203 | 203 | return false; |
| 204 | 204 | } |
| 205 | 205 | $securiser_action = charger_fonction('securiser_action', 'inc'); |
| 206 | 206 | $secu = $securiser_action($form, $args, '', -1); |
| 207 | 207 | if ($sign !== $secu['hash']) { |
| 208 | - spip_log("signature ajax form incorrecte : $form (formulaire signe mais ne correspond pas a la session)", 'formulaires' . _LOG_ERREUR); |
|
| 208 | + spip_log("signature ajax form incorrecte : $form (formulaire signe mais ne correspond pas a la session)", 'formulaires'._LOG_ERREUR); |
|
| 209 | 209 | return false; |
| 210 | 210 | } |
| 211 | 211 | } |
| 212 | 212 | else { |
| 213 | 213 | if (!empty($sign)) { |
| 214 | - spip_log("signature ajax form incorrecte : $form (formulaire signe mais pas de session)", 'formulaires' . _LOG_ERREUR); |
|
| 214 | + spip_log("signature ajax form incorrecte : $form (formulaire signe mais pas de session)", 'formulaires'._LOG_ERREUR); |
|
| 215 | 215 | return false; |
| 216 | 216 | } |
| 217 | 217 | } |
| 218 | 218 | |
| 219 | 219 | include_spip('inc/filtres'); |
| 220 | 220 | if (($args = decoder_contexte_ajax($args, $form)) === false) { |
| 221 | - spip_log("signature ajax form incorrecte : $form (encodage corrompu)", 'formulaires' . _LOG_ERREUR); |
|
| 221 | + spip_log("signature ajax form incorrecte : $form (encodage corrompu)", 'formulaires'._LOG_ERREUR); |
|
| 222 | 222 | |
| 223 | 223 | return false; // continuons le hit comme si de rien etait |
| 224 | 224 | } else { |
@@ -335,7 +335,7 @@ discard block |
||
| 335 | 335 | // on ajoute un br en display none en tete du retour ajax pour regler un bug dans IE6/7 |
| 336 | 336 | // sans cela le formulaire n'est pas actif apres le hit ajax |
| 337 | 337 | // la classe ajax-form-is-ok sert a s'assurer que le retour ajax s'est bien passe |
| 338 | - $retour = "<br class='bugajaxie ajax-form-is-ok' style='display:none;'/>" . $retour; |
|
| 338 | + $retour = "<br class='bugajaxie ajax-form-is-ok' style='display:none;'/>".$retour; |
|
| 339 | 339 | ajax_retour($retour, false); |
| 340 | 340 | |
| 341 | 341 | return true; // on a fini le hit |
@@ -155,23 +155,23 @@ discard block |
||
| 155 | 155 | or !$r = verifier_upload_autorise($dest) |
| 156 | 156 | or $r['autozip'] |
| 157 | 157 | ) { |
| 158 | - $dest = substr($dest, 0, -strlen($m[0])) . '_' . $m[1]; |
|
| 158 | + $dest = substr($dest, 0, -strlen($m[0])).'_'.$m[1]; |
|
| 159 | 159 | break; |
| 160 | 160 | } |
| 161 | 161 | else { |
| 162 | 162 | $dest = substr($dest, 0, -strlen($m[0])); |
| 163 | - $ext = $m[1] . '.' . $ext; |
|
| 163 | + $ext = $m[1].'.'.$ext; |
|
| 164 | 164 | } |
| 165 | 165 | } |
| 166 | 166 | |
| 167 | 167 | // Si le document "source" est deja au bon endroit, ne rien faire |
| 168 | - if ($source == ($dir . $dest . '.' . $ext)) { |
|
| 168 | + if ($source == ($dir.$dest.'.'.$ext)) { |
|
| 169 | 169 | return $source; |
| 170 | 170 | } |
| 171 | 171 | |
| 172 | 172 | // sinon tourner jusqu'a trouver un numero correct |
| 173 | 173 | $n = 0; |
| 174 | - while (@file_exists($newFile = $dir . $dest . ($n++ ? ('-' . $n) : '') . '.' . $ext)) { |
|
| 174 | + while (@file_exists($newFile = $dir.$dest.($n++ ? ('-'.$n) : '').'.'.$ext)) { |
|
| 175 | 175 | ; |
| 176 | 176 | } |
| 177 | 177 | |
@@ -232,7 +232,7 @@ discard block |
||
| 232 | 232 | function deplacer_fichier_upload($source, $dest, $move = false) { |
| 233 | 233 | // Securite |
| 234 | 234 | if (substr($dest, 0, strlen(_DIR_RACINE)) == _DIR_RACINE) { |
| 235 | - $dest = _DIR_RACINE . preg_replace(',\.\.+,', '.', substr($dest, strlen(_DIR_RACINE))); |
|
| 235 | + $dest = _DIR_RACINE.preg_replace(',\.\.+,', '.', substr($dest, strlen(_DIR_RACINE))); |
|
| 236 | 236 | } else { |
| 237 | 237 | $dest = preg_replace(',\.\.+,', '.', $dest); |
| 238 | 238 | } |
@@ -314,8 +314,8 @@ discard block |
||
| 314 | 314 | |
| 315 | 315 | default: /* autre */ |
| 316 | 316 | if (!$msg) { |
| 317 | - $msg = _T('pass_erreur') . ' ' . $error |
|
| 318 | - . '<br />' . propre('[->http://php.net/manual/fr/features.file-upload.errors.php]'); |
|
| 317 | + $msg = _T('pass_erreur').' '.$error |
|
| 318 | + . '<br />'.propre('[->http://php.net/manual/fr/features.file-upload.errors.php]'); |
|
| 319 | 319 | } |
| 320 | 320 | break; |
| 321 | 321 | } |
@@ -333,7 +333,7 @@ discard block |
||
| 333 | 333 | include_spip('inc/minipres'); |
| 334 | 334 | echo minipres( |
| 335 | 335 | $msg, |
| 336 | - "<div style='text-align: " . $GLOBALS['spip_lang_right'] . "'><a href='" . rawurldecode($GLOBALS['redirect']) . "'><button type='button'>" . _T('ecrire:bouton_suivant') . '</button></a></div>' |
|
| 336 | + "<div style='text-align: ".$GLOBALS['spip_lang_right']."'><a href='".rawurldecode($GLOBALS['redirect'])."'><button type='button'>"._T('ecrire:bouton_suivant').'</button></a></div>' |
|
| 337 | 337 | ); |
| 338 | 338 | exit; |
| 339 | 339 | } |
@@ -78,10 +78,10 @@ discard block |
||
| 78 | 78 | // chercher la classe d'iterateur |
| 79 | 79 | // IterateurXXX |
| 80 | 80 | // definie dans le fichier iterateurs/xxx.php |
| 81 | - $class = 'Iterateur' . $iterateur; |
|
| 81 | + $class = 'Iterateur'.$iterateur; |
|
| 82 | 82 | if (!class_exists($class)) { |
| 83 | 83 | if ( |
| 84 | - !include_spip('iterateur/' . strtolower($iterateur)) |
|
| 84 | + !include_spip('iterateur/'.strtolower($iterateur)) |
|
| 85 | 85 | or !class_exists($class) |
| 86 | 86 | ) { |
| 87 | 87 | die("Iterateur $iterateur non trouvé"); |
@@ -209,7 +209,7 @@ discard block |
||
| 209 | 209 | return $this->iter->$nom(); |
| 210 | 210 | } catch (Exception $e) { |
| 211 | 211 | // #GETCHILDREN sur un fichier de DirectoryIterator ... |
| 212 | - spip_log("Methode $nom en echec sur " . get_class($this->iter)); |
|
| 212 | + spip_log("Methode $nom en echec sur ".get_class($this->iter)); |
|
| 213 | 213 | spip_log("Cela peut être normal : retour d'une ligne de resultat ne pouvant pas calculer cette methode"); |
| 214 | 214 | |
| 215 | 215 | return ''; |
@@ -258,8 +258,8 @@ discard block |
||
| 258 | 258 | // Creer la fonction de filtrage sur $this |
| 259 | 259 | if ($this->filtre) { |
| 260 | 260 | if ($filtres = $this->assembler_filtres($this->filtre)) { |
| 261 | - $filtres = 'return ' . $filtres.';'; |
|
| 262 | - $this->func_filtre = function () use ($filtres) { |
|
| 261 | + $filtres = 'return '.$filtres.';'; |
|
| 262 | + $this->func_filtre = function() use ($filtres) { |
|
| 263 | 263 | return eval($filtres); |
| 264 | 264 | }; |
| 265 | 265 | } |
@@ -295,7 +295,7 @@ discard block |
||
| 295 | 295 | return null; |
| 296 | 296 | } |
| 297 | 297 | |
| 298 | - return "(" . implode( ") $operateur (", $filtres_string) . ")"; |
|
| 298 | + return "(".implode(") $operateur (", $filtres_string).")"; |
|
| 299 | 299 | } |
| 300 | 300 | |
| 301 | 301 | /** |
@@ -376,7 +376,7 @@ discard block |
||
| 376 | 376 | return $this->composer_filtre($v[1], $v[0], $v[2]); |
| 377 | 377 | } |
| 378 | 378 | |
| 379 | - return null; // sera ignore |
|
| 379 | + return null; // sera ignore |
|
| 380 | 380 | } |
| 381 | 381 | |
| 382 | 382 | /** |
@@ -402,28 +402,28 @@ discard block |
||
| 402 | 402 | # if (!in_array($cle, array('cle', 'valeur'))) |
| 403 | 403 | # return; |
| 404 | 404 | |
| 405 | - $a = '$this->get_select(\'' . $cle . '\')'; |
|
| 405 | + $a = '$this->get_select(\''.$cle.'\')'; |
|
| 406 | 406 | |
| 407 | 407 | $filtre = ''; |
| 408 | 408 | |
| 409 | 409 | if ($op == 'REGEXP') { |
| 410 | - $filtre = 'filtrer("match", ' . $a . ', ' . str_replace('\"', '"', $valeur) . ')'; |
|
| 410 | + $filtre = 'filtrer("match", '.$a.', '.str_replace('\"', '"', $valeur).')'; |
|
| 411 | 411 | $op = ''; |
| 412 | 412 | } else { |
| 413 | 413 | if ($op == 'LIKE') { |
| 414 | 414 | $valeur = str_replace(['\"', '_', '%'], ['"', '.', '.*'], preg_quote($valeur)); |
| 415 | - $filtre = 'filtrer("match", ' . $a . ', ' . $valeur . ')'; |
|
| 415 | + $filtre = 'filtrer("match", '.$a.', '.$valeur.')'; |
|
| 416 | 416 | $op = ''; |
| 417 | 417 | } else { |
| 418 | 418 | if ($op == '=') { |
| 419 | 419 | $op = '=='; |
| 420 | 420 | } else { |
| 421 | 421 | if ($op == 'IN') { |
| 422 | - $filtre = 'in_array(' . $a . ', array' . $valeur . ')'; |
|
| 422 | + $filtre = 'in_array('.$a.', array'.$valeur.')'; |
|
| 423 | 423 | $op = ''; |
| 424 | 424 | } else { |
| 425 | 425 | if (!in_array($op, ['<', '<=', '>', '>='])) { |
| 426 | - spip_log('operateur non reconnu ' . $op); // [todo] mettre une erreur de squelette |
|
| 426 | + spip_log('operateur non reconnu '.$op); // [todo] mettre une erreur de squelette |
|
| 427 | 427 | $op = ''; |
| 428 | 428 | } |
| 429 | 429 | } |
@@ -432,7 +432,7 @@ discard block |
||
| 432 | 432 | } |
| 433 | 433 | |
| 434 | 434 | if ($op) { |
| 435 | - $filtre = $a . $op . str_replace('\"', '"', $valeur); |
|
| 435 | + $filtre = $a.$op.str_replace('\"', '"', $valeur); |
|
| 436 | 436 | } |
| 437 | 437 | |
| 438 | 438 | if ($not) { |
@@ -48,9 +48,9 @@ discard block |
||
| 48 | 48 | if ($echec) { |
| 49 | 49 | echo minipres( |
| 50 | 50 | 'AUTO', |
| 51 | - info_progression_etape(3, 'etape_', 'install/', true) . |
|
| 52 | - "<div class='error'><h3>$echec</h3>\n" . |
|
| 53 | - '<p>' . _T('avis_connexion_echec_2') . '</p>' . |
|
| 51 | + info_progression_etape(3, 'etape_', 'install/', true). |
|
| 52 | + "<div class='error'><h3>$echec</h3>\n". |
|
| 53 | + '<p>'._T('avis_connexion_echec_2').'</p>'. |
|
| 54 | 54 | '</div>' |
| 55 | 55 | ); |
| 56 | 56 | exit; |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | } |
| 89 | 89 | $alea_actuel = creer_uniqid(); |
| 90 | 90 | $alea_futur = creer_uniqid(); |
| 91 | - $shapass = spip_sha256($alea_actuel . $pass); |
|
| 91 | + $shapass = spip_sha256($alea_actuel.$pass); |
|
| 92 | 92 | // prelablement, creer le champ webmestre si il n'existe pas (install neuve |
| 93 | 93 | // sur une vieille base |
| 94 | 94 | $t = sql_showtable('spip_auteurs', true); |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | @sql_alter("TABLE spip_auteurs ADD webmestre varchar(3) DEFAULT 'non' NOT NULL"); |
| 97 | 97 | } |
| 98 | 98 | |
| 99 | - $id_auteur = sql_getfetsel('id_auteur', 'spip_auteurs', 'login=' . sql_quote($login)); |
|
| 99 | + $id_auteur = sql_getfetsel('id_auteur', 'spip_auteurs', 'login='.sql_quote($login)); |
|
| 100 | 100 | if ($id_auteur !== null) { |
| 101 | 101 | sql_updateq('spip_auteurs', [ |
| 102 | 102 | 'nom' => $nom, |
@@ -136,7 +136,7 @@ discard block |
||
| 136 | 136 | !$auteur = auth_identifier_login($login, $pass) |
| 137 | 137 | or !auth_loger($auteur, true) |
| 138 | 138 | ) { |
| 139 | - spip_log("login automatique impossible $auth_spip $session" . count($row)); |
|
| 139 | + spip_log("login automatique impossible $auth_spip $session".count($row)); |
|
| 140 | 140 | } |
| 141 | 141 | } |
| 142 | 142 | |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | $row = sql_fetsel( |
| 57 | 57 | 'alea_actuel, alea_futur', |
| 58 | 58 | 'spip_auteurs', |
| 59 | - 'login=' . sql_quote($login, $serveur, 'text'), |
|
| 59 | + 'login='.sql_quote($login, $serveur, 'text'), |
|
| 60 | 60 | '', |
| 61 | 61 | '', |
| 62 | 62 | '', |
@@ -66,9 +66,9 @@ discard block |
||
| 66 | 66 | |
| 67 | 67 | if ($row) { |
| 68 | 68 | include_spip('auth/sha256.inc'); |
| 69 | - $shapass = spip_sha256($row['alea_actuel'] . $pass); |
|
| 70 | - $shanext = spip_sha256($row['alea_futur'] . $pass); |
|
| 71 | - $md5pass = md5($row['alea_actuel'] . $pass); |
|
| 69 | + $shapass = spip_sha256($row['alea_actuel'].$pass); |
|
| 70 | + $shanext = spip_sha256($row['alea_futur'].$pass); |
|
| 71 | + $md5pass = md5($row['alea_actuel'].$pass); |
|
| 72 | 72 | } |
| 73 | 73 | } |
| 74 | 74 | |
@@ -80,11 +80,11 @@ discard block |
||
| 80 | 80 | $row = sql_fetsel( |
| 81 | 81 | '*', |
| 82 | 82 | 'spip_auteurs', |
| 83 | - 'login=' . sql_quote($login, $serveur, 'text') . ' AND pass=' . sql_quote( |
|
| 83 | + 'login='.sql_quote($login, $serveur, 'text').' AND pass='.sql_quote( |
|
| 84 | 84 | $shapass, |
| 85 | 85 | $serveur, |
| 86 | 86 | 'text' |
| 87 | - ) . " AND statut<>'5poubelle'", |
|
| 87 | + )." AND statut<>'5poubelle'", |
|
| 88 | 88 | '', |
| 89 | 89 | '', |
| 90 | 90 | '', |
@@ -97,11 +97,11 @@ discard block |
||
| 97 | 97 | $row = sql_fetsel( |
| 98 | 98 | '*', |
| 99 | 99 | 'spip_auteurs', |
| 100 | - 'login=' . sql_quote($login, $serveur, 'text') . ' AND pass=' . sql_quote( |
|
| 100 | + 'login='.sql_quote($login, $serveur, 'text').' AND pass='.sql_quote( |
|
| 101 | 101 | $md5pass, |
| 102 | 102 | $serveur, |
| 103 | 103 | 'text' |
| 104 | - ) . " AND statut<>'5poubelle'", |
|
| 104 | + )." AND statut<>'5poubelle'", |
|
| 105 | 105 | '', |
| 106 | 106 | '', |
| 107 | 107 | '', |
@@ -123,11 +123,11 @@ discard block |
||
| 123 | 123 | 'alea_actuel' => 'alea_futur', |
| 124 | 124 | 'pass' => sql_quote($shanext, $serveur, 'text'), |
| 125 | 125 | 'alea_futur' => sql_quote(creer_uniqid(), $serveur, 'text') |
| 126 | - ], 'id_auteur=' . $row['id_auteur'] . ' AND pass IN (' . sql_quote( |
|
| 126 | + ], 'id_auteur='.$row['id_auteur'].' AND pass IN ('.sql_quote( |
|
| 127 | 127 | $shapass, |
| 128 | 128 | $serveur, |
| 129 | 129 | 'text' |
| 130 | - ) . ', ' . sql_quote($md5pass, $serveur, 'text') . ')', '', $serveur); |
|
| 130 | + ).', '.sql_quote($md5pass, $serveur, 'text').')', '', $serveur); |
|
| 131 | 131 | // En profiter pour verifier la securite de tmp/ |
| 132 | 132 | // Si elle ne fonctionne pas a l'installation, prevenir |
| 133 | 133 | if (!verifier_htaccess(_DIR_TMP) and defined('_ECRIRE_INSTALL')) { |
@@ -163,16 +163,16 @@ discard block |
||
| 163 | 163 | |
| 164 | 164 | // javascript qui gere la securite du login en evitant de faire circuler le pass en clair |
| 165 | 165 | $flux['data'] .= |
| 166 | - ($compat_md5 ? '<script type="text/javascript" src="' . _DIR_JAVASCRIPT . 'md5.js"></script>' : '') |
|
| 167 | - . '<script type="text/javascript" src="' . _DIR_JAVASCRIPT . 'login-sha-min.js"></script>' |
|
| 166 | + ($compat_md5 ? '<script type="text/javascript" src="'._DIR_JAVASCRIPT.'md5.js"></script>' : '') |
|
| 167 | + . '<script type="text/javascript" src="'._DIR_JAVASCRIPT.'login-sha-min.js"></script>' |
|
| 168 | 168 | . '<script type="text/javascript">/*<![CDATA[*/' |
| 169 | - . "var login_info={'alea_actuel':'" . $flux['args']['contexte']['_alea_actuel'] . "'," |
|
| 170 | - . "'alea_futur':'" . $flux['args']['contexte']['_alea_futur'] . "'," |
|
| 171 | - . "'login':'" . $flux['args']['contexte']['var_login'] . "'," |
|
| 172 | - . "'page_auteur': '" . generer_url_public('informer_auteur') . "'," |
|
| 169 | + . "var login_info={'alea_actuel':'".$flux['args']['contexte']['_alea_actuel']."'," |
|
| 170 | + . "'alea_futur':'".$flux['args']['contexte']['_alea_futur']."'," |
|
| 171 | + . "'login':'".$flux['args']['contexte']['var_login']."'," |
|
| 172 | + . "'page_auteur': '".generer_url_public('informer_auteur')."'," |
|
| 173 | 173 | . "'informe_auteur_en_cours':false," |
| 174 | 174 | . "'attente_informe':0," |
| 175 | - . "'compat_md5':" . ($compat_md5 ? 'true' : 'false') . '};' |
|
| 175 | + . "'compat_md5':".($compat_md5 ? 'true' : 'false').'};' |
|
| 176 | 176 | . "jQuery(function(){ |
| 177 | 177 | jQuery('#var_login').change(actualise_auteur); |
| 178 | 178 | jQuery('form#formulaire_login').submit(login_submit); |
@@ -215,7 +215,7 @@ discard block |
||
| 215 | 215 | } else { |
| 216 | 216 | $n = sql_countsel( |
| 217 | 217 | 'spip_auteurs', |
| 218 | - 'login=' . sql_quote($new_login) . ' AND id_auteur!=' . intval($id_auteur) . " AND statut!='5poubelle'", |
|
| 218 | + 'login='.sql_quote($new_login).' AND id_auteur!='.intval($id_auteur)." AND statut!='5poubelle'", |
|
| 219 | 219 | '', |
| 220 | 220 | '', |
| 221 | 221 | $serveur |
@@ -243,7 +243,7 @@ discard block |
||
| 243 | 243 | } |
| 244 | 244 | if ( |
| 245 | 245 | !$id_auteur = intval($id_auteur) |
| 246 | - or !$auteur = sql_fetsel('login', 'spip_auteurs', 'id_auteur=' . intval($id_auteur), '', '', '', '', $serveur) |
|
| 246 | + or !$auteur = sql_fetsel('login', 'spip_auteurs', 'id_auteur='.intval($id_auteur), '', '', '', '', $serveur) |
|
| 247 | 247 | ) { |
| 248 | 248 | return false; |
| 249 | 249 | } |
@@ -258,7 +258,7 @@ discard block |
||
| 258 | 258 | $anciens = sql_allfetsel( |
| 259 | 259 | 'id_auteur', |
| 260 | 260 | 'spip_auteurs', |
| 261 | - 'login=' . sql_quote($new_login, $serveur, 'text') . " AND statut='5poubelle'", |
|
| 261 | + 'login='.sql_quote($new_login, $serveur, 'text')." AND statut='5poubelle'", |
|
| 262 | 262 | '', |
| 263 | 263 | '', |
| 264 | 264 | '', |
@@ -292,8 +292,8 @@ discard block |
||
| 292 | 292 | $r = sql_getfetsel( |
| 293 | 293 | 'login', |
| 294 | 294 | 'spip_auteurs', |
| 295 | - "statut<>'5poubelle'" . |
|
| 296 | - ' AND (length(pass)>0)' . |
|
| 295 | + "statut<>'5poubelle'". |
|
| 296 | + ' AND (length(pass)>0)'. |
|
| 297 | 297 | " AND (login=$l)", |
| 298 | 298 | '', |
| 299 | 299 | '', |
@@ -312,8 +312,8 @@ discard block |
||
| 312 | 312 | return sql_getfetsel( |
| 313 | 313 | 'login', |
| 314 | 314 | 'spip_auteurs', |
| 315 | - "statut<>'5poubelle'" . |
|
| 316 | - ' AND (length(pass)>0)' . |
|
| 315 | + "statut<>'5poubelle'". |
|
| 316 | + ' AND (length(pass)>0)'. |
|
| 317 | 317 | " AND (login<>'' AND (nom=$l OR email=$l))", |
| 318 | 318 | '', |
| 319 | 319 | '', |
@@ -403,7 +403,7 @@ discard block |
||
| 403 | 403 | |
| 404 | 404 | if ( |
| 405 | 405 | !$id_auteur = intval($id_auteur) |
| 406 | - or !sql_fetsel('login', 'spip_auteurs', 'id_auteur=' . intval($id_auteur), '', '', '', '', $serveur) |
|
| 406 | + or !sql_fetsel('login', 'spip_auteurs', 'id_auteur='.intval($id_auteur), '', '', '', '', $serveur) |
|
| 407 | 407 | ) { |
| 408 | 408 | return false; |
| 409 | 409 | } |
@@ -416,7 +416,7 @@ discard block |
||
| 416 | 416 | } |
| 417 | 417 | $alea_actuel = creer_uniqid(); |
| 418 | 418 | $alea_futur = creer_uniqid(); |
| 419 | - $pass = spip_sha256($alea_actuel . $new_pass); |
|
| 419 | + $pass = spip_sha256($alea_actuel.$new_pass); |
|
| 420 | 420 | $c['pass'] = $pass; |
| 421 | 421 | $c['htpass'] = $htpass; |
| 422 | 422 | $c['alea_actuel'] = $alea_actuel; |
@@ -452,8 +452,8 @@ discard block |
||
| 452 | 452 | or isset($champs['statut']) |
| 453 | 453 | or (isset($options['all']) and $options['all']) |
| 454 | 454 | ) { |
| 455 | - $htaccess = _DIR_RESTREINT . _ACCESS_FILE_NAME; |
|
| 456 | - $htpasswd = _DIR_TMP . _AUTH_USER_FILE; |
|
| 455 | + $htaccess = _DIR_RESTREINT._ACCESS_FILE_NAME; |
|
| 456 | + $htpasswd = _DIR_TMP._AUTH_USER_FILE; |
|
| 457 | 457 | |
| 458 | 458 | // Cette variable de configuration peut etre posee par un plugin |
| 459 | 459 | // par exemple acces_restreint ; |
@@ -463,7 +463,7 @@ discard block |
||
| 463 | 463 | and !@file_exists($htaccess) |
| 464 | 464 | ) { |
| 465 | 465 | spip_unlink($htpasswd); |
| 466 | - spip_unlink($htpasswd . '-admin'); |
|
| 466 | + spip_unlink($htpasswd.'-admin'); |
|
| 467 | 467 | |
| 468 | 468 | return; |
| 469 | 469 | } |
@@ -481,16 +481,16 @@ discard block |
||
| 481 | 481 | ); |
| 482 | 482 | while ($t = sql_fetch($s)) { |
| 483 | 483 | if (strlen($t['login']) and strlen($t['htpass'])) { |
| 484 | - $p1 .= $t['login'] . ':' . $t['htpass'] . "\n"; |
|
| 484 | + $p1 .= $t['login'].':'.$t['htpass']."\n"; |
|
| 485 | 485 | if ($t['statut'] == '0minirezo') { |
| 486 | - $p2 .= $t['login'] . ':' . $t['htpass'] . "\n"; |
|
| 486 | + $p2 .= $t['login'].':'.$t['htpass']."\n"; |
|
| 487 | 487 | } |
| 488 | 488 | } |
| 489 | 489 | } |
| 490 | 490 | sql_free($s); |
| 491 | 491 | if ($p1) { |
| 492 | 492 | ecrire_fichier($htpasswd, $p1); |
| 493 | - ecrire_fichier($htpasswd . '-admin', $p2); |
|
| 493 | + ecrire_fichier($htpasswd.'-admin', $p2); |
|
| 494 | 494 | spip_log("Ecriture de $htpasswd et $htpasswd-admin"); |
| 495 | 495 | } |
| 496 | 496 | } |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | function surligner_mots($page, $surcharge_surligne = '') { |
| 38 | 38 | $surlignejs_engines = [ |
| 39 | 39 | [ |
| 40 | - ',' . str_replace(['/', '.'], ['\/', '\.'], $GLOBALS['meta']['adresse_site']) . ',i', |
|
| 40 | + ','.str_replace(['/', '.'], ['\/', '\.'], $GLOBALS['meta']['adresse_site']).',i', |
|
| 41 | 41 | ',recherche=([^&]+),i' |
| 42 | 42 | ], //SPIP |
| 43 | 43 | [',^http://(www\.)?google\.,i', ',q=([^&]+),i'], // Google |
@@ -72,19 +72,19 @@ discard block |
||
| 72 | 72 | //good referrer found or var_recherche is not null |
| 73 | 73 | include_spip('inc/filtres'); |
| 74 | 74 | $script = " |
| 75 | - <script type='text/javascript' src='" . url_absolue(find_in_path('javascript/SearchHighlight.js')) . "'></script> |
|
| 75 | + <script type='text/javascript' src='" . url_absolue(find_in_path('javascript/SearchHighlight.js'))."'></script> |
|
| 76 | 76 | <script type='text/javascript'> |
| 77 | 77 | var highlighter = function() { |
| 78 | 78 | jQuery(this).SearchHighlight({ |
| 79 | - tag_name:'" . (html5_permis() ? 'mark' : 'span') . "', |
|
| 79 | + tag_name:'" . (html5_permis() ? 'mark' : 'span')."', |
|
| 80 | 80 | style_name:'spip_surligne', |
| 81 | 81 | exact:'whole', |
| 82 | 82 | style_name_suffix:false, |
| 83 | - engines:[/^" . str_replace(['/', '.'], ['\/', '\.'], $GLOBALS['meta']['adresse_site']) . "/i,/recherche=([^&]+)/i], |
|
| 83 | + engines:[/^" . str_replace(['/', '.'], ['\/', '\.'], $GLOBALS['meta']['adresse_site'])."/i,/recherche=([^&]+)/i], |
|
| 84 | 84 | highlight:'.surlignable', |
| 85 | 85 | nohighlight:'.pas_surlignable'" . |
| 86 | 86 | ($surcharge_surligne ? ", |
| 87 | - keys:'$surcharge_surligne'" : '') . ', |
|
| 87 | + keys:'$surcharge_surligne'" : '').', |
|
| 88 | 88 | min_length: 3 |
| 89 | 89 | }); |
| 90 | 90 | } |