@@ -333,7 +333,7 @@ discard block |
||
| 333 | 333 | * @return string |
| 334 | 334 | */ |
| 335 | 335 | function _sqlite_func_preg_replace($quoi, $cherche, $remplace) { |
| 336 | - $return = preg_replace('%' . $cherche . '%', $remplace, $quoi); |
|
| 336 | + $return = preg_replace('%'.$cherche.'%', $remplace, $quoi); |
|
| 337 | 337 | |
| 338 | 338 | #spip_log("preg_replace : $quoi, $cherche, $remplace, $return",'sqlite.'._LOG_DEBUG); |
| 339 | 339 | return $return; |
@@ -409,7 +409,7 @@ discard block |
||
| 409 | 409 | // il faut enlever un niveau d'echappement pour être homogène à mysql |
| 410 | 410 | $cherche = str_replace('\\\\', '\\', $cherche); |
| 411 | 411 | $u = $GLOBALS['meta']['pcre_u'] ?? 'u'; |
| 412 | - $return = preg_match('%' . $cherche . '%imsS' . $u, $quoi); |
|
| 412 | + $return = preg_match('%'.$cherche.'%imsS'.$u, $quoi); |
|
| 413 | 413 | |
| 414 | 414 | #spip_log("regexp_replace : $quoi, $cherche, $remplace, $return",'sqlite.'._LOG_DEBUG); |
| 415 | 415 | return $return; |
@@ -461,7 +461,7 @@ discard block |
||
| 461 | 461 | $count = 0; |
| 462 | 462 | str_replace($mysql_to_strftime_not_ok, '', $conv, $count); |
| 463 | 463 | if ($count > 0) { |
| 464 | - spip_log("DATE_FORMAT : At least one parameter can't be parsed by strftime with format '$conv'", 'sqlite.' . _LOG_ERREUR); |
|
| 464 | + spip_log("DATE_FORMAT : At least one parameter can't be parsed by strftime with format '$conv'", 'sqlite.'._LOG_ERREUR); |
|
| 465 | 465 | } |
| 466 | 466 | $to_strftime[$conv] = str_replace(array_keys($mysql_to_strftime), $mysql_to_strftime, $conv); |
| 467 | 467 | } |
@@ -480,7 +480,7 @@ discard block |
||
| 480 | 480 | */ |
| 481 | 481 | function _sqlite_func_to_days($d) { |
| 482 | 482 | static $offset = 719528; // nb de jour entre 0000-00-00 et timestamp 0=1970-01-01 |
| 483 | - $result = $offset + (int)ceil(_sqlite_func_unix_timestamp($d) / (24 * 3600)); |
|
| 483 | + $result = $offset + (int) ceil(_sqlite_func_unix_timestamp($d) / (24 * 3600)); |
|
| 484 | 484 | |
| 485 | 485 | #spip_log("Passage avec TO_DAYS : $d, $result",'sqlite.'._LOG_DEBUG); |
| 486 | 486 | return $result; |
@@ -63,9 +63,9 @@ |
||
| 63 | 63 | $f = new IndenteurXML(); |
| 64 | 64 | $sax($page, $apply, $f); |
| 65 | 65 | if (!$f->err) { |
| 66 | - return $f->entete . $f->res; |
|
| 66 | + return $f->entete.$f->res; |
|
| 67 | 67 | } |
| 68 | - spip_log('indentation impossible ' . (is_countable($f->err) ? count($f->err) : 0) . ' erreurs de validation'); |
|
| 68 | + spip_log('indentation impossible '.(is_countable($f->err) ? count($f->err) : 0).' erreurs de validation'); |
|
| 69 | 69 | |
| 70 | - return $f->entete . $f->page; |
|
| 70 | + return $f->entete.$f->page; |
|
| 71 | 71 | } |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | $grammaire = find_in_path($grammaire); |
| 30 | 30 | } |
| 31 | 31 | |
| 32 | - $file = _DIR_CACHE_XML . preg_replace('/[^\w.]/', '_', $rotlvl) . '.gz'; |
|
| 32 | + $file = _DIR_CACHE_XML.preg_replace('/[^\w.]/', '_', $rotlvl).'.gz'; |
|
| 33 | 33 | |
| 34 | 34 | if (lire_fichier($file, $r)) { |
| 35 | 35 | if (!$grammaire) { |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | $dtc->peres[$k] = $v; |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | - spip_log("Analyser DTD $avail $grammaire (" . spip_timer('dtd') . ') ' . (is_countable($dtc->macros) ? count($dtc->macros) : 0) . ' macros, ' . (is_countable($dtc->elements) ? count($dtc->elements) : 0) . ' elements, ' . (is_countable($dtc->attributs) ? count($dtc->attributs) : 0) . " listes d'attributs, " . (is_countable($dtc->entites) ? count($dtc->entites) : 0) . ' entites'); |
|
| 59 | + spip_log("Analyser DTD $avail $grammaire (".spip_timer('dtd').') '.(is_countable($dtc->macros) ? count($dtc->macros) : 0).' macros, '.(is_countable($dtc->elements) ? count($dtc->elements) : 0).' elements, '.(is_countable($dtc->attributs) ? count($dtc->attributs) : 0)." listes d'attributs, ".(is_countable($dtc->entites) ? count($dtc->entites) : 0).' entites'); |
|
| 60 | 60 | # $r = $dtc->regles; ksort($r);foreach($r as $l => $v) {$t=array_keys($dtc->attributs[$l]);echo "<b>$l</b> '$v' ", count($t), " attributs: ", join (', ',$t);$t=$dtc->peres[$l];echo "<br />",count($t), " peres: ", @join (', ',$t), "<br />\n";}exit; |
| 61 | 61 | ecrire_fichier($file, serialize($dtc), true); |
| 62 | 62 | } |
@@ -173,7 +173,7 @@ discard block |
||
| 173 | 173 | } |
| 174 | 174 | } |
| 175 | 175 | if (!is_string($r)) { |
| 176 | - spip_log("erreur $r dans la DTD " . substr($dtd, 0, 80) . '.....'); |
|
| 176 | + spip_log("erreur $r dans la DTD ".substr($dtd, 0, 80).'.....'); |
|
| 177 | 177 | |
| 178 | 178 | return false; |
| 179 | 179 | } |
@@ -221,7 +221,7 @@ discard block |
||
| 221 | 221 | ($n[0] == 'PUBLIC') |
| 222 | 222 | and !tester_url_absolue($n[1]) |
| 223 | 223 | ) { |
| 224 | - $n[1] = substr($grammaire, 0, strrpos($grammaire, '/') + 1) . $n[1]; |
|
| 224 | + $n[1] = substr($grammaire, 0, strrpos($grammaire, '/') + 1).$n[1]; |
|
| 225 | 225 | } |
| 226 | 226 | analyser_dtd($n[1], $n[0], $dtc); |
| 227 | 227 | } |
@@ -249,7 +249,7 @@ discard block |
||
| 249 | 249 | } |
| 250 | 250 | |
| 251 | 251 | if ($dtc->macros[$m[1]] == 'INCLUDE') { |
| 252 | - $retour = $r[1] . substr($m[2], strlen($r[0])); |
|
| 252 | + $retour = $r[1].substr($m[2], strlen($r[0])); |
|
| 253 | 253 | } else { |
| 254 | 254 | $retour = substr($m[2], strlen($r[0])); |
| 255 | 255 | } |
@@ -282,7 +282,7 @@ discard block |
||
| 282 | 282 | spip_log("redefinition de l'entite $nom"); |
| 283 | 283 | } |
| 284 | 284 | if ($k6) { |
| 285 | - return $k6 . $dtd; |
|
| 285 | + return $k6.$dtd; |
|
| 286 | 286 | } // cas du synonyme complet |
| 287 | 287 | $val = expanserEntite(($k2 ? $k3 : ($k4 ? $k5 : $k6)), $dtc->macros); |
| 288 | 288 | |
@@ -390,7 +390,7 @@ discard block |
||
| 390 | 390 | if (preg_match_all("/\s*(\S+)\s+(([(][^)]*[)])|(\S+))\s+([^\s']*)(\s*'[^']*')?/", $val, $r2, PREG_SET_ORDER)) { |
| 391 | 391 | foreach ($r2 as $m2) { |
| 392 | 392 | $v = preg_match('/^\w+$/', $m2[2]) ? $m2[2] |
| 393 | - : ('/^' . preg_replace('/\s+/', '', $m2[2]) . '$/'); |
|
| 393 | + : ('/^'.preg_replace('/\s+/', '', $m2[2]).'$/'); |
|
| 394 | 394 | $m21 = expanserEntite($m2[1], $dtc->macros); |
| 395 | 395 | $m25 = expanserEntite($m2[5], $dtc->macros); |
| 396 | 396 | $dtc->attributs[$nom][$m21] = [$v, $m25]; |
@@ -107,7 +107,7 @@ |
||
| 107 | 107 | '_publiable' => $publiable, |
| 108 | 108 | '_label' => $desc['texte_changer_statut'] ?? 'texte_article_statut', |
| 109 | 109 | '_aide' => $desc['aide_changer_statut'] ?? '', |
| 110 | - '_hidden' => "<input type='hidden' name='statut_old' value='" . $v['statut'] . "' />", |
|
| 110 | + '_hidden' => "<input type='hidden' name='statut_old' value='".$v['statut']."' />", |
|
| 111 | 111 | ]; |
| 112 | 112 | |
| 113 | 113 | #if (!count($valeurs['statuts'])) |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | } |
| 97 | 97 | |
| 98 | 98 | |
| 99 | - $row = sql_fetsel($select, $desc['table'], "$_id_objet=" . intval($id_objet)); |
|
| 99 | + $row = sql_fetsel($select, $desc['table'], "$_id_objet=".intval($id_objet)); |
|
| 100 | 100 | $statut = $row['statut'] ?? 'publie'; // pas de statut => publie |
| 101 | 101 | |
| 102 | 102 | $valeurs['editable'] = autoriser('dater', $objet, $id_objet, null, ['statut' => $statut]); |
@@ -253,9 +253,9 @@ discard block |
||
| 253 | 253 | |
| 254 | 254 | if (_request('changer')) { |
| 255 | 255 | foreach (['date', 'date_redac'] as $k) { |
| 256 | - if ($v = _request($k . '_jour') and !dater_recuperer_date_saisie($v, $k)) { |
|
| 256 | + if ($v = _request($k.'_jour') and !dater_recuperer_date_saisie($v, $k)) { |
|
| 257 | 257 | $erreurs[$k] = _T('format_date_incorrecte'); |
| 258 | - } elseif ($v = _request($k . '_heure') and !dater_recuperer_heure_saisie($v)) { |
|
| 258 | + } elseif ($v = _request($k.'_heure') and !dater_recuperer_heure_saisie($v)) { |
|
| 259 | 259 | $erreurs[$k] = _T('format_heure_incorrecte'); |
| 260 | 260 | } |
| 261 | 261 | } |
@@ -63,9 +63,9 @@ discard block |
||
| 63 | 63 | " class='picto_err'", |
| 64 | 64 | _T('plugin_info_erreur_xml') |
| 65 | 65 | ) |
| 66 | - . "<div class='erreur'>" . join('<br >', $info['erreur']) . '</div>'; |
|
| 66 | + . "<div class='erreur'>".join('<br >', $info['erreur']).'</div>'; |
|
| 67 | 67 | $checkable = false; |
| 68 | - } elseif (isset($GLOBALS['erreurs_activation_raw'][$dir_plugins . $plug_file])) { |
|
| 68 | + } elseif (isset($GLOBALS['erreurs_activation_raw'][$dir_plugins.$plug_file])) { |
|
| 69 | 69 | $class_li .= ' error'; |
| 70 | 70 | $erreur = http_img_pack( |
| 71 | 71 | 'plugin-err-32.png', |
@@ -73,10 +73,10 @@ discard block |
||
| 73 | 73 | " class='picto_err'", |
| 74 | 74 | _T('plugin_impossible_activer', ['plugin' => $nom]) |
| 75 | 75 | ) |
| 76 | - . "<div class='erreur'>" . implode( |
|
| 76 | + . "<div class='erreur'>".implode( |
|
| 77 | 77 | '<br />', |
| 78 | - $GLOBALS['erreurs_activation_raw'][$dir_plugins . $plug_file] |
|
| 79 | - ) . '</div>'; |
|
| 78 | + $GLOBALS['erreurs_activation_raw'][$dir_plugins.$plug_file] |
|
| 79 | + ).'</div>'; |
|
| 80 | 80 | } else { |
| 81 | 81 | $cfg = $actif ? plugin_bouton_config($plug_file, $info, $dir_plugins) : ''; |
| 82 | 82 | if (defined('_DEV_VERSION_SPIP_COMPAT') and !plugin_version_compatible($info['compatibilite'], $GLOBALS['spip_version_branche'])) { |
@@ -93,11 +93,11 @@ discard block |
||
| 93 | 93 | // numerotons les occurrences d'un meme prefix |
| 94 | 94 | $versions[$prefix] = $id = isset($versions[$prefix]) ? intval($versions[$prefix]) + 1 : ''; |
| 95 | 95 | |
| 96 | - $class_li .= ($actif ? ' actif' : '') . ($expose ? ' on' : ''); |
|
| 96 | + $class_li .= ($actif ? ' actif' : '').($expose ? ' on' : ''); |
|
| 97 | 97 | |
| 98 | 98 | return "<li id='$prefix$id' class='$class_li'>" |
| 99 | 99 | . ((!$checkable and !$checked) |
| 100 | - ? '' : plugin_checkbox(++$id_input, $dir_plugins . $plug_file, $checked)) |
|
| 100 | + ? '' : plugin_checkbox(++$id_input, $dir_plugins.$plug_file, $checked)) |
|
| 101 | 101 | . plugin_resume($info, $dir_plugins, $plug_file, $url_page) |
| 102 | 102 | . $cfg |
| 103 | 103 | . $erreur |
@@ -116,9 +116,9 @@ discard block |
||
| 116 | 116 | // si paquet.xml fournit un squelette, le prendre |
| 117 | 117 | if (isset($infos['config']) and $infos['config']) { |
| 118 | 118 | return recuperer_fond( |
| 119 | - "$dir$nom/" . $infos['config'], |
|
| 119 | + "$dir$nom/".$infos['config'], |
|
| 120 | 120 | [ |
| 121 | - 'script' => 'configurer_' . $prefix, |
|
| 121 | + 'script' => 'configurer_'.$prefix, |
|
| 122 | 122 | 'nom' => $nom |
| 123 | 123 | ] |
| 124 | 124 | ); |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | return recuperer_fond( |
| 138 | 138 | 'prive/squelettes/inclure/cfg', |
| 139 | 139 | [ |
| 140 | - 'script' => 'configurer_' . $prefix, |
|
| 140 | + 'script' => 'configurer_'.$prefix, |
|
| 141 | 141 | 'nom' => $nom |
| 142 | 142 | ] |
| 143 | 143 | ); |
@@ -153,7 +153,7 @@ discard block |
||
| 153 | 153 | . "<input type='checkbox' name='s$name' id='label_$id_input'" |
| 154 | 154 | . ($actif ? " checked='checked'" : '') |
| 155 | 155 | . " class='checkbox' value='O' />" |
| 156 | - . "\n<label for='label_$id_input'>" . _T('activer_plugin') . '</label>' |
|
| 156 | + . "\n<label for='label_$id_input'>"._T('activer_plugin').'</label>' |
|
| 157 | 157 | . '</div>'; |
| 158 | 158 | } |
| 159 | 159 | |
@@ -208,11 +208,11 @@ discard block |
||
| 208 | 208 | . "<h3><a href='$url' rel='info'>" |
| 209 | 209 | . $nom |
| 210 | 210 | . '</a></h3>' |
| 211 | - . " <span class='version'>" . $info['version'] . '</span>' |
|
| 211 | + . " <span class='version'>".$info['version'].'</span>' |
|
| 212 | 212 | . " <span class='etat'> - " |
| 213 | 213 | . plugin_etat_en_clair($info['etat']) |
| 214 | 214 | . '</span>' |
| 215 | - . "<div class='short'>" . $slogan . '</div>' |
|
| 215 | + . "<div class='short'>".$slogan.'</div>' |
|
| 216 | 216 | . $i |
| 217 | 217 | . '</div>'; |
| 218 | 218 | } |
@@ -227,7 +227,7 @@ discard block |
||
| 227 | 227 | $text2 = _T('info_desinstaller_plugin'); |
| 228 | 228 | $file = basename($plug_file); |
| 229 | 229 | |
| 230 | - return "<div class='actions'>[" . |
|
| 230 | + return "<div class='actions'>[". |
|
| 231 | 231 | "<a href='$action' |
| 232 | 232 | onclick='return confirm(\"$text $nom ?\\n$text2\")'>" |
| 233 | 233 | . $text |
@@ -249,7 +249,7 @@ discard block |
||
| 249 | 249 | $etat = 'developpement'; |
| 250 | 250 | } |
| 251 | 251 | |
| 252 | - return _T('plugin_etat_' . $etat); |
|
| 252 | + return _T('plugin_etat_'.$etat); |
|
| 253 | 253 | } |
| 254 | 254 | |
| 255 | 255 | function plugin_propre($texte, $module = '', $propre = 'propre') { |
@@ -258,7 +258,7 @@ discard block |
||
| 258 | 258 | $module = substr($module, strlen(_DIR_RACINE)); |
| 259 | 259 | } |
| 260 | 260 | if (preg_match('|^\w+_[\w_]+$|', $texte)) { |
| 261 | - $texte = _T(($module ? "$module:" : '') . $texte, [], ['force' => false]); |
|
| 261 | + $texte = _T(($module ? "$module:" : '').$texte, [], ['force' => false]); |
|
| 262 | 262 | } |
| 263 | 263 | |
| 264 | 264 | return $propre($texte); |
@@ -291,9 +291,9 @@ discard block |
||
| 291 | 291 | isset($info['documentation']) |
| 292 | 292 | and $lien = $info['documentation'] |
| 293 | 293 | ) { |
| 294 | - $description .= "<p><em class='site'><a href='$lien' class='spip_out'>" . _T('en_savoir_plus') . '</a></em></p>'; |
|
| 294 | + $description .= "<p><em class='site'><a href='$lien' class='spip_out'>"._T('en_savoir_plus').'</a></em></p>'; |
|
| 295 | 295 | } |
| 296 | - $s .= "<dd class='desc'>" . $description . "</dd>\n"; |
|
| 296 | + $s .= "<dd class='desc'>".$description."</dd>\n"; |
|
| 297 | 297 | |
| 298 | 298 | if (isset($info['auteur'])) { |
| 299 | 299 | if (is_array($info['auteur'])) { |
@@ -303,19 +303,19 @@ discard block |
||
| 303 | 303 | $a = trim($info['auteur']); |
| 304 | 304 | } |
| 305 | 305 | if ($a) { |
| 306 | - $s .= "<dt class='auteurs'>" . _T('public:par_auteur') . "</dt><dd class='auteurs'>" . PtoBR(propre( |
|
| 306 | + $s .= "<dt class='auteurs'>"._T('public:par_auteur')."</dt><dd class='auteurs'>".PtoBR(propre( |
|
| 307 | 307 | $a, |
| 308 | 308 | $dir |
| 309 | - )) . "</dd>\n"; |
|
| 309 | + ))."</dd>\n"; |
|
| 310 | 310 | } |
| 311 | 311 | } |
| 312 | 312 | |
| 313 | 313 | if (isset($info['credit'])) { |
| 314 | 314 | if ($a = formater_credits($info['credit'], ', ')) { |
| 315 | - $s .= "<dt class='credits'>" . _T('plugin_info_credit') . "</dt><dd class='credits'>" . PtoBR(propre( |
|
| 315 | + $s .= "<dt class='credits'>"._T('plugin_info_credit')."</dt><dd class='credits'>".PtoBR(propre( |
|
| 316 | 316 | $a, |
| 317 | 317 | $dir |
| 318 | - )) . "</dd>\n"; |
|
| 318 | + ))."</dd>\n"; |
|
| 319 | 319 | } |
| 320 | 320 | } |
| 321 | 321 | |
@@ -327,10 +327,10 @@ discard block |
||
| 327 | 327 | $a = trim($info['licence']); |
| 328 | 328 | } |
| 329 | 329 | if ($a) { |
| 330 | - $s .= "<dt class='licence'>" . _T('intitule_licence') . "</dt><dd class='licence'>" . PtoBR(propre( |
|
| 330 | + $s .= "<dt class='licence'>"._T('intitule_licence')."</dt><dd class='licence'>".PtoBR(propre( |
|
| 331 | 331 | $a, |
| 332 | 332 | $dir |
| 333 | - )) . "</dd>\n"; |
|
| 333 | + ))."</dd>\n"; |
|
| 334 | 334 | } |
| 335 | 335 | } |
| 336 | 336 | |
@@ -341,25 +341,24 @@ discard block |
||
| 341 | 341 | // |
| 342 | 342 | $infotech = []; |
| 343 | 343 | |
| 344 | - $version = '<dt>' . _T('version') . '</dt><dd>' . $info['version']; |
|
| 344 | + $version = '<dt>'._T('version').'</dt><dd>'.$info['version']; |
|
| 345 | 345 | // Version VCS |
| 346 | - if ($vcs = version_vcs_courante($dir_plugins . $plug_file)) { |
|
| 347 | - $version .= ' ' . $vcs; |
|
| 346 | + if ($vcs = version_vcs_courante($dir_plugins.$plug_file)) { |
|
| 347 | + $version .= ' '.$vcs; |
|
| 348 | 348 | } |
| 349 | 349 | $version .= '</dd>'; |
| 350 | 350 | $infotech[] = $version; |
| 351 | - $infotech[] = '<dt>' . _T('repertoire_plugins') . '</dt><dd>' . joli_repertoire("$dir_plugins$plug_file") . '</dd>'; |
|
| 351 | + $infotech[] = '<dt>'._T('repertoire_plugins').'</dt><dd>'.joli_repertoire("$dir_plugins$plug_file").'</dd>'; |
|
| 352 | 352 | // source zip le cas echeant |
| 353 | - $infotech[] = (lire_fichier($dir_plugins . $plug_file . '/install.log', $log) |
|
| 353 | + $infotech[] = (lire_fichier($dir_plugins.$plug_file.'/install.log', $log) |
|
| 354 | 354 | and preg_match(',^source:(.*)$,m', $log, $r)) |
| 355 | - ? '<dt>' . _T('plugin_source') . '</dt><dd>' . trim($r[1]) . '</dd>' |
|
| 355 | + ? '<dt>'._T('plugin_source').'</dt><dd>'.trim($r[1]).'</dd>' |
|
| 356 | 356 | : ''; |
| 357 | 357 | |
| 358 | - $infotech[] = !$info['necessite'] ? '' : |
|
| 359 | - ('<dt>' . _T('plugin_info_necessite') . '</dt><dd>' . join( |
|
| 358 | + $infotech[] = !$info['necessite'] ? '' : ('<dt>'._T('plugin_info_necessite').'</dt><dd>'.join( |
|
| 360 | 359 | ' ', |
| 361 | 360 | array_map('array_shift', $info['necessite']) |
| 362 | - ) . '</dd>'); |
|
| 361 | + ).'</dd>'); |
|
| 363 | 362 | |
| 364 | 363 | $s .= "<dl class='tech'>" |
| 365 | 364 | . join('', $infotech) |
@@ -380,8 +379,8 @@ discard block |
||
| 380 | 379 | $texte .= |
| 381 | 380 | (!is_array($_credit)) |
| 382 | 381 | ? PtoBR(propre($_credit)) |
| 383 | - : ($_credit['url'] ? '<a href="' . $_credit['url'] . '">' : '') . |
|
| 384 | - $_credit['nom'] . |
|
| 382 | + : ($_credit['url'] ? '<a href="'.$_credit['url'].'">' : ''). |
|
| 383 | + $_credit['nom']. |
|
| 385 | 384 | ($_credit['url'] ? '</a>' : ''); |
| 386 | 385 | } |
| 387 | 386 | |
@@ -44,9 +44,9 @@ discard block |
||
| 44 | 44 | ]; |
| 45 | 45 | $style_titre_mapping = ['couleur' => 'topper', 'trait-couleur' => 'section']; |
| 46 | 46 | $c = $style_mapping[$style] ?? 'simple'; |
| 47 | - $class = $c . ($class ? " $class" : ''); |
|
| 47 | + $class = $c.($class ? " $class" : ''); |
|
| 48 | 48 | if (!$padding) { |
| 49 | - $class .= ($class ? ' ' : '') . 'no-padding'; |
|
| 49 | + $class .= ($class ? ' ' : '').'no-padding'; |
|
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | //($id?"id='$id' ":"") |
@@ -61,12 +61,12 @@ discard block |
||
| 61 | 61 | if ($fonction) { |
| 62 | 62 | // 2 images pour composer l'icone : le fond (article) en background, |
| 63 | 63 | // la fonction (new) en image |
| 64 | - $icone = http_img_pack($fonction, '', "class='cadre-icone' width='$size' height='$size'\n" . |
|
| 64 | + $icone = http_img_pack($fonction, '', "class='cadre-icone' width='$size' height='$size'\n". |
|
| 65 | 65 | http_style_background($fond, 'no-repeat center center', $size)); |
| 66 | 66 | } else { |
| 67 | 67 | $icone = http_img_pack($fond, '', "class='cadre-icone' width='$size' height='$size'"); |
| 68 | 68 | } |
| 69 | - $titre = $icone . $titre; |
|
| 69 | + $titre = $icone.$titre; |
|
| 70 | 70 | } |
| 71 | 71 | |
| 72 | 72 | return boite_ouvrir($titre, $class, $style_titre_mapping[$style] ?? '', $id); |
@@ -179,14 +179,14 @@ discard block |
||
| 179 | 179 | $titre, |
| 180 | 180 | $ze_logo = '' |
| 181 | 181 | ) { |
| 182 | - return "<h1 class = 'grostitre'>" . $ze_logo . ' ' . typo($titre) . "</h1>\n"; |
|
| 182 | + return "<h1 class = 'grostitre'>".$ze_logo.' '.typo($titre)."</h1>\n"; |
|
| 183 | 183 | } |
| 184 | 184 | |
| 185 | 185 | // La boite des raccourcis |
| 186 | 186 | // Se place a droite si l'ecran est en mode panoramique. |
| 187 | 187 | function bloc_des_raccourcis($bloc) { |
| 188 | 188 | return creer_colonne_droite() |
| 189 | - . boite_ouvrir(_T('titre_cadre_raccourcis'), 'raccourcis') . $bloc . boite_fermer(); |
|
| 189 | + . boite_ouvrir(_T('titre_cadre_raccourcis'), 'raccourcis').$bloc.boite_fermer(); |
|
| 190 | 190 | } |
| 191 | 191 | |
| 192 | 192 | // |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | $class = ' blocreplie'; |
| 54 | 54 | } |
| 55 | 55 | |
| 56 | - return '<div ' . ($id ? "id='$id' " : '') . "class='bloc_depliable$class'>"; |
|
| 56 | + return '<div '.($id ? "id='$id' " : '')."class='bloc_depliable$class'>"; |
|
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | function fin_block() { |
@@ -64,12 +64,12 @@ discard block |
||
| 64 | 64 | // $deplie : true (deplie) ou false (plie) ou -1 (inactif) ou 'incertain' pour que le bouton s'auto init au chargement de la page |
| 65 | 65 | // $ids : id des div lies au bouton (facultatif, par defaut c'est le div.bloc_depliable qui suit) |
| 66 | 66 | function bouton_block_depliable($texte, $deplie, $ids = '') { |
| 67 | - $bouton_id = 'b' . substr(md5($texte . microtime()), 0, 8); |
|
| 67 | + $bouton_id = 'b'.substr(md5($texte.microtime()), 0, 8); |
|
| 68 | 68 | |
| 69 | 69 | $class = ($deplie === true) ? ' deplie' : (($deplie == -1) ? ' impliable' : ' replie'); |
| 70 | 70 | if (strlen($ids)) { |
| 71 | 71 | $cible = explode(',', $ids); |
| 72 | - $cible = '#' . implode(',#', $cible); |
|
| 72 | + $cible = '#'.implode(',#', $cible); |
|
| 73 | 73 | } else { |
| 74 | 74 | $cible = "#$bouton_id + div.bloc_depliable"; |
| 75 | 75 | } |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | . $pere |
| 62 | 62 | . '</b>' |
| 63 | 63 | . (!$bons_peres ? '' |
| 64 | - : ('<p style="font-size: 80%"> ' . _T('zxml_mais_de') . ' <b>' . $bons_peres . '</b></p>'))); |
|
| 64 | + : ('<p style="font-size: 80%"> '._T('zxml_mais_de').' <b>'.$bons_peres.'</b></p>'))); |
|
| 65 | 65 | } elseif ($this->dtc->regles[$pere][0] == '/') { |
| 66 | 66 | $frat = substr($depth, 2); |
| 67 | 67 | if (!isset($this->fratrie[$frat])) { |
@@ -98,15 +98,15 @@ discard block |
||
| 98 | 98 | if (!isset($a[$name])) { |
| 99 | 99 | $bons = join(', ', array_keys($a)); |
| 100 | 100 | if ($bons) { |
| 101 | - $bons = " title=' " . |
|
| 102 | - _T('zxml_connus_attributs') . |
|
| 103 | - ' : ' . |
|
| 104 | - $bons . |
|
| 101 | + $bons = " title=' ". |
|
| 102 | + _T('zxml_connus_attributs'). |
|
| 103 | + ' : '. |
|
| 104 | + $bons. |
|
| 105 | 105 | "'"; |
| 106 | 106 | } |
| 107 | 107 | $bons .= " style='font-weight: bold'"; |
| 108 | 108 | coordonnees_erreur($this, " <b>$name</b> " |
| 109 | - . _T('zxml_inconnu_attribut') . ' ' . _T('zxml_de') |
|
| 109 | + . _T('zxml_inconnu_attribut').' '._T('zxml_de') |
|
| 110 | 110 | . " <a$bons>$bal</a> (" |
| 111 | 111 | . _T('zxml_survoler') |
| 112 | 112 | . ')'); |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | if (!preg_match('/^\w+$/', $type)) { |
| 116 | 116 | $this->valider_motif($phraseur, $name, $val, $bal, $type); |
| 117 | 117 | } else { |
| 118 | - if (method_exists($this, $f = 'validerAttribut_' . $type)) { |
|
| 118 | + if (method_exists($this, $f = 'validerAttribut_'.$type)) { |
|
| 119 | 119 | $this->$f($phraseur, $name, $val, $bal); |
| 120 | 120 | } |
| 121 | 121 | } |
@@ -164,13 +164,13 @@ discard block |
||
| 164 | 164 | . " <b>$bal</b> " |
| 165 | 165 | . _T('zxml_non_conforme') |
| 166 | 166 | . '</p><p>' |
| 167 | - . '<b>' . $motif . '</b>'); |
|
| 167 | + . '<b>'.$motif.'</b>'); |
|
| 168 | 168 | } |
| 169 | 169 | } |
| 170 | 170 | |
| 171 | 171 | public function valider_idref($nom, $ligne, $col) { |
| 172 | 172 | if (!isset($this->ids[$nom])) { |
| 173 | - $this->err[] = [" <p><b>$nom</b> " . _T('zxml_inconnu_id'), $ligne, $col]; |
|
| 173 | + $this->err[] = [" <p><b>$nom</b> "._T('zxml_inconnu_id'), $ligne, $col]; |
|
| 174 | 174 | } |
| 175 | 175 | } |
| 176 | 176 | |
@@ -217,7 +217,7 @@ discard block |
||
| 217 | 217 | // controler que les balises devant etre vides le sont |
| 218 | 218 | if ($vide) { |
| 219 | 219 | if ($n <> ($k + $c)) { |
| 220 | - coordonnees_erreur($this, " <p><b>$name</b> " . _T('zxml_nonvide_balise')); |
|
| 220 | + coordonnees_erreur($this, " <p><b>$name</b> "._T('zxml_nonvide_balise')); |
|
| 221 | 221 | } |
| 222 | 222 | // pour les regles PCDATA ou iteration de disjonction, tout est fait |
| 223 | 223 | } elseif ($regle and ($regle != '*')) { |
@@ -252,7 +252,7 @@ discard block |
||
| 252 | 252 | $d = $this->ouvrant[$d]; |
| 253 | 253 | preg_match('/^\s*(\S+)/', $d, $m); |
| 254 | 254 | if (isset($this->dtc->pcdata[$m[1]]) and ($this->dtc->pcdata[$m[1]])) { |
| 255 | - coordonnees_erreur($this, ' <p><b>' . $m[1] . '</b> ' |
|
| 255 | + coordonnees_erreur($this, ' <p><b>'.$m[1].'</b> ' |
|
| 256 | 256 | . _T('zxml_nonvide_balise')); // message a affiner |
| 257 | 257 | } |
| 258 | 258 | } |
@@ -296,7 +296,7 @@ discard block |
||
| 296 | 296 | public function phraserTout($phraseur, $data) { |
| 297 | 297 | xml_parsestring($this, $data); |
| 298 | 298 | |
| 299 | - if (!$this->dtc or preg_match(',^' . _MESSAGE_DOCTYPE . ',', $data)) { |
|
| 299 | + if (!$this->dtc or preg_match(',^'._MESSAGE_DOCTYPE.',', $data)) { |
|
| 300 | 300 | $this->err[] = ['DOCTYPE ?', 0, 0]; |
| 301 | 301 | } else { |
| 302 | 302 | $this->valider_passe2(); |