@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | include_spip('base/abstract_sql'); |
| 59 | - $res = sql_select("statut, id_auteur, login, email", "spip_auteurs", "email=" . sql_quote($desc['email'])); |
|
| 59 | + $res = sql_select("statut, id_auteur, login, email", "spip_auteurs", "email=".sql_quote($desc['email'])); |
|
| 60 | 60 | // erreur ? |
| 61 | 61 | if (!$res) { |
| 62 | 62 | return _T('titre_probleme_technique'); |
@@ -209,7 +209,7 @@ discard block |
||
| 209 | 209 | if (!sql_countsel('spip_auteurs', "login='$login'")) { |
| 210 | 210 | return $login; |
| 211 | 211 | } |
| 212 | - $login = $login_base . $i; |
|
| 212 | + $login = $login_base.$i; |
|
| 213 | 213 | } |
| 214 | 214 | |
| 215 | 215 | return $login; |
@@ -242,7 +242,7 @@ discard block |
||
| 242 | 242 | } |
| 243 | 243 | |
| 244 | 244 | $modele_mail = 'modeles/mail_inscription'; |
| 245 | - if (isset($options['modele_mail']) and $options['modele_mail']){ |
|
| 245 | + if (isset($options['modele_mail']) and $options['modele_mail']) { |
|
| 246 | 246 | $modele_mail = $options['modele_mail']; |
| 247 | 247 | } |
| 248 | 248 | $message = recuperer_fond($modele_mail, $contexte); |
@@ -346,8 +346,8 @@ discard block |
||
| 346 | 346 | // s'assurer de l'unicite du jeton pour le couple (email,cookie) |
| 347 | 347 | do { |
| 348 | 348 | $jeton = creer_uniqid(); |
| 349 | - sql_updateq("spip_auteurs", array("cookie_oubli" => $jeton), "id_auteur=" . intval($id_auteur)); |
|
| 350 | - } while (sql_countsel("spip_auteurs", "cookie_oubli=" . sql_quote($jeton)) > 1); |
|
| 349 | + sql_updateq("spip_auteurs", array("cookie_oubli" => $jeton), "id_auteur=".intval($id_auteur)); |
|
| 350 | + } while (sql_countsel("spip_auteurs", "cookie_oubli=".sql_quote($jeton)) > 1); |
|
| 351 | 351 | |
| 352 | 352 | return $jeton; |
| 353 | 353 | } |
@@ -365,7 +365,7 @@ discard block |
||
| 365 | 365 | } |
| 366 | 366 | |
| 367 | 367 | // on peut tomber sur un jeton compose uniquement de chiffres, il faut forcer le $type pour sql_quote pour eviter de planter |
| 368 | - $desc = sql_fetsel('*', 'spip_auteurs', "cookie_oubli=" . sql_quote($jeton, '', 'string')); |
|
| 368 | + $desc = sql_fetsel('*', 'spip_auteurs', "cookie_oubli=".sql_quote($jeton, '', 'string')); |
|
| 369 | 369 | |
| 370 | 370 | return $desc; |
| 371 | 371 | } |
@@ -377,5 +377,5 @@ discard block |
||
| 377 | 377 | * @return bool |
| 378 | 378 | */ |
| 379 | 379 | function auteur_effacer_jeton($id_auteur) { |
| 380 | - return sql_updateq("spip_auteurs", array("cookie_oubli" => ''), "id_auteur=" . intval($id_auteur)); |
|
| 380 | + return sql_updateq("spip_auteurs", array("cookie_oubli" => ''), "id_auteur=".intval($id_auteur)); |
|
| 381 | 381 | } |
@@ -45,7 +45,7 @@ |
||
| 45 | 45 | $les_couleurs = $couleurs(); |
| 46 | 46 | foreach ($les_couleurs as $k => $c) { |
| 47 | 47 | $valeurs['_couleurs_url'][$k] = generer_url_public('style_prive.css', 'ltr=' |
| 48 | - . $GLOBALS['spip_lang_left'] . '&' |
|
| 48 | + . $GLOBALS['spip_lang_left'].'&' |
|
| 49 | 49 | . $couleurs($k)); |
| 50 | 50 | $valeurs['couleurs'][$k] = $c; |
| 51 | 51 | } |
@@ -44,13 +44,13 @@ discard block |
||
| 44 | 44 | $blue = dechex($blue); |
| 45 | 45 | |
| 46 | 46 | if (strlen($red) == 1) { |
| 47 | - $red = "0" . $red; |
|
| 47 | + $red = "0".$red; |
|
| 48 | 48 | } |
| 49 | 49 | if (strlen($green) == 1) { |
| 50 | - $green = "0" . $green; |
|
| 50 | + $green = "0".$green; |
|
| 51 | 51 | } |
| 52 | 52 | if (strlen($blue) == 1) { |
| 53 | - $blue = "0" . $blue; |
|
| 53 | + $blue = "0".$blue; |
|
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | return "$red$green$blue"; |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | $couleur = couleur_html_to_hex($couleur); |
| 69 | 69 | $couleur = ltrim($couleur, '#'); |
| 70 | 70 | if (strlen($couleur) === 3) { |
| 71 | - $couleur = $couleur[0] . $couleur[0] . $couleur[1] . $couleur[1] . $couleur[2] . $couleur[2]; |
|
| 71 | + $couleur = $couleur[0].$couleur[0].$couleur[1].$couleur[1].$couleur[2].$couleur[2]; |
|
| 72 | 72 | } |
| 73 | 73 | $retour = []; |
| 74 | 74 | $retour["red"] = hexdec(substr($couleur, 0, 2)); |
@@ -125,9 +125,9 @@ discard block |
||
| 125 | 125 | $var_G = ($G / 255); |
| 126 | 126 | $var_B = ($B / 255); |
| 127 | 127 | |
| 128 | - $var_Min = min($var_R, $var_G, $var_B); //Min. value of RGB |
|
| 129 | - $var_Max = max($var_R, $var_G, $var_B); //Max. value of RGB |
|
| 130 | - $del_Max = $var_Max - $var_Min; //Delta RGB value |
|
| 128 | + $var_Min = min($var_R, $var_G, $var_B); //Min. value of RGB |
|
| 129 | + $var_Max = max($var_R, $var_G, $var_B); //Max. value of RGB |
|
| 130 | + $del_Max = $var_Max - $var_Min; //Delta RGB value |
|
| 131 | 131 | |
| 132 | 132 | $L = ($var_Max + $var_Min) / 2; |
| 133 | 133 | |
@@ -321,7 +321,7 @@ discard block |
||
| 321 | 321 | and $extension = _image_trouver_extension_depuis_mime("image/".$regs[1]) |
| 322 | 322 | and in_array($extension, _image_extensions_acceptees_en_entree()) |
| 323 | 323 | ) { |
| 324 | - $local = sous_repertoire(_DIR_VAR, 'image-data') . md5($regs[2]) . '.' . _image_extension_normalisee($extension); |
|
| 324 | + $local = sous_repertoire(_DIR_VAR, 'image-data').md5($regs[2]).'.'._image_extension_normalisee($extension); |
|
| 325 | 325 | if (!file_exists($local)) { |
| 326 | 326 | ecrire_fichier($local, base64_decode($regs[2])); |
| 327 | 327 | } |
@@ -335,7 +335,7 @@ discard block |
||
| 335 | 335 | // les protocoles web prennent au moins 3 lettres |
| 336 | 336 | if (tester_url_absolue($source)) { |
| 337 | 337 | include_spip('inc/distant'); |
| 338 | - $fichier = _DIR_RACINE . copie_locale($source); |
|
| 338 | + $fichier = _DIR_RACINE.copie_locale($source); |
|
| 339 | 339 | if (!$fichier) { |
| 340 | 340 | return ""; |
| 341 | 341 | } |
@@ -360,7 +360,7 @@ discard block |
||
| 360 | 360 | |
| 361 | 361 | if ($forcer_format !== false |
| 362 | 362 | // ignorer forcer_format si on a une image svg, que le filtre appelant ne supporte pas SVG, et que le forcage est un autre format image |
| 363 | - and ($terminaison_dest !== 'svg' or $support_svg or !in_array($forcer_format,_image_extensions_acceptees_en_sortie()))) { |
|
| 363 | + and ($terminaison_dest !== 'svg' or $support_svg or !in_array($forcer_format, _image_extensions_acceptees_en_sortie()))) { |
|
| 364 | 364 | $terminaison_dest = $forcer_format; |
| 365 | 365 | } |
| 366 | 366 | |
@@ -422,9 +422,9 @@ discard block |
||
| 422 | 422 | // on garde la terminaison initiale car image simplement copiee |
| 423 | 423 | // et on postfixe son nom avec un md5 du path |
| 424 | 424 | $terminaison_dest = $terminaison; |
| 425 | - $fichier_dest .= '-' . substr(md5("$identifiant"), 0, 5); |
|
| 425 | + $fichier_dest .= '-'.substr(md5("$identifiant"), 0, 5); |
|
| 426 | 426 | } else { |
| 427 | - $fichier_dest .= '-' . substr(md5("$identifiant-$effet"), 0, 5); |
|
| 427 | + $fichier_dest .= '-'.substr(md5("$identifiant-$effet"), 0, 5); |
|
| 428 | 428 | } |
| 429 | 429 | $cache = sous_repertoire(_DIR_VAR, $cache); |
| 430 | 430 | $cache = sous_repertoire($cache, $effet); |
@@ -435,7 +435,7 @@ discard block |
||
| 435 | 435 | $fichier_dest = substr($fichier_dest, 2); |
| 436 | 436 | } |
| 437 | 437 | |
| 438 | - $fichier_dest = $cache . $fichier_dest . "." . $terminaison_dest; |
|
| 438 | + $fichier_dest = $cache.$fichier_dest.".".$terminaison_dest; |
|
| 439 | 439 | |
| 440 | 440 | $GLOBALS["images_calculees"][] = $fichier_dest; |
| 441 | 441 | |
@@ -471,14 +471,14 @@ discard block |
||
| 471 | 471 | } |
| 472 | 472 | |
| 473 | 473 | if ($creer) { |
| 474 | - spip_log("filtre image " . ($fonction_creation ? reset($fonction_creation) : '') . "[$effet] sur $fichier", |
|
| 475 | - "images" . _LOG_DEBUG); |
|
| 474 | + spip_log("filtre image ".($fonction_creation ? reset($fonction_creation) : '')."[$effet] sur $fichier", |
|
| 475 | + "images"._LOG_DEBUG); |
|
| 476 | 476 | } |
| 477 | 477 | |
| 478 | 478 | $term_fonction = _image_trouver_extension_pertinente($fichier); |
| 479 | - $ret["fonction_imagecreatefrom"] = "_imagecreatefrom" . $term_fonction; |
|
| 479 | + $ret["fonction_imagecreatefrom"] = "_imagecreatefrom".$term_fonction; |
|
| 480 | 480 | $ret["fichier"] = $fichier; |
| 481 | - $ret["fonction_image"] = "_image_image" . $terminaison_dest; |
|
| 481 | + $ret["fonction_image"] = "_image_image".$terminaison_dest; |
|
| 482 | 482 | $ret["fichier_dest"] = $fichier_dest; |
| 483 | 483 | $ret["format_source"] = _image_extension_normalisee($terminaison); |
| 484 | 484 | $ret["format_dest"] = $terminaison_dest; |
@@ -552,9 +552,9 @@ discard block |
||
| 552 | 552 | /** |
| 553 | 553 | * @return array|string[]|null |
| 554 | 554 | */ |
| 555 | -function _image_extensions_acceptees_en_sortie(){ |
|
| 555 | +function _image_extensions_acceptees_en_sortie() { |
|
| 556 | 556 | static $extensions = null; |
| 557 | - if (empty($extensions)){ |
|
| 557 | + if (empty($extensions)) { |
|
| 558 | 558 | $extensions = _image_extensions_acceptees_en_entree(); |
| 559 | 559 | $extensions = array_diff($extensions, ['jpeg']); |
| 560 | 560 | if (in_array('gif', $extensions) and !function_exists('imagegif')) { |
@@ -568,7 +568,7 @@ discard block |
||
| 568 | 568 | return $extensions; |
| 569 | 569 | } |
| 570 | 570 | |
| 571 | -function _image_extension_normalisee($extension){ |
|
| 571 | +function _image_extension_normalisee($extension) { |
|
| 572 | 572 | $extension = strtolower($extension); |
| 573 | 573 | if ($extension === 'jpeg') { |
| 574 | 574 | $extension = 'jpg'; |
@@ -576,7 +576,7 @@ discard block |
||
| 576 | 576 | return $extension; |
| 577 | 577 | } |
| 578 | 578 | |
| 579 | -function _image_extensions_conservent_transparence(){ |
|
| 579 | +function _image_extensions_conservent_transparence() { |
|
| 580 | 580 | return ['png', 'webp']; |
| 581 | 581 | } |
| 582 | 582 | |
@@ -626,7 +626,7 @@ discard block |
||
| 626 | 626 | |
| 627 | 627 | $_terminaison = _image_trouver_extension_depuis_mime($mime); |
| 628 | 628 | if ($_terminaison and $_terminaison !== $terminaison) { |
| 629 | - spip_log("Mauvaise extension du fichier : $path . Son type mime est : $mime", "images." . _LOG_INFO_IMPORTANTE); |
|
| 629 | + spip_log("Mauvaise extension du fichier : $path . Son type mime est : $mime", "images."._LOG_INFO_IMPORTANTE); |
|
| 630 | 630 | $terminaison = $_terminaison; |
| 631 | 631 | } |
| 632 | 632 | return $terminaison; |
@@ -783,7 +783,7 @@ discard block |
||
| 783 | 783 | if (!function_exists('imagepng')) { |
| 784 | 784 | return false; |
| 785 | 785 | } |
| 786 | - $tmp = $fichier . ".tmp"; |
|
| 786 | + $tmp = $fichier.".tmp"; |
|
| 787 | 787 | $ret = imagepng($img, $tmp); |
| 788 | 788 | if (file_exists($tmp)) { |
| 789 | 789 | $taille_test = getimagesize($tmp); |
@@ -818,7 +818,7 @@ discard block |
||
| 818 | 818 | if (!function_exists('imagegif')) { |
| 819 | 819 | return false; |
| 820 | 820 | } |
| 821 | - $tmp = $fichier . ".tmp"; |
|
| 821 | + $tmp = $fichier.".tmp"; |
|
| 822 | 822 | $ret = imagegif($img, $tmp); |
| 823 | 823 | if (file_exists($tmp)) { |
| 824 | 824 | $taille_test = getimagesize($tmp); |
@@ -858,7 +858,7 @@ discard block |
||
| 858 | 858 | if (!function_exists('imagejpeg')) { |
| 859 | 859 | return false; |
| 860 | 860 | } |
| 861 | - $tmp = $fichier . ".tmp"; |
|
| 861 | + $tmp = $fichier.".tmp"; |
|
| 862 | 862 | |
| 863 | 863 | // Enable interlancing |
| 864 | 864 | imageinterlace($img, true); |
@@ -919,7 +919,7 @@ discard block |
||
| 919 | 919 | if (!function_exists('imagewebp')) { |
| 920 | 920 | return false; |
| 921 | 921 | } |
| 922 | - $tmp = $fichier . ".tmp"; |
|
| 922 | + $tmp = $fichier.".tmp"; |
|
| 923 | 923 | $ret = imagewebp($img, $tmp, $qualite); |
| 924 | 924 | if (file_exists($tmp)) { |
| 925 | 925 | $taille_test = getimagesize($tmp); |
@@ -953,7 +953,7 @@ discard block |
||
| 953 | 953 | */ |
| 954 | 954 | function _image_imagesvg($img, $fichier) { |
| 955 | 955 | |
| 956 | - $tmp = $fichier . ".tmp"; |
|
| 956 | + $tmp = $fichier.".tmp"; |
|
| 957 | 957 | if (strpos($img, "<") === false) { |
| 958 | 958 | $img = supprimer_timestamp($img); |
| 959 | 959 | if (!file_exists($img)) { |
@@ -1010,13 +1010,13 @@ discard block |
||
| 1010 | 1010 | */ |
| 1011 | 1011 | function _image_gd_output($img, $valeurs, $qualite = _IMG_GD_QUALITE, $fonction = null) { |
| 1012 | 1012 | if (is_null($fonction)) { |
| 1013 | - $fonction = "_image_image" . $valeurs['format_dest']; |
|
| 1013 | + $fonction = "_image_image".$valeurs['format_dest']; |
|
| 1014 | 1014 | } |
| 1015 | 1015 | $ret = false; |
| 1016 | 1016 | #un flag pour reperer les images gravees |
| 1017 | 1017 | $lock = |
| 1018 | 1018 | !statut_effacer_images_temporaires('get') // si la fonction n'a pas ete activee, on grave tout |
| 1019 | - or (@file_exists($valeurs['fichier_dest']) and !@file_exists($valeurs['fichier_dest'] . '.src')); |
|
| 1019 | + or (@file_exists($valeurs['fichier_dest']) and !@file_exists($valeurs['fichier_dest'].'.src')); |
|
| 1020 | 1020 | if ( |
| 1021 | 1021 | function_exists($fonction) |
| 1022 | 1022 | && ($ret = $fonction($img, $valeurs['fichier_dest'], $qualite)) # on a reussi a creer l'image |
@@ -1027,7 +1027,7 @@ discard block |
||
| 1027 | 1027 | // dans tous les cas mettre a jour la taille de l'image finale |
| 1028 | 1028 | list($valeurs["hauteur_dest"], $valeurs["largeur_dest"]) = taille_image($valeurs['fichier_dest']); |
| 1029 | 1029 | $valeurs['date'] = @filemtime($valeurs['fichier_dest']); // pour la retrouver apres disparition |
| 1030 | - ecrire_fichier($valeurs['fichier_dest'] . '.src', serialize($valeurs), true); |
|
| 1030 | + ecrire_fichier($valeurs['fichier_dest'].'.src', serialize($valeurs), true); |
|
| 1031 | 1031 | } |
| 1032 | 1032 | } |
| 1033 | 1033 | |
@@ -1046,7 +1046,7 @@ discard block |
||
| 1046 | 1046 | function reconstruire_image_intermediaire($fichier_manquant) { |
| 1047 | 1047 | $reconstruire = array(); |
| 1048 | 1048 | $fichier = $fichier_manquant; |
| 1049 | - while (strpos($fichier,"://")===false |
|
| 1049 | + while (strpos($fichier, "://") === false |
|
| 1050 | 1050 | and !@file_exists($fichier) |
| 1051 | 1051 | and lire_fichier($src = "$fichier.src", $source) |
| 1052 | 1052 | and $valeurs = unserialize($source) |
@@ -1083,7 +1083,7 @@ discard block |
||
| 1083 | 1083 | * Chemin du fichier d'image calculé |
| 1084 | 1084 | **/ |
| 1085 | 1085 | function ramasse_miettes($fichier) { |
| 1086 | - if (strpos($fichier,"://")!==false |
|
| 1086 | + if (strpos($fichier, "://") !== false |
|
| 1087 | 1087 | or !lire_fichier($src = "$fichier.src", $source) |
| 1088 | 1088 | or !$valeurs = unserialize($source) |
| 1089 | 1089 | ) { |
@@ -1139,7 +1139,7 @@ discard block |
||
| 1139 | 1139 | } |
| 1140 | 1140 | # si jamais le fichier final n'a pas ete calcule car suppose temporaire |
| 1141 | 1141 | # et qu'il ne s'agit pas d'une URL |
| 1142 | - if (strpos($fichier,"://")===false and !@file_exists($fichier)) { |
|
| 1142 | + if (strpos($fichier, "://") === false and !@file_exists($fichier)) { |
|
| 1143 | 1143 | reconstruire_image_intermediaire($fichier); |
| 1144 | 1144 | } |
| 1145 | 1145 | ramasse_miettes($fichier); |
@@ -1236,7 +1236,7 @@ discard block |
||
| 1236 | 1236 | |
| 1237 | 1237 | // attributs deprecies. Transformer en CSS |
| 1238 | 1238 | if ($espace = extraire_attribut($tag, 'hspace')) { |
| 1239 | - $style = "margin:${espace}px;" . $style; |
|
| 1239 | + $style = "margin:${espace}px;".$style; |
|
| 1240 | 1240 | $tag = inserer_attribut($tag, 'hspace', ''); |
| 1241 | 1241 | } |
| 1242 | 1242 | |
@@ -1360,7 +1360,7 @@ discard block |
||
| 1360 | 1360 | $image = $valeurs['fichier']; |
| 1361 | 1361 | $format = $valeurs['format_source']; |
| 1362 | 1362 | $destdir = dirname($valeurs['fichier_dest']); |
| 1363 | - $destfile = basename($valeurs['fichier_dest'], "." . $valeurs["format_dest"]); |
|
| 1363 | + $destfile = basename($valeurs['fichier_dest'], ".".$valeurs["format_dest"]); |
|
| 1364 | 1364 | |
| 1365 | 1365 | $format_sortie = $valeurs['format_dest']; |
| 1366 | 1366 | |
@@ -1392,14 +1392,14 @@ discard block |
||
| 1392 | 1392 | |
| 1393 | 1393 | // Si l'image est de la taille demandee (ou plus petite), simplement la retourner |
| 1394 | 1394 | if ($srcWidth and $srcWidth <= $maxWidth and $srcHeight <= $maxHeight) { |
| 1395 | - $vignette = $destination . '.' . $format; |
|
| 1395 | + $vignette = $destination.'.'.$format; |
|
| 1396 | 1396 | @copy($image, $vignette); |
| 1397 | 1397 | } |
| 1398 | 1398 | |
| 1399 | 1399 | elseif ($valeurs["format_source"] === 'svg') { |
| 1400 | - if ($svg = svg_redimensionner($valeurs['fichier'], $destWidth, $destHeight)){ |
|
| 1400 | + if ($svg = svg_redimensionner($valeurs['fichier'], $destWidth, $destHeight)) { |
|
| 1401 | 1401 | $format_sortie = 'svg'; |
| 1402 | - $vignette = $destination . "." . $format_sortie; |
|
| 1402 | + $vignette = $destination.".".$format_sortie; |
|
| 1403 | 1403 | $valeurs['fichier_dest'] = $vignette; |
| 1404 | 1404 | _image_gd_output($svg, $valeurs); |
| 1405 | 1405 | } |
@@ -1411,9 +1411,9 @@ discard block |
||
| 1411 | 1411 | define('_CONVERT_COMMAND', 'convert'); |
| 1412 | 1412 | } // Securite : mes_options.php peut preciser le chemin absolu |
| 1413 | 1413 | if (!defined('_RESIZE_COMMAND')) { |
| 1414 | - define('_RESIZE_COMMAND', _CONVERT_COMMAND . ' -quality ' . _IMG_CONVERT_QUALITE . ' -resize %xx%y! %src %dest'); |
|
| 1414 | + define('_RESIZE_COMMAND', _CONVERT_COMMAND.' -quality '._IMG_CONVERT_QUALITE.' -resize %xx%y! %src %dest'); |
|
| 1415 | 1415 | } |
| 1416 | - $vignette = $destination . "." . $format_sortie; |
|
| 1416 | + $vignette = $destination.".".$format_sortie; |
|
| 1417 | 1417 | $commande = str_replace( |
| 1418 | 1418 | array('%x', '%y', '%src', '%dest'), |
| 1419 | 1419 | array( |
@@ -1428,13 +1428,13 @@ discard block |
||
| 1428 | 1428 | if (!@file_exists($vignette)) { |
| 1429 | 1429 | spip_log("echec convert sur $vignette"); |
| 1430 | 1430 | |
| 1431 | - return; // echec commande |
|
| 1431 | + return; // echec commande |
|
| 1432 | 1432 | } |
| 1433 | 1433 | } |
| 1434 | 1434 | |
| 1435 | 1435 | // php5 imagemagick |
| 1436 | 1436 | elseif ($process == 'imagick') { |
| 1437 | - $vignette = "$destination." . $format_sortie; |
|
| 1437 | + $vignette = "$destination.".$format_sortie; |
|
| 1438 | 1438 | |
| 1439 | 1439 | if (!class_exists('Imagick')) { |
| 1440 | 1440 | spip_log("Classe Imagick absente !", _LOG_ERREUR); |
@@ -1444,7 +1444,7 @@ discard block |
||
| 1444 | 1444 | $imagick = new Imagick(); |
| 1445 | 1445 | $imagick->readImage($image); |
| 1446 | 1446 | $imagick->resizeImage($destWidth, $destHeight, Imagick::FILTER_LANCZOS, |
| 1447 | - 1);//, IMAGICK_FILTER_LANCZOS, _IMG_IMAGICK_QUALITE / 100); |
|
| 1447 | + 1); //, IMAGICK_FILTER_LANCZOS, _IMG_IMAGICK_QUALITE / 100); |
|
| 1448 | 1448 | $imagick->writeImage($vignette); |
| 1449 | 1449 | |
| 1450 | 1450 | if (!@file_exists($vignette)) { |
@@ -1462,12 +1462,12 @@ discard block |
||
| 1462 | 1462 | if (_PNMSCALE_COMMAND == '') { |
| 1463 | 1463 | return; |
| 1464 | 1464 | } |
| 1465 | - $vignette = $destination . "." . $format_sortie; |
|
| 1465 | + $vignette = $destination.".".$format_sortie; |
|
| 1466 | 1466 | $pnmtojpeg_command = str_replace("pnmscale", "pnmtojpeg", _PNMSCALE_COMMAND); |
| 1467 | 1467 | if ($format == "jpg") { |
| 1468 | 1468 | |
| 1469 | 1469 | $jpegtopnm_command = str_replace("pnmscale", "jpegtopnm", _PNMSCALE_COMMAND); |
| 1470 | - exec("$jpegtopnm_command $image | " . _PNMSCALE_COMMAND . " -width $destWidth | $pnmtojpeg_command > $vignette"); |
|
| 1470 | + exec("$jpegtopnm_command $image | "._PNMSCALE_COMMAND." -width $destWidth | $pnmtojpeg_command > $vignette"); |
|
| 1471 | 1471 | if (!($s = @filesize($vignette))) { |
| 1472 | 1472 | spip_unlink($vignette); |
| 1473 | 1473 | } |
@@ -1479,7 +1479,7 @@ discard block |
||
| 1479 | 1479 | } else { |
| 1480 | 1480 | if ($format == "gif") { |
| 1481 | 1481 | $giftopnm_command = str_replace("pnmscale", "giftopnm", _PNMSCALE_COMMAND); |
| 1482 | - exec("$giftopnm_command $image | " . _PNMSCALE_COMMAND . " -width $destWidth | $pnmtojpeg_command > $vignette"); |
|
| 1482 | + exec("$giftopnm_command $image | "._PNMSCALE_COMMAND." -width $destWidth | $pnmtojpeg_command > $vignette"); |
|
| 1483 | 1483 | if (!($s = @filesize($vignette))) { |
| 1484 | 1484 | spip_unlink($vignette); |
| 1485 | 1485 | } |
@@ -1491,7 +1491,7 @@ discard block |
||
| 1491 | 1491 | } else { |
| 1492 | 1492 | if ($format == "png") { |
| 1493 | 1493 | $pngtopnm_command = str_replace("pnmscale", "pngtopnm", _PNMSCALE_COMMAND); |
| 1494 | - exec("$pngtopnm_command $image | " . _PNMSCALE_COMMAND . " -width $destWidth | $pnmtojpeg_command > $vignette"); |
|
| 1494 | + exec("$pngtopnm_command $image | "._PNMSCALE_COMMAND." -width $destWidth | $pnmtojpeg_command > $vignette"); |
|
| 1495 | 1495 | if (!($s = @filesize($vignette))) { |
| 1496 | 1496 | spip_unlink($vignette); |
| 1497 | 1497 | } |
@@ -1513,7 +1513,7 @@ discard block |
||
| 1513 | 1513 | return; |
| 1514 | 1514 | } |
| 1515 | 1515 | if (_IMG_GD_MAX_PIXELS && $srcWidth * $srcHeight > _IMG_GD_MAX_PIXELS) { |
| 1516 | - spip_log("vignette gd1/gd2 impossible : " . $srcWidth * $srcHeight . "pixels"); |
|
| 1516 | + spip_log("vignette gd1/gd2 impossible : ".$srcWidth * $srcHeight."pixels"); |
|
| 1517 | 1517 | |
| 1518 | 1518 | return; |
| 1519 | 1519 | } |
@@ -1818,7 +1818,7 @@ discard block |
||
| 1818 | 1818 | // de l'image, de facon a tromper le cache du navigateur |
| 1819 | 1819 | // quand on fait supprimer/reuploader un logo |
| 1820 | 1820 | // (pas de filemtime si SAFE MODE) |
| 1821 | - $date = test_espace_prive() ? ('?' . $date) : ''; |
|
| 1821 | + $date = test_espace_prive() ? ('?'.$date) : ''; |
|
| 1822 | 1822 | |
| 1823 | 1823 | return _image_ecrire_tag($image, array('src' => "$logo$date", 'width' => $destWidth, 'height' => $destHeight)); |
| 1824 | 1824 | } |
@@ -1865,7 +1865,7 @@ discard block |
||
| 1865 | 1865 | public static function LittleEndian2String($number, $minbytes = 1) { |
| 1866 | 1866 | $intstring = ''; |
| 1867 | 1867 | while ($number > 0) { |
| 1868 | - $intstring = $intstring . chr($number & 255); |
|
| 1868 | + $intstring = $intstring.chr($number & 255); |
|
| 1869 | 1869 | $number >>= 8; |
| 1870 | 1870 | } |
| 1871 | 1871 | |
@@ -1898,9 +1898,9 @@ discard block |
||
| 1898 | 1898 | $b = $argb['blue']; |
| 1899 | 1899 | |
| 1900 | 1900 | if ($bpp[$key] == 32) { |
| 1901 | - $icXOR[$key] .= chr($b) . chr($g) . chr($r) . chr($a); |
|
| 1901 | + $icXOR[$key] .= chr($b).chr($g).chr($r).chr($a); |
|
| 1902 | 1902 | } elseif ($bpp[$key] == 24) { |
| 1903 | - $icXOR[$key] .= chr($b) . chr($g) . chr($r); |
|
| 1903 | + $icXOR[$key] .= chr($b).chr($g).chr($r); |
|
| 1904 | 1904 | } |
| 1905 | 1905 | |
| 1906 | 1906 | if ($a < 128) { |
@@ -1928,44 +1928,44 @@ discard block |
||
| 1928 | 1928 | |
| 1929 | 1929 | // BITMAPINFOHEADER - 40 bytes |
| 1930 | 1930 | $BitmapInfoHeader[$key] = ''; |
| 1931 | - $BitmapInfoHeader[$key] .= "\x28\x00\x00\x00"; // DWORD biSize; |
|
| 1932 | - $BitmapInfoHeader[$key] .= phpthumb_functions::LittleEndian2String($ImageWidths[$key], 4); // LONG biWidth; |
|
| 1931 | + $BitmapInfoHeader[$key] .= "\x28\x00\x00\x00"; // DWORD biSize; |
|
| 1932 | + $BitmapInfoHeader[$key] .= phpthumb_functions::LittleEndian2String($ImageWidths[$key], 4); // LONG biWidth; |
|
| 1933 | 1933 | // The biHeight member specifies the combined |
| 1934 | 1934 | // height of the XOR and AND masks. |
| 1935 | 1935 | $BitmapInfoHeader[$key] .= phpthumb_functions::LittleEndian2String($ImageHeights[$key] * 2, 4); // LONG biHeight; |
| 1936 | - $BitmapInfoHeader[$key] .= "\x01\x00"; // WORD biPlanes; |
|
| 1937 | - $BitmapInfoHeader[$key] .= chr($bpp[$key]) . "\x00"; // wBitCount; |
|
| 1938 | - $BitmapInfoHeader[$key] .= "\x00\x00\x00\x00"; // DWORD biCompression; |
|
| 1939 | - $BitmapInfoHeader[$key] .= phpthumb_functions::LittleEndian2String($biSizeImage, 4); // DWORD biSizeImage; |
|
| 1940 | - $BitmapInfoHeader[$key] .= "\x00\x00\x00\x00"; // LONG biXPelsPerMeter; |
|
| 1941 | - $BitmapInfoHeader[$key] .= "\x00\x00\x00\x00"; // LONG biYPelsPerMeter; |
|
| 1942 | - $BitmapInfoHeader[$key] .= "\x00\x00\x00\x00"; // DWORD biClrUsed; |
|
| 1943 | - $BitmapInfoHeader[$key] .= "\x00\x00\x00\x00"; // DWORD biClrImportant; |
|
| 1936 | + $BitmapInfoHeader[$key] .= "\x01\x00"; // WORD biPlanes; |
|
| 1937 | + $BitmapInfoHeader[$key] .= chr($bpp[$key])."\x00"; // wBitCount; |
|
| 1938 | + $BitmapInfoHeader[$key] .= "\x00\x00\x00\x00"; // DWORD biCompression; |
|
| 1939 | + $BitmapInfoHeader[$key] .= phpthumb_functions::LittleEndian2String($biSizeImage, 4); // DWORD biSizeImage; |
|
| 1940 | + $BitmapInfoHeader[$key] .= "\x00\x00\x00\x00"; // LONG biXPelsPerMeter; |
|
| 1941 | + $BitmapInfoHeader[$key] .= "\x00\x00\x00\x00"; // LONG biYPelsPerMeter; |
|
| 1942 | + $BitmapInfoHeader[$key] .= "\x00\x00\x00\x00"; // DWORD biClrUsed; |
|
| 1943 | + $BitmapInfoHeader[$key] .= "\x00\x00\x00\x00"; // DWORD biClrImportant; |
|
| 1944 | 1944 | } |
| 1945 | 1945 | |
| 1946 | 1946 | |
| 1947 | - $icondata = "\x00\x00"; // idReserved; // Reserved (must be 0) |
|
| 1948 | - $icondata .= "\x01\x00"; // idType; // Resource Type (1 for icons) |
|
| 1949 | - $icondata .= phpthumb_functions::LittleEndian2String(count($gd_image_array), 2); // idCount; // How many images? |
|
| 1947 | + $icondata = "\x00\x00"; // idReserved; // Reserved (must be 0) |
|
| 1948 | + $icondata .= "\x01\x00"; // idType; // Resource Type (1 for icons) |
|
| 1949 | + $icondata .= phpthumb_functions::LittleEndian2String(count($gd_image_array), 2); // idCount; // How many images? |
|
| 1950 | 1950 | |
| 1951 | 1951 | $dwImageOffset = 6 + (count($gd_image_array) * 16); |
| 1952 | 1952 | foreach ($gd_image_array as $key => $gd_image) { |
| 1953 | 1953 | // ICONDIRENTRY idEntries[1]; // An entry for each image (idCount of 'em) |
| 1954 | 1954 | |
| 1955 | - $icondata .= chr($ImageWidths[$key]); // bWidth; // Width, in pixels, of the image |
|
| 1956 | - $icondata .= chr($ImageHeights[$key]); // bHeight; // Height, in pixels, of the image |
|
| 1957 | - $icondata .= chr($totalcolors[$key]); // bColorCount; // Number of colors in image (0 if >=8bpp) |
|
| 1958 | - $icondata .= "\x00"; // bReserved; // Reserved ( must be 0) |
|
| 1955 | + $icondata .= chr($ImageWidths[$key]); // bWidth; // Width, in pixels, of the image |
|
| 1956 | + $icondata .= chr($ImageHeights[$key]); // bHeight; // Height, in pixels, of the image |
|
| 1957 | + $icondata .= chr($totalcolors[$key]); // bColorCount; // Number of colors in image (0 if >=8bpp) |
|
| 1958 | + $icondata .= "\x00"; // bReserved; // Reserved ( must be 0) |
|
| 1959 | 1959 | |
| 1960 | - $icondata .= "\x01\x00"; // wPlanes; // Color Planes |
|
| 1961 | - $icondata .= chr($bpp[$key]) . "\x00"; // wBitCount; // Bits per pixel |
|
| 1960 | + $icondata .= "\x01\x00"; // wPlanes; // Color Planes |
|
| 1961 | + $icondata .= chr($bpp[$key])."\x00"; // wBitCount; // Bits per pixel |
|
| 1962 | 1962 | |
| 1963 | 1963 | $dwBytesInRes = 40 + strlen($icXOR[$key]) + strlen($icAND[$key]); |
| 1964 | 1964 | $icondata .= phpthumb_functions::LittleEndian2String($dwBytesInRes, |
| 1965 | - 4); // dwBytesInRes; // How many bytes in this resource? |
|
| 1965 | + 4); // dwBytesInRes; // How many bytes in this resource? |
|
| 1966 | 1966 | |
| 1967 | 1967 | $icondata .= phpthumb_functions::LittleEndian2String($dwImageOffset, |
| 1968 | - 4); // dwImageOffset; // Where in the file is this image? |
|
| 1968 | + 4); // dwImageOffset; // Where in the file is this image? |
|
| 1969 | 1969 | $dwImageOffset += strlen($BitmapInfoHeader[$key]); |
| 1970 | 1970 | $dwImageOffset += strlen($icXOR[$key]); |
| 1971 | 1971 | $dwImageOffset += strlen($icAND[$key]); |
@@ -66,13 +66,13 @@ |
||
| 66 | 66 | // compat < SPIP 3.3 |
| 67 | 67 | include_spip('inc/filtres_images_mini'); |
| 68 | 68 | $c["couleur_foncee"] = $c["couleur_theme"]; |
| 69 | - $c["couleur_claire"] = '#' . couleur_eclaircir($c["couleur_theme"], .5); |
|
| 69 | + $c["couleur_claire"] = '#'.couleur_eclaircir($c["couleur_theme"], .5); |
|
| 70 | 70 | |
| 71 | 71 | return |
| 72 | - 'couleur_theme=' . substr($c['couleur_theme'], 1) |
|
| 72 | + 'couleur_theme='.substr($c['couleur_theme'], 1) |
|
| 73 | 73 | // compat < SPIP 3.3 |
| 74 | - . '&couleur_claire=' . substr($c['couleur_claire'], 1) |
|
| 75 | - . '&couleur_foncee=' . substr($c['couleur_foncee'], 1); |
|
| 74 | + . '&couleur_claire='.substr($c['couleur_claire'], 1) |
|
| 75 | + . '&couleur_foncee='.substr($c['couleur_foncee'], 1); |
|
| 76 | 76 | } else { |
| 77 | 77 | if (is_array($choix)) { |
| 78 | 78 | // compat < SPIP 3.3 |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | $titre = "[" |
| 91 | 91 | . $nom_site_spip |
| 92 | 92 | . "]" |
| 93 | - . ($titre ? " " . textebrut(typo($titre)) : ""); |
|
| 93 | + . ($titre ? " ".textebrut(typo($titre)) : ""); |
|
| 94 | 94 | |
| 95 | 95 | return _DOCTYPE_ECRIRE |
| 96 | 96 | . html_lang_attributes() |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | function init_body($rubrique = 'accueil', $sous_rubrique = 'accueil', $id_rubrique = '', $menu = true) { |
| 134 | 134 | |
| 135 | 135 | $res = pipeline('body_prive', "<body class='" |
| 136 | - . init_body_class() . " " . _request('exec') . "'" |
|
| 136 | + . init_body_class()." "._request('exec')."'" |
|
| 137 | 137 | . ($GLOBALS['spip_lang_rtl'] ? " dir='rtl'" : "") |
| 138 | 138 | . '>'); |
| 139 | 139 | |
@@ -176,7 +176,7 @@ discard block |
||
| 176 | 176 | |
| 177 | 177 | $couleur = isset($prefs['couleur']) ? (int) $prefs['couleur'] : 9; |
| 178 | 178 | |
| 179 | - $classes = $GLOBALS['spip_ecran'] . " spip-theme-colors-$couleur $spip_display_navigation $spip_display_outils " . $display_class[$GLOBALS['spip_display']]; |
|
| 179 | + $classes = $GLOBALS['spip_ecran']." spip-theme-colors-$couleur $spip_display_navigation $spip_display_outils ".$display_class[$GLOBALS['spip_display']]; |
|
| 180 | 180 | return spip_sanitize_classname($classes); |
| 181 | 181 | } |
| 182 | 182 | |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | |
| 23 | 23 | /** l'adresse du repertoire de telechargement et de decompactage des plugins */ |
| 24 | 24 | if (!defined('_DIR_PLUGINS_AUTO')) { |
| 25 | - define('_DIR_PLUGINS_AUTO', _DIR_PLUGINS . 'auto/'); |
|
| 25 | + define('_DIR_PLUGINS_AUTO', _DIR_PLUGINS.'auto/'); |
|
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | #include_spip('inc/texte'); // ????? Appelle public/parametrer trop tot avant la reconstruction du chemin des plugins. |
@@ -370,7 +370,7 @@ discard block |
||
| 370 | 370 | if ($dir) { |
| 371 | 371 | $dir .= "/"; |
| 372 | 372 | } |
| 373 | - $dir .= "procure:" . $procure['nom']; |
|
| 373 | + $dir .= "procure:".$procure['nom']; |
|
| 374 | 374 | |
| 375 | 375 | $procure['etat'] = '?'; |
| 376 | 376 | $procure['dir_type'] = $resume['dir_type']; |
@@ -551,7 +551,7 @@ discard block |
||
| 551 | 551 | $plug = $resume['dir']; |
| 552 | 552 | $k = $infos[$dir_type][$plug]; |
| 553 | 553 | |
| 554 | - $plug = constant($dir_type) . $plug; |
|
| 554 | + $plug = constant($dir_type).$plug; |
|
| 555 | 555 | if (!isset($msg[$p])) { |
| 556 | 556 | if (isset($resume['erreur']) and $resume['erreur']) { |
| 557 | 557 | $msg[$p] = array($resume['erreur']); |
@@ -594,10 +594,10 @@ discard block |
||
| 594 | 594 | $list = $raw ? array() : $GLOBALS['meta']['plugin_erreur_activation']; |
| 595 | 595 | } elseif (!$raw) { |
| 596 | 596 | foreach ($list as $plug => $msg) { |
| 597 | - $list[$plug] = "<li>" . _T('plugin_impossible_activer', array('plugin' => $plug)) |
|
| 598 | - . "<ul><li>" . implode("</li><li>", $msg) . "</li></ul></li>"; |
|
| 597 | + $list[$plug] = "<li>"._T('plugin_impossible_activer', array('plugin' => $plug)) |
|
| 598 | + . "<ul><li>".implode("</li><li>", $msg)."</li></ul></li>"; |
|
| 599 | 599 | } |
| 600 | - $list = "<ul>" . join("\n", $list) . "</ul>"; |
|
| 600 | + $list = "<ul>".join("\n", $list)."</ul>"; |
|
| 601 | 601 | } |
| 602 | 602 | if ($raz) { |
| 603 | 603 | effacer_meta('plugin_erreur_activation'); |
@@ -708,13 +708,13 @@ discard block |
||
| 708 | 708 | if ($minimum_inclus and spip_version_compare($version, $minimum, '<')) { |
| 709 | 709 | return _T("plugin_${balise}_${type}", array( |
| 710 | 710 | 'plugin' => $nom, |
| 711 | - 'version' => ' ≥ ' . $minimum |
|
| 711 | + 'version' => ' ≥ '.$minimum |
|
| 712 | 712 | )); |
| 713 | 713 | } |
| 714 | 714 | if (!$minimum_inclus and spip_version_compare($version, $minimum, '<=')) { |
| 715 | 715 | return _T("plugin_${balise}_${type}", array( |
| 716 | 716 | 'plugin' => $nom, |
| 717 | - 'version' => ' > ' . $minimum |
|
| 717 | + 'version' => ' > '.$minimum |
|
| 718 | 718 | )); |
| 719 | 719 | } |
| 720 | 720 | } |
@@ -723,13 +723,13 @@ discard block |
||
| 723 | 723 | if ($maximum_inclus and spip_version_compare($version, $maximum, '>')) { |
| 724 | 724 | return _T("plugin_${balise}_${type}", array( |
| 725 | 725 | 'plugin' => $nom, |
| 726 | - 'version' => ' ≤ ' . $maximum |
|
| 726 | + 'version' => ' ≤ '.$maximum |
|
| 727 | 727 | )); |
| 728 | 728 | } |
| 729 | 729 | if (!$maximum_inclus and spip_version_compare($version, $maximum, '>=')) { |
| 730 | 730 | return _T("plugin_${balise}_plugin", array( |
| 731 | 731 | 'plugin' => $nom, |
| 732 | - 'version' => ' < ' . $maximum |
|
| 732 | + 'version' => ' < '.$maximum |
|
| 733 | 733 | )); |
| 734 | 734 | } |
| 735 | 735 | } |
@@ -748,7 +748,7 @@ discard block |
||
| 748 | 748 | include_spip('inc/charger_plugin'); |
| 749 | 749 | $url = '<br />' . bouton_telechargement_plugin($url, 'lib'); |
| 750 | 750 | }*/ |
| 751 | - return _T('plugin_necessite_lib', array('lib' => $lib)) . " <a href='$url'>$url</a>"; |
|
| 751 | + return _T('plugin_necessite_lib', array('lib' => $lib))." <a href='$url'>$url</a>"; |
|
| 752 | 752 | } |
| 753 | 753 | |
| 754 | 754 | |
@@ -847,7 +847,7 @@ discard block |
||
| 847 | 847 | foreach ($plugin_valides as $p => $resume) { |
| 848 | 848 | // Les headers ne doivent pas indiquer les versions des extensions PHP, ni la version PHP |
| 849 | 849 | if (0 !== strpos($p, 'PHP:') and $p !== 'PHP') { |
| 850 | - $header[] = $p . ($resume['version'] ? "(" . $resume['version'] . ")" : ""); |
|
| 850 | + $header[] = $p.($resume['version'] ? "(".$resume['version'].")" : ""); |
|
| 851 | 851 | } |
| 852 | 852 | if ($resume['dir']) { |
| 853 | 853 | foreach ($infos[$resume['dir_type']][$resume['dir']]['lib'] as $l) { |
@@ -871,10 +871,10 @@ discard block |
||
| 871 | 871 | ecrire_meta('plugin_attente', serialize($liste)); |
| 872 | 872 | $header = strtolower(implode(",", $header)); |
| 873 | 873 | if (!isset($GLOBALS['spip_header_silencieux']) or !$GLOBALS['spip_header_silencieux']) { |
| 874 | - ecrire_fichier(_DIR_VAR . "config.txt", |
|
| 875 | - (defined('_HEADER_COMPOSED_BY') ? _HEADER_COMPOSED_BY : "Composed-By: SPIP") . ' ' . $GLOBALS['spip_version_affichee'] . " @ www.spip.net + " . $header); |
|
| 874 | + ecrire_fichier(_DIR_VAR."config.txt", |
|
| 875 | + (defined('_HEADER_COMPOSED_BY') ? _HEADER_COMPOSED_BY : "Composed-By: SPIP").' '.$GLOBALS['spip_version_affichee']." @ www.spip.net + ".$header); |
|
| 876 | 876 | } else { |
| 877 | - @unlink(_DIR_VAR . "config.txt"); |
|
| 877 | + @unlink(_DIR_VAR."config.txt"); |
|
| 878 | 878 | } |
| 879 | 879 | // generer charger_plugins_chemin.php |
| 880 | 880 | plugins_precompile_chemin($plugin_valides, $ordre); |
@@ -928,7 +928,7 @@ discard block |
||
| 928 | 928 | // definir le plugin, donc le path avant l'include du fichier options |
| 929 | 929 | // permet de faire des include_spip pour attraper un inc_ du plugin |
| 930 | 930 | |
| 931 | - $dir = $dir_type . ".'" . $plug . "/'"; |
|
| 931 | + $dir = $dir_type.".'".$plug."/'"; |
|
| 932 | 932 | |
| 933 | 933 | $prefix = strtoupper(preg_replace(',\W,', '_', $info['prefix'])); |
| 934 | 934 | if ( |
@@ -939,11 +939,11 @@ discard block |
||
| 939 | 939 | if (!$info['chemin']) { |
| 940 | 940 | $chemins['public'][] = "_DIR_PLUGIN_$prefix"; |
| 941 | 941 | $chemins['prive'][] = "_DIR_PLUGIN_$prefix"; |
| 942 | - if (is_dir(constant($dir_type) . $plug . '/squelettes/')) { |
|
| 942 | + if (is_dir(constant($dir_type).$plug.'/squelettes/')) { |
|
| 943 | 943 | $chemins['public'][] = "_DIR_PLUGIN_{$prefix}.'squelettes/'"; |
| 944 | 944 | } |
| 945 | 945 | } |
| 946 | - else{ |
|
| 946 | + else { |
|
| 947 | 947 | foreach ($info['chemin'] as $chemin) { |
| 948 | 948 | if (!isset($chemin['version']) or plugin_version_compatible($chemin['version'], |
| 949 | 949 | $GLOBALS['spip_version_branche'], 'spip') |
@@ -956,13 +956,13 @@ discard block |
||
| 956 | 956 | $dir = ''; |
| 957 | 957 | } |
| 958 | 958 | if (strlen($dir)) { |
| 959 | - $dir = rtrim($dir, '/') . '/'; |
|
| 959 | + $dir = rtrim($dir, '/').'/'; |
|
| 960 | 960 | } |
| 961 | 961 | if (!isset($chemin['type']) or $chemin['type'] == 'public') { |
| 962 | - $chemins['public'][] = "_DIR_PLUGIN_$prefix" . (strlen($dir) ? ".'$dir'" : ""); |
|
| 962 | + $chemins['public'][] = "_DIR_PLUGIN_$prefix".(strlen($dir) ? ".'$dir'" : ""); |
|
| 963 | 963 | } |
| 964 | 964 | if (!isset($chemin['type']) or $chemin['type'] == 'prive') { |
| 965 | - $chemins['prive'][] = "_DIR_PLUGIN_$prefix" . (strlen($dir) ? ".'$dir'" : ""); |
|
| 965 | + $chemins['prive'][] = "_DIR_PLUGIN_$prefix".(strlen($dir) ? ".'$dir'" : ""); |
|
| 966 | 966 | } |
| 967 | 967 | } |
| 968 | 968 | } |
@@ -971,9 +971,9 @@ discard block |
||
| 971 | 971 | } |
| 972 | 972 | } |
| 973 | 973 | if (count($chemins['public']) or count($chemins['prive'])) { |
| 974 | - $contenu .= "if (_DIR_RESTREINT) _chemin([" . implode(',', |
|
| 975 | - array_reverse($chemins['public'])) . "]);\n" |
|
| 976 | - . "else _chemin([" . implode(',', array_reverse($chemins['prive'])) . "]);\n"; |
|
| 974 | + $contenu .= "if (_DIR_RESTREINT) _chemin([".implode(',', |
|
| 975 | + array_reverse($chemins['public']))."]);\n" |
|
| 976 | + . "else _chemin([".implode(',', array_reverse($chemins['prive']))."]);\n"; |
|
| 977 | 977 | } |
| 978 | 978 | |
| 979 | 979 | ecrire_fichier_php(_CACHE_PLUGINS_PATH, $contenu); |
@@ -1021,7 +1021,7 @@ discard block |
||
| 1021 | 1021 | and strpos($dir, ":") === false // exclure le cas des procure: |
| 1022 | 1022 | and file_exists("$dir$plug/paquet.xml") // uniquement pour les paquet.xml |
| 1023 | 1023 | ) { |
| 1024 | - if (is_readable("$dir$plug/" . ($file = $info['prefix'] . "_" . $charge . ".php"))) { |
|
| 1024 | + if (is_readable("$dir$plug/".($file = $info['prefix']."_".$charge.".php"))) { |
|
| 1025 | 1025 | $info[$charge] = array($file); |
| 1026 | 1026 | } |
| 1027 | 1027 | } |
@@ -1037,7 +1037,7 @@ discard block |
||
| 1037 | 1037 | ) { |
| 1038 | 1038 | unset($info[$charge][$k]); |
| 1039 | 1039 | } else { |
| 1040 | - $_file = $root_dir_type . ".'$plug/$file'"; |
|
| 1040 | + $_file = $root_dir_type.".'$plug/$file'"; |
|
| 1041 | 1041 | $contenu[$charge] .= "include_once_check($_file);\n"; |
| 1042 | 1042 | } |
| 1043 | 1043 | } |
@@ -1047,7 +1047,7 @@ discard block |
||
| 1047 | 1047 | } |
| 1048 | 1048 | } |
| 1049 | 1049 | |
| 1050 | - $contenu['options'] = "define('_PLUGINS_HASH','" . md5($sign) . "');\n" . $contenu['options']; |
|
| 1050 | + $contenu['options'] = "define('_PLUGINS_HASH','".md5($sign)."');\n".$contenu['options']; |
|
| 1051 | 1051 | $contenu['fonctions'] .= plugin_ongletbouton("boutons_plugins", $boutons) |
| 1052 | 1052 | . plugin_ongletbouton("onglets_plugins", $onglets); |
| 1053 | 1053 | |
@@ -1082,12 +1082,12 @@ discard block |
||
| 1082 | 1082 | define("_UPDATED_$nom", $val); |
| 1083 | 1083 | define("_UPDATED_md5_$nom", $md5); |
| 1084 | 1084 | } |
| 1085 | - $val = "unserialize('" . str_replace("'", "\'", $val) . "')"; |
|
| 1085 | + $val = "unserialize('".str_replace("'", "\'", $val)."')"; |
|
| 1086 | 1086 | |
| 1087 | 1087 | return |
| 1088 | 1088 | "if (!function_exists('$nom')) {\n" |
| 1089 | 1089 | . "function $nom(){return defined('_UPDATED_$nom')?unserialize(_UPDATED_$nom):$val;}\n" |
| 1090 | - . "function md5_$nom(){return defined('_UPDATED_md5_$nom')?_UPDATED_md5_$nom:'" . $md5 . "';}\n" |
|
| 1090 | + . "function md5_$nom(){return defined('_UPDATED_md5_$nom')?_UPDATED_md5_$nom:'".$md5."';}\n" |
|
| 1091 | 1091 | . "}\n"; |
| 1092 | 1092 | } |
| 1093 | 1093 | |
@@ -1110,7 +1110,7 @@ discard block |
||
| 1110 | 1110 | if (@is_readable(_CACHE_PLUGINS_OPT)) { |
| 1111 | 1111 | include_once(_CACHE_PLUGINS_OPT); |
| 1112 | 1112 | } else { |
| 1113 | - spip_log("pipelines desactives: impossible de produire " . _CACHE_PLUGINS_OPT); |
|
| 1113 | + spip_log("pipelines desactives: impossible de produire "._CACHE_PLUGINS_OPT); |
|
| 1114 | 1114 | } |
| 1115 | 1115 | } |
| 1116 | 1116 | |
@@ -1147,7 +1147,7 @@ discard block |
||
| 1147 | 1147 | $dir_type = $plugin_valides[$p]['dir_type']; |
| 1148 | 1148 | $root_dir_type = str_replace('_DIR_', '_ROOT_', $dir_type); |
| 1149 | 1149 | $plug = $plugin_valides[$p]['dir']; |
| 1150 | - $prefix = (($info['prefix'] == "spip") ? "" : $info['prefix'] . "_"); |
|
| 1150 | + $prefix = (($info['prefix'] == "spip") ? "" : $info['prefix']."_"); |
|
| 1151 | 1151 | if (isset($info['pipeline']) and is_array($info['pipeline'])) { |
| 1152 | 1152 | foreach ($info['pipeline'] as $pipe) { |
| 1153 | 1153 | $nom = $pipe['nom']; |
@@ -1177,7 +1177,7 @@ discard block |
||
| 1177 | 1177 | } |
| 1178 | 1178 | if (isset($pipe['inclure'])) { |
| 1179 | 1179 | $GLOBALS['spip_matrice']["$prefix$action"] = |
| 1180 | - "$root_dir_type:$plug/" . $pipe['inclure']; |
|
| 1180 | + "$root_dir_type:$plug/".$pipe['inclure']; |
|
| 1181 | 1181 | } |
| 1182 | 1182 | } |
| 1183 | 1183 | } |
@@ -1187,7 +1187,7 @@ discard block |
||
| 1187 | 1187 | $prepend_code['taches_generales_cron'] = ""; |
| 1188 | 1188 | } |
| 1189 | 1189 | foreach ($info['genie'] as $genie) { |
| 1190 | - $nom = $prefix . $genie['nom']; |
|
| 1190 | + $nom = $prefix.$genie['nom']; |
|
| 1191 | 1191 | $periode = max(60, intval($genie['periode'])); |
| 1192 | 1192 | if (charger_fonction($nom, "genie", true)) { |
| 1193 | 1193 | $prepend_code['taches_generales_cron'] .= "\$val['$nom'] = $periode;\n"; |
@@ -1205,13 +1205,13 @@ discard block |
||
| 1205 | 1205 | } |
| 1206 | 1206 | foreach ($info['style'] as $style) { |
| 1207 | 1207 | if (isset($style['path']) and $style['path']) { |
| 1208 | - $code = "if (\$f=timestamp(direction_css(find_in_path('" . addslashes($style['path']) . "')))) "; |
|
| 1208 | + $code = "if (\$f=timestamp(direction_css(find_in_path('".addslashes($style['path'])."')))) "; |
|
| 1209 | 1209 | } else { |
| 1210 | - $code = "if (\$f='" . addslashes($style['url']) . "') "; |
|
| 1210 | + $code = "if (\$f='".addslashes($style['url'])."') "; |
|
| 1211 | 1211 | } |
| 1212 | 1212 | $code .= "\$val .= '<link rel=\"stylesheet\" href=\"'.\$f.'\" type=\"text/css\""; |
| 1213 | 1213 | if (isset($style['media']) and strlen($style['media'])) { |
| 1214 | - $code .= " media=\"" . addslashes($style['media']) . "\""; |
|
| 1214 | + $code .= " media=\"".addslashes($style['media'])."\""; |
|
| 1215 | 1215 | } |
| 1216 | 1216 | $code .= "/>';\n"; |
| 1217 | 1217 | if ($style['type'] != 'prive') { |
@@ -1231,9 +1231,9 @@ discard block |
||
| 1231 | 1231 | if (isset($info['script']) and count($info['script'])) { |
| 1232 | 1232 | foreach ($info['script'] as $script) { |
| 1233 | 1233 | if (isset($script['path']) and $script['path']) { |
| 1234 | - $code = "if (\$f=timestamp(find_in_path('" . addslashes($script['path']) . "'))) "; |
|
| 1234 | + $code = "if (\$f=timestamp(find_in_path('".addslashes($script['path'])."'))) "; |
|
| 1235 | 1235 | } else { |
| 1236 | - $code = "if (\$f='" . addslashes($script['url']) . "') "; |
|
| 1236 | + $code = "if (\$f='".addslashes($script['url'])."') "; |
|
| 1237 | 1237 | } |
| 1238 | 1238 | $code .= "\$val .= '<script src=\"'.\$f.'\" type=\"text/javascript\"></script>';\n"; |
| 1239 | 1239 | if ($script['type'] != 'prive') { |
@@ -1296,10 +1296,10 @@ discard block |
||
| 1296 | 1296 | unset($GLOBALS['spip_pipeline']['all']); |
| 1297 | 1297 | $all_pipes = trim(array_shift($a)); |
| 1298 | 1298 | if ($all_pipes) { |
| 1299 | - $all_pipes = '|' . ltrim($a, '|'); |
|
| 1299 | + $all_pipes = '|'.ltrim($a, '|'); |
|
| 1300 | 1300 | } |
| 1301 | 1301 | if (count($a)) { |
| 1302 | - $all_pipes_end = '||' . array_shift($a); |
|
| 1302 | + $all_pipes_end = '||'.array_shift($a); |
|
| 1303 | 1303 | } |
| 1304 | 1304 | } |
| 1305 | 1305 | $content = ""; |
@@ -1316,7 +1316,7 @@ discard block |
||
| 1316 | 1316 | // Eclater le pipeline en filtres et appliquer chaque filtre |
| 1317 | 1317 | foreach ($pipe as $fonc) { |
| 1318 | 1318 | $fonc = trim($fonc); |
| 1319 | - $s_call .= '$val = minipipe(\'' . $fonc . '\', $val);' . "\n"; |
|
| 1319 | + $s_call .= '$val = minipipe(\''.$fonc.'\', $val);'."\n"; |
|
| 1320 | 1320 | if (isset($GLOBALS['spip_matrice'][$fonc])) { |
| 1321 | 1321 | $file = $GLOBALS['spip_matrice'][$fonc]; |
| 1322 | 1322 | $file = "'$file'"; |
@@ -1327,7 +1327,7 @@ discard block |
||
| 1327 | 1327 | if (defined($root_dir)) { |
| 1328 | 1328 | $dir = $root_dir; |
| 1329 | 1329 | } |
| 1330 | - $file = str_replace($regs[0], "'." . $dir . ".'", $file); |
|
| 1330 | + $file = str_replace($regs[0], "'.".$dir.".'", $file); |
|
| 1331 | 1331 | $file = str_replace("''.", "", $file); |
| 1332 | 1332 | $file = str_replace(constant($dir), '', $file); |
| 1333 | 1333 | } |
@@ -1340,7 +1340,7 @@ discard block |
||
| 1340 | 1340 | $content .= "// Pipeline $action \n" |
| 1341 | 1341 | . "function execute_pipeline_$action(&\$val){\n" |
| 1342 | 1342 | . $s_inc |
| 1343 | - . ((isset($prepend_code[$action]) and strlen($prepend_code[$action])) ? trim($prepend_code[$action]) . "\n" : '') |
|
| 1343 | + . ((isset($prepend_code[$action]) and strlen($prepend_code[$action])) ? trim($prepend_code[$action])."\n" : '') |
|
| 1344 | 1344 | . $s_call |
| 1345 | 1345 | . "return \$val;\n}\n"; |
| 1346 | 1346 | } |
@@ -1424,18 +1424,18 @@ discard block |
||
| 1424 | 1424 | $GLOBALS['fichier_php_compile_recent'] = 0; |
| 1425 | 1425 | } |
| 1426 | 1426 | |
| 1427 | - $contenu = '<' . '?php' . "\n" . $comment . "\nif (defined('_ECRIRE_INC_VERSION')) {\n" . $contenu . "}\n?" . '>'; |
|
| 1427 | + $contenu = '<'.'?php'."\n".$comment."\nif (defined('_ECRIRE_INC_VERSION')) {\n".$contenu."}\n?".'>'; |
|
| 1428 | 1428 | // si un fichier existe deja on verifie que son contenu change avant de l'ecraser |
| 1429 | 1429 | // si pas de modif on ne touche pas au fichier initial |
| 1430 | 1430 | if (file_exists($nom)) { |
| 1431 | 1431 | if (substr($nom, -4) == '.php') { |
| 1432 | - $fichier_tmp = substr($nom, 0, -4) . '.tmp.php'; |
|
| 1432 | + $fichier_tmp = substr($nom, 0, -4).'.tmp.php'; |
|
| 1433 | 1433 | } |
| 1434 | 1434 | else { |
| 1435 | - $fichier_tmp = $nom . '.tmp'; |
|
| 1435 | + $fichier_tmp = $nom.'.tmp'; |
|
| 1436 | 1436 | } |
| 1437 | 1437 | file_put_contents($fichier_tmp, $contenu); |
| 1438 | - if(md5_file($nom) == md5_file($fichier_tmp)) { |
|
| 1438 | + if (md5_file($nom) == md5_file($fichier_tmp)) { |
|
| 1439 | 1439 | $GLOBALS['fichier_php_compile_recent'] = max($GLOBALS['fichier_php_compile_recent'], filemtime($nom)); |
| 1440 | 1440 | @unlink($fichier_tmp); |
| 1441 | 1441 | return; |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | |
| 135 | 135 | // ceci est la RegExp NO_REAL_NAME faisant hurler SpamAssassin |
| 136 | 136 | if (preg_match('/^["\s]*\<?\S+\@\S+\>?\s*$/', $from)) { |
| 137 | - $from .= ' (' . str_replace(')', '', translitteration(str_replace('@', ' at ', $from))) . ')'; |
|
| 137 | + $from .= ' ('.str_replace(')', '', translitteration(str_replace('@', ' at ', $from))).')'; |
|
| 138 | 138 | } |
| 139 | 139 | |
| 140 | 140 | // nettoyer les é ’, &emdash; etc... |
@@ -171,7 +171,7 @@ discard block |
||
| 171 | 171 | if (!_TEST_EMAIL_DEST) { |
| 172 | 172 | return false; |
| 173 | 173 | } else { |
| 174 | - $texte = "Dest : $destinataire\r\n" . $texte; |
|
| 174 | + $texte = "Dest : $destinataire\r\n".$texte; |
|
| 175 | 175 | $destinataire = _TEST_EMAIL_DEST; |
| 176 | 176 | } |
| 177 | 177 | } |
@@ -195,7 +195,7 @@ discard block |
||
| 195 | 195 | // Ajouter le Content-Type et consort s'il n'y est pas deja |
| 196 | 196 | if (strpos($headers, 'Content-Type: ') === false) { |
| 197 | 197 | $type = |
| 198 | - "Content-Type: text/plain;charset=\"$charset\";\n" . |
|
| 198 | + "Content-Type: text/plain;charset=\"$charset\";\n". |
|
| 199 | 199 | "Content-Transfer-Encoding: 8bit\n"; |
| 200 | 200 | } else { |
| 201 | 201 | $type = ''; |
@@ -209,15 +209,15 @@ discard block |
||
| 209 | 209 | else { |
| 210 | 210 | $domain = "@unknown-".md5($from).'.org'; |
| 211 | 211 | } |
| 212 | - $uniq = rand() . '_' . md5($to . $texte) . $domain; |
|
| 212 | + $uniq = rand().'_'.md5($to.$texte).$domain; |
|
| 213 | 213 | |
| 214 | 214 | // Si multi-part, s'en servir comme borne ... |
| 215 | 215 | if ($parts) { |
| 216 | - $texte = "--$uniq\n$type\n" . $texte . "\n"; |
|
| 216 | + $texte = "--$uniq\n$type\n".$texte."\n"; |
|
| 217 | 217 | foreach ($parts as $part) { |
| 218 | - $n = strlen($part[1]) . ($part[0] ? "\n" : ''); |
|
| 218 | + $n = strlen($part[1]).($part[0] ? "\n" : ''); |
|
| 219 | 219 | $e = join("\n", $part[0]); |
| 220 | - $texte .= "\n--$uniq\nContent-Length: $n$e\n\n" . $part[1]; |
|
| 220 | + $texte .= "\n--$uniq\nContent-Length: $n$e\n\n".$part[1]; |
|
| 221 | 221 | } |
| 222 | 222 | $texte .= "\n\n--$uniq--\n"; |
| 223 | 223 | // Si boundary n'est pas entre guillemets, |
@@ -227,7 +227,7 @@ discard block |
||
| 227 | 227 | |
| 228 | 228 | // .. et s'en servir pour plaire a SpamAssassin |
| 229 | 229 | |
| 230 | - $mid = 'Message-Id: <' . $uniq . '>'; |
|
| 230 | + $mid = 'Message-Id: <'.$uniq.'>'; |
|
| 231 | 231 | |
| 232 | 232 | // indispensable pour les sites qui collent d'office From: serveur-http |
| 233 | 233 | // sauf si deja mis par l'envoyeur |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | * Mot de passe |
| 32 | 32 | **/ |
| 33 | 33 | function creer_pass_aleatoire($longueur = 16, $sel = '') { |
| 34 | - $seed = (int)round(((float)microtime() + 1) * time()); |
|
| 34 | + $seed = (int) round(((float) microtime() + 1) * time()); |
|
| 35 | 35 | |
| 36 | 36 | mt_srand($seed); |
| 37 | 37 | srand($seed); |
@@ -43,9 +43,9 @@ discard block |
||
| 43 | 43 | if (!$s) { |
| 44 | 44 | $s = rand(); |
| 45 | 45 | } |
| 46 | - $s = substr(md5(uniqid($s) . $sel), 0, 16); |
|
| 46 | + $s = substr(md5(uniqid($s).$sel), 0, 16); |
|
| 47 | 47 | } |
| 48 | - $r = unpack('Cr', pack('H2', $s . $s)); |
|
| 48 | + $r = unpack('Cr', pack('H2', $s.$s)); |
|
| 49 | 49 | $x = $r['r'] & 63; |
| 50 | 50 | if ($x < 10) { |
| 51 | 51 | $x = chr($x + 48); |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | static $seeded; |
| 84 | 84 | |
| 85 | 85 | if (!$seeded) { |
| 86 | - $seed = (int)round(((float)microtime() + 1) * time()); |
|
| 86 | + $seed = (int) round(((float) microtime() + 1) * time()); |
|
| 87 | 87 | mt_srand($seed); |
| 88 | 88 | srand($seed); |
| 89 | 89 | $seeded = true; |
@@ -192,9 +192,9 @@ discard block |
||
| 192 | 192 | foreach ($args as $val => $var) { |
| 193 | 193 | if ($var) { |
| 194 | 194 | if ($val <> 'statut') { |
| 195 | - $a .= ':' . $val . '-' . $var; |
|
| 195 | + $a .= ':'.$val.'-'.$var; |
|
| 196 | 196 | } |
| 197 | - $b .= $val . '=' . $var . '&'; |
|
| 197 | + $b .= $val.'='.$var.'&'; |
|
| 198 | 198 | } |
| 199 | 199 | } |
| 200 | 200 | $a = substr($a, 1); |
@@ -224,7 +224,7 @@ discard block |
||
| 224 | 224 | * Clé |
| 225 | 225 | **/ |
| 226 | 226 | function afficher_low_sec($id_auteur, $action = '') { |
| 227 | - return substr(md5($action . low_sec($id_auteur)), 0, 8); |
|
| 227 | + return substr(md5($action.low_sec($id_auteur)), 0, 8); |
|
| 228 | 228 | } |
| 229 | 229 | |
| 230 | 230 | /** |
@@ -266,7 +266,7 @@ discard block |
||
| 266 | 266 | function initialiser_sel() { |
| 267 | 267 | if (!isset($GLOBALS['htsalt'])) { |
| 268 | 268 | if (CRYPT_MD5) { |
| 269 | - $GLOBALS['htsalt'] = '$1$' . creer_pass_aleatoire(); |
|
| 269 | + $GLOBALS['htsalt'] = '$1$'.creer_pass_aleatoire(); |
|
| 270 | 270 | } else { |
| 271 | 271 | $GLOBALS['htsalt'] = ''; |
| 272 | 272 | } |
@@ -288,8 +288,8 @@ discard block |
||
| 288 | 288 | * - void sinon. |
| 289 | 289 | **/ |
| 290 | 290 | function ecrire_acces() { |
| 291 | - $htaccess = _DIR_RESTREINT . _ACCESS_FILE_NAME; |
|
| 292 | - $htpasswd = _DIR_TMP . _AUTH_USER_FILE; |
|
| 291 | + $htaccess = _DIR_RESTREINT._ACCESS_FILE_NAME; |
|
| 292 | + $htpasswd = _DIR_TMP._AUTH_USER_FILE; |
|
| 293 | 293 | |
| 294 | 294 | // Cette variable de configuration peut etre posee par un plugin |
| 295 | 295 | // par exemple acces_restreint ; |
@@ -299,7 +299,7 @@ discard block |
||
| 299 | 299 | and !@file_exists($htaccess) |
| 300 | 300 | ) { |
| 301 | 301 | spip_unlink($htpasswd); |
| 302 | - spip_unlink($htpasswd . '-admin'); |
|
| 302 | + spip_unlink($htpasswd.'-admin'); |
|
| 303 | 303 | return; |
| 304 | 304 | } |
| 305 | 305 | |
@@ -331,7 +331,7 @@ discard block |
||
| 331 | 331 | $res = sql_select('login, htpass, statut', 'spip_auteurs', "htpass!='' AND login!='' AND ".sql_in('statut', ['1comite', '0minirezo', 'nouveau'])); |
| 332 | 332 | while ($row = sql_fetch($res)) { |
| 333 | 333 | if (strlen($row['login']) and strlen($row['htpass'])) { |
| 334 | - $ligne = $row['login'] . ':' . $row['htpass'] . "\n"; |
|
| 334 | + $ligne = $row['login'].':'.$row['htpass']."\n"; |
|
| 335 | 335 | $pwd_all .= $ligne; |
| 336 | 336 | if ($row['statut'] == '0minirezo') { |
| 337 | 337 | $pwd_admin .= $ligne; |
@@ -376,7 +376,7 @@ discard block |
||
| 376 | 376 | * @return boolean |
| 377 | 377 | */ |
| 378 | 378 | function verifier_htaccess($rep, $force = false) { |
| 379 | - $htaccess = rtrim($rep, '/') . '/' . _ACCESS_FILE_NAME; |
|
| 379 | + $htaccess = rtrim($rep, '/').'/'._ACCESS_FILE_NAME; |
|
| 380 | 380 | if (((@file_exists($htaccess)) or defined('_TEST_DIRS')) and !$force) { |
| 381 | 381 | return true; |
| 382 | 382 | } |
@@ -403,19 +403,19 @@ discard block |
||
| 403 | 403 | fputs($ht, $deny); |
| 404 | 404 | fclose($ht); |
| 405 | 405 | @chmod($htaccess, _SPIP_CHMOD & 0666); |
| 406 | - $t = rtrim($rep, '/') . '/.ok'; |
|
| 406 | + $t = rtrim($rep, '/').'/.ok'; |
|
| 407 | 407 | if ($ht = @fopen($t, 'w')) { |
| 408 | 408 | @fclose($ht); |
| 409 | 409 | include_spip('inc/distant'); |
| 410 | 410 | $t = substr($t, strlen(_DIR_RACINE)); |
| 411 | - $t = url_de_base() . $t; |
|
| 411 | + $t = url_de_base().$t; |
|
| 412 | 412 | $ht = recuperer_lapage($t, false, 'HEAD', 0); |
| 413 | 413 | // htaccess inoperant si on a recupere des entetes HTTP |
| 414 | 414 | // (ignorer la reussite si connexion par fopen) |
| 415 | 415 | $ht = !(isset($ht[0]) and $ht[0]); |
| 416 | 416 | } |
| 417 | 417 | } |
| 418 | - spip_log("Creation de $htaccess " . ($ht ? ' reussie' : ' manquee')); |
|
| 418 | + spip_log("Creation de $htaccess ".($ht ? ' reussie' : ' manquee')); |
|
| 419 | 419 | |
| 420 | 420 | return $ht; |
| 421 | 421 | } |
@@ -441,11 +441,11 @@ discard block |
||
| 441 | 441 | $dirs = sql_allfetsel('extension', 'spip_types_documents'); |
| 442 | 442 | $dirs[] = array('extension' => 'distant'); |
| 443 | 443 | foreach ($dirs as $e) { |
| 444 | - if (is_dir($dir = _DIR_IMG . $e['extension'])) { |
|
| 444 | + if (is_dir($dir = _DIR_IMG.$e['extension'])) { |
|
| 445 | 445 | if ($f) { |
| 446 | 446 | verifier_htaccess($dir); |
| 447 | 447 | } else { |
| 448 | - spip_unlink($dir . '/' . _ACCESS_FILE_NAME); |
|
| 448 | + spip_unlink($dir.'/'._ACCESS_FILE_NAME); |
|
| 449 | 449 | } |
| 450 | 450 | } |
| 451 | 451 | } |
@@ -252,7 +252,7 @@ discard block |
||
| 252 | 252 | |
| 253 | 253 | // https://code.spip.net/@_sqlite_func_preg_replace |
| 254 | 254 | function _sqlite_func_preg_replace($quoi, $cherche, $remplace) { |
| 255 | - $return = preg_replace('%' . $cherche . '%', $remplace, $quoi); |
|
| 255 | + $return = preg_replace('%'.$cherche.'%', $remplace, $quoi); |
|
| 256 | 256 | |
| 257 | 257 | #spip_log("preg_replace : $quoi, $cherche, $remplace, $return",'sqlite.'._LOG_DEBUG); |
| 258 | 258 | return $return; |
@@ -308,7 +308,7 @@ discard block |
||
| 308 | 308 | return false; |
| 309 | 309 | } |
| 310 | 310 | $u = isset($GLOBALS['meta']['pcre_u']) ? $GLOBALS['meta']['pcre_u'] : 'u'; |
| 311 | - $return = preg_match('%' . $cherche . '%imsS' . $u, $quoi); |
|
| 311 | + $return = preg_match('%'.$cherche.'%imsS'.$u, $quoi); |
|
| 312 | 312 | |
| 313 | 313 | #spip_log("regexp_replace : $quoi, $cherche, $remplace, $return",'sqlite.'._LOG_DEBUG); |
| 314 | 314 | return $return; |
@@ -357,7 +357,7 @@ discard block |
||
| 357 | 357 | $count = 0; |
| 358 | 358 | str_replace($mysql_to_strftime_not_ok, '', $conv, $count); |
| 359 | 359 | if ($count > 0) { |
| 360 | - spip_log("DATE_FORMAT : At least one parameter can't be parsed by strftime with format '$conv'", 'sqlite.' . _LOG_ERREUR); |
|
| 360 | + spip_log("DATE_FORMAT : At least one parameter can't be parsed by strftime with format '$conv'", 'sqlite.'._LOG_ERREUR); |
|
| 361 | 361 | } |
| 362 | 362 | $to_strftime[$conv] = str_replace(array_keys($mysql_to_strftime), $mysql_to_strftime, $conv); |
| 363 | 363 | } |
@@ -374,7 +374,7 @@ discard block |
||
| 374 | 374 | */ |
| 375 | 375 | function _sqlite_func_to_days($d) { |
| 376 | 376 | static $offset = 719528; // nb de jour entre 0000-00-00 et timestamp 0=1970-01-01 |
| 377 | - $result = $offset + (int)ceil(_sqlite_func_unix_timestamp($d) / (24 * 3600)); |
|
| 377 | + $result = $offset + (int) ceil(_sqlite_func_unix_timestamp($d) / (24 * 3600)); |
|
| 378 | 378 | |
| 379 | 379 | #spip_log("Passage avec TO_DAYS : $d, $result",'sqlite.'._LOG_DEBUG); |
| 380 | 380 | return $result; |