@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | if (!$max_age) { |
| 107 | 107 | $max_age = _DEFAULT_LOCKTIME; |
| 108 | 108 | } |
| 109 | - $lock_file = _DIR_TMP . _NAME_LOCK . '-' . substr(md5($fichier), 0, 8); |
|
| 109 | + $lock_file = _DIR_TMP._NAME_LOCK.'-'.substr(md5($fichier), 0, 8); |
|
| 110 | 110 | |
| 111 | 111 | |
| 112 | 112 | /* |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | */ |
| 116 | 116 | |
| 117 | 117 | $id = creer_uniqid(); |
| 118 | - $tpath = _DIR_TMP . "slock.$id"; |
|
| 118 | + $tpath = _DIR_TMP."slock.$id"; |
|
| 119 | 119 | $tmpfd = @fopen($tpath, 'w'); // hum, le 'x' necessite php4,3,2 ... |
| 120 | 120 | if (!$tmpfd) { /* open failed */ |
| 121 | 121 | @fclose($tmpfd); |
@@ -241,7 +241,7 @@ discard block |
||
| 241 | 241 | * thinks the current time is (our_tmp.st_ctime).. |
| 242 | 242 | */ |
| 243 | 243 | |
| 244 | - $tpath = _DIR_TMP . "stime.$id"; |
|
| 244 | + $tpath = _DIR_TMP."stime.$id"; |
|
| 245 | 245 | $tmpfd = @fopen($tpath, 'w'); |
| 246 | 246 | if ( |
| 247 | 247 | (!$tmpfd) |
@@ -255,14 +255,14 @@ discard block |
||
| 255 | 255 | return false; //(NFSL_SYSF); |
| 256 | 256 | } |
| 257 | 257 | |
| 258 | - @fclose($tmpfd); /* We don't need this once we have our_tmp.st_ctime. */ |
|
| 258 | + @fclose($tmpfd); /* We don't need this once we have our_tmp.st_ctime. */ |
|
| 259 | 259 | spip_unlink($tpath); |
| 260 | 260 | |
| 261 | 261 | /* |
| 262 | 262 | * 2. make fullpath, a buffer for the full pathname of the lock file |
| 263 | 263 | */ |
| 264 | 264 | |
| 265 | - $lock_file = _DIR_TMP . _NAME_LOCK . '-' . substr(md5($fichier), 0, 8); |
|
| 265 | + $lock_file = _DIR_TMP._NAME_LOCK.'-'.substr(md5($fichier), 0, 8); |
|
| 266 | 266 | |
| 267 | 267 | /* |
| 268 | 268 | * 3. If the ctime hasn't been modified, unlink the file and return. If the |
@@ -282,10 +282,10 @@ discard block |
||
| 282 | 282 | if (!$test) { |
| 283 | 283 | return false; |
| 284 | 284 | } //(NFSL_LOST); |
| 285 | - sleep(1 + (random(0, 4))); /* so sleep a bit */ |
|
| 285 | + sleep(1 + (random(0, 4))); /* so sleep a bit */ |
|
| 286 | 286 | } |
| 287 | 287 | |
| 288 | - return true;//(NFSL_OK); /* success */ |
|
| 288 | + return true; //(NFSL_OK); /* success */ |
|
| 289 | 289 | } |
| 290 | 290 | |
| 291 | 291 | /* |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | if (isset($data[$root])) { # pas de racine sauf pour les rubriques |
| 147 | 147 | $r = "<option$selected value='$root' class='$class' style='$style'>$espace" |
| 148 | 148 | . $data[$root] |
| 149 | - . '</option>' . "\n"; |
|
| 149 | + . '</option>'."\n"; |
|
| 150 | 150 | } else { |
| 151 | 151 | $r = ''; |
| 152 | 152 | } |
@@ -174,7 +174,7 @@ discard block |
||
| 174 | 174 | } |
| 175 | 175 | |
| 176 | 176 | // et voila le travail |
| 177 | - return $r . $sous; |
|
| 177 | + return $r.$sous; |
|
| 178 | 178 | } |
| 179 | 179 | |
| 180 | 180 | /** |
@@ -221,12 +221,12 @@ discard block |
||
| 221 | 221 | while ($r = sql_fetch($q)) { |
| 222 | 222 | if (autoriser('voir', 'rubrique', $r['id_rubrique'])) { |
| 223 | 223 | // titre largeur maxi a 50 |
| 224 | - $titre = couper(supprimer_tags(typo($r['titre'])) . ' ', 50); |
|
| 224 | + $titre = couper(supprimer_tags(typo($r['titre'])).' ', 50); |
|
| 225 | 225 | if ( |
| 226 | 226 | $GLOBALS['meta']['multi_rubriques'] == 'oui' |
| 227 | 227 | and ($r['langue_choisie'] == 'oui' or $r['id_parent'] == 0) |
| 228 | 228 | ) { |
| 229 | - $titre .= ' [' . traduire_nom_langue($r['lang']) . ']'; |
|
| 229 | + $titre .= ' ['.traduire_nom_langue($r['lang']).']'; |
|
| 230 | 230 | } |
| 231 | 231 | $data[$r['id_rubrique']] = $titre; |
| 232 | 232 | $enfants[$r['id_parent']][] = $r['id_rubrique']; |
@@ -253,9 +253,9 @@ discard block |
||
| 253 | 253 | $att = " id='id_parent' name='id_parent'\nclass='selecteur_parent verdana1'"; |
| 254 | 254 | |
| 255 | 255 | if (preg_match(',^<option[^<>]*value=.(\d*).[^<>]*>([^<]*)</option>$,', $opt, $r)) { |
| 256 | - $r = "<input$att type='hidden' value='" . $r[1] . "' />" . $r[2]; |
|
| 256 | + $r = "<input$att type='hidden' value='".$r[1]."' />".$r[2]; |
|
| 257 | 257 | } else { |
| 258 | - $r = '<select' . $att . " size='1'>\n$opt</select>\n"; |
|
| 258 | + $r = '<select'.$att." size='1'>\n$opt</select>\n"; |
|
| 259 | 259 | } |
| 260 | 260 | |
| 261 | 261 | # message pour neuneus (a supprimer ?) |
@@ -297,7 +297,7 @@ discard block |
||
| 297 | 297 | function selecteur_rubrique_ajax($id_rubrique, $type, $restreint, $idem = 0, $do = 'aff') { |
| 298 | 298 | |
| 299 | 299 | if ($id_rubrique) { |
| 300 | - $titre = sql_getfetsel('titre', 'spip_rubriques', 'id_rubrique=' . intval($id_rubrique)); |
|
| 300 | + $titre = sql_getfetsel('titre', 'spip_rubriques', 'id_rubrique='.intval($id_rubrique)); |
|
| 301 | 301 | } else { |
| 302 | 302 | if ($type == 'auteur') { |
| 303 | 303 | $titre = ' '; |
@@ -307,7 +307,7 @@ discard block |
||
| 307 | 307 | } |
| 308 | 308 | |
| 309 | 309 | $titre = str_replace('&', '&', entites_html(textebrut(typo($titre)))); |
| 310 | - $init = " disabled='disabled' type='text' value=\"" . $titre . "\"\nstyle='width:300px;'"; |
|
| 310 | + $init = " disabled='disabled' type='text' value=\"".$titre."\"\nstyle='width:300px;'"; |
|
| 311 | 311 | |
| 312 | 312 | $url = generer_url_ecrire('selectionner', "id=$id_rubrique&type=$type&do=$do" |
| 313 | 313 | . (!$idem ? '' : "&exclus=$idem") |
@@ -356,7 +356,7 @@ discard block |
||
| 356 | 356 | . " jQuery(this).toggleClass('toggled'); " |
| 357 | 357 | . "return charger_node_url_si_vide('" |
| 358 | 358 | . $url |
| 359 | - . "', this.parentNode.nextSibling, this.nextSibling,'',event)\" title='" . attribut_html(_T('titre_image_selecteur')) . "'>" |
|
| 359 | + . "', this.parentNode.nextSibling, this.nextSibling,'',event)\" title='".attribut_html(_T('titre_image_selecteur'))."'>" |
|
| 360 | 360 | . $img_icone |
| 361 | 361 | . "</a><img src='" |
| 362 | 362 | . chemin_image('loader.svg') |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | renouvelle_alea(); |
| 66 | 66 | $new = false; |
| 67 | 67 | } else { |
| 68 | - spip_log("impossible d'ecrire dans " . $cache); |
|
| 68 | + spip_log("impossible d'ecrire dans ".$cache); |
|
| 69 | 69 | } |
| 70 | 70 | } |
| 71 | 71 | // et refaire le cache si on a du lire en base |
@@ -166,7 +166,7 @@ discard block |
||
| 166 | 166 | if (!isset($touch[$table])) { |
| 167 | 167 | touch_meta($antidate, $table); |
| 168 | 168 | } |
| 169 | - sql_delete('spip_' . $table, "nom='$nom'", '', 'continue'); |
|
| 169 | + sql_delete('spip_'.$table, "nom='$nom'", '', 'continue'); |
|
| 170 | 170 | unset($GLOBALS[$table][$nom]); |
| 171 | 171 | if (!isset($touch[$table])) { |
| 172 | 172 | touch_meta($antidate, $table); |
@@ -197,7 +197,7 @@ discard block |
||
| 197 | 197 | return; |
| 198 | 198 | } |
| 199 | 199 | include_spip('base/abstract_sql'); |
| 200 | - $res = sql_select('*', 'spip_' . $table, 'nom=' . sql_quote($nom), '', '', '', '', '', 'continue'); |
|
| 200 | + $res = sql_select('*', 'spip_'.$table, 'nom='.sql_quote($nom), '', '', '', '', '', 'continue'); |
|
| 201 | 201 | // table pas encore installee, travailler en php seulement |
| 202 | 202 | if (!$res) { |
| 203 | 203 | $GLOBALS[$table][$nom] = $valeur; |
@@ -231,9 +231,9 @@ discard block |
||
| 231 | 231 | $r['impt'] = sql_quote($importable, '', 'text'); |
| 232 | 232 | } |
| 233 | 233 | if ($row) { |
| 234 | - sql_update('spip_' . $table, $r, 'nom=' . sql_quote($nom)); |
|
| 234 | + sql_update('spip_'.$table, $r, 'nom='.sql_quote($nom)); |
|
| 235 | 235 | } else { |
| 236 | - sql_insert('spip_' . $table, '(' . join(',', array_keys($r)) . ')', '(' . join(',', array_values($r)) . ')'); |
|
| 236 | + sql_insert('spip_'.$table, '('.join(',', array_keys($r)).')', '('.join(',', array_values($r)).')'); |
|
| 237 | 237 | } |
| 238 | 238 | if (!isset($touch[$table])) { |
| 239 | 239 | touch_meta($antidate, $table); |
@@ -250,7 +250,7 @@ discard block |
||
| 250 | 250 | * Nom du fichier cache |
| 251 | 251 | **/ |
| 252 | 252 | function cache_meta($table = 'meta') { |
| 253 | - return ($table == 'meta') ? _FILE_META : (_DIR_CACHE . $table . '.php'); |
|
| 253 | + return ($table == 'meta') ? _FILE_META : (_DIR_CACHE.$table.'.php'); |
|
| 254 | 254 | } |
| 255 | 255 | |
| 256 | 256 | /** |
@@ -30,9 +30,9 @@ discard block |
||
| 30 | 30 | if (!defined('_DIR_RESTREINT_ABS')) { |
| 31 | 31 | if ( |
| 32 | 32 | defined('_DIR_RESTREINT') |
| 33 | - and @file_exists(_ROOT_RESTREINT . 'inc_version.php') |
|
| 33 | + and @file_exists(_ROOT_RESTREINT.'inc_version.php') |
|
| 34 | 34 | ) { |
| 35 | - include_once _ROOT_RESTREINT . 'inc_version.php'; |
|
| 35 | + include_once _ROOT_RESTREINT.'inc_version.php'; |
|
| 36 | 36 | } else { |
| 37 | 37 | die('inc_version absent ?'); |
| 38 | 38 | } |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | } // fond demande dans l'url par page=xxxx ? |
| 44 | 44 | else { |
| 45 | 45 | if (isset($_GET[_SPIP_PAGE])) { |
| 46 | - $fond = (string)$_GET[_SPIP_PAGE]; |
|
| 46 | + $fond = (string) $_GET[_SPIP_PAGE]; |
|
| 47 | 47 | |
| 48 | 48 | // Securite |
| 49 | 49 | if ( |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | // lancer les taches sur affichage final, comme le cron |
| 108 | 108 | // mais sans rien afficher |
| 109 | 109 | $GLOBALS['html'] = false; // ne rien afficher |
| 110 | - pipeline('affichage_final' . _PIPELINE_SUFFIX, ''); |
|
| 110 | + pipeline('affichage_final'._PIPELINE_SUFFIX, ''); |
|
| 111 | 111 | exit; // le hit est fini ! |
| 112 | 112 | } |
| 113 | 113 | } |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | // Content-Type ? |
| 125 | 125 | if (!isset($page['entetes']['Content-Type'])) { |
| 126 | 126 | $charset = isset($GLOBALS['meta']['charset']) ? $GLOBALS['meta']['charset'] : 'utf-8'; |
| 127 | - $page['entetes']['Content-Type'] = 'text/html; charset=' . $charset; |
|
| 127 | + $page['entetes']['Content-Type'] = 'text/html; charset='.$charset; |
|
| 128 | 128 | $html = true; |
| 129 | 129 | } else { |
| 130 | 130 | $html = preg_match(',^\s*text/html,', $page['entetes']['Content-Type']); |
@@ -150,11 +150,11 @@ discard block |
||
| 150 | 150 | |
| 151 | 151 | // traitements sur les entetes avant envoi |
| 152 | 152 | // peut servir pour le plugin de stats |
| 153 | - $page['entetes'] = pipeline('affichage_entetes_final' . _PIPELINE_SUFFIX, $page['entetes']); |
|
| 153 | + $page['entetes'] = pipeline('affichage_entetes_final'._PIPELINE_SUFFIX, $page['entetes']); |
|
| 154 | 154 | |
| 155 | 155 | |
| 156 | 156 | // eval $page et affecte $res |
| 157 | - include _ROOT_RESTREINT . 'public/evaluer_page.php'; |
|
| 157 | + include _ROOT_RESTREINT.'public/evaluer_page.php'; |
|
| 158 | 158 | envoyer_entetes($page['entetes']); |
| 159 | 159 | if ($res === false) { |
| 160 | 160 | include_spip('inc/autoriser'); |
@@ -173,7 +173,7 @@ discard block |
||
| 173 | 173 | // |
| 174 | 174 | // (c'est ici qu'on fait var_recherche, validation, boutons d'admin, |
| 175 | 175 | // cf. public/assembler.php) |
| 176 | - echo pipeline('affichage_final' . _PIPELINE_SUFFIX, $page['texte']); |
|
| 176 | + echo pipeline('affichage_final'._PIPELINE_SUFFIX, $page['texte']); |
|
| 177 | 177 | |
| 178 | 178 | if ($lang) { |
| 179 | 179 | lang_select(); |
@@ -189,7 +189,7 @@ discard block |
||
| 189 | 189 | if ($html and ($affiche_boutons_admin or $debug)) { |
| 190 | 190 | $var_mode_affiche = _request('var_mode_affiche'); |
| 191 | 191 | $var_mode_objet = _request('var_mode_objet'); |
| 192 | - $GLOBALS['debug_objets'][$var_mode_affiche][$var_mode_objet . 'tout'] = ($var_mode_affiche == 'validation' ? $page['texte'] : ''); |
|
| 192 | + $GLOBALS['debug_objets'][$var_mode_affiche][$var_mode_objet.'tout'] = ($var_mode_affiche == 'validation' ? $page['texte'] : ''); |
|
| 193 | 193 | echo erreur_squelette(false); |
| 194 | 194 | } |
| 195 | 195 | } else { |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | $credentials_ldap = ['ldap_dn' => $dn, 'ldap_password' => $pass]; |
| 69 | 69 | |
| 70 | 70 | // Si l'utilisateur figure deja dans la base, y recuperer les infos |
| 71 | - $r = sql_fetsel('*', 'spip_auteurs', 'login=' . sql_quote($login) . " AND source='ldap'", '', '', '', '', $serveur); |
|
| 71 | + $r = sql_fetsel('*', 'spip_auteurs', 'login='.sql_quote($login)." AND source='ldap'", '', '', '', '', $serveur); |
|
| 72 | 72 | |
| 73 | 73 | if ($r) { |
| 74 | 74 | return array_merge($r, $credentials_ldap); |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | if ($r) { |
| 93 | 93 | return array_merge( |
| 94 | 94 | $credentials_ldap, |
| 95 | - sql_fetsel('*', 'spip_auteurs', 'id_auteur=' . intval($r), '', '', '', '', $serveur) |
|
| 95 | + sql_fetsel('*', 'spip_auteurs', 'id_auteur='.intval($r), '', '', '', '', $serveur) |
|
| 96 | 96 | ); |
| 97 | 97 | } |
| 98 | 98 | |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | $connexion = spip_connect($serveur); |
| 122 | 122 | if (!is_array($connexion['ldap'])) { |
| 123 | 123 | if ($connexion['authentification']['ldap']) { |
| 124 | - $f = _DIR_CONNECT . $connexion['authentification']['ldap']; |
|
| 124 | + $f = _DIR_CONNECT.$connexion['authentification']['ldap']; |
|
| 125 | 125 | unset($GLOBALS['ldap_link']); |
| 126 | 126 | if (is_readable($f)) { |
| 127 | 127 | include_once($f); |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | |
| 170 | 170 | $ldap_link = isset($ldap['link']) ? $ldap['link'] : null; |
| 171 | 171 | $ldap_base = isset($ldap['base']) ? $ldap['base'] : null; |
| 172 | - $desc = isset($ldap['attributes']) && $ldap['attributes'] ? $ldap['attributes'] : $GLOBALS['ldap_attributes'] ; |
|
| 172 | + $desc = isset($ldap['attributes']) && $ldap['attributes'] ? $ldap['attributes'] : $GLOBALS['ldap_attributes']; |
|
| 173 | 173 | |
| 174 | 174 | $logins = is_array($desc['login']) ? $desc['login'] : [$desc['login']]; |
| 175 | 175 | |
@@ -334,7 +334,7 @@ discard block |
||
| 334 | 334 | if (!ldap_bind($link, $dn, session_get('ldap_password'))) { |
| 335 | 335 | return false; |
| 336 | 336 | } |
| 337 | - $encoded_pass = '{MD5}' . base64_encode(pack('H*', md5($new_pass))); |
|
| 337 | + $encoded_pass = '{MD5}'.base64_encode(pack('H*', md5($new_pass))); |
|
| 338 | 338 | $success = ldap_mod_replace($link, $dn, ['userPassword' => $encoded_pass]); |
| 339 | 339 | |
| 340 | 340 | return $success; |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | if ($fichier) { |
| 109 | 109 | $code = "quete_logo_file($doc, $qconnect)"; |
| 110 | 110 | } else { |
| 111 | - $code = "quete_logo_document($doc, " . ($lien ? $lien : "''") . ", '$align', '$mode_logo', $coord_x, $coord_y, $qconnect)"; |
|
| 111 | + $code = "quete_logo_document($doc, ".($lien ? $lien : "''").", '$align', '$mode_logo', $coord_x, $coord_y, $qconnect)"; |
|
| 112 | 112 | } |
| 113 | 113 | // (x=non-faux ? y : '') pour affecter x en retournant y |
| 114 | 114 | if ($p->descr['documents']) { |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | |
| 126 | 126 | // demande de reduction sur logo avec ecriture spip 2.1 : #LOGO_xxx{200, 0} |
| 127 | 127 | if ($coord_x or $coord_y) { |
| 128 | - $code = "filtrer('image_graver',filtrer('image_reduire'," . $code . ", '$coord_x', '$coord_y'))"; |
|
| 128 | + $code = "filtrer('image_graver',filtrer('image_reduire',".$code.", '$coord_x', '$coord_y'))"; |
|
| 129 | 129 | } |
| 130 | 130 | |
| 131 | 131 | $p->code = $code; |
@@ -158,14 +158,12 @@ discard block |
||
| 158 | 158 | * Code compilé retournant le chemin du logo ou le code HTML du logo. |
| 159 | 159 | **/ |
| 160 | 160 | function logo_survol($id_objet, $_id_objet, $type, $align, $fichier, $_lien, $p, $suite) { |
| 161 | - $code = "quete_logo('$id_objet', '" . |
|
| 162 | - (($suite == '_SURVOL') ? 'off' : |
|
| 163 | - (($suite == '_NORMAL') ? 'on' : 'ON')) . |
|
| 164 | - "', $_id_objet," . |
|
| 161 | + $code = "quete_logo('$id_objet', '". |
|
| 162 | + (($suite == '_SURVOL') ? 'off' : (($suite == '_NORMAL') ? 'on' : 'ON')). |
|
| 163 | + "', $_id_objet,". |
|
| 165 | 164 | (($suite == '_RUBRIQUE') ? |
| 166 | - champ_sql('id_rubrique', $p) : |
|
| 167 | - (($type == 'rubrique') ? "quete_parent($_id_objet)" : "''")) . |
|
| 168 | - ', ' . intval($fichier) . ')'; |
|
| 165 | + champ_sql('id_rubrique', $p) : (($type == 'rubrique') ? "quete_parent($_id_objet)" : "''")). |
|
| 166 | + ', '.intval($fichier).')'; |
|
| 169 | 167 | |
| 170 | 168 | if ($fichier) { |
| 171 | 169 | return $code; |
@@ -173,5 +171,5 @@ discard block |
||
| 173 | 171 | |
| 174 | 172 | $align = preg_replace(',\W,', '', $align); |
| 175 | 173 | |
| 176 | - return "quete_html_logo($code, '$align', " . ($_lien ? $_lien : "''") . ')'; |
|
| 174 | + return "quete_html_logo($code, '$align', ".($_lien ? $_lien : "''").')'; |
|
| 177 | 175 | } |
@@ -73,5 +73,5 @@ |
||
| 73 | 73 | return ''; |
| 74 | 74 | } |
| 75 | 75 | |
| 76 | - return generer_url_action('logout', 'logout=public&url=' . rawurlencode($cible ? $cible : self('&'))); |
|
| 76 | + return generer_url_action('logout', 'logout=public&url='.rawurlencode($cible ? $cible : self('&'))); |
|
| 77 | 77 | } |
@@ -99,9 +99,9 @@ discard block |
||
| 99 | 99 | include_spip('inc/lang'); |
| 100 | 100 | |
| 101 | 101 | if ($GLOBALS['spip_lang'] <> $default) { |
| 102 | - $opt = lang_select($default); # et remplace |
|
| 102 | + $opt = lang_select($default); # et remplace |
|
| 103 | 103 | if ($GLOBALS['spip_lang'] <> $default) { |
| 104 | - $default = ''; # annule tout choix par defaut |
|
| 104 | + $default = ''; # annule tout choix par defaut |
|
| 105 | 105 | if ($opt) { |
| 106 | 106 | lang_select(); |
| 107 | 107 | } |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | |
| 111 | 111 | # lien a partir de / |
| 112 | 112 | $cible = parametre_url(self(), 'lang', '', '&'); |
| 113 | - $post = generer_url_action('converser', 'redirect=' . rawurlencode($cible), '&'); |
|
| 113 | + $post = generer_url_action('converser', 'redirect='.rawurlencode($cible), '&'); |
|
| 114 | 114 | |
| 115 | 115 | return [ |
| 116 | 116 | 'formulaires/menu_lang', |
@@ -101,8 +101,8 @@ discard block |
||
| 101 | 101 | } |
| 102 | 102 | foreach ($debug['sourcefile'] as $k => $v) { |
| 103 | 103 | if (strpos($v, 'administration.') !== false) { |
| 104 | - if (isset($debug['resultat'][$k . 'tout'])) { |
|
| 105 | - return $debug['resultat'][$k . 'tout']; |
|
| 104 | + if (isset($debug['resultat'][$k.'tout'])) { |
|
| 105 | + return $debug['resultat'][$k.'tout']; |
|
| 106 | 106 | } |
| 107 | 107 | } |
| 108 | 108 | } |
@@ -180,12 +180,12 @@ discard block |
||
| 180 | 180 | and $id = intval($id) |
| 181 | 181 | and $desc = $trouver_table(table_objet_sql($type)) |
| 182 | 182 | ) { |
| 183 | - $id = sql_getfetsel($_id_type, table_objet_sql($type), "$_id_type=" . intval($id)); |
|
| 183 | + $id = sql_getfetsel($_id_type, table_objet_sql($type), "$_id_type=".intval($id)); |
|
| 184 | 184 | if ($id) { |
| 185 | 185 | $env[$_id_type] = $id; |
| 186 | 186 | $env['objet'] = $type; |
| 187 | 187 | $env['id_objet'] = $id; |
| 188 | - $env['voir_' . $obj] = |
|
| 188 | + $env['voir_'.$obj] = |
|
| 189 | 189 | str_replace('&', '&', generer_url_entite($id, $obj, '', '', false)); |
| 190 | 190 | if ( |
| 191 | 191 | isset($desc['field']['id_rubrique']) |
@@ -239,10 +239,10 @@ discard block |
||
| 239 | 239 | $notpub = sql_in('statut', ['prop', 'prive']); |
| 240 | 240 | |
| 241 | 241 | if ($type == 'article' and $GLOBALS['meta']['post_dates'] != 'oui') { |
| 242 | - $notpub .= " OR (statut='publie' AND date>" . sql_quote(date('Y-m-d H:i:s')) . ')'; |
|
| 242 | + $notpub .= " OR (statut='publie' AND date>".sql_quote(date('Y-m-d H:i:s')).')'; |
|
| 243 | 243 | } |
| 244 | 244 | |
| 245 | - return sql_fetsel('1', table_objet_sql($type), id_table_objet($type) . '=' . $id . " AND ($notpub)"); |
|
| 245 | + return sql_fetsel('1', table_objet_sql($type), id_table_objet($type).'='.$id." AND ($notpub)"); |
|
| 246 | 246 | } |
| 247 | 247 | |
| 248 | 248 | |
@@ -256,9 +256,9 @@ discard block |
||
| 256 | 256 | $alang = ''; |
| 257 | 257 | if (!empty($_COOKIE['spip_admin'])) { |
| 258 | 258 | $email_or_login = preg_replace(',^@,', '', $_COOKIE['spip_admin']); |
| 259 | - $alang = sql_getfetsel('lang', 'spip_auteurs', 'email=' . sql_quote($email_or_login)); |
|
| 259 | + $alang = sql_getfetsel('lang', 'spip_auteurs', 'email='.sql_quote($email_or_login)); |
|
| 260 | 260 | if (!$alang) { |
| 261 | - $alang = sql_getfetsel('lang', 'spip_auteurs', 'login=' . sql_quote($email_or_login)); |
|
| 261 | + $alang = sql_getfetsel('lang', 'spip_auteurs', 'login='.sql_quote($email_or_login)); |
|
| 262 | 262 | } |
| 263 | 263 | } |
| 264 | 264 | if (!$alang) { |
@@ -283,9 +283,8 @@ discard block |
||
| 283 | 283 | |
| 284 | 284 | return ((!isset($GLOBALS['xhtml']) or $GLOBALS['xhtml'] !== 'true') ? |
| 285 | 285 | (parametre_url(self(), 'var_mode', 'debug', '&') |
| 286 | - . '&var_mode_affiche=validation') : |
|
| 287 | - ('http://validator.w3.org/check?uri=' |
|
| 288 | - . rawurlencode('http://' . $_SERVER['HTTP_HOST'] . nettoyer_uri()))); |
|
| 286 | + . '&var_mode_affiche=validation') : ('http://validator.w3.org/check?uri=' |
|
| 287 | + . rawurlencode('http://'.$_SERVER['HTTP_HOST'].nettoyer_uri()))); |
|
| 289 | 288 | } |
| 290 | 289 | |
| 291 | 290 | /** |