@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | supprime_invalideurs(); |
| 62 | 62 | @spip_unlink(_CACHE_RUBRIQUES); |
| 63 | 63 | @spip_unlink(_CACHE_CHEMIN); |
| 64 | - @spip_unlink(_DIR_TMP . 'plugin_xml_cache.gz'); |
|
| 64 | + @spip_unlink(_DIR_TMP.'plugin_xml_cache.gz'); |
|
| 65 | 65 | // on ne supprime que _CACHE_PLUGINS_OPT qui declenche la reconstruction des 3 |
| 66 | 66 | // _CACHE_PIPELINES _CACHE_PLUGINS_PATH et _CACHE_PLUGINS_FCT |
| 67 | 67 | // pour eviter des problemes de concurence |
@@ -72,8 +72,8 @@ discard block |
||
| 72 | 72 | @spip_unlink(_CACHE_PLUGINS_OPT); |
| 73 | 73 | purger_repertoire(_DIR_CACHE, ['subdir' => true]); |
| 74 | 74 | purger_repertoire(_DIR_AIDE); |
| 75 | - purger_repertoire(_DIR_VAR . 'cache-css'); |
|
| 76 | - purger_repertoire(_DIR_VAR . 'cache-js'); |
|
| 75 | + purger_repertoire(_DIR_VAR.'cache-css'); |
|
| 76 | + purger_repertoire(_DIR_VAR.'cache-js'); |
|
| 77 | 77 | break; |
| 78 | 78 | |
| 79 | 79 | case 'squelettes': |
@@ -81,10 +81,10 @@ discard block |
||
| 81 | 81 | break; |
| 82 | 82 | |
| 83 | 83 | case 'vignettes': |
| 84 | - purger_repertoire(_DIR_VAR . 'cache-gd2', ['subdir' => true]); |
|
| 85 | - purger_repertoire(_DIR_VAR . 'cache-texte', ['subdir' => true]); |
|
| 86 | - purger_repertoire(_DIR_VAR . 'cache-vignettes', ['subdir' => true]); |
|
| 87 | - purger_repertoire(_DIR_VAR . 'cache-TeX', ['subdir' => true]); |
|
| 84 | + purger_repertoire(_DIR_VAR.'cache-gd2', ['subdir' => true]); |
|
| 85 | + purger_repertoire(_DIR_VAR.'cache-texte', ['subdir' => true]); |
|
| 86 | + purger_repertoire(_DIR_VAR.'cache-vignettes', ['subdir' => true]); |
|
| 87 | + purger_repertoire(_DIR_VAR.'cache-TeX', ['subdir' => true]); |
|
| 88 | 88 | supprime_invalideurs(); |
| 89 | 89 | purger_repertoire(_DIR_CACHE, ['subdir' => true]); |
| 90 | 90 | break; |
@@ -55,7 +55,7 @@ |
||
| 55 | 55 | if (autoriser('ecrire', '', '', $auteur['id_auteur'])) { |
| 56 | 56 | // poser un cookie admin aussi |
| 57 | 57 | $cookie = charger_fonction('cookie', 'action'); |
| 58 | - $cookie('@' . $GLOBALS['visiteur_session']['login']); |
|
| 58 | + $cookie('@'.$GLOBALS['visiteur_session']['login']); |
|
| 59 | 59 | $GLOBALS['redirect'] = _DIR_RESTREINT_ABS; |
| 60 | 60 | } else { |
| 61 | 61 | $GLOBALS['redirect'] = $GLOBALS['meta']['adresse_site']; |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | $id_lier = sql_getfetsel( |
| 57 | 57 | 'id_trad', |
| 58 | 58 | $table_objet_sql, |
| 59 | - "$id_table_objet=" . intval($id_trad) . " AND NOT($id_table_objet=" . intval($id_objet) . ')' |
|
| 59 | + "$id_table_objet=".intval($id_trad)." AND NOT($id_table_objet=".intval($id_objet).')' |
|
| 60 | 60 | ); |
| 61 | 61 | if ($id_lier === null) { |
| 62 | 62 | spip_log("echec lien de trad vers objet $objet/$id_objet incorrect ($id_trad)"); |
@@ -75,18 +75,18 @@ discard block |
||
| 75 | 75 | sql_updateq($table_objet_sql, ['id_trad' => $id_trad], "id_trad = $id_lier"); |
| 76 | 76 | } // sinon ajouter notre objet dans le groupe |
| 77 | 77 | else { |
| 78 | - sql_updateq($table_objet_sql, ['id_trad' => $id_lier], "$id_table_objet=" . intval($id_objet)); |
|
| 78 | + sql_updateq($table_objet_sql, ['id_trad' => $id_lier], "$id_table_objet=".intval($id_objet)); |
|
| 79 | 79 | } |
| 80 | 80 | } // on a fourni un id_trad nul : sortir id_objet du groupe de trad |
| 81 | 81 | else { |
| 82 | - $old_id_trad = sql_getfetsel('id_trad', $table_objet_sql, "$id_table_objet=" . intval($id_objet)); |
|
| 82 | + $old_id_trad = sql_getfetsel('id_trad', $table_objet_sql, "$id_table_objet=".intval($id_objet)); |
|
| 83 | 83 | // supprimer le lien de traduction |
| 84 | - sql_updateq($table_objet_sql, ['id_trad' => 0], "$id_table_objet=" . intval($id_objet)); |
|
| 84 | + sql_updateq($table_objet_sql, ['id_trad' => 0], "$id_table_objet=".intval($id_objet)); |
|
| 85 | 85 | |
| 86 | 86 | // Verifier si l'ancien groupe ne comporte plus qu'un seul objet. Alors mettre a zero. |
| 87 | - $cpt = sql_countsel($table_objet_sql, 'id_trad=' . intval($old_id_trad)); |
|
| 87 | + $cpt = sql_countsel($table_objet_sql, 'id_trad='.intval($old_id_trad)); |
|
| 88 | 88 | if ($cpt == 1) { |
| 89 | - sql_updateq($table_objet_sql, ['id_trad' => 0], 'id_trad=' . intval($old_id_trad)); |
|
| 89 | + sql_updateq($table_objet_sql, ['id_trad' => 0], 'id_trad='.intval($old_id_trad)); |
|
| 90 | 90 | } |
| 91 | 91 | } |
| 92 | 92 | |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | $redirect = _request('redirect') and !$arg == sql_getfetsel( |
| 43 | 43 | 'email', |
| 44 | 44 | 'spip_auteurs', |
| 45 | - 'id_auteur=' . intval($GLOBALS['visiteur_session']) |
|
| 45 | + 'id_auteur='.intval($GLOBALS['visiteur_session']) |
|
| 46 | 46 | ) |
| 47 | 47 | ) { |
| 48 | 48 | $GLOBALS['redirect'] = parametre_url($redirect, 'email_modif', ''); |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | return; |
| 21 | 21 | } |
| 22 | 22 | |
| 23 | -include_spip('inc/charsets'); # pour le nom de fichier |
|
| 23 | +include_spip('inc/charsets'); # pour le nom de fichier |
|
| 24 | 24 | |
| 25 | 25 | /** |
| 26 | 26 | * Effacer une rubrique |
@@ -36,19 +36,19 @@ discard block |
||
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | if (intval($id_rubrique)) { |
| 39 | - sql_delete('spip_rubriques', 'id_rubrique=' . intval($id_rubrique)); |
|
| 39 | + sql_delete('spip_rubriques', 'id_rubrique='.intval($id_rubrique)); |
|
| 40 | 40 | // Les admin restreints qui n'administraient que cette rubrique |
| 41 | 41 | // deviennent redacteurs |
| 42 | 42 | // (il y a sans doute moyen de faire ca avec un having) |
| 43 | 43 | |
| 44 | - $q = sql_select('id_auteur', 'spip_auteurs_liens', "objet='rubrique' AND id_objet=" . intval($id_rubrique)); |
|
| 44 | + $q = sql_select('id_auteur', 'spip_auteurs_liens', "objet='rubrique' AND id_objet=".intval($id_rubrique)); |
|
| 45 | 45 | while ($r = sql_fetch($q)) { |
| 46 | 46 | $id_auteur = $r['id_auteur']; |
| 47 | 47 | // degrader avant de supprimer la restriction d'admin |
| 48 | 48 | // section critique sur les droits |
| 49 | 49 | $n = sql_countsel( |
| 50 | 50 | 'spip_auteurs_liens', |
| 51 | - "objet='rubrique' AND id_objet!=" . intval($id_rubrique) . ' AND id_auteur=' . intval($id_auteur) |
|
| 51 | + "objet='rubrique' AND id_objet!=".intval($id_rubrique).' AND id_auteur='.intval($id_auteur) |
|
| 52 | 52 | ); |
| 53 | 53 | if (!$n) { |
| 54 | 54 | include_spip('action/editer_auteur'); |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | } |
| 57 | 57 | sql_delete( |
| 58 | 58 | 'spip_auteurs_liens', |
| 59 | - "objet='rubrique' AND id_objet=" . intval($id_rubrique) . ' AND id_auteur=' . intval($id_auteur) |
|
| 59 | + "objet='rubrique' AND id_objet=".intval($id_rubrique).' AND id_auteur='.intval($id_auteur) |
|
| 60 | 60 | ); |
| 61 | 61 | } |
| 62 | 62 | // menu_rubriques devra recalculer |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | } |
| 69 | 69 | $dir = constant($dir); |
| 70 | 70 | foreach ($infos['install'] as $file) { |
| 71 | - $file = $dir . $plug . '/' . trim($file); |
|
| 71 | + $file = $dir.$plug.'/'.trim($file); |
|
| 72 | 72 | if (file_exists($file)) { |
| 73 | 73 | include_once($file); |
| 74 | 74 | } |
@@ -81,10 +81,10 @@ discard block |
||
| 81 | 81 | // S'assurer que les metas de la table spécifique sont bien accessibles dans la globale |
| 82 | 82 | lire_metas($table); |
| 83 | 83 | } |
| 84 | - $nom_meta = $infos['prefix'] . '_base_version'; |
|
| 84 | + $nom_meta = $infos['prefix'].'_base_version'; |
|
| 85 | 85 | |
| 86 | 86 | // Détermination de la fonction à appeler et de ses arguments |
| 87 | - $f = $infos['prefix'] . '_install'; |
|
| 87 | + $f = $infos['prefix'].'_install'; |
|
| 88 | 88 | if (!function_exists($f)) { |
| 89 | 89 | $f = isset($infos['schema']) ? 'spip_plugin_install' : ''; |
| 90 | 90 | $arg = $infos; |
@@ -168,12 +168,12 @@ discard block |
||
| 168 | 168 | and spip_version_compare($GLOBALS[$table][$nom_meta], $version_cible, '>=')); |
| 169 | 169 | break; |
| 170 | 170 | case 'install': |
| 171 | - if (function_exists($upgrade = $infos['prefix'] . '_upgrade')) { |
|
| 171 | + if (function_exists($upgrade = $infos['prefix'].'_upgrade')) { |
|
| 172 | 172 | $upgrade($nom_meta, $version_cible, $table); |
| 173 | 173 | } |
| 174 | 174 | break; |
| 175 | 175 | case 'uninstall': |
| 176 | - if (function_exists($vider_tables = $infos['prefix'] . '_vider_tables')) { |
|
| 176 | + if (function_exists($vider_tables = $infos['prefix'].'_vider_tables')) { |
|
| 177 | 177 | $vider_tables($nom_meta, $table); |
| 178 | 178 | } |
| 179 | 179 | break; |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | } |
| 49 | 49 | } |
| 50 | 50 | if (is_null($p)) { |
| 51 | - $arbre = ['erreur' => [_T('erreur_plugin_tag_plugin_absent') . " : $plug"]]; |
|
| 51 | + $arbre = ['erreur' => [_T('erreur_plugin_tag_plugin_absent')." : $plug"]]; |
|
| 52 | 52 | $silence = true; |
| 53 | 53 | } else { |
| 54 | 54 | $arbre = $p; |
@@ -83,15 +83,15 @@ discard block |
||
| 83 | 83 | if (isset($arbre['etat'])) { |
| 84 | 84 | $etat = trim(end($arbre['etat'])); |
| 85 | 85 | if (!in_array($etat, $etats)) { |
| 86 | - $arbre['erreur'][] = _T('erreur_plugin_etat_inconnu') . " : '$etat'"; |
|
| 86 | + $arbre['erreur'][] = _T('erreur_plugin_etat_inconnu')." : '$etat'"; |
|
| 87 | 87 | } |
| 88 | 88 | } |
| 89 | 89 | if (isset($arbre['options'])) { |
| 90 | 90 | foreach ($arbre['options'] as $optfile) { |
| 91 | 91 | $optfile = trim($optfile); |
| 92 | - if (!@is_readable($dir_plugins . "$plug/$optfile")) { |
|
| 92 | + if (!@is_readable($dir_plugins."$plug/$optfile")) { |
|
| 93 | 93 | if (!$silence) { |
| 94 | - $arbre['erreur'][] = _T('erreur_plugin_fichier_absent') . " : $optfile"; |
|
| 94 | + $arbre['erreur'][] = _T('erreur_plugin_fichier_absent')." : $optfile"; |
|
| 95 | 95 | } |
| 96 | 96 | } |
| 97 | 97 | } |
@@ -99,9 +99,9 @@ discard block |
||
| 99 | 99 | if (isset($arbre['fonctions'])) { |
| 100 | 100 | foreach ($arbre['fonctions'] as $optfile) { |
| 101 | 101 | $optfile = trim($optfile); |
| 102 | - if (!@is_readable($dir_plugins . "$plug/$optfile")) { |
|
| 102 | + if (!@is_readable($dir_plugins."$plug/$optfile")) { |
|
| 103 | 103 | if (!$silence) { |
| 104 | - $arbre['erreur'][] = _T('erreur_plugin_fichier_absent') . " : $optfile"; |
|
| 104 | + $arbre['erreur'][] = _T('erreur_plugin_fichier_absent')." : $optfile"; |
|
| 105 | 105 | } |
| 106 | 106 | } |
| 107 | 107 | } |
@@ -135,14 +135,14 @@ discard block |
||
| 135 | 135 | // verif que la methode a un nom autorise |
| 136 | 136 | if (in_array(strtolower($action), $liste_methodes_reservees)) { |
| 137 | 137 | if (!$silence) { |
| 138 | - $arbre['erreur'][] = _T('erreur_plugin_nom_fonction_interdit') . " : $action"; |
|
| 138 | + $arbre['erreur'][] = _T('erreur_plugin_nom_fonction_interdit')." : $action"; |
|
| 139 | 139 | } |
| 140 | 140 | } |
| 141 | 141 | if (isset($pipe['inclure'])) { |
| 142 | - $inclure = $dir_plugins . "$plug/" . $pipe['inclure']; |
|
| 142 | + $inclure = $dir_plugins."$plug/".$pipe['inclure']; |
|
| 143 | 143 | if (!@is_readable($inclure)) { |
| 144 | 144 | if (!$silence) { |
| 145 | - $arbre['erreur'][] = _T('erreur_plugin_fichier_absent') . " : $inclure"; |
|
| 145 | + $arbre['erreur'][] = _T('erreur_plugin_fichier_absent')." : $inclure"; |
|
| 146 | 146 | } |
| 147 | 147 | } |
| 148 | 148 | } |
@@ -212,9 +212,9 @@ discard block |
||
| 212 | 212 | foreach ($arbre['noisette'] as $k => $nut) { |
| 213 | 213 | $nut = preg_replace(',[.]html$,uims', '', trim($nut)); |
| 214 | 214 | $arbre['noisette'][$k] = $nut; |
| 215 | - if (!@is_readable($dir_plugins . "$plug/$nut.html")) { |
|
| 215 | + if (!@is_readable($dir_plugins."$plug/$nut.html")) { |
|
| 216 | 216 | if (!$silence) { |
| 217 | - $arbre['erreur'][] = _T('erreur_plugin_fichier_absent') . " : $nut"; |
|
| 217 | + $arbre['erreur'][] = _T('erreur_plugin_fichier_absent')." : $nut"; |
|
| 218 | 218 | } |
| 219 | 219 | } |
| 220 | 220 | } |
@@ -60,10 +60,10 @@ discard block |
||
| 60 | 60 | $id = substr(md5($plug), 0, 16); |
| 61 | 61 | $res .= $ligne_plug( |
| 62 | 62 | $url_page, |
| 63 | - str_replace(_DIR_PLUGINS, '', _DIR_RACINE . $plug), |
|
| 63 | + str_replace(_DIR_PLUGINS, '', _DIR_RACINE.$plug), |
|
| 64 | 64 | $actif, |
| 65 | 65 | 'menu-entree' |
| 66 | - ) . "\n"; |
|
| 66 | + )."\n"; |
|
| 67 | 67 | unset($liste_plugins[$key]); |
| 68 | 68 | } |
| 69 | 69 | } |
@@ -105,12 +105,12 @@ discard block |
||
| 105 | 105 | } |
| 106 | 106 | $chemin = ''; |
| 107 | 107 | if (count($tcom)) { |
| 108 | - $chemin .= implode('/', $tcom) . '/'; |
|
| 108 | + $chemin .= implode('/', $tcom).'/'; |
|
| 109 | 109 | } |
| 110 | 110 | // ouvrir les repertoires jusqu'a la cible |
| 111 | 111 | while ($open = array_shift($ttarg)) { |
| 112 | - $visible = @isset($deplie[$chemin . $open]); |
|
| 113 | - $chemin .= $open . '/'; |
|
| 112 | + $visible = @isset($deplie[$chemin.$open]); |
|
| 113 | + $chemin .= $open.'/'; |
|
| 114 | 114 | $output .= '<li>'; |
| 115 | 115 | $output .= bouton_block_depliable($chemin, $visible); |
| 116 | 116 | $output .= debut_block_depliable($visible); |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | * @return array |
| 26 | 26 | */ |
| 27 | 27 | function plugins_infos_paquet($desc, $plug = '', $dir_plugins = _DIR_PLUGINS) { |
| 28 | - static $process = [ // tableau constant |
|
| 28 | + static $process = [// tableau constant |
|
| 29 | 29 | 'debut' => 'paquet_debutElement', |
| 30 | 30 | 'fin' => 'paquet_finElement', |
| 31 | 31 | 'text' => 'paquet_textElement' |
@@ -47,8 +47,8 @@ discard block |
||
| 47 | 47 | unset($tree['']); |
| 48 | 48 | } |
| 49 | 49 | |
| 50 | - $tree['slogan'] = $tree['prefix'] . '_slogan'; |
|
| 51 | - $tree['description'] = $tree['prefix'] . '_description'; |
|
| 50 | + $tree['slogan'] = $tree['prefix'].'_slogan'; |
|
| 51 | + $tree['description'] = $tree['prefix'].'_description'; |
|
| 52 | 52 | paquet_readable_files($tree, "$dir_plugins$plug/"); |
| 53 | 53 | if (!$tree['chemin']) { |
| 54 | 54 | $tree['chemin'] = []; |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | // Prendre les messages d'erreur sans les numeros de lignes |
| 81 | 81 | $msg = array_column($vxml->err, 0); |
| 82 | 82 | $t = _T('plugins_erreur', ['plugins' => $plug]); |
| 83 | - array_unshift($msg, $t . " <ul class='erreur_xml'><li>" . reset($msg) . '</li></ul>'); |
|
| 83 | + array_unshift($msg, $t." <ul class='erreur_xml'><li>".reset($msg).'</li></ul>'); |
|
| 84 | 84 | |
| 85 | 85 | return ['erreur' => $msg]; |
| 86 | 86 | } |
@@ -96,9 +96,9 @@ discard block |
||
| 96 | 96 | function paquet_readable_files(&$tree, $dir) { |
| 97 | 97 | $prefix = strtolower($tree['prefix']); |
| 98 | 98 | |
| 99 | - $tree['options'] = (is_readable($dir . $f = ($prefix . '_options.php'))) ? [$f] : []; |
|
| 100 | - $tree['fonctions'] = (is_readable($dir . $f = ($prefix . '_fonctions.php'))) ? [$f] : []; |
|
| 101 | - $tree['install'] = (is_readable($dir . $f = ($prefix . '_administrations.php'))) ? [$f] : []; |
|
| 99 | + $tree['options'] = (is_readable($dir.$f = ($prefix.'_options.php'))) ? [$f] : []; |
|
| 100 | + $tree['fonctions'] = (is_readable($dir.$f = ($prefix.'_fonctions.php'))) ? [$f] : []; |
|
| 101 | + $tree['install'] = (is_readable($dir.$f = ($prefix.'_administrations.php'))) ? [$f] : []; |
|
| 102 | 102 | } |
| 103 | 103 | |
| 104 | 104 | /** |
@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | $texte = trim($phraseur->versions[$n]['']); |
| 187 | 187 | $phraseur->versions[$n][''] = ''; |
| 188 | 188 | |
| 189 | - $f = 'info_paquet_' . $name; |
|
| 189 | + $f = 'info_paquet_'.$name; |
|
| 190 | 190 | if (function_exists($f)) { |
| 191 | 191 | $f($phraseur, $attrs, $texte); |
| 192 | 192 | } elseif (!$attrs) { |