@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | if ($fichier) { |
| 111 | 111 | $code = "quete_logo_file($doc, $qconnect)"; |
| 112 | 112 | } else { |
| 113 | - $code = "quete_logo_document($doc, " . ($lien ?: "''") . ", '$align', '$mode_logo', $coord_x, $coord_y, $qconnect)"; |
|
| 113 | + $code = "quete_logo_document($doc, ".($lien ?: "''").", '$align', '$mode_logo', $coord_x, $coord_y, $qconnect)"; |
|
| 114 | 114 | } |
| 115 | 115 | // (x=non-faux ? y : '') pour affecter x en retournant y |
| 116 | 116 | if ($p->descr['documents']) { |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | |
| 134 | 134 | // demande de reduction sur logo avec ecriture spip 2.1 : #LOGO_xxx{200, 0} |
| 135 | 135 | if ($coord_x or $coord_y) { |
| 136 | - $code = "filtrer('image_graver',filtrer('image_reduire'," . $code . ", '$coord_x', '$coord_y'))"; |
|
| 136 | + $code = "filtrer('image_graver',filtrer('image_reduire',".$code.", '$coord_x', '$coord_y'))"; |
|
| 137 | 137 | } |
| 138 | 138 | |
| 139 | 139 | $p->code = $code; |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | ]; |
| 44 | 44 | $options = array_merge($defaut, $options); |
| 45 | 45 | if (is_numeric($options['expires']) and $options['expires'] > 0) { |
| 46 | - $options['expires'] = gmdate('D, d M Y H:i:s', time() + $options['expires']) . ' GMT'; |
|
| 46 | + $options['expires'] = gmdate('D, d M Y H:i:s', time() + $options['expires']).' GMT'; |
|
| 47 | 47 | } |
| 48 | 48 | |
| 49 | 49 | if (is_null($options) and isset($_SERVER['HTTP_RANGE'])) { |
@@ -72,12 +72,12 @@ discard block |
||
| 72 | 72 | function spip_livrer_fichier_entetes($fichier, $content_type = 'application/octet-stream', $attachment = false, $expires = 0) { |
| 73 | 73 | // toujours envoyer un content type, meme vide ! |
| 74 | 74 | header('Accept-Ranges: bytes'); |
| 75 | - header('Content-Type: ' . $content_type); |
|
| 75 | + header('Content-Type: '.$content_type); |
|
| 76 | 76 | |
| 77 | 77 | if ($fs = stat($fichier) |
| 78 | 78 | and !empty($fs['size']) |
| 79 | 79 | and !empty($fs['mtime'])) { |
| 80 | - header("Last-Modified: " . gmdate("D, d M Y H:i:s", $fs['mtime']) . " GMT"); |
|
| 80 | + header("Last-Modified: ".gmdate("D, d M Y H:i:s", $fs['mtime'])." GMT"); |
|
| 81 | 81 | header(sprintf('Etag: "%x-%x"', $fs['size'], str_pad($fs['mtime'], 16, "0"))); |
| 82 | 82 | } |
| 83 | 83 | |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | else { |
| 98 | 98 | $f = basename($fichier); |
| 99 | 99 | header("Content-Disposition: inline; filename=\"$f\";"); |
| 100 | - header('Expires: ' . $expires); // set expiration time |
|
| 100 | + header('Expires: '.$expires); // set expiration time |
|
| 101 | 101 | } |
| 102 | 102 | } |
| 103 | 103 | |
@@ -149,12 +149,12 @@ discard block |
||
| 149 | 149 | // Parse Content-Range header for byte offsets, looks like "bytes=11525-" OR "bytes=11525-12451" |
| 150 | 150 | if ($range and preg_match('%bytes=(\d+)-(\d+)?%i', $range, $match)) { |
| 151 | 151 | ### Offset signifies where we should begin to read the file |
| 152 | - $byteOffset = (int)$match[1]; |
|
| 152 | + $byteOffset = (int) $match[1]; |
|
| 153 | 153 | |
| 154 | 154 | |
| 155 | 155 | ### Length is for how long we should read the file according to the browser, and can never go beyond the file size |
| 156 | 156 | if (isset($match[2])) { |
| 157 | - $finishBytes = (int)$match[2]; |
|
| 157 | + $finishBytes = (int) $match[2]; |
|
| 158 | 158 | $byteLength = $finishBytes + 1; |
| 159 | 159 | } else { |
| 160 | 160 | $finishBytes = $fileSize - 1; |
@@ -175,7 +175,7 @@ discard block |
||
| 175 | 175 | |
| 176 | 176 | // partial content |
| 177 | 177 | header('HTTP/1.1 206 Partial content'); |
| 178 | - header($cr_header); ### Decrease by 1 on byte-length since this definition is zero-based index of bytes being sent |
|
| 178 | + header($cr_header); ### Decrease by 1 on byte-length since this definition is zero-based index of bytes being sent |
|
| 179 | 179 | |
| 180 | 180 | |
| 181 | 181 | $byteRange = $byteLength - $byteOffset; |
@@ -43,13 +43,13 @@ discard block |
||
| 43 | 43 | $blue = dechex($blue); |
| 44 | 44 | |
| 45 | 45 | if (strlen($red) == 1) { |
| 46 | - $red = '0' . $red; |
|
| 46 | + $red = '0'.$red; |
|
| 47 | 47 | } |
| 48 | 48 | if (strlen($green) == 1) { |
| 49 | - $green = '0' . $green; |
|
| 49 | + $green = '0'.$green; |
|
| 50 | 50 | } |
| 51 | 51 | if (strlen($blue) == 1) { |
| 52 | - $blue = '0' . $blue; |
|
| 52 | + $blue = '0'.$blue; |
|
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | 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)); |
@@ -126,9 +126,9 @@ discard block |
||
| 126 | 126 | $var_G = ($G / 255); |
| 127 | 127 | $var_B = ($B / 255); |
| 128 | 128 | |
| 129 | - $var_Min = min($var_R, $var_G, $var_B); //Min. value of RGB |
|
| 130 | - $var_Max = max($var_R, $var_G, $var_B); //Max. value of RGB |
|
| 131 | - $del_Max = $var_Max - $var_Min; //Delta RGB value |
|
| 129 | + $var_Min = min($var_R, $var_G, $var_B); //Min. value of RGB |
|
| 130 | + $var_Max = max($var_R, $var_G, $var_B); //Max. value of RGB |
|
| 131 | + $del_Max = $var_Max - $var_Min; //Delta RGB value |
|
| 132 | 132 | |
| 133 | 133 | $L = ($var_Max + $var_Min) / 2; |
| 134 | 134 | |
@@ -190,7 +190,7 @@ discard block |
||
| 190 | 190 | */ |
| 191 | 191 | function _couleur_hsl_to_rgb($H, $S, $L) { |
| 192 | 192 | // helper |
| 193 | - $hue_2_rgb = function ($v1, $v2, $vH) { |
|
| 193 | + $hue_2_rgb = function($v1, $v2, $vH) { |
|
| 194 | 194 | if ($vH < 0) { |
| 195 | 195 | $vH += 1; |
| 196 | 196 | } |
@@ -322,11 +322,11 @@ discard block |
||
| 322 | 322 | $img = "<img src='$source' />"; |
| 323 | 323 | } elseif ( |
| 324 | 324 | preg_match('@^data:image/([^;]*);base64,(.*)$@isS', $source, $regs) |
| 325 | - and $extension = _image_trouver_extension_depuis_mime('image/' . $regs[1]) |
|
| 325 | + and $extension = _image_trouver_extension_depuis_mime('image/'.$regs[1]) |
|
| 326 | 326 | and in_array($extension, _image_extensions_acceptees_en_entree()) |
| 327 | 327 | ) { |
| 328 | 328 | # gerer img src="data:....base64" |
| 329 | - $local = sous_repertoire(_DIR_VAR, 'image-data') . md5($regs[2]) . '.' . _image_extension_normalisee($extension); |
|
| 329 | + $local = sous_repertoire(_DIR_VAR, 'image-data').md5($regs[2]).'.'._image_extension_normalisee($extension); |
|
| 330 | 330 | if (!file_exists($local)) { |
| 331 | 331 | ecrire_fichier($local, base64_decode($regs[2])); |
| 332 | 332 | } |
@@ -343,7 +343,7 @@ discard block |
||
| 343 | 343 | // les protocoles web prennent au moins 3 lettres |
| 344 | 344 | if (tester_url_absolue($source)) { |
| 345 | 345 | include_spip('inc/distant'); |
| 346 | - $fichier = _DIR_RACINE . copie_locale($source); |
|
| 346 | + $fichier = _DIR_RACINE.copie_locale($source); |
|
| 347 | 347 | if (!$fichier) { |
| 348 | 348 | return ''; |
| 349 | 349 | } |
@@ -445,9 +445,9 @@ discard block |
||
| 445 | 445 | // on garde la terminaison initiale car image simplement copiee |
| 446 | 446 | // et on postfixe son nom avec un md5 du path |
| 447 | 447 | $terminaison_dest = $terminaison; |
| 448 | - $fichier_dest .= '-' . substr(md5("$identifiant"), 0, 5); |
|
| 448 | + $fichier_dest .= '-'.substr(md5("$identifiant"), 0, 5); |
|
| 449 | 449 | } else { |
| 450 | - $fichier_dest .= '-' . substr(md5("$identifiant-$effet"), 0, 5); |
|
| 450 | + $fichier_dest .= '-'.substr(md5("$identifiant-$effet"), 0, 5); |
|
| 451 | 451 | } |
| 452 | 452 | $cache = sous_repertoire(_DIR_VAR, $cache); |
| 453 | 453 | $cache = sous_repertoire($cache, $effet); |
@@ -458,7 +458,7 @@ discard block |
||
| 458 | 458 | $fichier_dest = substr($fichier_dest, 2); |
| 459 | 459 | } |
| 460 | 460 | |
| 461 | - $fichier_dest = $cache . $fichier_dest . '.' . $terminaison_dest; |
|
| 461 | + $fichier_dest = $cache.$fichier_dest.'.'.$terminaison_dest; |
|
| 462 | 462 | |
| 463 | 463 | $GLOBALS['images_calculees'][] = $fichier_dest; |
| 464 | 464 | |
@@ -496,15 +496,15 @@ discard block |
||
| 496 | 496 | |
| 497 | 497 | if ($creer) { |
| 498 | 498 | spip_log( |
| 499 | - 'filtre image ' . ($fonction_creation ? reset($fonction_creation) : '') . "[$effet] sur $fichier", |
|
| 500 | - 'images' . _LOG_DEBUG |
|
| 499 | + 'filtre image '.($fonction_creation ? reset($fonction_creation) : '')."[$effet] sur $fichier", |
|
| 500 | + 'images'._LOG_DEBUG |
|
| 501 | 501 | ); |
| 502 | 502 | } |
| 503 | 503 | |
| 504 | 504 | $term_fonction = _image_trouver_extension_pertinente($fichier); |
| 505 | - $ret['fonction_imagecreatefrom'] = '_imagecreatefrom' . $term_fonction; |
|
| 505 | + $ret['fonction_imagecreatefrom'] = '_imagecreatefrom'.$term_fonction; |
|
| 506 | 506 | $ret['fichier'] = $fichier; |
| 507 | - $ret['fonction_image'] = '_image_image' . $terminaison_dest; |
|
| 507 | + $ret['fonction_image'] = '_image_image'.$terminaison_dest; |
|
| 508 | 508 | $ret['fichier_dest'] = $fichier_dest; |
| 509 | 509 | $ret['format_source'] = _image_extension_normalisee($terminaison); |
| 510 | 510 | $ret['format_dest'] = $terminaison_dest; |
@@ -654,7 +654,7 @@ discard block |
||
| 654 | 654 | |
| 655 | 655 | $_terminaison = _image_trouver_extension_depuis_mime($mime); |
| 656 | 656 | if ($_terminaison and $_terminaison !== $terminaison) { |
| 657 | - spip_log("Mauvaise extension du fichier : $path . Son type mime est : $mime", 'images.' . _LOG_INFO_IMPORTANTE); |
|
| 657 | + spip_log("Mauvaise extension du fichier : $path . Son type mime est : $mime", 'images.'._LOG_INFO_IMPORTANTE); |
|
| 658 | 658 | $terminaison = $_terminaison; |
| 659 | 659 | } |
| 660 | 660 | return $terminaison; |
@@ -811,7 +811,7 @@ discard block |
||
| 811 | 811 | if (!function_exists('imagepng')) { |
| 812 | 812 | return false; |
| 813 | 813 | } |
| 814 | - $tmp = $fichier . '.tmp'; |
|
| 814 | + $tmp = $fichier.'.tmp'; |
|
| 815 | 815 | $ret = imagepng($img, $tmp); |
| 816 | 816 | if (file_exists($tmp)) { |
| 817 | 817 | $taille_test = @getimagesize($tmp); |
@@ -846,7 +846,7 @@ discard block |
||
| 846 | 846 | if (!function_exists('imagegif')) { |
| 847 | 847 | return false; |
| 848 | 848 | } |
| 849 | - $tmp = $fichier . '.tmp'; |
|
| 849 | + $tmp = $fichier.'.tmp'; |
|
| 850 | 850 | $ret = imagegif($img, $tmp); |
| 851 | 851 | if (file_exists($tmp)) { |
| 852 | 852 | $taille_test = @getimagesize($tmp); |
@@ -886,7 +886,7 @@ discard block |
||
| 886 | 886 | if (!function_exists('imagejpeg')) { |
| 887 | 887 | return false; |
| 888 | 888 | } |
| 889 | - $tmp = $fichier . '.tmp'; |
|
| 889 | + $tmp = $fichier.'.tmp'; |
|
| 890 | 890 | |
| 891 | 891 | // Enable interlancing |
| 892 | 892 | imageinterlace($img, true); |
@@ -947,7 +947,7 @@ discard block |
||
| 947 | 947 | if (!function_exists('imagewebp')) { |
| 948 | 948 | return false; |
| 949 | 949 | } |
| 950 | - $tmp = $fichier . '.tmp'; |
|
| 950 | + $tmp = $fichier.'.tmp'; |
|
| 951 | 951 | $ret = imagewebp($img, $tmp, $qualite); |
| 952 | 952 | if (file_exists($tmp)) { |
| 953 | 953 | $taille_test = @getimagesize($tmp); |
@@ -981,7 +981,7 @@ discard block |
||
| 981 | 981 | */ |
| 982 | 982 | function _image_imagesvg($img, $fichier) { |
| 983 | 983 | |
| 984 | - $tmp = $fichier . '.tmp'; |
|
| 984 | + $tmp = $fichier.'.tmp'; |
|
| 985 | 985 | if (strpos($img, '<') === false) { |
| 986 | 986 | $img = supprimer_timestamp($img); |
| 987 | 987 | if (!file_exists($img)) { |
@@ -1038,13 +1038,13 @@ discard block |
||
| 1038 | 1038 | */ |
| 1039 | 1039 | function _image_gd_output($img, $valeurs, $qualite = _IMG_GD_QUALITE, $fonction = null) { |
| 1040 | 1040 | if (is_null($fonction)) { |
| 1041 | - $fonction = '_image_image' . $valeurs['format_dest']; |
|
| 1041 | + $fonction = '_image_image'.$valeurs['format_dest']; |
|
| 1042 | 1042 | } |
| 1043 | 1043 | $ret = false; |
| 1044 | 1044 | #un flag pour reperer les images gravees |
| 1045 | 1045 | $lock = ( |
| 1046 | 1046 | !statut_effacer_images_temporaires('get') // si la fonction n'a pas ete activee, on grave tout |
| 1047 | - or (@file_exists($valeurs['fichier_dest']) and !@file_exists($valeurs['fichier_dest'] . '.src')) |
|
| 1047 | + or (@file_exists($valeurs['fichier_dest']) and !@file_exists($valeurs['fichier_dest'].'.src')) |
|
| 1048 | 1048 | ); |
| 1049 | 1049 | if ( |
| 1050 | 1050 | function_exists($fonction) |
@@ -1056,7 +1056,7 @@ discard block |
||
| 1056 | 1056 | // dans tous les cas mettre a jour la taille de l'image finale |
| 1057 | 1057 | [$valeurs['hauteur_dest'], $valeurs['largeur_dest']] = taille_image($valeurs['fichier_dest']); |
| 1058 | 1058 | $valeurs['date'] = @filemtime($valeurs['fichier_dest']); // pour la retrouver apres disparition |
| 1059 | - ecrire_fichier($valeurs['fichier_dest'] . '.src', serialize($valeurs), true); |
|
| 1059 | + ecrire_fichier($valeurs['fichier_dest'].'.src', serialize($valeurs), true); |
|
| 1060 | 1060 | } |
| 1061 | 1061 | } |
| 1062 | 1062 | |
@@ -1231,7 +1231,7 @@ discard block |
||
| 1231 | 1231 | |
| 1232 | 1232 | // attributs deprecies. Transformer en CSS |
| 1233 | 1233 | if ($espace = extraire_attribut($tag, 'hspace')) { |
| 1234 | - $style = "margin:{$espace}px;" . $style; |
|
| 1234 | + $style = "margin:{$espace}px;".$style; |
|
| 1235 | 1235 | $tag = inserer_attribut($tag, 'hspace', ''); |
| 1236 | 1236 | } |
| 1237 | 1237 | |
@@ -1358,7 +1358,7 @@ discard block |
||
| 1358 | 1358 | $image = $valeurs['fichier']; |
| 1359 | 1359 | $format = $valeurs['format_source']; |
| 1360 | 1360 | $destdir = dirname($valeurs['fichier_dest']); |
| 1361 | - $destfile = basename($valeurs['fichier_dest'], '.' . $valeurs['format_dest']); |
|
| 1361 | + $destfile = basename($valeurs['fichier_dest'], '.'.$valeurs['format_dest']); |
|
| 1362 | 1362 | |
| 1363 | 1363 | $format_sortie = $valeurs['format_dest']; |
| 1364 | 1364 | |
@@ -1390,7 +1390,7 @@ discard block |
||
| 1390 | 1390 | |
| 1391 | 1391 | // Si l'image est de la taille demandee (ou plus petite), simplement la retourner |
| 1392 | 1392 | if ($srcWidth and $srcWidth <= $maxWidth and $srcHeight <= $maxHeight) { |
| 1393 | - $vignette = $destination . '.' . $format; |
|
| 1393 | + $vignette = $destination.'.'.$format; |
|
| 1394 | 1394 | @copy($image, $vignette); |
| 1395 | 1395 | } |
| 1396 | 1396 | |
@@ -1398,7 +1398,7 @@ discard block |
||
| 1398 | 1398 | include_spip('inc/svg'); |
| 1399 | 1399 | if ($svg = svg_redimensionner($valeurs['fichier'], $destWidth, $destHeight)) { |
| 1400 | 1400 | $format_sortie = 'svg'; |
| 1401 | - $vignette = $destination . '.' . $format_sortie; |
|
| 1401 | + $vignette = $destination.'.'.$format_sortie; |
|
| 1402 | 1402 | $valeurs['fichier_dest'] = $vignette; |
| 1403 | 1403 | _image_gd_output($svg, $valeurs); |
| 1404 | 1404 | } |
@@ -1410,9 +1410,9 @@ discard block |
||
| 1410 | 1410 | define('_CONVERT_COMMAND', 'convert'); |
| 1411 | 1411 | } // Securite : mes_options.php peut preciser le chemin absolu |
| 1412 | 1412 | if (!defined('_RESIZE_COMMAND')) { |
| 1413 | - define('_RESIZE_COMMAND', _CONVERT_COMMAND . ' -quality ' . _IMG_CONVERT_QUALITE . ' -resize %xx%y! %src %dest'); |
|
| 1413 | + define('_RESIZE_COMMAND', _CONVERT_COMMAND.' -quality '._IMG_CONVERT_QUALITE.' -resize %xx%y! %src %dest'); |
|
| 1414 | 1414 | } |
| 1415 | - $vignette = $destination . '.' . $format_sortie; |
|
| 1415 | + $vignette = $destination.'.'.$format_sortie; |
|
| 1416 | 1416 | $commande = str_replace( |
| 1417 | 1417 | ['%x', '%y', '%src', '%dest'], |
| 1418 | 1418 | [ |
@@ -1428,7 +1428,7 @@ 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 | |
@@ -1445,7 +1445,7 @@ discard block |
||
| 1445 | 1445 | if (!$output) { |
| 1446 | 1446 | return; |
| 1447 | 1447 | } |
| 1448 | - $vignette = $output . DIRECTORY_SEPARATOR . basename($destination) . '.' . $format_sortie; |
|
| 1448 | + $vignette = $output.DIRECTORY_SEPARATOR.basename($destination).'.'.$format_sortie; |
|
| 1449 | 1449 | |
| 1450 | 1450 | $imagick = new Imagick(); |
| 1451 | 1451 | $imagick->readImage(realpath($image)); |
@@ -1454,7 +1454,7 @@ discard block |
||
| 1454 | 1454 | $destHeight, |
| 1455 | 1455 | Imagick::FILTER_LANCZOS, |
| 1456 | 1456 | 1 |
| 1457 | - );//, IMAGICK_FILTER_LANCZOS, _IMG_IMAGICK_QUALITE / 100); |
|
| 1457 | + ); //, IMAGICK_FILTER_LANCZOS, _IMG_IMAGICK_QUALITE / 100); |
|
| 1458 | 1458 | $imagick->writeImage($vignette); |
| 1459 | 1459 | |
| 1460 | 1460 | if (!@file_exists($vignette)) { |
@@ -1463,7 +1463,7 @@ discard block |
||
| 1463 | 1463 | return; |
| 1464 | 1464 | } |
| 1465 | 1465 | // remettre le chemin relatif car c'est ce qu'attend SPIP pour la suite (en particlier action/tester) |
| 1466 | - $vignette = $destination . '.' . $format_sortie; |
|
| 1466 | + $vignette = $destination.'.'.$format_sortie; |
|
| 1467 | 1467 | } |
| 1468 | 1468 | |
| 1469 | 1469 | // netpbm |
@@ -1474,11 +1474,11 @@ discard block |
||
| 1474 | 1474 | if (_PNMSCALE_COMMAND == '') { |
| 1475 | 1475 | return; |
| 1476 | 1476 | } |
| 1477 | - $vignette = $destination . '.' . $format_sortie; |
|
| 1477 | + $vignette = $destination.'.'.$format_sortie; |
|
| 1478 | 1478 | $pnmtojpeg_command = str_replace('pnmscale', 'pnmtojpeg', _PNMSCALE_COMMAND); |
| 1479 | 1479 | if ($format == 'jpg') { |
| 1480 | 1480 | $jpegtopnm_command = str_replace('pnmscale', 'jpegtopnm', _PNMSCALE_COMMAND); |
| 1481 | - exec("$jpegtopnm_command $image | " . _PNMSCALE_COMMAND . " -width $destWidth | $pnmtojpeg_command > $vignette"); |
|
| 1481 | + exec("$jpegtopnm_command $image | "._PNMSCALE_COMMAND." -width $destWidth | $pnmtojpeg_command > $vignette"); |
|
| 1482 | 1482 | if (!($s = @filesize($vignette))) { |
| 1483 | 1483 | spip_unlink($vignette); |
| 1484 | 1484 | } |
@@ -1490,7 +1490,7 @@ discard block |
||
| 1490 | 1490 | } else { |
| 1491 | 1491 | if ($format == 'gif') { |
| 1492 | 1492 | $giftopnm_command = str_replace('pnmscale', 'giftopnm', _PNMSCALE_COMMAND); |
| 1493 | - exec("$giftopnm_command $image | " . _PNMSCALE_COMMAND . " -width $destWidth | $pnmtojpeg_command > $vignette"); |
|
| 1493 | + exec("$giftopnm_command $image | "._PNMSCALE_COMMAND." -width $destWidth | $pnmtojpeg_command > $vignette"); |
|
| 1494 | 1494 | if (!($s = @filesize($vignette))) { |
| 1495 | 1495 | spip_unlink($vignette); |
| 1496 | 1496 | } |
@@ -1502,7 +1502,7 @@ discard block |
||
| 1502 | 1502 | } else { |
| 1503 | 1503 | if ($format == 'png') { |
| 1504 | 1504 | $pngtopnm_command = str_replace('pnmscale', 'pngtopnm', _PNMSCALE_COMMAND); |
| 1505 | - exec("$pngtopnm_command $image | " . _PNMSCALE_COMMAND . " -width $destWidth | $pnmtojpeg_command > $vignette"); |
|
| 1505 | + exec("$pngtopnm_command $image | "._PNMSCALE_COMMAND." -width $destWidth | $pnmtojpeg_command > $vignette"); |
|
| 1506 | 1506 | if (!($s = @filesize($vignette))) { |
| 1507 | 1507 | spip_unlink($vignette); |
| 1508 | 1508 | } |
@@ -1524,7 +1524,7 @@ discard block |
||
| 1524 | 1524 | return; |
| 1525 | 1525 | } |
| 1526 | 1526 | if (_IMG_GD_MAX_PIXELS && $srcWidth * $srcHeight > _IMG_GD_MAX_PIXELS) { |
| 1527 | - spip_log('vignette gd1/gd2 impossible : ' . $srcWidth * $srcHeight . 'pixels'); |
|
| 1527 | + spip_log('vignette gd1/gd2 impossible : '.$srcWidth * $srcHeight.'pixels'); |
|
| 1528 | 1528 | |
| 1529 | 1529 | return; |
| 1530 | 1530 | } |
@@ -1834,7 +1834,7 @@ discard block |
||
| 1834 | 1834 | // de l'image, de facon a tromper le cache du navigateur |
| 1835 | 1835 | // quand on fait supprimer/reuploader un logo |
| 1836 | 1836 | // (pas de filemtime si SAFE MODE) |
| 1837 | - $date = test_espace_prive() ? ('?' . $date) : ''; |
|
| 1837 | + $date = test_espace_prive() ? ('?'.$date) : ''; |
|
| 1838 | 1838 | |
| 1839 | 1839 | return _image_ecrire_tag($image, ['src' => "$logo$date", 'width' => $destWidth, 'height' => $destHeight]); |
| 1840 | 1840 | } |
@@ -1880,7 +1880,7 @@ discard block |
||
| 1880 | 1880 | public static function LittleEndian2String($number, $minbytes = 1) { |
| 1881 | 1881 | $intstring = ''; |
| 1882 | 1882 | while ($number > 0) { |
| 1883 | - $intstring = $intstring . chr($number & 255); |
|
| 1883 | + $intstring = $intstring.chr($number & 255); |
|
| 1884 | 1884 | $number >>= 8; |
| 1885 | 1885 | } |
| 1886 | 1886 | |
@@ -1912,9 +1912,9 @@ discard block |
||
| 1912 | 1912 | $b = $argb['blue']; |
| 1913 | 1913 | |
| 1914 | 1914 | if ($bpp[$key] == 32) { |
| 1915 | - $icXOR[$key] .= chr($b) . chr($g) . chr($r) . chr($a); |
|
| 1915 | + $icXOR[$key] .= chr($b).chr($g).chr($r).chr($a); |
|
| 1916 | 1916 | } elseif ($bpp[$key] == 24) { |
| 1917 | - $icXOR[$key] .= chr($b) . chr($g) . chr($r); |
|
| 1917 | + $icXOR[$key] .= chr($b).chr($g).chr($r); |
|
| 1918 | 1918 | } |
| 1919 | 1919 | |
| 1920 | 1920 | if ($a < 128) { |
@@ -1941,48 +1941,48 @@ discard block |
||
| 1941 | 1941 | |
| 1942 | 1942 | // BITMAPINFOHEADER - 40 bytes |
| 1943 | 1943 | $BitmapInfoHeader[$key] = ''; |
| 1944 | - $BitmapInfoHeader[$key] .= "\x28\x00\x00\x00"; // DWORD biSize; |
|
| 1945 | - $BitmapInfoHeader[$key] .= phpthumb_functions::LittleEndian2String($ImageWidths[$key], 4); // LONG biWidth; |
|
| 1944 | + $BitmapInfoHeader[$key] .= "\x28\x00\x00\x00"; // DWORD biSize; |
|
| 1945 | + $BitmapInfoHeader[$key] .= phpthumb_functions::LittleEndian2String($ImageWidths[$key], 4); // LONG biWidth; |
|
| 1946 | 1946 | // The biHeight member specifies the combined |
| 1947 | 1947 | // height of the XOR and AND masks. |
| 1948 | 1948 | $BitmapInfoHeader[$key] .= phpthumb_functions::LittleEndian2String($ImageHeights[$key] * 2, 4); // LONG biHeight; |
| 1949 | - $BitmapInfoHeader[$key] .= "\x01\x00"; // WORD biPlanes; |
|
| 1950 | - $BitmapInfoHeader[$key] .= chr($bpp[$key]) . "\x00"; // wBitCount; |
|
| 1951 | - $BitmapInfoHeader[$key] .= "\x00\x00\x00\x00"; // DWORD biCompression; |
|
| 1952 | - $BitmapInfoHeader[$key] .= phpthumb_functions::LittleEndian2String($biSizeImage, 4); // DWORD biSizeImage; |
|
| 1953 | - $BitmapInfoHeader[$key] .= "\x00\x00\x00\x00"; // LONG biXPelsPerMeter; |
|
| 1954 | - $BitmapInfoHeader[$key] .= "\x00\x00\x00\x00"; // LONG biYPelsPerMeter; |
|
| 1955 | - $BitmapInfoHeader[$key] .= "\x00\x00\x00\x00"; // DWORD biClrUsed; |
|
| 1956 | - $BitmapInfoHeader[$key] .= "\x00\x00\x00\x00"; // DWORD biClrImportant; |
|
| 1949 | + $BitmapInfoHeader[$key] .= "\x01\x00"; // WORD biPlanes; |
|
| 1950 | + $BitmapInfoHeader[$key] .= chr($bpp[$key])."\x00"; // wBitCount; |
|
| 1951 | + $BitmapInfoHeader[$key] .= "\x00\x00\x00\x00"; // DWORD biCompression; |
|
| 1952 | + $BitmapInfoHeader[$key] .= phpthumb_functions::LittleEndian2String($biSizeImage, 4); // DWORD biSizeImage; |
|
| 1953 | + $BitmapInfoHeader[$key] .= "\x00\x00\x00\x00"; // LONG biXPelsPerMeter; |
|
| 1954 | + $BitmapInfoHeader[$key] .= "\x00\x00\x00\x00"; // LONG biYPelsPerMeter; |
|
| 1955 | + $BitmapInfoHeader[$key] .= "\x00\x00\x00\x00"; // DWORD biClrUsed; |
|
| 1956 | + $BitmapInfoHeader[$key] .= "\x00\x00\x00\x00"; // DWORD biClrImportant; |
|
| 1957 | 1957 | } |
| 1958 | 1958 | |
| 1959 | 1959 | |
| 1960 | - $icondata = "\x00\x00"; // idReserved; // Reserved (must be 0) |
|
| 1961 | - $icondata .= "\x01\x00"; // idType; // Resource Type (1 for icons) |
|
| 1962 | - $icondata .= phpthumb_functions::LittleEndian2String(count($gd_image_array), 2); // idCount; // How many images? |
|
| 1960 | + $icondata = "\x00\x00"; // idReserved; // Reserved (must be 0) |
|
| 1961 | + $icondata .= "\x01\x00"; // idType; // Resource Type (1 for icons) |
|
| 1962 | + $icondata .= phpthumb_functions::LittleEndian2String(count($gd_image_array), 2); // idCount; // How many images? |
|
| 1963 | 1963 | |
| 1964 | 1964 | $dwImageOffset = 6 + (count($gd_image_array) * 16); |
| 1965 | 1965 | foreach ($gd_image_array as $key => $gd_image) { |
| 1966 | 1966 | // ICONDIRENTRY idEntries[1]; // An entry for each image (idCount of 'em) |
| 1967 | 1967 | |
| 1968 | - $icondata .= chr($ImageWidths[$key]); // bWidth; // Width, in pixels, of the image |
|
| 1969 | - $icondata .= chr($ImageHeights[$key]); // bHeight; // Height, in pixels, of the image |
|
| 1970 | - $icondata .= chr($totalcolors[$key]); // bColorCount; // Number of colors in image (0 if >=8bpp) |
|
| 1971 | - $icondata .= "\x00"; // bReserved; // Reserved ( must be 0) |
|
| 1968 | + $icondata .= chr($ImageWidths[$key]); // bWidth; // Width, in pixels, of the image |
|
| 1969 | + $icondata .= chr($ImageHeights[$key]); // bHeight; // Height, in pixels, of the image |
|
| 1970 | + $icondata .= chr($totalcolors[$key]); // bColorCount; // Number of colors in image (0 if >=8bpp) |
|
| 1971 | + $icondata .= "\x00"; // bReserved; // Reserved ( must be 0) |
|
| 1972 | 1972 | |
| 1973 | - $icondata .= "\x01\x00"; // wPlanes; // Color Planes |
|
| 1974 | - $icondata .= chr($bpp[$key]) . "\x00"; // wBitCount; // Bits per pixel |
|
| 1973 | + $icondata .= "\x01\x00"; // wPlanes; // Color Planes |
|
| 1974 | + $icondata .= chr($bpp[$key])."\x00"; // wBitCount; // Bits per pixel |
|
| 1975 | 1975 | |
| 1976 | 1976 | $dwBytesInRes = 40 + strlen($icXOR[$key]) + strlen($icAND[$key]); |
| 1977 | 1977 | $icondata .= phpthumb_functions::LittleEndian2String( |
| 1978 | 1978 | $dwBytesInRes, |
| 1979 | 1979 | 4 |
| 1980 | - ); // dwBytesInRes; // How many bytes in this resource? |
|
| 1980 | + ); // dwBytesInRes; // How many bytes in this resource? |
|
| 1981 | 1981 | |
| 1982 | 1982 | $icondata .= phpthumb_functions::LittleEndian2String( |
| 1983 | 1983 | $dwImageOffset, |
| 1984 | 1984 | 4 |
| 1985 | - ); // dwImageOffset; // Where in the file is this image? |
|
| 1985 | + ); // dwImageOffset; // Where in the file is this image? |
|
| 1986 | 1986 | $dwImageOffset += strlen($BitmapInfoHeader[$key]); |
| 1987 | 1987 | $dwImageOffset += strlen($icXOR[$key]); |
| 1988 | 1988 | $dwImageOffset += strlen($icAND[$key]); |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | if ($row = sql_fetsel( |
| 113 | 113 | 'statut, id_auteur, login, email', |
| 114 | 114 | 'spip_auteurs', |
| 115 | - 'email=' . sql_quote($declaration['email']) |
|
| 115 | + 'email='.sql_quote($declaration['email']) |
|
| 116 | 116 | )) { |
| 117 | 117 | if (($row['statut'] == '5poubelle') and empty($declaration['pass'])) { |
| 118 | 118 | // irrecuperable |
@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | } |
| 128 | 128 | } |
| 129 | 129 | } |
| 130 | - spip_log($row['id_auteur'] . ' veut se resinscrire'); |
|
| 130 | + spip_log($row['id_auteur'].' veut se resinscrire'); |
|
| 131 | 131 | } |
| 132 | 132 | } |
| 133 | 133 | } |
@@ -80,7 +80,7 @@ |
||
| 80 | 80 | if (!is_array($id_ou_options)) { |
| 81 | 81 | $options = ['id' => intval($id_ou_options)]; |
| 82 | 82 | $id = $options['id']; |
| 83 | - }else { |
|
| 83 | + } else { |
|
| 84 | 84 | $options = $id_ou_options; |
| 85 | 85 | $id = (int) ($id_ou_options['id'] ?? 0); |
| 86 | 86 | } |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | return sql_fetsel( |
| 22 | 22 | '*', |
| 23 | 23 | 'spip_auteurs', |
| 24 | - array('id_auteur=' . intval($id_auteur), "statut<>'5poubelle'", "pass<>''", "login<>''") |
|
| 24 | + array('id_auteur='.intval($id_auteur), "statut<>'5poubelle'", "pass<>''", "login<>''") |
|
| 25 | 25 | ); |
| 26 | 26 | } elseif ($jeton) { |
| 27 | 27 | include_spip('action/inscrire_auteur'); |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | if ($auteur) { |
| 60 | 60 | $valeurs['id_auteur'] = $id_auteur; // a toutes fins utiles pour le formulaire |
| 61 | 61 | if ($jeton) { |
| 62 | - $valeurs['_hidden'] = '<input type="hidden" name="p" value="' . $jeton . '" />'; |
|
| 62 | + $valeurs['_hidden'] = '<input type="hidden" name="p" value="'.$jeton.'" />'; |
|
| 63 | 63 | } |
| 64 | 64 | } else { |
| 65 | 65 | $valeurs['message_erreur'] = _T('pass_erreur_code_inconnu'); |
@@ -162,8 +162,8 @@ discard block |
||
| 162 | 162 | else { |
| 163 | 163 | $identifiant = $row['login']; |
| 164 | 164 | } |
| 165 | - $res['message_ok'] = '<b>' . _T('pass_nouveau_enregistre') . '</b>' . |
|
| 166 | - '<br />' . _T('pass_rappel_login', array('login' => $identifiant)); |
|
| 165 | + $res['message_ok'] = '<b>'._T('pass_nouveau_enregistre').'</b>'. |
|
| 166 | + '<br />'._T('pass_rappel_login', array('login' => $identifiant)); |
|
| 167 | 167 | |
| 168 | 168 | include_spip('inc/auth'); |
| 169 | 169 | $auth = auth_identifier_login($row['login'], $oubli); |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | array( |
| 39 | 39 | 'url_reset' => url_absolue( |
| 40 | 40 | generer_url_public('spip_pass', "$param=$cookie"), |
| 41 | - $GLOBALS['meta']['adresse_site'] . '/' |
|
| 41 | + $GLOBALS['meta']['adresse_site'].'/' |
|
| 42 | 42 | ) |
| 43 | 43 | ) |
| 44 | 44 | ); |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | |
| 109 | 109 | return array( |
| 110 | 110 | $declaration, |
| 111 | - sql_fetsel('id_auteur,statut,pass', 'spip_auteurs', "login<>'' AND email =" . sql_quote($declaration['mail'])) |
|
| 111 | + sql_fetsel('id_auteur,statut,pass', 'spip_auteurs', "login<>'' AND email =".sql_quote($declaration['mail'])) |
|
| 112 | 112 | ); |
| 113 | 113 | } |
| 114 | 114 | } |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | } |
| 97 | 97 | |
| 98 | 98 | include_fichiers_fonctions(); |
| 99 | - foreach (['filtre_' . $fonc, 'filtre_' . $fonc . '_dist', $fonc] as $f) { |
|
| 99 | + foreach (['filtre_'.$fonc, 'filtre_'.$fonc.'_dist', $fonc] as $f) { |
|
| 100 | 100 | trouver_filtre_matrice($f); // charge des fichiers spécifiques éventuels |
| 101 | 101 | if (is_callable($f)) { |
| 102 | 102 | return $f; |
@@ -231,7 +231,7 @@ discard block |
||
| 231 | 231 | // affichage "GIT [master: abcdef]" |
| 232 | 232 | $commit = $desc['commit_short'] ?? $desc['commit']; |
| 233 | 233 | if ($desc['branch']) { |
| 234 | - $commit = $desc['branch'] . ': ' . $commit; |
|
| 234 | + $commit = $desc['branch'].': '.$commit; |
|
| 235 | 235 | } |
| 236 | 236 | return "{$desc['vcs']} [$commit]"; |
| 237 | 237 | } |
@@ -250,9 +250,9 @@ discard block |
||
| 250 | 250 | } |
| 251 | 251 | |
| 252 | 252 | // version installee par GIT |
| 253 | - if (lire_fichier($dir . '/.git/HEAD', $c)) { |
|
| 253 | + if (lire_fichier($dir.'/.git/HEAD', $c)) { |
|
| 254 | 254 | $currentHead = trim(substr($c, 4)); |
| 255 | - if (lire_fichier($dir . '/.git/' . $currentHead, $hash)) { |
|
| 255 | + if (lire_fichier($dir.'/.git/'.$currentHead, $hash)) { |
|
| 256 | 256 | return [ |
| 257 | 257 | 'vcs' => 'GIT', |
| 258 | 258 | 'branch' => basename($currentHead), |
@@ -267,12 +267,12 @@ discard block |
||
| 267 | 267 | |
| 268 | 268 | // La matrice est necessaire pour ne filtrer _que_ des fonctions definies dans filtres_images |
| 269 | 269 | // et laisser passer les fonctions personnelles baptisees image_... |
| 270 | -$GLOBALS['spip_matrice']['image_graver'] = true;//'inc/filtres_images_mini.php'; |
|
| 271 | -$GLOBALS['spip_matrice']['image_select'] = true;//'inc/filtres_images_mini.php'; |
|
| 272 | -$GLOBALS['spip_matrice']['image_reduire'] = true;//'inc/filtres_images_mini.php'; |
|
| 273 | -$GLOBALS['spip_matrice']['image_reduire_par'] = true;//'inc/filtres_images_mini.php'; |
|
| 274 | -$GLOBALS['spip_matrice']['image_passe_partout'] = true;//'inc/filtres_images_mini.php'; |
|
| 275 | -$GLOBALS['spip_matrice']['image_recadre_avec_fallback'] = true;//'inc/filtres_images_mini.php'; |
|
| 270 | +$GLOBALS['spip_matrice']['image_graver'] = true; //'inc/filtres_images_mini.php'; |
|
| 271 | +$GLOBALS['spip_matrice']['image_select'] = true; //'inc/filtres_images_mini.php'; |
|
| 272 | +$GLOBALS['spip_matrice']['image_reduire'] = true; //'inc/filtres_images_mini.php'; |
|
| 273 | +$GLOBALS['spip_matrice']['image_reduire_par'] = true; //'inc/filtres_images_mini.php'; |
|
| 274 | +$GLOBALS['spip_matrice']['image_passe_partout'] = true; //'inc/filtres_images_mini.php'; |
|
| 275 | +$GLOBALS['spip_matrice']['image_recadre_avec_fallback'] = true; //'inc/filtres_images_mini.php'; |
|
| 276 | 276 | |
| 277 | 277 | $GLOBALS['spip_matrice']['couleur_html_to_hex'] = 'inc/filtres_images_mini.php'; |
| 278 | 278 | $GLOBALS['spip_matrice']['couleur_hex_to_hsl'] = 'inc/filtres_images_mini.php'; |
@@ -431,8 +431,8 @@ discard block |
||
| 431 | 431 | */ |
| 432 | 432 | function filtre_debug($val, $key = null) { |
| 433 | 433 | $debug = ( |
| 434 | - is_null($key) ? '' : (var_export($key, true) . ' = ') |
|
| 435 | - ) . var_export($val, true); |
|
| 434 | + is_null($key) ? '' : (var_export($key, true).' = ') |
|
| 435 | + ).var_export($val, true); |
|
| 436 | 436 | |
| 437 | 437 | include_spip('inc/autoriser'); |
| 438 | 438 | if (autoriser('webmestre')) { |
@@ -488,7 +488,7 @@ discard block |
||
| 488 | 488 | $is_file = false; |
| 489 | 489 | } |
| 490 | 490 | if ($is_file) { |
| 491 | - $is_local_file = function ($path) { |
|
| 491 | + $is_local_file = function($path) { |
|
| 492 | 492 | if (strpos($path, '?') !== false) { |
| 493 | 493 | $path = supprimer_timestamp($path); |
| 494 | 494 | // remove ?24px added by find_in_theme on .svg files |
@@ -537,7 +537,7 @@ discard block |
||
| 537 | 537 | if ($mouseover = extraire_attribut($reduit, 'onmouseover')) { |
| 538 | 538 | if (preg_match(",this[.]src=['\"]([^'\"]+)['\"],ims", $mouseover, $match)) { |
| 539 | 539 | $srcover = $match[1]; |
| 540 | - $srcover_filter = $filtre("<img src='" . $match[1] . "' />", ...$args); |
|
| 540 | + $srcover_filter = $filtre("<img src='".$match[1]."' />", ...$args); |
|
| 541 | 541 | $srcover_filter = extraire_attribut($srcover_filter, 'src'); |
| 542 | 542 | $reduit = str_replace($srcover, $srcover_filter, $reduit); |
| 543 | 543 | } |
@@ -942,7 +942,7 @@ discard block |
||
| 942 | 942 | // " -> " et tout ce genre de choses |
| 943 | 943 | $u = $GLOBALS['meta']['pcre_u']; |
| 944 | 944 | $texte = str_replace(' ', ' ', $texte); |
| 945 | - $texte = preg_replace('/\s{2,}/S' . $u, ' ', $texte); |
|
| 945 | + $texte = preg_replace('/\s{2,}/S'.$u, ' ', $texte); |
|
| 946 | 946 | // ne pas echapper les sinqle quotes car certains outils de syndication gerent mal |
| 947 | 947 | $texte = entites_html($texte, false, false); |
| 948 | 948 | // mais bien echapper les double quotes ! |
@@ -1004,7 +1004,7 @@ discard block |
||
| 1004 | 1004 | return ''; |
| 1005 | 1005 | } |
| 1006 | 1006 | return preg_replace( |
| 1007 | - ',^[[:space:]]*([0-9]+)([.)]|' . chr(194) . '?' . chr(176) . ')[[:space:]]+,S', |
|
| 1007 | + ',^[[:space:]]*([0-9]+)([.)]|'.chr(194).'?'.chr(176).')[[:space:]]+,S', |
|
| 1008 | 1008 | '', |
| 1009 | 1009 | $texte |
| 1010 | 1010 | ); |
@@ -1033,7 +1033,7 @@ discard block |
||
| 1033 | 1033 | if ( |
| 1034 | 1034 | $texte and |
| 1035 | 1035 | preg_match( |
| 1036 | - ',^[[:space:]]*([0-9]+)([.)]|' . chr(194) . '?' . chr(176) . ')[[:space:]]+,S', |
|
| 1036 | + ',^[[:space:]]*([0-9]+)([.)]|'.chr(194).'?'.chr(176).')[[:space:]]+,S', |
|
| 1037 | 1037 | $texte, |
| 1038 | 1038 | $regs |
| 1039 | 1039 | ) |
@@ -1124,8 +1124,8 @@ discard block |
||
| 1124 | 1124 | **/ |
| 1125 | 1125 | function textebrut($texte) { |
| 1126 | 1126 | $u = $GLOBALS['meta']['pcre_u']; |
| 1127 | - $texte = preg_replace('/\s+/S' . $u, ' ', $texte); |
|
| 1128 | - $texte = preg_replace('/<(p|br)( [^>]*)?' . '>/iS', "\n\n", $texte); |
|
| 1127 | + $texte = preg_replace('/\s+/S'.$u, ' ', $texte); |
|
| 1128 | + $texte = preg_replace('/<(p|br)( [^>]*)?'.'>/iS', "\n\n", $texte); |
|
| 1129 | 1129 | $texte = preg_replace("/^\n+/", '', $texte); |
| 1130 | 1130 | $texte = preg_replace("/\n+$/", '', $texte); |
| 1131 | 1131 | $texte = preg_replace("/\n +/", "\n", $texte); |
@@ -1159,7 +1159,7 @@ discard block |
||
| 1159 | 1159 | ) |
| 1160 | 1160 | ) { |
| 1161 | 1161 | foreach ($liens[0] as $a) { |
| 1162 | - $rel = 'noopener noreferrer ' . extraire_attribut($a, 'rel'); |
|
| 1162 | + $rel = 'noopener noreferrer '.extraire_attribut($a, 'rel'); |
|
| 1163 | 1163 | $ablank = inserer_attribut($a, 'rel', $rel); |
| 1164 | 1164 | $ablank = inserer_attribut($ablank, 'target', '_blank'); |
| 1165 | 1165 | $texte = str_replace($a, $ablank, $texte); |
@@ -1184,7 +1184,7 @@ discard block |
||
| 1184 | 1184 | foreach ($regs[0] as $a) { |
| 1185 | 1185 | $rel = extraire_attribut($a, 'rel') ?? ''; |
| 1186 | 1186 | if (strpos($rel, 'nofollow') === false) { |
| 1187 | - $rel = 'nofollow' . ($rel ? " $rel" : ''); |
|
| 1187 | + $rel = 'nofollow'.($rel ? " $rel" : ''); |
|
| 1188 | 1188 | $anofollow = inserer_attribut($a, 'rel', $rel); |
| 1189 | 1189 | $texte = str_replace($a, $anofollow, $texte); |
| 1190 | 1190 | } |
@@ -1213,7 +1213,7 @@ discard block |
||
| 1213 | 1213 | $u = $GLOBALS['meta']['pcre_u']; |
| 1214 | 1214 | $texte = preg_replace('@</p>@iS', "\n", $texte); |
| 1215 | 1215 | $texte = preg_replace("@<p\b.*>@UiS", '<br />', $texte); |
| 1216 | - $texte = preg_replace('@^\s*<br />@S' . $u, '', $texte); |
|
| 1216 | + $texte = preg_replace('@^\s*<br />@S'.$u, '', $texte); |
|
| 1217 | 1217 | |
| 1218 | 1218 | return $texte; |
| 1219 | 1219 | } |
@@ -1244,7 +1244,7 @@ discard block |
||
| 1244 | 1244 | return $texte; |
| 1245 | 1245 | } |
| 1246 | 1246 | include_spip('inc/texte'); |
| 1247 | - $tag = preg_match(',</?(' . _BALISES_BLOCS . ')[>[:space:]],iS', $texte) ? |
|
| 1247 | + $tag = preg_match(',</?('._BALISES_BLOCS.')[>[:space:]],iS', $texte) ? |
|
| 1248 | 1248 | 'div' : 'span'; |
| 1249 | 1249 | |
| 1250 | 1250 | return "<$tag style='word-wrap:break-word;'>$texte</$tag>"; |
@@ -1335,7 +1335,7 @@ discard block |
||
| 1335 | 1335 | |
| 1336 | 1336 | // Calcul de la taille et choix de l'unité |
| 1337 | 1337 | $affichage = _T( |
| 1338 | - 'spip:taille_' . $unites[$puissance] . $suffixe_item, |
|
| 1338 | + 'spip:taille_'.$unites[$puissance].$suffixe_item, |
|
| 1339 | 1339 | [ |
| 1340 | 1340 | 'taille' => round($octets / pow($kilo, $puissance), $precisions[$puissance]) |
| 1341 | 1341 | ] |
@@ -1369,7 +1369,7 @@ discard block |
||
| 1369 | 1369 | } |
| 1370 | 1370 | $u = $GLOBALS['meta']['pcre_u']; |
| 1371 | 1371 | if ($textebrut) { |
| 1372 | - $texte = preg_replace([",\n,", ',\s(?=\s),msS' . $u], [' ', ''], textebrut($texte)); |
|
| 1372 | + $texte = preg_replace([",\n,", ',\s(?=\s),msS'.$u], [' ', ''], textebrut($texte)); |
|
| 1373 | 1373 | } |
| 1374 | 1374 | $texte = texte_backend($texte); |
| 1375 | 1375 | $texte = str_replace(["'", '"'], [''', '"'], $texte); |
@@ -1404,7 +1404,7 @@ discard block |
||
| 1404 | 1404 | # un message pour abs_url |
| 1405 | 1405 | $GLOBALS['mode_abs_url'] = 'url'; |
| 1406 | 1406 | $url = trim($url); |
| 1407 | - $r = ',^(?:' . _PROTOCOLES_STD . '):?/?/?$,iS'; |
|
| 1407 | + $r = ',^(?:'._PROTOCOLES_STD.'):?/?/?$,iS'; |
|
| 1408 | 1408 | |
| 1409 | 1409 | return preg_match($r, $url) ? '' : ($entites ? entites_html($url) : $url); |
| 1410 | 1410 | } |
@@ -1610,7 +1610,7 @@ discard block |
||
| 1610 | 1610 | |
| 1611 | 1611 | $debut = ''; |
| 1612 | 1612 | $suite = $texte; |
| 1613 | - while ($t = strpos('-' . $suite, "\n", 1)) { |
|
| 1613 | + while ($t = strpos('-'.$suite, "\n", 1)) { |
|
| 1614 | 1614 | $debut .= substr($suite, 0, $t - 1); |
| 1615 | 1615 | $suite = substr($suite, $t); |
| 1616 | 1616 | $car = substr($suite, 0, 1); |
@@ -1628,7 +1628,7 @@ discard block |
||
| 1628 | 1628 | $suite = substr($suite, strlen($regs[0])); |
| 1629 | 1629 | } |
| 1630 | 1630 | } |
| 1631 | - $texte = $debut . $suite; |
|
| 1631 | + $texte = $debut.$suite; |
|
| 1632 | 1632 | |
| 1633 | 1633 | if ($collecteurModeles) { |
| 1634 | 1634 | $texte = $collecteurModeles->retablir($texte); |
@@ -1636,7 +1636,7 @@ discard block |
||
| 1636 | 1636 | |
| 1637 | 1637 | $texte = echappe_retour($texte); |
| 1638 | 1638 | |
| 1639 | - return $texte . $fin; |
|
| 1639 | + return $texte.$fin; |
|
| 1640 | 1640 | } |
| 1641 | 1641 | |
| 1642 | 1642 | |
@@ -1912,7 +1912,7 @@ discard block |
||
| 1912 | 1912 | if (is_array($balise)) { |
| 1913 | 1913 | array_walk( |
| 1914 | 1914 | $balise, |
| 1915 | - function (&$a, $key, $t) { |
|
| 1915 | + function(&$a, $key, $t) { |
|
| 1916 | 1916 | $a = extraire_attribut($a, $t); |
| 1917 | 1917 | }, |
| 1918 | 1918 | $attribut |
@@ -2010,14 +2010,14 @@ discard block |
||
| 2010 | 2010 | |
| 2011 | 2011 | if ($old !== null) { |
| 2012 | 2012 | // Remplacer l'ancien attribut du meme nom |
| 2013 | - $balise = $r[1] . $insert . $r[5]; |
|
| 2013 | + $balise = $r[1].$insert.$r[5]; |
|
| 2014 | 2014 | } else { |
| 2015 | 2015 | // preferer une balise " />" (comme <img />) |
| 2016 | 2016 | if (preg_match(',/>,', $balise)) { |
| 2017 | - $balise = preg_replace(',\s?/>,S', $insert . ' />', $balise, 1); |
|
| 2017 | + $balise = preg_replace(',\s?/>,S', $insert.' />', $balise, 1); |
|
| 2018 | 2018 | } // sinon une balise <a ...> ... </a> |
| 2019 | 2019 | else { |
| 2020 | - $balise = preg_replace(',\s?>,S', $insert . '>', $balise, 1); |
|
| 2020 | + $balise = preg_replace(',\s?>,S', $insert.'>', $balise, 1); |
|
| 2021 | 2021 | } |
| 2022 | 2022 | } |
| 2023 | 2023 | |
@@ -2075,7 +2075,7 @@ discard block |
||
| 2075 | 2075 | in_array($operation, ['ajouter', 'commuter']) |
| 2076 | 2076 | and !$is_class_presente |
| 2077 | 2077 | ) { |
| 2078 | - $class_new = ltrim(rtrim($class_new ?? '') . ' ' . $c); |
|
| 2078 | + $class_new = ltrim(rtrim($class_new ?? '').' '.$c); |
|
| 2079 | 2079 | } elseif ( |
| 2080 | 2080 | in_array($operation, ['supprimer', 'commuter']) |
| 2081 | 2081 | and $is_class_presente |
@@ -2145,7 +2145,7 @@ discard block |
||
| 2145 | 2145 | // Quelques fonctions de calcul arithmetique |
| 2146 | 2146 | // |
| 2147 | 2147 | function floatstr($a) { |
| 2148 | - return str_replace(',', '.', (string)floatval($a)); |
|
| 2148 | + return str_replace(',', '.', (string) floatval($a)); |
|
| 2149 | 2149 | } |
| 2150 | 2150 | function strize($f, $a, $b) { |
| 2151 | 2151 | return floatstr($f(floatstr($a), floatstr($b))); |
@@ -2286,13 +2286,13 @@ discard block |
||
| 2286 | 2286 | if (!defined('_TAGS_NOM_AUTEUR')) { |
| 2287 | 2287 | define('_TAGS_NOM_AUTEUR', ''); |
| 2288 | 2288 | } |
| 2289 | - $tags_acceptes = array_unique(explode(',', 'multi,' . _TAGS_NOM_AUTEUR)); |
|
| 2289 | + $tags_acceptes = array_unique(explode(',', 'multi,'._TAGS_NOM_AUTEUR)); |
|
| 2290 | 2290 | foreach ($tags_acceptes as $tag) { |
| 2291 | 2291 | if (strlen($tag)) { |
| 2292 | - $remp1[] = '<' . trim($tag) . '>'; |
|
| 2293 | - $remp1[] = '</' . trim($tag) . '>'; |
|
| 2294 | - $remp2[] = '\x60' . trim($tag) . '\x61'; |
|
| 2295 | - $remp2[] = '\x60/' . trim($tag) . '\x61'; |
|
| 2292 | + $remp1[] = '<'.trim($tag).'>'; |
|
| 2293 | + $remp1[] = '</'.trim($tag).'>'; |
|
| 2294 | + $remp2[] = '\x60'.trim($tag).'\x61'; |
|
| 2295 | + $remp2[] = '\x60/'.trim($tag).'\x61'; |
|
| 2296 | 2296 | } |
| 2297 | 2297 | } |
| 2298 | 2298 | $v_nom = str_replace($remp2, $remp1, supprimer_tags(str_replace($remp1, $remp2, $nom))); |
@@ -2412,10 +2412,10 @@ discard block |
||
| 2412 | 2412 | $fichier = basename($url); |
| 2413 | 2413 | |
| 2414 | 2414 | return '<a rel="enclosure"' |
| 2415 | - . ($url ? ' href="' . spip_htmlspecialchars($url) . '"' : '') |
|
| 2416 | - . ($type ? ' type="' . spip_htmlspecialchars($type) . '"' : '') |
|
| 2417 | - . ($length ? ' title="' . spip_htmlspecialchars($length) . '"' : '') |
|
| 2418 | - . '>' . $fichier . '</a>'; |
|
| 2415 | + . ($url ? ' href="'.spip_htmlspecialchars($url).'"' : '') |
|
| 2416 | + . ($type ? ' type="'.spip_htmlspecialchars($type).'"' : '') |
|
| 2417 | + . ($length ? ' title="'.spip_htmlspecialchars($length).'"' : '') |
|
| 2418 | + . '>'.$fichier.'</a>'; |
|
| 2419 | 2419 | } |
| 2420 | 2420 | |
| 2421 | 2421 | /** |
@@ -2443,9 +2443,9 @@ discard block |
||
| 2443 | 2443 | } # vieux data |
| 2444 | 2444 | $fichier = basename($url); |
| 2445 | 2445 | $enclosures[] = '<enclosure' |
| 2446 | - . ($url ? ' url="' . spip_htmlspecialchars($url) . '"' : '') |
|
| 2447 | - . ($type ? ' type="' . spip_htmlspecialchars($type) . '"' : '') |
|
| 2448 | - . ($length ? ' length="' . $length . '"' : '') |
|
| 2446 | + . ($url ? ' url="'.spip_htmlspecialchars($url).'"' : '') |
|
| 2447 | + . ($type ? ' type="'.spip_htmlspecialchars($type).'"' : '') |
|
| 2448 | + . ($length ? ' length="'.$length.'"' : '') |
|
| 2449 | 2449 | . ' />'; |
| 2450 | 2450 | } |
| 2451 | 2451 | } |
@@ -2471,7 +2471,7 @@ discard block |
||
| 2471 | 2471 | if (extraire_attribut($e, 'rel') == 'tag') { |
| 2472 | 2472 | $subjects .= '<dc:subject>' |
| 2473 | 2473 | . texte_backend(textebrut($e)) |
| 2474 | - . '</dc:subject>' . "\n"; |
|
| 2474 | + . '</dc:subject>'."\n"; |
|
| 2475 | 2475 | } |
| 2476 | 2476 | } |
| 2477 | 2477 | |
@@ -2507,7 +2507,7 @@ discard block |
||
| 2507 | 2507 | if (is_array($texte)) { |
| 2508 | 2508 | array_walk( |
| 2509 | 2509 | $texte, |
| 2510 | - function (&$a, $key, $t) { |
|
| 2510 | + function(&$a, $key, $t) { |
|
| 2511 | 2511 | $a = extraire_balise($a, $t); |
| 2512 | 2512 | }, |
| 2513 | 2513 | $tag |
@@ -2555,7 +2555,7 @@ discard block |
||
| 2555 | 2555 | if (is_array($texte)) { |
| 2556 | 2556 | array_walk( |
| 2557 | 2557 | $texte, |
| 2558 | - function (&$a, $key, $t) { |
|
| 2558 | + function(&$a, $key, $t) { |
|
| 2559 | 2559 | $a = extraire_balises($a, $t); |
| 2560 | 2560 | }, |
| 2561 | 2561 | $tag |
@@ -2688,7 +2688,7 @@ discard block |
||
| 2688 | 2688 | if ($fond != '404') { |
| 2689 | 2689 | $contexte = array_shift($p); |
| 2690 | 2690 | $contexte['page'] = $fond; |
| 2691 | - $action = preg_replace('/([?]' . preg_quote($fond) . '[^&=]*[0-9]+)(&|$)/', '?&', $action); |
|
| 2691 | + $action = preg_replace('/([?]'.preg_quote($fond).'[^&=]*[0-9]+)(&|$)/', '?&', $action); |
|
| 2692 | 2692 | } |
| 2693 | 2693 | } |
| 2694 | 2694 | // defaire ce qu'a injecte urls_decoder_url : a revoir en modifiant la signature de urls_decoder_url |
@@ -2743,9 +2743,9 @@ discard block |
||
| 2743 | 2743 | . '"' |
| 2744 | 2744 | . (is_null($val) |
| 2745 | 2745 | ? '' |
| 2746 | - : ' value="' . entites_html($val) . '"' |
|
| 2746 | + : ' value="'.entites_html($val).'"' |
|
| 2747 | 2747 | ) |
| 2748 | - . ' type="hidden"' . "\n/>"; |
|
| 2748 | + . ' type="hidden"'."\n/>"; |
|
| 2749 | 2749 | } |
| 2750 | 2750 | |
| 2751 | 2751 | return join('', $hidden); |
@@ -2855,7 +2855,7 @@ discard block |
||
| 2855 | 2855 | |
| 2856 | 2856 | return preg_replace_callback( |
| 2857 | 2857 | ",url\s*\(\s*['\"]?([^'\"/#\s][^:]*)['\"]?\s*\),Uims", |
| 2858 | - fn($x) => "url('" . suivre_lien($path, $x[1]) . "')", |
|
| 2858 | + fn($x) => "url('".suivre_lien($path, $x[1])."')", |
|
| 2859 | 2859 | $contenu |
| 2860 | 2860 | ); |
| 2861 | 2861 | } |
@@ -2916,14 +2916,14 @@ discard block |
||
| 2916 | 2916 | ) { |
| 2917 | 2917 | $distant = true; |
| 2918 | 2918 | $cssf = parse_url($css); |
| 2919 | - $cssf = $cssf['path'] . ($cssf['query'] ? '?' . $cssf['query'] : ''); |
|
| 2919 | + $cssf = $cssf['path'].($cssf['query'] ? '?'.$cssf['query'] : ''); |
|
| 2920 | 2920 | $cssf = preg_replace(',[?:&=],', '_', $cssf); |
| 2921 | 2921 | } else { |
| 2922 | 2922 | $distant = false; |
| 2923 | 2923 | $cssf = $css; |
| 2924 | 2924 | // 1. regarder d'abord si un fichier avec la bonne direction n'est pas aussi |
| 2925 | 2925 | //propose (rien a faire dans ce cas) |
| 2926 | - $f = preg_replace(',(_rtl)?\.css$,i', '_' . $ndir . '.css', $css); |
|
| 2926 | + $f = preg_replace(',(_rtl)?\.css$,i', '_'.$ndir.'.css', $css); |
|
| 2927 | 2927 | if (@file_exists($f)) { |
| 2928 | 2928 | return $f; |
| 2929 | 2929 | } |
@@ -2933,7 +2933,7 @@ discard block |
||
| 2933 | 2933 | $dir_var = sous_repertoire(_DIR_VAR, 'cache-css'); |
| 2934 | 2934 | $f = $dir_var |
| 2935 | 2935 | . preg_replace(',.*/(.*?)(_rtl)?\.css,', '\1', $cssf) |
| 2936 | - . '.' . substr(md5($cssf), 0, 4) . '_' . $ndir . '.css'; |
|
| 2936 | + . '.'.substr(md5($cssf), 0, 4).'_'.$ndir.'.css'; |
|
| 2937 | 2937 | |
| 2938 | 2938 | // la css peut etre distante (url absolue !) |
| 2939 | 2939 | if ($distant) { |
@@ -2979,8 +2979,8 @@ discard block |
||
| 2979 | 2979 | } // si la css_direction commence par $dir_var on la fait passer pour une absolue |
| 2980 | 2980 | elseif (substr($css_direction, 0, strlen($dir_var)) == $dir_var) { |
| 2981 | 2981 | $css_direction = substr($css_direction, strlen($dir_var)); |
| 2982 | - $src_faux_abs['/@@@@@@/' . $css_direction] = $css_direction; |
|
| 2983 | - $css_direction = '/@@@@@@/' . $css_direction; |
|
| 2982 | + $src_faux_abs['/@@@@@@/'.$css_direction] = $css_direction; |
|
| 2983 | + $css_direction = '/@@@@@@/'.$css_direction; |
|
| 2984 | 2984 | } |
| 2985 | 2985 | $src[] = $regs[0][$k]; |
| 2986 | 2986 | $src_direction_css[] = str_replace($import_css, $css_direction, $regs[0][$k]); |
@@ -3029,7 +3029,7 @@ discard block |
||
| 3029 | 3029 | |
| 3030 | 3030 | $f = basename($css, '.css'); |
| 3031 | 3031 | $f = sous_repertoire(_DIR_VAR, 'cache-css') |
| 3032 | - . preg_replace(',(.*?)(_rtl|_ltr)?$,', "\\1-urlabs-" . substr(md5("$css-urlabs"), 0, 4) . "\\2", $f) |
|
| 3032 | + . preg_replace(',(.*?)(_rtl|_ltr)?$,', "\\1-urlabs-".substr(md5("$css-urlabs"), 0, 4)."\\2", $f) |
|
| 3033 | 3033 | . '.css'; |
| 3034 | 3034 | |
| 3035 | 3035 | if ((@filemtime($f) > @filemtime($css)) and (_VAR_MODE != 'recalcul')) { |
@@ -3039,7 +3039,7 @@ discard block |
||
| 3039 | 3039 | if ($url_absolue_css == $css) { |
| 3040 | 3040 | if ( |
| 3041 | 3041 | strncmp($GLOBALS['meta']['adresse_site'], $css, $l = strlen($GLOBALS['meta']['adresse_site'])) != 0 |
| 3042 | - or !lire_fichier(_DIR_RACINE . substr($css, $l), $contenu) |
|
| 3042 | + or !lire_fichier(_DIR_RACINE.substr($css, $l), $contenu) |
|
| 3043 | 3043 | ) { |
| 3044 | 3044 | include_spip('inc/distant'); |
| 3045 | 3045 | $contenu = recuperer_url($css); |
@@ -3151,7 +3151,7 @@ discard block |
||
| 3151 | 3151 | $expression = str_replace('\/', '/', $expression); |
| 3152 | 3152 | $expression = str_replace('/', '\/', $expression); |
| 3153 | 3153 | |
| 3154 | - if (preg_match('/' . $expression . '/' . $modif, $texte ?? '', $r)) { |
|
| 3154 | + if (preg_match('/'.$expression.'/'.$modif, $texte ?? '', $r)) { |
|
| 3155 | 3155 | if (isset($r[$capte])) { |
| 3156 | 3156 | return $r[$capte]; |
| 3157 | 3157 | } else { |
@@ -3193,7 +3193,7 @@ discard block |
||
| 3193 | 3193 | $expression = str_replace('\/', '/', $expression); |
| 3194 | 3194 | $expression = str_replace('/', '\/', $expression); |
| 3195 | 3195 | |
| 3196 | - return (string) preg_replace('/' . $expression . '/' . $modif, $replace, $texte); |
|
| 3196 | + return (string) preg_replace('/'.$expression.'/'.$modif, $replace, $texte); |
|
| 3197 | 3197 | } |
| 3198 | 3198 | |
| 3199 | 3199 | |
@@ -3212,7 +3212,7 @@ discard block |
||
| 3212 | 3212 | function traiter_doublons_documents(&$doublons, $letexte) { |
| 3213 | 3213 | |
| 3214 | 3214 | // Verifier dans le texte & les notes (pas beau, helas) |
| 3215 | - $t = $letexte . $GLOBALS['les_notes']; |
|
| 3215 | + $t = $letexte.$GLOBALS['les_notes']; |
|
| 3216 | 3216 | |
| 3217 | 3217 | if ( |
| 3218 | 3218 | strstr($t, 'spip_document_') // evite le preg_match_all si inutile |
@@ -3226,7 +3226,7 @@ discard block |
||
| 3226 | 3226 | if (!isset($doublons['documents'])) { |
| 3227 | 3227 | $doublons['documents'] = ''; |
| 3228 | 3228 | } |
| 3229 | - $doublons['documents'] .= ',' . join(',', $matches[1]); |
|
| 3229 | + $doublons['documents'] .= ','.join(',', $matches[1]); |
|
| 3230 | 3230 | } |
| 3231 | 3231 | |
| 3232 | 3232 | return $letexte; |
@@ -3283,7 +3283,7 @@ discard block |
||
| 3283 | 3283 | if ($env) { |
| 3284 | 3284 | foreach ($env as $i => $j) { |
| 3285 | 3285 | if (is_string($j) and !in_array($i, $ignore_params)) { |
| 3286 | - $texte .= "<param name='" . attribut_html($i) . "'\n\tvalue='" . attribut_html($j) . "' />"; |
|
| 3286 | + $texte .= "<param name='".attribut_html($i)."'\n\tvalue='".attribut_html($j)."' />"; |
|
| 3287 | 3287 | } |
| 3288 | 3288 | } |
| 3289 | 3289 | } |
@@ -3322,7 +3322,7 @@ discard block |
||
| 3322 | 3322 | if ($env) { |
| 3323 | 3323 | foreach ($env as $i => $j) { |
| 3324 | 3324 | if (is_string($j) and !in_array($i, $ignore_params)) { |
| 3325 | - $texte .= attribut_html($i) . "='" . attribut_html($j) . "' "; |
|
| 3325 | + $texte .= attribut_html($i)."='".attribut_html($j)."' "; |
|
| 3326 | 3326 | } |
| 3327 | 3327 | } |
| 3328 | 3328 | } |
@@ -3396,10 +3396,10 @@ discard block |
||
| 3396 | 3396 | // si il y a un .svg a la bonne taille (-16.svg) a cote, on l'utilise en remplacement du -16.png |
| 3397 | 3397 | if ( |
| 3398 | 3398 | preg_match(',-(\d+)[.](png|gif|svg)$,', $img_file, $m) |
| 3399 | - and $variante_svg_generique = substr($img_file, 0, -strlen($m[0])) . '-xx.svg' |
|
| 3399 | + and $variante_svg_generique = substr($img_file, 0, -strlen($m[0])).'-xx.svg' |
|
| 3400 | 3400 | and file_exists($variante_svg_generique) |
| 3401 | 3401 | ) { |
| 3402 | - if ($variante_svg_size = substr($variante_svg_generique, 0, -6) . $m[1] . '.svg' and file_exists($variante_svg_size)) { |
|
| 3402 | + if ($variante_svg_size = substr($variante_svg_generique, 0, -6).$m[1].'.svg' and file_exists($variante_svg_size)) { |
|
| 3403 | 3403 | $img_file = $variante_svg_size; |
| 3404 | 3404 | } |
| 3405 | 3405 | else { |
@@ -3457,7 +3457,7 @@ discard block |
||
| 3457 | 3457 | return ''; |
| 3458 | 3458 | } |
| 3459 | 3459 | } |
| 3460 | - $atts .= " width='" . $largeur . "' height='" . $hauteur . "'"; |
|
| 3460 | + $atts .= " width='".$largeur."' height='".$hauteur."'"; |
|
| 3461 | 3461 | } |
| 3462 | 3462 | |
| 3463 | 3463 | if (file_exists($img_file)) { |
@@ -3467,14 +3467,14 @@ discard block |
||
| 3467 | 3467 | $alt = ''; |
| 3468 | 3468 | } |
| 3469 | 3469 | elseif ($alt or $alt === '') { |
| 3470 | - $alt = " alt='" . attribut_html($alt) . "'"; |
|
| 3470 | + $alt = " alt='".attribut_html($alt)."'"; |
|
| 3471 | 3471 | } |
| 3472 | 3472 | else { |
| 3473 | - $alt = " alt='" . attribut_html($title) . "'"; |
|
| 3473 | + $alt = " alt='".attribut_html($title)."'"; |
|
| 3474 | 3474 | } |
| 3475 | - return "<img src='" . attribut_html($img_file) . "'$alt" |
|
| 3476 | - . ($title ? ' title="' . attribut_html($title) . '"' : '') |
|
| 3477 | - . ' ' . ltrim($atts) |
|
| 3475 | + return "<img src='".attribut_html($img_file)."'$alt" |
|
| 3476 | + . ($title ? ' title="'.attribut_html($title).'"' : '') |
|
| 3477 | + . ' '.ltrim($atts) |
|
| 3478 | 3478 | . ' />'; |
| 3479 | 3479 | } |
| 3480 | 3480 | |
@@ -3488,10 +3488,10 @@ discard block |
||
| 3488 | 3488 | */ |
| 3489 | 3489 | function http_style_background($img, $att = '', $size = null) { |
| 3490 | 3490 | if ($size and is_numeric($size)) { |
| 3491 | - $size = trim($size) . 'px'; |
|
| 3491 | + $size = trim($size).'px'; |
|
| 3492 | 3492 | } |
| 3493 | - return " style='background" . |
|
| 3494 | - ($att ? '' : '-image') . ': url("' . chemin_image($img) . '")' . ($att ? (' ' . $att) : '') . ';' |
|
| 3493 | + return " style='background". |
|
| 3494 | + ($att ? '' : '-image').': url("'.chemin_image($img).'")'.($att ? (' '.$att) : '').';' |
|
| 3495 | 3495 | . ($size ? "background-size:{$size};" : '') |
| 3496 | 3496 | . "'"; |
| 3497 | 3497 | } |
@@ -3606,7 +3606,7 @@ discard block |
||
| 3606 | 3606 | $img = http_img_pack( |
| 3607 | 3607 | $img, |
| 3608 | 3608 | $alt, |
| 3609 | - $class ? " class='" . attribut_html($class) . "'" : '', |
|
| 3609 | + $class ? " class='".attribut_html($class)."'" : '', |
|
| 3610 | 3610 | '', |
| 3611 | 3611 | ['chemin_image' => false, 'utiliser_suffixe_size' => false] |
| 3612 | 3612 | ); |
@@ -3691,7 +3691,7 @@ discard block |
||
| 3691 | 3691 | $balise_svg_source = $balise_svg; |
| 3692 | 3692 | |
| 3693 | 3693 | // entete XML à supprimer |
| 3694 | - $svg = preg_replace(',^\s*<\?xml[^>]*\?' . '>,', '', $svg); |
|
| 3694 | + $svg = preg_replace(',^\s*<\?xml[^>]*\?'.'>,', '', $svg); |
|
| 3695 | 3695 | |
| 3696 | 3696 | // IE est toujours mon ami |
| 3697 | 3697 | $balise_svg = inserer_attribut($balise_svg, 'focusable', 'false'); |
@@ -3709,9 +3709,9 @@ discard block |
||
| 3709 | 3709 | // regler le alt |
| 3710 | 3710 | if ($alt) { |
| 3711 | 3711 | $balise_svg = inserer_attribut($balise_svg, 'role', 'img'); |
| 3712 | - $id = 'img-svg-title-' . substr(md5("$img_file:$svg:$alt"), 0, 4); |
|
| 3712 | + $id = 'img-svg-title-'.substr(md5("$img_file:$svg:$alt"), 0, 4); |
|
| 3713 | 3713 | $balise_svg = inserer_attribut($balise_svg, 'aria-labelledby', $id); |
| 3714 | - $title = "<title id=\"$id\">" . entites_html($alt) . "</title>\n"; |
|
| 3714 | + $title = "<title id=\"$id\">".entites_html($alt)."</title>\n"; |
|
| 3715 | 3715 | $balise_svg .= $title; |
| 3716 | 3716 | } |
| 3717 | 3717 | else { |
@@ -3759,7 +3759,7 @@ discard block |
||
| 3759 | 3759 | if (is_array($tableau)) { |
| 3760 | 3760 | foreach ($tableau as $k => $v) { |
| 3761 | 3761 | $res = recuperer_fond( |
| 3762 | - 'modeles/' . $modele, |
|
| 3762 | + 'modeles/'.$modele, |
|
| 3763 | 3763 | array_merge(['cle' => $k], (is_array($v) ? $v : ['valeur' => $v])) |
| 3764 | 3764 | ); |
| 3765 | 3765 | $texte .= $res; |
@@ -3944,7 +3944,7 @@ discard block |
||
| 3944 | 3944 | } |
| 3945 | 3945 | |
| 3946 | 3946 | $c = serialize($c); |
| 3947 | - $cle = calculer_cle_action($form . $c); |
|
| 3947 | + $cle = calculer_cle_action($form.$c); |
|
| 3948 | 3948 | $c = "$cle:$c"; |
| 3949 | 3949 | |
| 3950 | 3950 | // on ne stocke pas les contextes dans des fichiers en cache |
@@ -4002,15 +4002,15 @@ discard block |
||
| 4002 | 4002 | } |
| 4003 | 4003 | // toujours encoder l'url source dans le bloc ajax |
| 4004 | 4004 | $r = self(); |
| 4005 | - $r = ' data-origin="' . $r . '"'; |
|
| 4005 | + $r = ' data-origin="'.$r.'"'; |
|
| 4006 | 4006 | $class = 'ajaxbloc'; |
| 4007 | 4007 | if ($ajaxid and is_string($ajaxid)) { |
| 4008 | 4008 | // ajaxid est normalement conforme a un nom de classe css |
| 4009 | 4009 | // on ne verifie pas la conformite, mais on passe entites_html par dessus par precaution |
| 4010 | - $class .= ' ajax-id-' . entites_html($ajaxid); |
|
| 4010 | + $class .= ' ajax-id-'.entites_html($ajaxid); |
|
| 4011 | 4011 | } |
| 4012 | 4012 | |
| 4013 | - return "<div class='$class' " . "data-ajax-env='$env'$r>\n$emboite</div><!--ajaxbloc-->\n"; |
|
| 4013 | + return "<div class='$class' "."data-ajax-env='$env'$r>\n$emboite</div><!--ajaxbloc-->\n"; |
|
| 4014 | 4014 | } |
| 4015 | 4015 | |
| 4016 | 4016 | /** |
@@ -4054,7 +4054,7 @@ discard block |
||
| 4054 | 4054 | $cle = substr($c, 0, $p); |
| 4055 | 4055 | $c = substr($c, $p + 1); |
| 4056 | 4056 | |
| 4057 | - if ($cle == calculer_cle_action($form . $c)) { |
|
| 4057 | + if ($cle == calculer_cle_action($form.$c)) { |
|
| 4058 | 4058 | $env = @unserialize($c); |
| 4059 | 4059 | return $env; |
| 4060 | 4060 | } |
@@ -4175,13 +4175,13 @@ discard block |
||
| 4175 | 4175 | } |
| 4176 | 4176 | } |
| 4177 | 4177 | } |
| 4178 | - $att .= 'class="' . ($class ? attribut_html($class) . ' ' : '') . (defined('_LIEN_OU_EXPOSE_CLASS_ON') ? _LIEN_OU_EXPOSE_CLASS_ON : 'on') . '"'; |
|
| 4178 | + $att .= 'class="'.($class ? attribut_html($class).' ' : '').(defined('_LIEN_OU_EXPOSE_CLASS_ON') ? _LIEN_OU_EXPOSE_CLASS_ON : 'on').'"'; |
|
| 4179 | 4179 | } else { |
| 4180 | 4180 | $bal = 'a'; |
| 4181 | 4181 | $att = "href='$url'" |
| 4182 | - . ($title ? " title='" . attribut_html($title) . "'" : '') |
|
| 4183 | - . ($class ? " class='" . attribut_html($class) . "'" : '') |
|
| 4184 | - . ($rel ? " rel='" . attribut_html($rel) . "'" : '') |
|
| 4182 | + . ($title ? " title='".attribut_html($title)."'" : '') |
|
| 4183 | + . ($class ? " class='".attribut_html($class)."'" : '') |
|
| 4184 | + . ($rel ? " rel='".attribut_html($rel)."'" : '') |
|
| 4185 | 4185 | . $evt; |
| 4186 | 4186 | } |
| 4187 | 4187 | if ($libelle === null) { |
@@ -4320,7 +4320,7 @@ discard block |
||
| 4320 | 4320 | |
| 4321 | 4321 | // Icône |
| 4322 | 4322 | $icone = http_img_pack($fond, $alt, "width='$size' height='$size'"); |
| 4323 | - $icone = '<span class="icone-image' . ($fonction ? " icone-fonction icone-fonction-$fonction" : '') . "\">$icone</span>"; |
|
| 4323 | + $icone = '<span class="icone-image'.($fonction ? " icone-fonction icone-fonction-$fonction" : '')."\">$icone</span>"; |
|
| 4324 | 4324 | |
| 4325 | 4325 | // Markup final |
| 4326 | 4326 | if ($type == 'lien') { |
@@ -4595,20 +4595,20 @@ discard block |
||
| 4595 | 4595 | $class_form = 'ajax'; |
| 4596 | 4596 | $class = str_replace('ajax', '', $class); |
| 4597 | 4597 | } |
| 4598 | - $class_btn = 'submit ' . trim($class); |
|
| 4598 | + $class_btn = 'submit '.trim($class); |
|
| 4599 | 4599 | |
| 4600 | 4600 | if ($confirm) { |
| 4601 | - $confirm = 'confirm("' . attribut_html($confirm) . '")'; |
|
| 4601 | + $confirm = 'confirm("'.attribut_html($confirm).'")'; |
|
| 4602 | 4602 | if ($callback) { |
| 4603 | 4603 | $callback = "$confirm?($callback):false"; |
| 4604 | 4604 | } else { |
| 4605 | 4605 | $callback = $confirm; |
| 4606 | 4606 | } |
| 4607 | 4607 | } |
| 4608 | - $onclick = $callback ? " onclick='return " . addcslashes($callback, "'") . "'" : ''; |
|
| 4608 | + $onclick = $callback ? " onclick='return ".addcslashes($callback, "'")."'" : ''; |
|
| 4609 | 4609 | $title = $title ? " title='$title'" : ''; |
| 4610 | 4610 | |
| 4611 | - return "<form class='bouton_action_post $class_form' method='post' action='$url'><div>" . form_hidden($url) |
|
| 4611 | + return "<form class='bouton_action_post $class_form' method='post' action='$url'><div>".form_hidden($url) |
|
| 4612 | 4612 | . "<button type='submit' class='$class_btn'$title$onclick>$libelle</button></div></form>"; |
| 4613 | 4613 | } |
| 4614 | 4614 | |
@@ -4673,14 +4673,14 @@ discard block |
||
| 4673 | 4673 | $champ_titre = ''; |
| 4674 | 4674 | if ($demande_titre) { |
| 4675 | 4675 | // si pas de titre declare mais champ titre, il sera peuple par le select * |
| 4676 | - $champ_titre = (!empty($desc['titre'])) ? ', ' . $desc['titre'] : ''; |
|
| 4676 | + $champ_titre = (!empty($desc['titre'])) ? ', '.$desc['titre'] : ''; |
|
| 4677 | 4677 | } |
| 4678 | 4678 | include_spip('base/abstract_sql'); |
| 4679 | 4679 | include_spip('base/connect_sql'); |
| 4680 | 4680 | $objets[$type_objet][$id_objet] = sql_fetsel( |
| 4681 | - '*' . $champ_titre, |
|
| 4681 | + '*'.$champ_titre, |
|
| 4682 | 4682 | $desc['table_sql'], |
| 4683 | - id_table_objet($type_objet) . ' = ' . intval($id_objet) |
|
| 4683 | + id_table_objet($type_objet).' = '.intval($id_objet) |
|
| 4684 | 4684 | ); |
| 4685 | 4685 | |
| 4686 | 4686 | // Toujours noter la longueur d'introduction, même si pas demandé cette fois-ci |
@@ -4773,8 +4773,7 @@ discard block |
||
| 4773 | 4773 | if (isset($ligne_sql['chapo'])) { |
| 4774 | 4774 | $chapo = $ligne_sql['chapo']; |
| 4775 | 4775 | $texte = strlen($descriptif) ? |
| 4776 | - '' : |
|
| 4777 | - "$chapo \n\n $texte"; |
|
| 4776 | + '' : "$chapo \n\n $texte"; |
|
| 4778 | 4777 | } |
| 4779 | 4778 | |
| 4780 | 4779 | // Longueur en paramètre, sinon celle renseignée dans la description de l'objet, sinon valeur en dur |
@@ -4849,7 +4848,7 @@ discard block |
||
| 4849 | 4848 | return $texte; |
| 4850 | 4849 | } |
| 4851 | 4850 | |
| 4852 | - $traitement = str_replace('%s', "'" . texte_script($texte) . "'", $traitement); |
|
| 4851 | + $traitement = str_replace('%s', "'".texte_script($texte)."'", $traitement); |
|
| 4853 | 4852 | |
| 4854 | 4853 | // signaler qu'on est dans l'espace prive pour les filtres qui se servent de ce flag |
| 4855 | 4854 | if (test_espace_prive()) { |
@@ -4888,7 +4887,7 @@ discard block |
||
| 4888 | 4887 | } |
| 4889 | 4888 | $url = generer_objet_url($id_objet, $objet, '', '', null, '', $connect); |
| 4890 | 4889 | |
| 4891 | - return "<a href='$url' class='$objet'>" . couper($titre, $longueur) . '</a>'; |
|
| 4890 | + return "<a href='$url' class='$objet'>".couper($titre, $longueur).'</a>'; |
|
| 4892 | 4891 | } |
| 4893 | 4892 | |
| 4894 | 4893 | /** |
@@ -4914,10 +4913,10 @@ discard block |
||
| 4914 | 4913 | function wrap($texte, $wrap) { |
| 4915 | 4914 | $balises = extraire_balises($wrap); |
| 4916 | 4915 | if (preg_match_all(",<([a-z]\w*)\b[^>]*>,UimsS", $wrap, $regs, PREG_PATTERN_ORDER)) { |
| 4917 | - $texte = $wrap . $texte; |
|
| 4916 | + $texte = $wrap.$texte; |
|
| 4918 | 4917 | $regs = array_reverse($regs[1]); |
| 4919 | - $wrap = '</' . implode('></', $regs) . '>'; |
|
| 4920 | - $texte = $texte . $wrap; |
|
| 4918 | + $wrap = '</'.implode('></', $regs).'>'; |
|
| 4919 | + $texte = $texte.$wrap; |
|
| 4921 | 4920 | } |
| 4922 | 4921 | |
| 4923 | 4922 | return $texte; |
@@ -4948,7 +4947,7 @@ discard block |
||
| 4948 | 4947 | |
| 4949 | 4948 | // caster $u en array si besoin |
| 4950 | 4949 | if (is_object($u)) { |
| 4951 | - $u = (array)$u; |
|
| 4950 | + $u = (array) $u; |
|
| 4952 | 4951 | } |
| 4953 | 4952 | |
| 4954 | 4953 | if (is_array($u)) { |
@@ -4970,7 +4969,7 @@ discard block |
||
| 4970 | 4969 | // sinon on passe a la ligne et on indente |
| 4971 | 4970 | $i_str = str_pad('', $indent, ' '); |
| 4972 | 4971 | foreach ($u as $k => $v) { |
| 4973 | - $out .= $join . $i_str . "$k: " . filtre_print_dist($v, $join, $indent + 2); |
|
| 4972 | + $out .= $join.$i_str."$k: ".filtre_print_dist($v, $join, $indent + 2); |
|
| 4974 | 4973 | } |
| 4975 | 4974 | |
| 4976 | 4975 | return $out; |
@@ -5024,7 +5023,7 @@ discard block |
||
| 5024 | 5023 | * @return string |
| 5025 | 5024 | */ |
| 5026 | 5025 | function objet_icone($objet, $taille = 24, $class = '') { |
| 5027 | - $icone = objet_info($objet, 'icone_objet') . '-' . $taille . '.png'; |
|
| 5026 | + $icone = objet_info($objet, 'icone_objet').'-'.$taille.'.png'; |
|
| 5028 | 5027 | $icone = chemin_image($icone); |
| 5029 | 5028 | $balise_img = charger_filtre('balise_img'); |
| 5030 | 5029 | |
@@ -5050,7 +5049,7 @@ discard block |
||
| 5050 | 5049 | */ |
| 5051 | 5050 | function objet_T($objet, $chaine, $args = [], $options = []) { |
| 5052 | 5051 | $chaine = explode(':', $chaine); |
| 5053 | - if ($t = _T($objet . ':' . end($chaine), $args, array_merge($options, ['force' => false]))) { |
|
| 5052 | + if ($t = _T($objet.':'.end($chaine), $args, array_merge($options, ['force' => false]))) { |
|
| 5054 | 5053 | return $t; |
| 5055 | 5054 | } |
| 5056 | 5055 | $chaine = implode(':', $chaine); |
@@ -5116,7 +5115,7 @@ discard block |
||
| 5116 | 5115 | $cache = recuperer_fond($fond, $contexte, $options, $connect); |
| 5117 | 5116 | |
| 5118 | 5117 | // calculer le nom de la css |
| 5119 | - $dir_var = sous_repertoire(_DIR_VAR, 'cache-' . $extension); |
|
| 5118 | + $dir_var = sous_repertoire(_DIR_VAR, 'cache-'.$extension); |
|
| 5120 | 5119 | $nom_safe = preg_replace(',\W,', '_', str_replace('.', '_', $fond)); |
| 5121 | 5120 | $contexte_implicite = calculer_contexte_implicite(); |
| 5122 | 5121 | |
@@ -5124,14 +5123,14 @@ discard block |
||
| 5124 | 5123 | // mais on peut hasher selon le contenu a la demande, si plusieurs contextes produisent un meme contenu |
| 5125 | 5124 | // reduit la variabilite du nom et donc le nombre de css concatenees possibles in fine |
| 5126 | 5125 | if (isset($options['hash_on_content']) and $options['hash_on_content']) { |
| 5127 | - $hash = md5($contexte_implicite['host'] . '::' . $cache); |
|
| 5126 | + $hash = md5($contexte_implicite['host'].'::'.$cache); |
|
| 5128 | 5127 | } |
| 5129 | 5128 | else { |
| 5130 | 5129 | unset($contexte_implicite['notes']); // pas pertinent pour signaler un changeemnt de contenu pour des css/js |
| 5131 | 5130 | ksort($contexte); |
| 5132 | - $hash = md5($fond . json_encode($contexte_implicite, JSON_THROW_ON_ERROR) . json_encode($contexte, JSON_THROW_ON_ERROR) . $connect); |
|
| 5131 | + $hash = md5($fond.json_encode($contexte_implicite, JSON_THROW_ON_ERROR).json_encode($contexte, JSON_THROW_ON_ERROR).$connect); |
|
| 5133 | 5132 | } |
| 5134 | - $filename = $dir_var . $extension . "dyn-$nom_safe-" . substr($hash, 0, 8) . ".$extension"; |
|
| 5133 | + $filename = $dir_var.$extension."dyn-$nom_safe-".substr($hash, 0, 8).".$extension"; |
|
| 5135 | 5134 | |
| 5136 | 5135 | // mettre a jour le fichier si il n'existe pas |
| 5137 | 5136 | // ou trop ancien |
@@ -5139,8 +5138,8 @@ discard block |
||
| 5139 | 5138 | // et recopie sur le fichier cible uniquement si il change |
| 5140 | 5139 | if ( |
| 5141 | 5140 | !file_exists($filename) |
| 5142 | - or !file_exists($filename . '.last') |
|
| 5143 | - or (isset($cache['lastmodified']) and $cache['lastmodified'] and filemtime($filename . '.last') < $cache['lastmodified']) |
|
| 5141 | + or !file_exists($filename.'.last') |
|
| 5142 | + or (isset($cache['lastmodified']) and $cache['lastmodified'] and filemtime($filename.'.last') < $cache['lastmodified']) |
|
| 5144 | 5143 | or (defined('_VAR_MODE') and _VAR_MODE == 'recalcul') |
| 5145 | 5144 | ) { |
| 5146 | 5145 | $contenu = $cache['texte']; |
@@ -5164,10 +5163,10 @@ discard block |
||
| 5164 | 5163 | } |
| 5165 | 5164 | // pas de date dans le commentaire car sinon ca invalide le md5 et force la maj |
| 5166 | 5165 | // mais on peut mettre un md5 du contenu, ce qui donne un aperu rapide si la feuille a change ou non |
| 5167 | - $comment .= "}\n md5:" . md5($contenu) . " */\n"; |
|
| 5166 | + $comment .= "}\n md5:".md5($contenu)." */\n"; |
|
| 5168 | 5167 | } |
| 5169 | 5168 | // et ecrire le fichier si il change |
| 5170 | - ecrire_fichier_calcule_si_modifie($filename, $comment . $contenu, false, true); |
|
| 5169 | + ecrire_fichier_calcule_si_modifie($filename, $comment.$contenu, false, true); |
|
| 5171 | 5170 | } |
| 5172 | 5171 | |
| 5173 | 5172 | return timestamp($filename); |
@@ -5400,7 +5399,7 @@ discard block |
||
| 5400 | 5399 | if ($e > 0 and strlen($mid) > 8) { |
| 5401 | 5400 | $mid = '***...***'; |
| 5402 | 5401 | } |
| 5403 | - return substr($passe, 0, $e) . $mid . ($e > 0 ? substr($passe, -$e) : ''); |
|
| 5402 | + return substr($passe, 0, $e).$mid.($e > 0 ? substr($passe, -$e) : ''); |
|
| 5404 | 5403 | } |
| 5405 | 5404 | |
| 5406 | 5405 | |
@@ -5462,7 +5461,7 @@ discard block |
||
| 5462 | 5461 | case 'id': |
| 5463 | 5462 | case 'anchor': |
| 5464 | 5463 | if (preg_match(',^\d,', $texte)) { |
| 5465 | - $texte = substr($type, 0, 1) . $texte; |
|
| 5464 | + $texte = substr($type, 0, 1).$texte; |
|
| 5466 | 5465 | } |
| 5467 | 5466 | } |
| 5468 | 5467 | |
@@ -5472,9 +5471,9 @@ discard block |
||
| 5472 | 5471 | |
| 5473 | 5472 | if (strlen($texte) < $longueur_mini and $longueur_mini < $longueur_maxi) { |
| 5474 | 5473 | if (preg_match(',^\d,', $texte)) { |
| 5475 | - $texte = ($type ? substr($type, 0, 1) : 's') . $texte; |
|
| 5474 | + $texte = ($type ? substr($type, 0, 1) : 's').$texte; |
|
| 5476 | 5475 | } |
| 5477 | - $texte .= $separateur . md5($original); |
|
| 5476 | + $texte .= $separateur.md5($original); |
|
| 5478 | 5477 | $texte = substr($texte, 0, $longueur_mini); |
| 5479 | 5478 | } |
| 5480 | 5479 | |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | $this->serveur = strtolower($serveur); |
| 41 | 41 | |
| 42 | 42 | if (!($this->link = _sqlite_link($this->serveur)) && (!defined('_ECRIRE_INSTALL') || !_ECRIRE_INSTALL)) { |
| 43 | - spip_log('Aucune connexion sqlite (link)', 'sqlite.' . _LOG_ERREUR); |
|
| 43 | + spip_log('Aucune connexion sqlite (link)', 'sqlite.'._LOG_ERREUR); |
|
| 44 | 44 | |
| 45 | 45 | return; |
| 46 | 46 | } |
@@ -87,17 +87,17 @@ discard block |
||
| 87 | 87 | try { |
| 88 | 88 | $r = $this->link->query($query); |
| 89 | 89 | } catch (\PDOException $e) { |
| 90 | - spip_log('PDOException: ' . $e->getMessage(), 'sqlite.' . _LOG_DEBUG); |
|
| 90 | + spip_log('PDOException: '.$e->getMessage(), 'sqlite.'._LOG_DEBUG); |
|
| 91 | 91 | $r = false; |
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | // loger les warnings/erreurs eventuels de sqlite remontant dans PHP |
| 95 | 95 | if ($e and $e instanceof \PDOException) { |
| 96 | - $err = strip_tags($e->getMessage()) . ' in ' . $e->getFile() . ' line ' . $e->getLine(); |
|
| 97 | - spip_log("$err - " . $query, 'sqlite.' . _LOG_ERREUR); |
|
| 96 | + $err = strip_tags($e->getMessage()).' in '.$e->getFile().' line '.$e->getLine(); |
|
| 97 | + spip_log("$err - ".$query, 'sqlite.'._LOG_ERREUR); |
|
| 98 | 98 | } elseif ($err = (function_exists('error_get_last') ? error_get_last() : '') and $err != $last_error) { |
| 99 | - $err = strip_tags($err['message']) . ' in ' . $err['file'] . ' line ' . $err['line']; |
|
| 100 | - spip_log("$err - " . $query, 'sqlite.' . _LOG_ERREUR); |
|
| 99 | + $err = strip_tags($err['message']).' in '.$err['file'].' line '.$err['line']; |
|
| 100 | + spip_log("$err - ".$query, 'sqlite.'._LOG_ERREUR); |
|
| 101 | 101 | } else { |
| 102 | 102 | $err = ''; |
| 103 | 103 | } |