@@ -46,8 +46,8 @@ |
||
| 46 | 46 | |
| 47 | 47 | echo debut_grand_cadre(true); |
| 48 | 48 | echo boite_ouvrir(_T('info_message_technique'), 'notice'); |
| 49 | - echo "<p>" . _T('info_procedure_maj_version') . "</p>", |
|
| 50 | - "<p>" . _T('info_administrateur_site_01') . "</p>"; |
|
| 49 | + echo "<p>"._T('info_procedure_maj_version')."</p>", |
|
| 50 | + "<p>"._T('info_administrateur_site_01')."</p>"; |
|
| 51 | 51 | echo bouton_action(_T('bouton_mettre_a_jour_base'), generer_url_ecrire("upgrade", "reinstall=non")); |
| 52 | 52 | echo boite_fermer(); |
| 53 | 53 | // masquer les erreurs sql sur cette page car proviennent de la base pas a jour ! |
@@ -67,15 +67,15 @@ discard block |
||
| 67 | 67 | $where = preg_split(",\s+,", $type); |
| 68 | 68 | if ($where) { |
| 69 | 69 | foreach ($where as $k => $v) { |
| 70 | - $where[$k] = "'%" . substr(str_replace("%", "\%", sql_quote($v, '', 'string')), 1, -1) . "%'"; |
|
| 70 | + $where[$k] = "'%".substr(str_replace("%", "\%", sql_quote($v, '', 'string')), 1, -1)."%'"; |
|
| 71 | 71 | } |
| 72 | - $where_titre = ("(titre LIKE " . join(" AND titre LIKE ", $where) . ")"); |
|
| 73 | - $where_desc = ("(descriptif LIKE " . join(" AND descriptif LIKE ", $where) . ")"); |
|
| 74 | - $where_id = ("(id_rubrique = " . intval($type) . ")"); |
|
| 72 | + $where_titre = ("(titre LIKE ".join(" AND titre LIKE ", $where).")"); |
|
| 73 | + $where_desc = ("(descriptif LIKE ".join(" AND descriptif LIKE ", $where).")"); |
|
| 74 | + $where_id = ("(id_rubrique = ".intval($type).")"); |
|
| 75 | 75 | |
| 76 | 76 | if ($exclus) { |
| 77 | 77 | include_spip('inc/rubriques'); |
| 78 | - $where_exclus = " AND " . sql_in('id_rubrique', calcul_branche_in($exclus), 'NOT'); |
|
| 78 | + $where_exclus = " AND ".sql_in('id_rubrique', calcul_branche_in($exclus), 'NOT'); |
|
| 79 | 79 | } else { |
| 80 | 80 | $where_exclus = ''; |
| 81 | 81 | } |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | |
| 104 | 104 | if ($points) { |
| 105 | 105 | arsort($points); |
| 106 | - $style = " style='background-image: url(" . chemin_image('secteur-12.png') . ")'"; |
|
| 106 | + $style = " style='background-image: url(".chemin_image('secteur-12.png').")'"; |
|
| 107 | 107 | foreach ($rub as $k => $v) { |
| 108 | 108 | $rub[$k]['atts'] = ($v["id_parent"] ? $style : '') |
| 109 | 109 | . " class='petite-rubrique'"; |
@@ -136,13 +136,13 @@ discard block |
||
| 136 | 136 | if (!$ids) { |
| 137 | 137 | return "<br /><br /><div style='padding: 5px; color: red;'><b>" |
| 138 | 138 | . spip_htmlentities($type) |
| 139 | - . "</b> : " . _T('avis_aucun_resultat') . "</div>"; |
|
| 139 | + . "</b> : "._T('avis_aucun_resultat')."</div>"; |
|
| 140 | 140 | } |
| 141 | 141 | |
| 142 | 142 | $ret = ''; |
| 143 | 143 | $info = generer_url_ecrire('informer', "type=rubrique&rac=$rac&id="); |
| 144 | 144 | |
| 145 | - $onClick = "aff_selection(this.firstChild.title,'$rac" . "_selection','$info', event)"; |
|
| 145 | + $onClick = "aff_selection(this.firstChild.title,'$rac"."_selection','$info', event)"; |
|
| 146 | 146 | |
| 147 | 147 | $ondbClick = "$do(this.firstChild.firstChild.nodeValue,this.firstChild.title,'selection_rubrique', 'id_parent');"; |
| 148 | 148 | |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | |
| 27 | 27 | |
| 28 | 28 | $fond = _request('exec'); |
| 29 | -$GLOBALS['delais'] = 0;// pas de cache ! |
|
| 29 | +$GLOBALS['delais'] = 0; // pas de cache ! |
|
| 30 | 30 | // Securite |
| 31 | 31 | if (strstr($fond, '/')) { |
| 32 | 32 | if (!include_spip('inc/autoriser') |
@@ -139,11 +139,11 @@ discard block |
||
| 139 | 139 | if ($quoi !== 'actifs') { |
| 140 | 140 | $lpf = liste_plugin_files(); |
| 141 | 141 | if ($lpf) { |
| 142 | - echo "<p>" . _T('texte_presente_plugin') . "</p>"; |
|
| 142 | + echo "<p>"._T('texte_presente_plugin')."</p>"; |
|
| 143 | 143 | } else { |
| 144 | 144 | if (!@is_dir(_DIR_PLUGINS)) { |
| 145 | - echo "<p>" . _T('plugin_info_automatique_ftp', array('rep' => joli_repertoire(_DIR_PLUGINS))) |
|
| 146 | - . " — " . _T('plugin_info_automatique_creer') . "</p>"; |
|
| 145 | + echo "<p>"._T('plugin_info_automatique_ftp', array('rep' => joli_repertoire(_DIR_PLUGINS))) |
|
| 146 | + . " — "._T('plugin_info_automatique_creer')."</p>"; |
|
| 147 | 147 | } |
| 148 | 148 | } |
| 149 | 149 | $lcpaffiche = $lpf; |
@@ -164,8 +164,8 @@ discard block |
||
| 164 | 164 | if (defined('_DIR_PLUGINS_SUPPL')) { |
| 165 | 165 | $nb += count($lcpas); |
| 166 | 166 | } |
| 167 | - echo "<h3>" . sinon(singulier_ou_pluriel($nb, 'plugins_actif_un', 'plugins_actifs', 'count'), |
|
| 168 | - _T('plugins_actif_aucun')) . "</h3>"; |
|
| 167 | + echo "<h3>".sinon(singulier_ou_pluriel($nb, 'plugins_actif_un', 'plugins_actifs', 'count'), |
|
| 168 | + _T('plugins_actif_aucun'))."</h3>"; |
|
| 169 | 169 | } |
| 170 | 170 | |
| 171 | 171 | if (empty($format)) { |
@@ -182,7 +182,7 @@ discard block |
||
| 182 | 182 | |
| 183 | 183 | if ($corps) { |
| 184 | 184 | $corps .= "\n<div class='boutons' style='display:none;'>" |
| 185 | - . "<input type='submit' class='submit save' value='" . _T('bouton_enregistrer') |
|
| 185 | + . "<input type='submit' class='submit save' value='"._T('bouton_enregistrer') |
|
| 186 | 186 | . "' />" |
| 187 | 187 | . "</div>"; |
| 188 | 188 | } |
@@ -255,7 +255,7 @@ discard block |
||
| 255 | 255 | . debut_cadre_trait_couleur('', true, '', _T('plugins_liste_dist'), 'liste_plugins_dist') |
| 256 | 256 | . "<p>" |
| 257 | 257 | . _T('plugin_info_plugins_dist_1', array('plugins_dist' => joli_repertoire(_DIR_PLUGINS_DIST))) |
| 258 | - . '<br />' . _T('plugin_info_plugins_dist_2') |
|
| 258 | + . '<br />'._T('plugin_info_plugins_dist_2') |
|
| 259 | 259 | . "</p>" |
| 260 | 260 | . $liste |
| 261 | 261 | . fin_cadre_trait_couleur(true) |
@@ -278,7 +278,7 @@ discard block |
||
| 278 | 278 | $res = debut_cadre_enfonce('', true, '', _T('plugin_librairies_installees')); |
| 279 | 279 | $res .= '<dl>'; |
| 280 | 280 | foreach ($libs as $lib => $rep) { |
| 281 | - $res .= "<dt>$lib</dt><dd>" . joli_repertoire($rep) . "</dd>\n"; |
|
| 281 | + $res .= "<dt>$lib</dt><dd>".joli_repertoire($rep)."</dd>\n"; |
|
| 282 | 282 | } |
| 283 | 283 | $res .= '</dl>'; |
| 284 | 284 | $res .= fin_cadre_enfonce(true); |
@@ -296,7 +296,7 @@ discard block |
||
| 296 | 296 | function liste_librairies() { |
| 297 | 297 | $libs = array(); |
| 298 | 298 | foreach (array_reverse(creer_chemin()) as $d) { |
| 299 | - if (is_dir($dir = $d . 'lib/') |
|
| 299 | + if (is_dir($dir = $d.'lib/') |
|
| 300 | 300 | and $t = opendir($dir) |
| 301 | 301 | ) { |
| 302 | 302 | while (($f = readdir($t)) !== false) { |
@@ -135,7 +135,7 @@ |
||
| 135 | 135 | while ( |
| 136 | 136 | $p !== false |
| 137 | 137 | and ($morceau = substr($txt, $d, $p - $d)) |
| 138 | - and (($nopen += preg_match_all("{<" . preg_quote($closing_tag) . "(\s*>|\s[^>]*[^/>]>)}is", $morceau, |
|
| 138 | + and (($nopen += preg_match_all("{<".preg_quote($closing_tag)."(\s*>|\s[^>]*[^/>]>)}is", $morceau, |
|
| 139 | 139 | $matches, PREG_SET_ORDER)) > $nclose) |
| 140 | 140 | ) { |
| 141 | 141 | $nclose++; |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | $_id = $e['id_table_objet']; |
| 51 | 51 | if (isset($contexte[$_id]) and $id = intval($contexte[$_id])) { |
| 52 | 52 | $table = $e['table_objet_sql']; |
| 53 | - $row = sql_fetsel('*', $table, "$_id=" . intval($id)); |
|
| 53 | + $row = sql_fetsel('*', $table, "$_id=".intval($id)); |
|
| 54 | 54 | if (isset($row['id_rubrique'])) { |
| 55 | 55 | $contexte['id_rubrique'] = $row['id_rubrique']; |
| 56 | 56 | if (isset($row['id_secteur'])) { |
@@ -111,8 +111,8 @@ discard block |
||
| 111 | 111 | $boutons_admin[$parent]->sousmenu = array_slice($boutons_admin[$parent]->sousmenu, 0, $position) |
| 112 | 112 | + array( |
| 113 | 113 | $id => new Bouton( |
| 114 | - ($icones and !empty($infos['icone'])) ? find_in_theme($infos['icone']) : '', // icone |
|
| 115 | - $infos['titre'], // titre |
|
| 114 | + ($icones and !empty($infos['icone'])) ? find_in_theme($infos['icone']) : '', // icone |
|
| 115 | + $infos['titre'], // titre |
|
| 116 | 116 | (isset($infos['action']) and $infos['action']) ? $infos['action'] : null, |
| 117 | 117 | (isset($infos['parametres']) and $infos['parametres']) ? $infos['parametres'] : null |
| 118 | 118 | ) |
@@ -128,8 +128,8 @@ discard block |
||
| 128 | 128 | $boutons_admin = array_slice($boutons_admin, 0, $position) |
| 129 | 129 | + array( |
| 130 | 130 | $id => new Bouton( |
| 131 | - ($icones and isset($infos['icone']) and $infos['icone']) ? find_in_theme($infos['icone']) : '', // icone |
|
| 132 | - $infos['titre'], // titre |
|
| 131 | + ($icones and isset($infos['icone']) and $infos['icone']) ? find_in_theme($infos['icone']) : '', // icone |
|
| 132 | + $infos['titre'], // titre |
|
| 133 | 133 | (isset($infos['action']) and $infos['action']) ? $infos['action'] : null, |
| 134 | 134 | (isset($infos['parametres']) and $infos['parametres']) ? $infos['parametres'] : null |
| 135 | 135 | ) |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | $libelles = $isfavoris = $favoris = array(); |
| 171 | 171 | foreach ($menu->sousmenu as $key => $item) { |
| 172 | 172 | $libelles[$key] = strtolower(translitteration(_T($item->libelle))); |
| 173 | - $isfavoris[$key] = (bool)$item->favori; |
|
| 173 | + $isfavoris[$key] = (bool) $item->favori; |
|
| 174 | 174 | $favoris[$key] = $item->favori; |
| 175 | 175 | } |
| 176 | 176 | if ($avec_favoris) { |
@@ -212,7 +212,7 @@ discard block |
||
| 212 | 212 | $url = str_replace('&', '&', $url); |
| 213 | 213 | while (preg_match(',[&?]([a-z_]+)=@([a-z_]+)@,i', $url, $matches)) { |
| 214 | 214 | if ($matches[2] == 'id_secteur' and !isset($contexte['id_secteur']) and isset($contexte['id_rubrique'])) { |
| 215 | - $contexte['id_secteur'] = sql_getfetsel('id_secteur', 'spip_rubriques', 'id_rubrique=' . intval($contexte['id_rubrique'])); |
|
| 215 | + $contexte['id_secteur'] = sql_getfetsel('id_secteur', 'spip_rubriques', 'id_rubrique='.intval($contexte['id_rubrique'])); |
|
| 216 | 216 | } |
| 217 | 217 | $val = _request($matches[2], $contexte); |
| 218 | 218 | $url = parametre_url($url, $matches[1], $val ? $val : '', '&'); |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | |
| 114 | 114 | // Appels incomplets (sans $c) |
| 115 | 115 | if (!is_array($c)) { |
| 116 | - spip_log('erreur appel objet_modifier_champs(' . $objet . '), manque $c'); |
|
| 116 | + spip_log('erreur appel objet_modifier_champs('.$objet.'), manque $c'); |
|
| 117 | 117 | |
| 118 | 118 | return _T('erreur_technique_enregistrement_impossible'); |
| 119 | 119 | } |
@@ -181,7 +181,7 @@ discard block |
||
| 181 | 181 | |
| 182 | 182 | // Verifier si les mises a jour sont pertinentes, datees, en conflit etc |
| 183 | 183 | include_spip('inc/editer'); |
| 184 | - if (!isset($options['data']) or is_null($options['data'])){ |
|
| 184 | + if (!isset($options['data']) or is_null($options['data'])) { |
|
| 185 | 185 | $options['data'] = &$_POST; |
| 186 | 186 | } |
| 187 | 187 | $conflits = controler_md5($champs, $options['data'], $objet, $id_objet, $serveur); |
@@ -199,7 +199,7 @@ discard block |
||
| 199 | 199 | $id_rubrique = 0; |
| 200 | 200 | if (isset($desc['field']['id_rubrique'])) { |
| 201 | 201 | $parent = ($objet == 'rubrique') ? 'id_parent' : 'id_rubrique'; |
| 202 | - $id_rubrique = sql_getfetsel($parent, $spip_table_objet, "$id_table_objet=" . intval($id_objet)); |
|
| 202 | + $id_rubrique = sql_getfetsel($parent, $spip_table_objet, "$id_table_objet=".intval($id_objet)); |
|
| 203 | 203 | } |
| 204 | 204 | $instituer_langue_objet = charger_fonction('instituer_langue_objet', 'action'); |
| 205 | 205 | $champs['lang'] = $instituer_langue_objet($objet, $id_objet, $id_rubrique, $changer_lang, $serveur); |
@@ -220,10 +220,10 @@ discard block |
||
| 220 | 220 | } |
| 221 | 221 | |
| 222 | 222 | // allez on commit la modif |
| 223 | - sql_updateq($spip_table_objet, $champs, "$id_table_objet=" . intval($id_objet), $serveur); |
|
| 223 | + sql_updateq($spip_table_objet, $champs, "$id_table_objet=".intval($id_objet), $serveur); |
|
| 224 | 224 | |
| 225 | 225 | // on verifie si elle est bien passee |
| 226 | - $moof = sql_fetsel(array_keys($champs), $spip_table_objet, "$id_table_objet=" . intval($id_objet), array(), array(), |
|
| 226 | + $moof = sql_fetsel(array_keys($champs), $spip_table_objet, "$id_table_objet=".intval($id_objet), array(), array(), |
|
| 227 | 227 | '', array(), $serveur); |
| 228 | 228 | // si difference entre les champs, reperer les champs mal enregistres |
| 229 | 229 | if ($moof != $champs) { |
@@ -250,11 +250,11 @@ discard block |
||
| 250 | 250 | // si un champ n'a pas ete correctement enregistre, loger et retourner une erreur |
| 251 | 251 | // c'est un cas exceptionnel |
| 252 | 252 | if (count($liste)) { |
| 253 | - spip_log("Erreur enregistrement en base $objet/$id_objet champs :" . var_export($conflits, true), |
|
| 254 | - 'modifier.' . _LOG_CRITIQUE); |
|
| 253 | + spip_log("Erreur enregistrement en base $objet/$id_objet champs :".var_export($conflits, true), |
|
| 254 | + 'modifier.'._LOG_CRITIQUE); |
|
| 255 | 255 | |
| 256 | 256 | return _T('erreur_technique_enregistrement_champs', |
| 257 | - array('champs' => "<i>'" . implode("'</i>,<i>'", $liste) . "'</i>")); |
|
| 257 | + array('champs' => "<i>'".implode("'</i>,<i>'", $liste)."'</i>")); |
|
| 258 | 258 | } |
| 259 | 259 | } |
| 260 | 260 | |
@@ -291,8 +291,8 @@ discard block |
||
| 291 | 291 | // message a affiner :-) |
| 292 | 292 | include_spip('inc/filtres_mini'); |
| 293 | 293 | $qui = isset($GLOBALS['visiteur_session']['nom']) and $GLOBALS['visiteur_session']['nom'] ? $GLOBALS['visiteur_session']['nom'] : $GLOBALS['ip']; |
| 294 | - journal(_L($qui . ' a édité l’' . $objet . ' ' . $id_objet . ' (' . join('+', |
|
| 295 | - array_diff(array_keys($champs), array('date_modif'))) . ')'), array( |
|
| 294 | + journal(_L($qui.' a édité l’'.$objet.' '.$id_objet.' ('.join('+', |
|
| 295 | + array_diff(array_keys($champs), array('date_modif'))).')'), array( |
|
| 296 | 296 | 'faire' => 'modifier', |
| 297 | 297 | 'quoi' => $objet, |
| 298 | 298 | 'id' => $id_objet |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | return; |
| 29 | 29 | } |
| 30 | 30 | if ($opt) { |
| 31 | - $phrase .= ' :: ' . str_replace("\n", ' ', join(', ', $opt)); |
|
| 31 | + $phrase .= ' :: '.str_replace("\n", ' ', join(', ', $opt)); |
|
| 32 | 32 | } |
| 33 | 33 | spip_log($phrase, 'journal'); |
| 34 | 34 | } |
@@ -211,9 +211,9 @@ discard block |
||
| 211 | 211 | */ |
| 212 | 212 | function nettoyer_url_page($url, $contexte = array()) { |
| 213 | 213 | $url_objets = urls_liste_objets(); |
| 214 | - $raccourci_url_page_html = ',^(?:[^?]*/)?(' . $url_objets . ')([0-9]+)(?:\.html)?([?&].*)?$,'; |
|
| 215 | - $raccourci_url_page_id = ',^(?:[^?]*/)?(' . $url_objets . ')\.php3?[?]id_\1=([0-9]+)([?&].*)?$,'; |
|
| 216 | - $raccourci_url_page_spip = ',^(?:[^?]*/)?(?:spip[.]php)?[?](' . $url_objets . ')([0-9]+)=?(&.*)?$,'; |
|
| 214 | + $raccourci_url_page_html = ',^(?:[^?]*/)?('.$url_objets.')([0-9]+)(?:\.html)?([?&].*)?$,'; |
|
| 215 | + $raccourci_url_page_id = ',^(?:[^?]*/)?('.$url_objets.')\.php3?[?]id_\1=([0-9]+)([?&].*)?$,'; |
|
| 216 | + $raccourci_url_page_spip = ',^(?:[^?]*/)?(?:spip[.]php)?[?]('.$url_objets.')([0-9]+)=?(&.*)?$,'; |
|
| 217 | 217 | |
| 218 | 218 | if (preg_match($raccourci_url_page_html, $url, $regs) |
| 219 | 219 | or preg_match($raccourci_url_page_id, $url, $regs) |
@@ -249,7 +249,7 @@ discard block |
||
| 249 | 249 | function generer_url_ecrire_objet($objet, $id, $args = '', $ancre = '', $public = null, $connect = '') { |
| 250 | 250 | static $furls = array(); |
| 251 | 251 | if (!isset($furls[$objet])) { |
| 252 | - if (function_exists($f = 'generer_url_ecrire_' . $objet) |
|
| 252 | + if (function_exists($f = 'generer_url_ecrire_'.$objet) |
|
| 253 | 253 | // ou definie par un plugin |
| 254 | 254 | or $f = charger_fonction($f, 'urls', true) |
| 255 | 255 | ) { |
@@ -269,10 +269,10 @@ discard block |
||
| 269 | 269 | if ($public or $connect) { |
| 270 | 270 | return generer_url_entite_absolue($id, $objet, $args, $ancre, $connect); |
| 271 | 271 | } |
| 272 | - $a = id_table_objet($objet) . "=" . intval($id); |
|
| 272 | + $a = id_table_objet($objet)."=".intval($id); |
|
| 273 | 273 | if (!function_exists('objet_info')) { |
| 274 | 274 | include_spip('inc/filtres'); |
| 275 | 275 | } |
| 276 | 276 | |
| 277 | - return generer_url_ecrire(objet_info($objet, 'url_voir'), $a . ($args ? "&$args" : '')) . ($ancre ? "#$ancre" : ''); |
|
| 277 | + return generer_url_ecrire(objet_info($objet, 'url_voir'), $a.($args ? "&$args" : '')).($ancre ? "#$ancre" : ''); |
|
| 278 | 278 | } |