@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | |
| 38 | 38 | $GLOBALS['contexte'] = calculer_contexte(); |
| 39 | 39 | $page = ['contexte_implicite' => calculer_contexte_implicite()]; |
| 40 | - $page['contexte_implicite']['cache'] = $fond . preg_replace( |
|
| 40 | + $page['contexte_implicite']['cache'] = $fond.preg_replace( |
|
| 41 | 41 | ',\.[a-zA-Z0-9]*$,', |
| 42 | 42 | '', |
| 43 | 43 | preg_replace('/[?].*$/', '', $GLOBALS['REQUEST_URI']) |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | if ($page === '') { |
| 139 | 139 | $erreur = _T( |
| 140 | 140 | 'info_erreur_squelette2', |
| 141 | - ['fichier' => spip_htmlspecialchars($fond) . '.' . _EXTENSION_SQUELETTES] |
|
| 141 | + ['fichier' => spip_htmlspecialchars($fond).'.'._EXTENSION_SQUELETTES] |
|
| 142 | 142 | ); |
| 143 | 143 | erreur_squelette($erreur); |
| 144 | 144 | // eviter des erreurs strictes ensuite sur $page['cle'] en PHP >= 5.4 |
@@ -183,7 +183,7 @@ discard block |
||
| 183 | 183 | and !isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) |
| 184 | 184 | and !isset($page['entetes']['Last-Modified']) |
| 185 | 185 | ) { |
| 186 | - $page['entetes']['Last-Modified'] = gmdate('D, d M Y H:i:s', $lastmodified) . ' GMT'; |
|
| 186 | + $page['entetes']['Last-Modified'] = gmdate('D, d M Y H:i:s', $lastmodified).' GMT'; |
|
| 187 | 187 | } |
| 188 | 188 | |
| 189 | 189 | // fermer la connexion apres les headers si requete HEAD |
@@ -248,7 +248,7 @@ discard block |
||
| 248 | 248 | 'spip_version_code' => $GLOBALS['spip_version_code'], |
| 249 | 249 | ]; |
| 250 | 250 | if (isset($_SERVER['HTTP_X_FORWARDED_HOST'])) { |
| 251 | - $contexte_implicite['host'] .= '|' . $_SERVER['HTTP_X_FORWARDED_HOST']; |
|
| 251 | + $contexte_implicite['host'] .= '|'.$_SERVER['HTTP_X_FORWARDED_HOST']; |
|
| 252 | 252 | } |
| 253 | 253 | |
| 254 | 254 | return $contexte_implicite; |
@@ -579,7 +579,7 @@ discard block |
||
| 579 | 579 | } |
| 580 | 580 | } |
| 581 | 581 | if (is_null($id)) { |
| 582 | - $msg = "modeles/$modele : " . _T('zbug_parametres_inclus_incorrects', ['param' => "id/$primary"]); |
|
| 582 | + $msg = "modeles/$modele : "._T('zbug_parametres_inclus_incorrects', ['param' => "id/$primary"]); |
|
| 583 | 583 | erreur_squelette($msg); |
| 584 | 584 | // on passe id=0 au routeur pour tomber sur le modele par defaut et eviter une seconde erreur sur un modele inexistant |
| 585 | 585 | $id = 0; |
@@ -626,7 +626,7 @@ discard block |
||
| 626 | 626 | } |
| 627 | 627 | |
| 628 | 628 | if (preg_match(',^[a-z0-9_]+$,', $soustype)) { |
| 629 | - if (!trouve_modele($fond = ($type . '_' . $soustype))) { |
|
| 629 | + if (!trouve_modele($fond = ($type.'_'.$soustype))) { |
|
| 630 | 630 | $fond = ''; |
| 631 | 631 | $class = $soustype; |
| 632 | 632 | } |
@@ -641,7 +641,7 @@ discard block |
||
| 641 | 641 | |
| 642 | 642 | return false; |
| 643 | 643 | } |
| 644 | - $fond = 'modeles/' . $fond; |
|
| 644 | + $fond = 'modeles/'.$fond; |
|
| 645 | 645 | // Creer le contexte |
| 646 | 646 | $contexte = $env; |
| 647 | 647 | $contexte['dir_racine'] = _DIR_RACINE; # eviter de mixer un cache racine et un cache ecrire (meme si pour l'instant les modeles ne sont pas caches, le resultat etant different il faut que le contexte en tienne compte |
@@ -682,7 +682,7 @@ discard block |
||
| 682 | 682 | // sinon, s'il y a un lien, on l'ajoute classiquement |
| 683 | 683 | if ( |
| 684 | 684 | strstr( |
| 685 | - ' ' . ($classes = extraire_attribut($retour, 'class')) . ' ', |
|
| 685 | + ' '.($classes = extraire_attribut($retour, 'class')).' ', |
|
| 686 | 686 | 'spip_lien_ok' |
| 687 | 687 | ) |
| 688 | 688 | ) { |
@@ -693,7 +693,7 @@ discard block |
||
| 693 | 693 | ); |
| 694 | 694 | } else { |
| 695 | 695 | if ($lien) { |
| 696 | - $retour = "<a href='" . $lien['href'] . "' class='" . $lien['class'] . "'>" . $retour . '</a>'; |
|
| 696 | + $retour = "<a href='".$lien['href']."' class='".$lien['class']."'>".$retour.'</a>'; |
|
| 697 | 697 | } |
| 698 | 698 | } |
| 699 | 699 | |
@@ -717,7 +717,7 @@ discard block |
||
| 717 | 717 | return $page; |
| 718 | 718 | } |
| 719 | 719 | // eval $page et affecte $res |
| 720 | - include _ROOT_RESTREINT . 'public/evaluer_page.php'; |
|
| 720 | + include _ROOT_RESTREINT.'public/evaluer_page.php'; |
|
| 721 | 721 | |
| 722 | 722 | // Lever un drapeau (global) si le fond utilise #SESSION |
| 723 | 723 | // a destination de public/parametrer |
@@ -785,16 +785,16 @@ discard block |
||
| 785 | 785 | if (($pos = strpos($head, '<head>')) !== false) { |
| 786 | 786 | $head = substr_replace($head, $base, $pos + 6, 0); |
| 787 | 787 | } elseif (preg_match(',<head[^>]*>,i', $head, $r)) { |
| 788 | - $head = str_replace($r[0], $r[0] . $base, $head); |
|
| 788 | + $head = str_replace($r[0], $r[0].$base, $head); |
|
| 789 | 789 | } |
| 790 | - $texte = $head . substr($texte, $poshead); |
|
| 790 | + $texte = $head.substr($texte, $poshead); |
|
| 791 | 791 | } |
| 792 | 792 | if ($href_base) { |
| 793 | 793 | // gerer les ancres |
| 794 | 794 | $base = $_SERVER['REQUEST_URI']; |
| 795 | 795 | // pas de guillemets ni < dans l'URL qu'on insere dans le HTML |
| 796 | 796 | if (strpos($base, "'") or strpos($base, '"') or strpos($base, '<')) { |
| 797 | - $base = str_replace(["'",'"','<'], ['%27','%22','%3C'], $base); |
|
| 797 | + $base = str_replace(["'", '"', '<'], ['%27', '%22', '%3C'], $base); |
|
| 798 | 798 | } |
| 799 | 799 | if (strpos($texte, "href='#") !== false) { |
| 800 | 800 | $texte = str_replace("href='#", "href='$base#", $texte); |
@@ -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 pa de creer les repertoires, on va au plus vite |
| 64 | - $rep = _DIR_CACHE . "$d/"; |
|
| 64 | + $rep = _DIR_CACHE."$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 | |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | $GLOBALS['debug_objets']['courant'] = $nom; |
| 55 | 55 | } |
| 56 | 56 | |
| 57 | - $phpfile = sous_repertoire(_DIR_SKELS, '', false, true) . $nom . '.php'; |
|
| 57 | + $phpfile = sous_repertoire(_DIR_SKELS, '', false, true).$nom.'.php'; |
|
| 58 | 58 | |
| 59 | 59 | // si squelette est deja compile et perenne, le charger |
| 60 | 60 | if (!squelette_obsolete($phpfile, $source)) { |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | #} |
| 68 | 68 | } |
| 69 | 69 | |
| 70 | - if (file_exists($lib = $squelette . '_fonctions' . '.php')) { |
|
| 70 | + if (file_exists($lib = $squelette.'_fonctions'.'.php')) { |
|
| 71 | 71 | include_once $lib; |
| 72 | 72 | } |
| 73 | 73 | |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | eval("return true; $f ;"); |
| 96 | 96 | } catch (\ParseError $e) { |
| 97 | 97 | // Code syntaxiquement faux (critere etc mal programme') |
| 98 | - $msg = _T('zbug_erreur_compilation') . ' | Line ' . $e->getLine() . ' : ' . $e->getMessage(); |
|
| 98 | + $msg = _T('zbug_erreur_compilation').' | Line '.$e->getLine().' : '.$e->getMessage(); |
|
| 99 | 99 | erreur_squelette($msg, $boucle); |
| 100 | 100 | // continuer pour trouver d'autres fautes eventuelles |
| 101 | 101 | // mais prevenir que c'est mort |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | |
| 124 | 124 | if (defined('_VAR_MODE') and _VAR_MODE == 'debug') { |
| 125 | 125 | // Tracer ce qui vient d'etre compile |
| 126 | - $GLOBALS['debug_objets']['code'][$nom . 'tout'] = $code; |
|
| 126 | + $GLOBALS['debug_objets']['code'][$nom.'tout'] = $code; |
|
| 127 | 127 | |
| 128 | 128 | // si c'est ce que demande le debusqueur, lui passer la main |
| 129 | 129 | if ( |
@@ -146,13 +146,13 @@ discard block |
||
| 146 | 146 | $code = " |
| 147 | 147 | /* |
| 148 | 148 | * Squelette : $sourcefile |
| 149 | - * Date : " . gmdate('D, d M Y H:i:s', @filemtime($sourcefile)) . ' GMT |
|
| 150 | - * Compile : ' . gmdate('D, d M Y H:i:s', time()) . ' GMT |
|
| 151 | - * ' . (!$boucles ? 'Pas de boucle' : ('Boucles : ' . $noms)) . ' |
|
| 149 | + * Date : ".gmdate('D, d M Y H:i:s', @filemtime($sourcefile)).' GMT |
|
| 150 | + * Compile : ' . gmdate('D, d M Y H:i:s', time()).' GMT |
|
| 151 | + * ' . (!$boucles ? 'Pas de boucle' : ('Boucles : '.$noms)).' |
|
| 152 | 152 | */ '; |
| 153 | 153 | } |
| 154 | 154 | |
| 155 | - $code = '<' . "?php\n" . $code . join('', $boucles) . "\n?" . '>'; |
|
| 155 | + $code = '<'."?php\n".$code.join('', $boucles)."\n?".'>'; |
|
| 156 | 156 | if (!defined('_VAR_NOCACHE') or !_VAR_NOCACHE) { |
| 157 | 157 | ecrire_fichier($phpfile, $code); |
| 158 | 158 | } |
@@ -216,7 +216,7 @@ discard block |
||
| 216 | 216 | $j = join('-', array_map('ucwords', explode('-', strtolower($r[2])))); |
| 217 | 217 | |
| 218 | 218 | if ($j == 'X-Spip-Filtre' and isset($headers[$j])) { |
| 219 | - $headers[$j] .= '|' . $r[3]; |
|
| 219 | + $headers[$j] .= '|'.$r[3]; |
|
| 220 | 220 | } else { |
| 221 | 221 | $headers[$j] = $r[3]; |
| 222 | 222 | } |
@@ -224,10 +224,10 @@ discard block |
||
| 224 | 224 | } |
| 225 | 225 | // S'agit-il d'un resultat constant ou contenant du code php |
| 226 | 226 | $process_ins = ( |
| 227 | - strpos($corps, '<' . '?') === false |
|
| 227 | + strpos($corps, '<'.'?') === false |
|
| 228 | 228 | or |
| 229 | - (strpos($corps, '<' . '?xml') !== false and |
|
| 230 | - strpos(str_replace('<' . '?xml', '', $corps), '<' . '?') === false) |
|
| 229 | + (strpos($corps, '<'.'?xml') !== false and |
|
| 230 | + strpos(str_replace('<'.'?xml', '', $corps), '<'.'?') === false) |
|
| 231 | 231 | ) |
| 232 | 232 | ? 'html' |
| 233 | 233 | : 'php'; |
@@ -256,10 +256,10 @@ discard block |
||
| 256 | 256 | |
| 257 | 257 | if ($process_ins == 'html') { |
| 258 | 258 | $skel['process_ins'] = ( |
| 259 | - strpos($corps, '<' . '?') === false |
|
| 259 | + strpos($corps, '<'.'?') === false |
|
| 260 | 260 | or |
| 261 | - (strpos($corps, '<' . '?xml') !== false and |
|
| 262 | - strpos(str_replace('<' . '?xml', '', $corps), '<' . '?') === false) |
|
| 261 | + (strpos($corps, '<'.'?xml') !== false and |
|
| 262 | + strpos(str_replace('<'.'?xml', '', $corps), '<'.'?') === false) |
|
| 263 | 263 | ) |
| 264 | 264 | ? 'html' |
| 265 | 265 | : 'php'; |
@@ -277,7 +277,7 @@ discard block |
||
| 277 | 277 | // |
| 278 | 278 | |
| 279 | 279 | /** Code PHP pour inclure une balise dynamique à l'exécution d'une page */ |
| 280 | -define('CODE_INCLURE_BALISE', '<' . '?php |
|
| 280 | +define('CODE_INCLURE_BALISE', '<'.'?php |
|
| 281 | 281 | include_once("%s"); |
| 282 | 282 | if ($lang_select = "%s") $lang_select = lang_select($lang_select); |
| 283 | 283 | inserer_balise_dynamique(balise_%s_dyn(%s), array(%s)); |
@@ -308,7 +308,7 @@ discard block |
||
| 308 | 308 | // pas de lien symbolique sous Windows |
| 309 | 309 | and !(stristr(PHP_OS, 'WIN') and strpos($file, ':') !== false) |
| 310 | 310 | ) { |
| 311 | - $file = './" . _DIR_RACINE . "' . $file; |
|
| 311 | + $file = './" . _DIR_RACINE . "'.$file; |
|
| 312 | 312 | } |
| 313 | 313 | |
| 314 | 314 | $lang = $context_compil[4]; |
@@ -318,7 +318,7 @@ discard block |
||
| 318 | 318 | |
| 319 | 319 | $args = array_map('argumenter_squelette', $args); |
| 320 | 320 | if (!empty($context_compil['appel_php_depuis_modele'])) { |
| 321 | - $args[0] = 'arguments_balise_dyn_depuis_modele(' . $args[0] . ')'; |
|
| 321 | + $args[0] = 'arguments_balise_dyn_depuis_modele('.$args[0].')'; |
|
| 322 | 322 | } |
| 323 | 323 | $args = join(', ', $args); |
| 324 | 324 | |
@@ -352,14 +352,14 @@ discard block |
||
| 352 | 352 | if (is_object($v)) { |
| 353 | 353 | return var_export($v, true); |
| 354 | 354 | } elseif (!is_array($v)) { |
| 355 | - return "'" . texte_script($v) . "'"; |
|
| 355 | + return "'".texte_script($v)."'"; |
|
| 356 | 356 | } else { |
| 357 | 357 | $out = []; |
| 358 | 358 | foreach ($v as $k => $val) { |
| 359 | - $out [] = argumenter_squelette($k) . '=>' . argumenter_squelette($val); |
|
| 359 | + $out [] = argumenter_squelette($k).'=>'.argumenter_squelette($val); |
|
| 360 | 360 | } |
| 361 | 361 | |
| 362 | - return 'array(' . join(', ', $out) . ')'; |
|
| 362 | + return 'array('.join(', ', $out).')'; |
|
| 363 | 363 | } |
| 364 | 364 | } |
| 365 | 365 | |
@@ -437,7 +437,7 @@ discard block |
||
| 437 | 437 | } |
| 438 | 438 | |
| 439 | 439 | // Y a-t-il une fonction de traitement des arguments ? |
| 440 | - $f = 'balise_' . $nom_balise . '_stat'; |
|
| 440 | + $f = 'balise_'.$nom_balise.'_stat'; |
|
| 441 | 441 | |
| 442 | 442 | $r = !function_exists($f) ? $args : $f($args, $context_compil); |
| 443 | 443 | |
@@ -447,18 +447,18 @@ discard block |
||
| 447 | 447 | |
| 448 | 448 | // verifier que la fonction dyn est la, |
| 449 | 449 | // sinon se replier sur la generique si elle existe |
| 450 | - if (!function_exists('balise_' . $nom_balise . '_dyn')) { |
|
| 450 | + if (!function_exists('balise_'.$nom_balise.'_dyn')) { |
|
| 451 | 451 | if ( |
| 452 | 452 | $balise_generique = chercher_balise_generique($nom) |
| 453 | 453 | and $nom_balise_generique = $balise_generique['nom_generique'] |
| 454 | - and $file = include_spip('balise/' . strtolower($nom_balise_generique)) |
|
| 455 | - and function_exists('balise_' . $nom_balise_generique . '_dyn') |
|
| 454 | + and $file = include_spip('balise/'.strtolower($nom_balise_generique)) |
|
| 455 | + and function_exists('balise_'.$nom_balise_generique.'_dyn') |
|
| 456 | 456 | ) { |
| 457 | 457 | // et lui injecter en premier arg le nom de la balise |
| 458 | 458 | array_unshift($r, $nom); |
| 459 | 459 | $nom_balise = $nom_balise_generique; |
| 460 | 460 | if (!_DIR_RESTREINT) { |
| 461 | - $file = _DIR_RESTREINT_ABS . $file; |
|
| 461 | + $file = _DIR_RESTREINT_ABS.$file; |
|
| 462 | 462 | } |
| 463 | 463 | } else { |
| 464 | 464 | $msg = ['zbug_balise_inexistante', ['from' => 'CVT', 'balise' => $nom]]; |
@@ -560,7 +560,7 @@ discard block |
||
| 560 | 560 | $n = ''; |
| 561 | 561 | foreach (explode(',', $liste) as $val) { |
| 562 | 562 | if ($a = intval($val) and $val === strval($a)) { |
| 563 | - $n .= ',' . $val; |
|
| 563 | + $n .= ','.$val; |
|
| 564 | 564 | } |
| 565 | 565 | } |
| 566 | 566 | if (strlen($n)) { |
@@ -739,8 +739,8 @@ discard block |
||
| 739 | 739 | // on construit le where une fois, puis on ajoute les where complentaires si besoin, et on reconstruit le where en fonction |
| 740 | 740 | $i = 0; |
| 741 | 741 | do { |
| 742 | - $where[$k] = remplace_sous_requete($w, '(' . calculer_select( |
|
| 743 | - [$sous[1] . ' AS id'], |
|
| 742 | + $where[$k] = remplace_sous_requete($w, '('.calculer_select( |
|
| 743 | + [$sous[1].' AS id'], |
|
| 744 | 744 | $from, |
| 745 | 745 | $from_type, |
| 746 | 746 | $wheresub, |
@@ -753,7 +753,7 @@ discard block |
||
| 753 | 753 | $id, |
| 754 | 754 | $serveur, |
| 755 | 755 | false |
| 756 | - ) . ')'); |
|
| 756 | + ).')'); |
|
| 757 | 757 | if (!$i) { |
| 758 | 758 | $i = 1; |
| 759 | 759 | $wherestring = calculer_where_to_string($where[$k]); |
@@ -773,7 +773,7 @@ discard block |
||
| 773 | 773 | if ($sous[0] == 'SUBSELECT') { |
| 774 | 774 | // c'est une sous requete explicite sous la forme identique a sql_select : (SUBSELECT,$select,$from,$where,$groupby,$orderby,$limit,$having) |
| 775 | 775 | array_push($where_simples, $sous[3]); // est-ce utile dans ce cas ? |
| 776 | - $where[$k] = remplace_sous_requete($w, '(' . calculer_select( |
|
| 776 | + $where[$k] = remplace_sous_requete($w, '('.calculer_select( |
|
| 777 | 777 | $sous[1], # select |
| 778 | 778 | $sous[2], #from |
| 779 | 779 | [], #from_type |
@@ -788,7 +788,7 @@ discard block |
||
| 788 | 788 | $id, |
| 789 | 789 | $serveur, |
| 790 | 790 | false |
| 791 | - ) . ')'); |
|
| 791 | + ).')'); |
|
| 792 | 792 | } |
| 793 | 793 | array_pop($where_simples); |
| 794 | 794 | } |
@@ -851,15 +851,15 @@ discard block |
||
| 851 | 851 | // sans recours a preg_match |
| 852 | 852 | // un implode(' ',..) est fait dans reinjecte_joint un peu plus bas |
| 853 | 853 | $afrom[$t][$cle] = [ |
| 854 | - "\n" . |
|
| 855 | - (isset($from_type[$cle]) ? $from_type[$cle] : 'INNER') . ' JOIN', |
|
| 854 | + "\n". |
|
| 855 | + (isset($from_type[$cle]) ? $from_type[$cle] : 'INNER').' JOIN', |
|
| 856 | 856 | $from[$cle], |
| 857 | 857 | "AS $cle", |
| 858 | 858 | 'ON (', |
| 859 | 859 | "$cle.$c", |
| 860 | 860 | '=', |
| 861 | 861 | "$t.$carr", |
| 862 | - ($and ? 'AND ' . $and : '') . |
|
| 862 | + ($and ? 'AND '.$and : ''). |
|
| 863 | 863 | ')' |
| 864 | 864 | ]; |
| 865 | 865 | if (isset($afrom[$cle])) { |
@@ -897,7 +897,7 @@ discard block |
||
| 897 | 897 | $t = key($from); |
| 898 | 898 | $c = current($from); |
| 899 | 899 | reset($from); |
| 900 | - $e = '/\b(' . "$t\\." . join('|' . $t . '\.', $equiv) . ')\b/'; |
|
| 900 | + $e = '/\b('."$t\\.".join('|'.$t.'\.', $equiv).')\b/'; |
|
| 901 | 901 | if ( |
| 902 | 902 | !(strpos($t, ' ') or // jointure des le depart cf boucle_doc |
| 903 | 903 | calculer_jointnul($t, $select, $e) or |
@@ -915,7 +915,7 @@ discard block |
||
| 915 | 915 | unset($afrom[$t][$nt]); |
| 916 | 916 | $afrom[$nt] = $afrom[$t]; |
| 917 | 917 | unset($afrom[$t]); |
| 918 | - $e = '/\b' . preg_quote($nfrom[6]) . '\b/'; |
|
| 918 | + $e = '/\b'.preg_quote($nfrom[6]).'\b/'; |
|
| 919 | 919 | $t = $nfrom[4]; |
| 920 | 920 | $alias = ''; |
| 921 | 921 | // verifier que les deux cles sont homonymes, sinon installer un alias dans le select |
@@ -926,14 +926,14 @@ discard block |
||
| 926 | 926 | if ($newcle != $oldcle) { |
| 927 | 927 | // si l'ancienne cle etait deja dans le select avec un AS |
| 928 | 928 | // reprendre simplement ce AS |
| 929 | - $as = '/\b' . preg_quote($nfrom[6]) . '\s+(AS\s+\w+)\b/'; |
|
| 929 | + $as = '/\b'.preg_quote($nfrom[6]).'\s+(AS\s+\w+)\b/'; |
|
| 930 | 930 | if (preg_match($as, implode(',', $select), $m)) { |
| 931 | 931 | $alias = ''; |
| 932 | 932 | } else { |
| 933 | - $alias = ', ' . $nfrom[4] . " AS $oldcle"; |
|
| 933 | + $alias = ', '.$nfrom[4]." AS $oldcle"; |
|
| 934 | 934 | } |
| 935 | 935 | } |
| 936 | - $select = remplacer_jointnul($t . $alias, $select, $e); |
|
| 936 | + $select = remplacer_jointnul($t.$alias, $select, $e); |
|
| 937 | 937 | $join = remplacer_jointnul($t, $join, $e); |
| 938 | 938 | $where = remplacer_jointnul($t, $where, $e); |
| 939 | 939 | $having = remplacer_jointnul($t, $having, $e); |
@@ -983,9 +983,9 @@ discard block |
||
| 983 | 983 | } else { |
| 984 | 984 | $exp = ''; |
| 985 | 985 | if (strtoupper($join) === 'AND') { |
| 986 | - return $exp . join(" $join ", array_map('calculer_where_to_string', $v)); |
|
| 986 | + return $exp.join(" $join ", array_map('calculer_where_to_string', $v)); |
|
| 987 | 987 | } else { |
| 988 | - return $exp . join($join, $v); |
|
| 988 | + return $exp.join($join, $v); |
|
| 989 | 989 | } |
| 990 | 990 | } |
| 991 | 991 | } |
@@ -1051,6 +1051,6 @@ discard block |
||
| 1051 | 1051 | } |
| 1052 | 1052 | |
| 1053 | 1053 | return $mime_type |
| 1054 | - . (!$connect ? '' : preg_replace('/\W/', '_', $connect)) . '_' |
|
| 1055 | - . md5($GLOBALS['spip_version_code'] . ' * ' . $skel . (isset($GLOBALS['marqueur_skel']) ? '*' . $GLOBALS['marqueur_skel'] : '')); |
|
| 1054 | + . (!$connect ? '' : preg_replace('/\W/', '_', $connect)).'_' |
|
| 1055 | + . md5($GLOBALS['spip_version_code'].' * '.$skel.(isset($GLOBALS['marqueur_skel']) ? '*'.$GLOBALS['marqueur_skel'] : '')); |
|
| 1056 | 1056 | } |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | **/ |
| 83 | 83 | function boucle_HIERARCHIE_dist($id_boucle, &$boucles) { |
| 84 | 84 | $boucle = &$boucles[$id_boucle]; |
| 85 | - $id_table = $boucle->id_table . '.id_rubrique'; |
|
| 85 | + $id_table = $boucle->id_table.'.id_rubrique'; |
|
| 86 | 86 | |
| 87 | 87 | // Si la boucle mere est une boucle RUBRIQUES il faut ignorer la feuille |
| 88 | 88 | // sauf en presence du critere {tout} (vu par phraser_html) |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | . '$hierarchie = calcul_hierarchie_in($id_rubrique,' |
| 96 | 96 | . (isset($boucle->modificateur['tout']) ? 'true' : 'false') |
| 97 | 97 | . ");\n\t" |
| 98 | - . 'if (!$hierarchie) return "";' . "\n\t"; |
|
| 98 | + . 'if (!$hierarchie) return "";'."\n\t"; |
|
| 99 | 99 | |
| 100 | 100 | $boucle->where[] = ["'IN'", "'$id_table'", '"($hierarchie)"']; |
| 101 | 101 | |
@@ -23,6 +23,6 @@ |
||
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | $GLOBALS['maj'][2021021800] = [ |
| 26 | - ['sql_alter', "TABLE spip_auteurs CHANGE imessage imessage VARCHAR(3) DEFAULT '' NOT NULL" ], |
|
| 27 | - ['sql_updateq', 'spip_auteurs', ['imessage' => 'oui'], "imessage != 'non' OR imessage IS NULL" ], |
|
| 26 | + ['sql_alter', "TABLE spip_auteurs CHANGE imessage imessage VARCHAR(3) DEFAULT '' NOT NULL"], |
|
| 27 | + ['sql_updateq', 'spip_auteurs', ['imessage' => 'oui'], "imessage != 'non' OR imessage IS NULL"], |
|
| 28 | 28 | ]; |
@@ -33,18 +33,18 @@ |
||
| 33 | 33 | */ |
| 34 | 34 | function ranger_cache_gd2() { |
| 35 | 35 | spip_log('ranger_cache_gd2'); |
| 36 | - $base = _DIR_VAR . 'cache-gd2/'; |
|
| 36 | + $base = _DIR_VAR.'cache-gd2/'; |
|
| 37 | 37 | if (is_dir($base) and is_readable($base)) { |
| 38 | 38 | if ($dir = opendir($base)) { |
| 39 | 39 | while (($f = readdir($dir)) !== false) { |
| 40 | 40 | if ( |
| 41 | - !is_dir($base . $f) and strncmp($f, '.', 1) !== 0 |
|
| 41 | + !is_dir($base.$f) and strncmp($f, '.', 1) !== 0 |
|
| 42 | 42 | and preg_match(',[0-9a-f]{32}\.\w+,', $f) |
| 43 | 43 | ) { |
| 44 | 44 | $sub = substr($f, 0, 2); |
| 45 | 45 | $sub = sous_repertoire($base, $sub); |
| 46 | - @rename($base . $f, $sub . substr($f, 2)); |
|
| 47 | - @unlink($base . $f); // au cas ou le rename a foire (collision) |
|
| 46 | + @rename($base.$f, $sub.substr($f, 2)); |
|
| 47 | + @unlink($base.$f); // au cas ou le rename a foire (collision) |
|
| 48 | 48 | } |
| 49 | 49 | if (time() >= _TIME_OUT) { |
| 50 | 50 | return; |
@@ -60,9 +60,9 @@ discard block |
||
| 60 | 60 | $exceptions_pluriel = ['forum' => 'forum', 'syndic' => 'syndic']; |
| 61 | 61 | |
| 62 | 62 | $pivot = preg_replace(',[^\w],', '', $pivot); // securite |
| 63 | - $pivots = (isset($exceptions_pluriel[$pivot]) ? $exceptions_pluriel[$pivot] : $pivot . 's'); |
|
| 64 | - $liens = 'spip_' . $pivots . '_liens'; |
|
| 65 | - $id_pivot = 'id_' . $pivot; |
|
| 63 | + $pivots = (isset($exceptions_pluriel[$pivot]) ? $exceptions_pluriel[$pivot] : $pivot.'s'); |
|
| 64 | + $liens = 'spip_'.$pivots.'_liens'; |
|
| 65 | + $id_pivot = 'id_'.$pivot; |
|
| 66 | 66 | // Creer spip_auteurs_liens |
| 67 | 67 | global $tables_auxiliaires; |
| 68 | 68 | if (!$l) { |
@@ -74,8 +74,8 @@ discard block |
||
| 74 | 74 | $l = preg_replace(',[^\w],', '', $l); // securite |
| 75 | 75 | $primary = "id_$l"; |
| 76 | 76 | $objet = ($l == 'syndic' ? 'site' : $l); |
| 77 | - $ls = (isset($exceptions_pluriel[$l]) ? $exceptions_pluriel[$l] : $l . 's'); |
|
| 78 | - $ancienne_table = 'spip_' . $pivots . '_' . $ls; |
|
| 77 | + $ls = (isset($exceptions_pluriel[$l]) ? $exceptions_pluriel[$l] : $l.'s'); |
|
| 78 | + $ancienne_table = 'spip_'.$pivots.'_'.$ls; |
|
| 79 | 79 | $pool = 400; |
| 80 | 80 | |
| 81 | 81 | $trouver_table = charger_fonction('trouver_table', 'base'); |
@@ -111,12 +111,12 @@ discard block |
||
| 111 | 111 | while ($ids = array_map('reset', sql_allfetsel("$primary", $ancienne_table, '', '', '', "0,$sub_pool"))) { |
| 112 | 112 | $insert = []; |
| 113 | 113 | foreach ($ids as $id) { |
| 114 | - $n = sql_countsel($liens, "objet='$objet' AND id_objet=" . intval($id)); |
|
| 115 | - while ($t = sql_allfetsel($champs, $ancienne_table, "$primary=" . intval($id), '', $id_pivot, "$n,$pool")) { |
|
| 114 | + $n = sql_countsel($liens, "objet='$objet' AND id_objet=".intval($id)); |
|
| 115 | + while ($t = sql_allfetsel($champs, $ancienne_table, "$primary=".intval($id), '', $id_pivot, "$n,$pool")) { |
|
| 116 | 116 | $n += count($t); |
| 117 | 117 | // empiler en s'assurant a minima de l'unicite |
| 118 | 118 | while ($r = array_shift($t)) { |
| 119 | - $insert[$r[$id_pivot] . ':' . $r['id_objet']] = $r; |
|
| 119 | + $insert[$r[$id_pivot].':'.$r['id_objet']] = $r; |
|
| 120 | 120 | } |
| 121 | 121 | if (count($insert) >= $sub_pool) { |
| 122 | 122 | maj_liens_insertq_multi_check($liens, $insert, $tables_auxiliaires[$liens]); |
@@ -267,13 +267,13 @@ discard block |
||
| 267 | 267 | |
| 268 | 268 | // cas particulier spip_auteurs : retablir le collate binary sur le login |
| 269 | 269 | $desc = $trouver_table('spip_auteurs'); |
| 270 | - spip_log('spip_auteurs : ' . var_export($desc['field'], true), 'maj.' . _LOG_INFO_IMPORTANTE); |
|
| 270 | + spip_log('spip_auteurs : '.var_export($desc['field'], true), 'maj.'._LOG_INFO_IMPORTANTE); |
|
| 271 | 271 | if (stripos($desc['field']['login'], 'BINARY') === false) { |
| 272 | 272 | spip_log('Retablir champ login BINARY sur table spip_auteurs', 'maj'); |
| 273 | 273 | sql_alter('table spip_auteurs change login login VARCHAR(255) BINARY'); |
| 274 | 274 | $trouver_table(''); |
| 275 | 275 | $new_desc = $trouver_table('spip_auteurs'); |
| 276 | - spip_log('Apres conversion spip_auteurs : ' . var_export($new_desc['field'], true), 'maj.' . _LOG_INFO_IMPORTANTE); |
|
| 276 | + spip_log('Apres conversion spip_auteurs : '.var_export($new_desc['field'], true), 'maj.'._LOG_INFO_IMPORTANTE); |
|
| 277 | 277 | } |
| 278 | 278 | |
| 279 | 279 | foreach ($tables as $table) { |
@@ -292,27 +292,27 @@ discard block |
||
| 292 | 292 | $data = sql_allfetsel('*', 'spip_urls', '', '', 'date DESC'); |
| 293 | 293 | $urls = []; |
| 294 | 294 | foreach ($data as $d) { |
| 295 | - $key = $d['id_parent'] . '::' . strtolower($d['url']); |
|
| 295 | + $key = $d['id_parent'].'::'.strtolower($d['url']); |
|
| 296 | 296 | if (!isset($urls[$key])) { |
| 297 | 297 | $urls[$key] = true; |
| 298 | 298 | } else { |
| 299 | 299 | spip_log( |
| 300 | - 'Suppression doublon dans spip_urls avant conversion : ' . serialize($d), |
|
| 301 | - 'maj.' . _LOG_INFO_IMPORTANTE |
|
| 300 | + 'Suppression doublon dans spip_urls avant conversion : '.serialize($d), |
|
| 301 | + 'maj.'._LOG_INFO_IMPORTANTE |
|
| 302 | 302 | ); |
| 303 | - sql_delete('spip_urls', 'id_parent=' . sql_quote($d['id_parent']) . ' AND url=' . sql_quote($d['url'])); |
|
| 303 | + sql_delete('spip_urls', 'id_parent='.sql_quote($d['id_parent']).' AND url='.sql_quote($d['url'])); |
|
| 304 | 304 | } |
| 305 | 305 | } |
| 306 | 306 | } |
| 307 | 307 | foreach ($desc['field'] as $field => $type) { |
| 308 | 308 | if ($desc['field'][$field] !== $desc_collate[$field]) { |
| 309 | - spip_log("Conversion COLLATE table $table", 'maj.' . _LOG_INFO_IMPORTANTE); |
|
| 310 | - sql_alter("table $table change $field $field " . $desc_collate[$field]); |
|
| 309 | + spip_log("Conversion COLLATE table $table", 'maj.'._LOG_INFO_IMPORTANTE); |
|
| 310 | + sql_alter("table $table change $field $field ".$desc_collate[$field]); |
|
| 311 | 311 | $trouver_table(''); |
| 312 | 312 | $new_desc = $trouver_table($table); |
| 313 | 313 | spip_log( |
| 314 | - "Apres conversion $table : " . var_export($new_desc['field'], true), |
|
| 315 | - 'maj.' . _LOG_INFO_IMPORTANTE |
|
| 314 | + "Apres conversion $table : ".var_export($new_desc['field'], true), |
|
| 315 | + 'maj.'._LOG_INFO_IMPORTANTE |
|
| 316 | 316 | ); |
| 317 | 317 | continue 2; // inutile de continuer pour cette table : un seul alter remet tout a jour en sqlite |
| 318 | 318 | } |
@@ -328,7 +328,7 @@ discard block |
||
| 328 | 328 | |
| 329 | 329 | $GLOBALS['maj'][19236] = [ |
| 330 | 330 | ['sql_updateq', 'spip_meta', ['impt' => 'oui'], "nom='version_installee'"], // version base principale |
| 331 | - ['sql_updateq', 'spip_meta', ['impt' => 'oui'], "nom LIKE '%_base_version'"], // version base plugins |
|
| 331 | + ['sql_updateq', 'spip_meta', ['impt' => 'oui'], "nom LIKE '%_base_version'"], // version base plugins |
|
| 332 | 332 | ['maj_collation_sqlite'], |
| 333 | 333 | ]; |
| 334 | 334 | |
@@ -345,7 +345,7 @@ discard block |
||
| 345 | 345 | spip_log('supprimer sessions auteur'); |
| 346 | 346 | if ($dir = opendir(_DIR_SESSIONS)) { |
| 347 | 347 | while (($f = readdir($dir)) !== false) { |
| 348 | - spip_unlink(_DIR_SESSIONS . $f); |
|
| 348 | + spip_unlink(_DIR_SESSIONS.$f); |
|
| 349 | 349 | if (time() >= _TIME_OUT) { |
| 350 | 350 | return; |
| 351 | 351 | } |
@@ -64,13 +64,13 @@ |
||
| 64 | 64 | spip_log("Table $table TIMESTAMP incorrect", 'maj'); |
| 65 | 65 | foreach ($desc['field'] as $field => $type) { |
| 66 | 66 | if ($desc['field'][$field] !== $fields_corrected[$field]) { |
| 67 | - spip_log("Adaptation TIMESTAMP table $table", 'maj.' . _LOG_INFO_IMPORTANTE); |
|
| 68 | - sql_alter("table $table change $field $field " . $fields_corrected[$field]); |
|
| 67 | + spip_log("Adaptation TIMESTAMP table $table", 'maj.'._LOG_INFO_IMPORTANTE); |
|
| 68 | + sql_alter("table $table change $field $field ".$fields_corrected[$field]); |
|
| 69 | 69 | $trouver_table(''); |
| 70 | 70 | $new_desc = $trouver_table($table); |
| 71 | 71 | spip_log( |
| 72 | - "Apres conversion $table : " . var_export($new_desc['field'], true), |
|
| 73 | - 'maj.' . _LOG_INFO_IMPORTANTE |
|
| 72 | + "Apres conversion $table : ".var_export($new_desc['field'], true), |
|
| 73 | + 'maj.'._LOG_INFO_IMPORTANTE |
|
| 74 | 74 | ); |
| 75 | 75 | } |
| 76 | 76 | } |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 19 | 19 | return; |
| 20 | 20 | } |
| 21 | -require_once _ROOT_RESTREINT . 'base/objets.php'; |
|
| 21 | +require_once _ROOT_RESTREINT.'base/objets.php'; |
|
| 22 | 22 | |
| 23 | 23 | |
| 24 | 24 | /** |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | $f = (!preg_match('/^[\w\.]*$/', $serveur)) |
| 60 | 60 | ? '' // nom de serveur mal ecrit |
| 61 | 61 | : ($serveur ? |
| 62 | - (_DIR_CONNECT . $serveur . '.php') // serveur externe |
|
| 62 | + (_DIR_CONNECT.$serveur.'.php') // serveur externe |
|
| 63 | 63 | : (_FILE_CONNECT ? _FILE_CONNECT // serveur principal ok |
| 64 | 64 | : ($install ? _FILE_CONNECT_TMP // init du serveur principal |
| 65 | 65 | : ''))); // installation pas faite |
@@ -102,9 +102,9 @@ discard block |
||
| 102 | 102 | // chargement de la version du jeu de fonctions |
| 103 | 103 | // si pas dans le fichier par defaut |
| 104 | 104 | $type = $GLOBALS['db_ok']['type']; |
| 105 | - $jeu = 'spip_' . $type . '_functions_' . $version; |
|
| 105 | + $jeu = 'spip_'.$type.'_functions_'.$version; |
|
| 106 | 106 | if (!isset($GLOBALS[$jeu])) { |
| 107 | - if (!find_in_path($type . '_' . $version . '.php', 'req/', true)) { |
|
| 107 | + if (!find_in_path($type.'_'.$version.'.php', 'req/', true)) { |
|
| 108 | 108 | spip_log("spip_connect: serveur $index version '$version' non defini pour '$type'", _LOG_HS); |
| 109 | 109 | |
| 110 | 110 | // ne plus reessayer |
@@ -166,9 +166,9 @@ discard block |
||
| 166 | 166 | $connexion = spip_connect($serveur); |
| 167 | 167 | $e = sql_errno($serveur); |
| 168 | 168 | $t = (isset($connexion['type']) ? $connexion['type'] : 'sql'); |
| 169 | - $m = "Erreur $e de $t: " . sql_error($serveur) . "\nin " . sql_error_backtrace() . "\n" . trim($connexion['last']); |
|
| 170 | - $f = $t . $serveur; |
|
| 171 | - spip_log($m, $f . '.' . _LOG_ERREUR); |
|
| 169 | + $m = "Erreur $e de $t: ".sql_error($serveur)."\nin ".sql_error_backtrace()."\n".trim($connexion['last']); |
|
| 170 | + $f = $t.$serveur; |
|
| 171 | + spip_log($m, $f.'.'._LOG_ERREUR); |
|
| 172 | 172 | } |
| 173 | 173 | |
| 174 | 174 | /** |
@@ -250,7 +250,7 @@ discard block |
||
| 250 | 250 | // si en cours d'installation ou si db=@test@ on ne pose rien |
| 251 | 251 | // car c'est un test de connexion |
| 252 | 252 | if (!defined('_ECRIRE_INSTALL') and $db !== '@test@') { |
| 253 | - $f = _DIR_TMP . $type . '.' . substr(md5($host . $port . $db), 0, 8) . '.out'; |
|
| 253 | + $f = _DIR_TMP.$type.'.'.substr(md5($host.$port.$db), 0, 8).'.out'; |
|
| 254 | 254 | } elseif ($db == '@test@') { |
| 255 | 255 | $db = ''; |
| 256 | 256 | } |
@@ -290,7 +290,7 @@ discard block |
||
| 290 | 290 | // En cas d'indisponibilite du serveur, eviter de le bombarder |
| 291 | 291 | if ($f) { |
| 292 | 292 | @touch($f); |
| 293 | - spip_log("Echec connexion serveur $type : host[$host] port[$port] login[$login] base[$db]", $type . '.' . _LOG_HS); |
|
| 293 | + spip_log("Echec connexion serveur $type : host[$host] port[$port] login[$login] base[$db]", $type.'.'._LOG_HS); |
|
| 294 | 294 | } |
| 295 | 295 | } |
| 296 | 296 | |
@@ -382,8 +382,7 @@ discard block |
||
| 382 | 382 | * @return string Valeur échappée. |
| 383 | 383 | **/ |
| 384 | 384 | function _q($a) { |
| 385 | - return (is_numeric($a)) ? strval($a) : |
|
| 386 | - (!is_array($a) ? ("'" . addslashes($a) . "'") |
|
| 385 | + return (is_numeric($a)) ? strval($a) : (!is_array($a) ? ("'".addslashes($a)."'") |
|
| 387 | 386 | : join(',', array_map('_q', $a))); |
| 388 | 387 | } |
| 389 | 388 | |
@@ -425,7 +424,7 @@ discard block |
||
| 425 | 424 | break; |
| 426 | 425 | default: |
| 427 | 426 | $replace = range(1, count($textes)); |
| 428 | - $replace = '%' . implode('$s,%', $replace) . '$s'; |
|
| 427 | + $replace = '%'.implode('$s,%', $replace).'$s'; |
|
| 429 | 428 | $replace = explode(',', $replace); |
| 430 | 429 | break; |
| 431 | 430 | } |