Completed
Pull Request — master (#32)
by
unknown
05:47
created
ecrire/balise/login_prive.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
  **/
18 18
 
19 19
 if (!defined("_ECRIRE_INC_VERSION")) {
20
-	return;
20
+    return;
21 21
 }  #securite
22 22
 
23 23
 
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
  *     Pile complétée du code compilé
35 35
  **/
36 36
 function balise_LOGIN_PRIVE($p) {
37
-	return calculer_balise_dynamique($p, 'LOGIN_PRIVE', array('url'));
37
+    return calculer_balise_dynamique($p, 'LOGIN_PRIVE', array('url'));
38 38
 }
39 39
 
40 40
 /**
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
  *   Liste (url, login) des arguments collectés.
56 56
  */
57 57
 function balise_LOGIN_PRIVE_stat($args, $context_compil) {
58
-	return array(isset($args[1]) ? $args[1] : $args[0], (isset($args[2]) ? $args[2] : ''));
58
+    return array(isset($args[1]) ? $args[1] : $args[0], (isset($args[2]) ? $args[2] : ''));
59 59
 }
60 60
 
61 61
 /**
@@ -72,12 +72,12 @@  discard block
 block discarded – undo
72 72
  *     Liste : Chemin du squelette, durée du cache, contexte
73 73
  **/
74 74
 function balise_LOGIN_PRIVE_dyn($url, $login) {
75
-	include_spip('balise/formulaire_');
76
-	if (!$url    # pas d'url passee en filtre ou dans le contexte
77
-		and !$url = _request('url') # ni d'url passee par l'utilisateur
78
-	) {
79
-		$url = generer_url_ecrire('accueil', '', true);
80
-	}
75
+    include_spip('balise/formulaire_');
76
+    if (!$url    # pas d'url passee en filtre ou dans le contexte
77
+        and !$url = _request('url') # ni d'url passee par l'utilisateur
78
+    ) {
79
+        $url = generer_url_ecrire('accueil', '', true);
80
+    }
81 81
 
82
-	return balise_FORMULAIRE__dyn('login', $url, $login, true);
82
+    return balise_FORMULAIRE__dyn('login', $url, $login, true);
83 83
 }
Please login to merge, or discard this patch.
ecrire/balise/menu_lang_ecrire.php 2 patches
Indentation   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
  **/
18 18
 
19 19
 if (!defined('_ECRIRE_INC_VERSION')) {
20
-	return;
20
+    return;
21 21
 }
22 22
 
23 23
 /**
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
  *     Pile complétée du code compilé
38 38
  **/
39 39
 function balise_MENU_LANG_ECRIRE($p) {
40
-	return calculer_balise_dynamique($p, 'MENU_LANG_ECRIRE', array('lang'));
40
+    return calculer_balise_dynamique($p, 'MENU_LANG_ECRIRE', array('lang'));
41 41
 }
42 42
 
43 43
 /**
@@ -55,12 +55,12 @@  discard block
 block discarded – undo
55 55
  *   Liste (lang) des arguments collectés et fournis.
56 56
  */
57 57
 function balise_MENU_LANG_ECRIRE_stat($args, $context_compil) {
58
-	include_spip('inc/lang');
59
-	if (strpos($GLOBALS['meta']['langues_proposees'], ',') === false) {
60
-		return '';
61
-	}
58
+    include_spip('inc/lang');
59
+    if (strpos($GLOBALS['meta']['langues_proposees'], ',') === false) {
60
+        return '';
61
+    }
62 62
 
63
-	return $args;
63
+    return $args;
64 64
 }
65 65
 
66 66
 /**
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
  *     Liste : Chemin du squelette, durée du cache, contexte
77 77
  **/
78 78
 function balise_MENU_LANG_ECRIRE_dyn($opt) {
79
-	return menu_lang_pour_tous('var_lang_ecrire', $opt);
79
+    return menu_lang_pour_tous('var_lang_ecrire', $opt);
80 80
 }
81 81
 
82 82
 /**
@@ -96,30 +96,30 @@  discard block
 block discarded – undo
96 96
  *     Liste : Chemin du squelette, durée du cache, contexte
97 97
  **/
98 98
 function menu_lang_pour_tous($nom, $default) {
99
-	include_spip('inc/lang');
99
+    include_spip('inc/lang');
100 100
 
101
-	if ($GLOBALS['spip_lang'] <> $default) {
102
-		$opt = lang_select($default);  # et remplace
103
-		if ($GLOBALS['spip_lang'] <> $default) {
104
-			$default = '';  # annule tout choix par defaut
105
-			if ($opt) {
106
-				lang_select();
107
-			}
108
-		}
109
-	}
101
+    if ($GLOBALS['spip_lang'] <> $default) {
102
+        $opt = lang_select($default);  # et remplace
103
+        if ($GLOBALS['spip_lang'] <> $default) {
104
+            $default = '';  # annule tout choix par defaut
105
+            if ($opt) {
106
+                lang_select();
107
+            }
108
+        }
109
+    }
110 110
 
111
-	# lien a partir de /
112
-	$cible = parametre_url(self(), 'lang', '', '&');
113
-	$post = generer_url_action('converser', 'redirect=' . rawurlencode($cible), '&');
111
+    # lien a partir de /
112
+    $cible = parametre_url(self(), 'lang', '', '&');
113
+    $post = generer_url_action('converser', 'redirect=' . rawurlencode($cible), '&');
114 114
 
115
-	return array(
116
-		'formulaires/menu_lang',
117
-		3600,
118
-		array(
119
-			'nom' => $nom,
120
-			'url' => $post,
121
-			'name' => $nom,
122
-			'default' => $default,
123
-		)
124
-	);
115
+    return array(
116
+        'formulaires/menu_lang',
117
+        3600,
118
+        array(
119
+            'nom' => $nom,
120
+            'url' => $post,
121
+            'name' => $nom,
122
+            'default' => $default,
123
+        )
124
+    );
125 125
 }
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -99,9 +99,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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 array(
116 116
 		'formulaires/menu_lang',
Please login to merge, or discard this patch.
ecrire/balise/configurer_metas.php 2 patches
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
  * @package SPIP\Core\Compilateur\Balises
18 18
  **/
19 19
 if (!defined('_ECRIRE_INC_VERSION')) {
20
-	return;
20
+    return;
21 21
 }
22 22
 
23 23
 
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
  *     Pile complétée du code compilé
61 61
  **/
62 62
 function balise_CONFIGURER_METAS_dist($p) {
63
-	return calculer_balise_dynamique($p, $p->nom_champ, array());
63
+    return calculer_balise_dynamique($p, $p->nom_champ, array());
64 64
 }
65 65
 
66 66
 /**
@@ -78,15 +78,15 @@  discard block
 block discarded – undo
78 78
  **/
79 79
 function balise_CONFIGURER_METAS_dyn($form) {
80 80
 
81
-	include_spip('balise/formulaire_');
82
-	if (!existe_formulaire($form)) {
83
-		return '';
84
-	}
85
-	$args = func_get_args();
86
-	$contexte = balise_FORMULAIRE__contexte('configurer_metas', $args);
87
-	if (!is_array($contexte)) {
88
-		return $contexte;
89
-	}
81
+    include_spip('balise/formulaire_');
82
+    if (!existe_formulaire($form)) {
83
+        return '';
84
+    }
85
+    $args = func_get_args();
86
+    $contexte = balise_FORMULAIRE__contexte('configurer_metas', $args);
87
+    if (!is_array($contexte)) {
88
+        return $contexte;
89
+    }
90 90
 
91
-	return array('formulaires/' . $form, 3600, $contexte);
91
+    return array('formulaires/' . $form, 3600, $contexte);
92 92
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -88,5 +88,5 @@
 block discarded – undo
88 88
 		return $contexte;
89 89
 	}
90 90
 
91
-	return array('formulaires/' . $form, 3600, $contexte);
91
+	return array('formulaires/'.$form, 3600, $contexte);
92 92
 }
Please login to merge, or discard this patch.
ecrire/balise/formulaire_ecrire_auteur.php 2 patches
Indentation   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
  **/
18 18
 
19 19
 if (!defined('_ECRIRE_INC_VERSION')) {
20
-	return;
20
+    return;
21 21
 }
22 22
 
23 23
 include_spip('base/abstract_sql');
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
  *     Pile complétée du code compilé
42 42
  **/
43 43
 function balise_FORMULAIRE_ECRIRE_AUTEUR($p) {
44
-	return calculer_balise_dynamique($p, 'FORMULAIRE_ECRIRE_AUTEUR', array('id_auteur', 'id_article', 'email'));
44
+    return calculer_balise_dynamique($p, 'FORMULAIRE_ECRIRE_AUTEUR', array('id_auteur', 'id_article', 'email'));
45 45
 }
46 46
 
47 47
 /**
@@ -59,42 +59,42 @@  discard block
 block discarded – undo
59 59
  *   - chaîne vide sinon (erreur ou non affichage).
60 60
  */
61 61
 function balise_FORMULAIRE_ECRIRE_AUTEUR_stat($args, $context_compil) {
62
-	include_spip('inc/filtres');
63
-	// Pas d'id_auteur ni d'id_article ? Erreur de contexte
64
-	$id = intval($args[1]);
65
-	if (!$args[0] and !$id) {
66
-		$msg = array(
67
-			'zbug_champ_hors_motif',
68
-			array(
69
-				'champ' => 'FORMULAIRE_ECRIRE_AUTEUR',
70
-				'motif' => 'AUTEURS/ARTICLES'
71
-			)
72
-		);
62
+    include_spip('inc/filtres');
63
+    // Pas d'id_auteur ni d'id_article ? Erreur de contexte
64
+    $id = intval($args[1]);
65
+    if (!$args[0] and !$id) {
66
+        $msg = array(
67
+            'zbug_champ_hors_motif',
68
+            array(
69
+                'champ' => 'FORMULAIRE_ECRIRE_AUTEUR',
70
+                'motif' => 'AUTEURS/ARTICLES'
71
+            )
72
+        );
73 73
 
74
-		erreur_squelette($msg, $context_compil);
74
+        erreur_squelette($msg, $context_compil);
75 75
 
76
-		return '';
77
-	}
78
-	// Si on est dans un contexte article,
79
-	// sortir tous les mails des auteurs de l'article
80
-	if (!$args[0] and $id) {
81
-		$r = '';
82
-		$s = sql_allfetsel('email',
83
-			'spip_auteurs AS A LEFT JOIN spip_auteurs_liens AS L ON (A.id_auteur=L.id_auteur AND L.objet=\'article\')',
84
-			"A.email != '' AND L.id_objet=$id");
85
-		foreach ($s as $row) {
86
-			if (email_valide($row['email'])) {
87
-				$r .= ', ' . $row['email'];
88
-			}
89
-		}
90
-		$args[2] = substr($r, 2);
91
-	}
76
+        return '';
77
+    }
78
+    // Si on est dans un contexte article,
79
+    // sortir tous les mails des auteurs de l'article
80
+    if (!$args[0] and $id) {
81
+        $r = '';
82
+        $s = sql_allfetsel('email',
83
+            'spip_auteurs AS A LEFT JOIN spip_auteurs_liens AS L ON (A.id_auteur=L.id_auteur AND L.objet=\'article\')',
84
+            "A.email != '' AND L.id_objet=$id");
85
+        foreach ($s as $row) {
86
+            if (email_valide($row['email'])) {
87
+                $r .= ', ' . $row['email'];
88
+            }
89
+        }
90
+        $args[2] = substr($r, 2);
91
+    }
92 92
 
93
-	// On ne peut pas ecrire a un auteur dont le mail n'est pas valide
94
-	if (!$args[2] or !email_valide($args[2])) {
95
-		return '';
96
-	}
93
+    // On ne peut pas ecrire a un auteur dont le mail n'est pas valide
94
+    if (!$args[2] or !email_valide($args[2])) {
95
+        return '';
96
+    }
97 97
 
98
-	// OK
99
-	return $args;
98
+    // OK
99
+    return $args;
100 100
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@
 block discarded – undo
84 84
 			"A.email != '' AND L.id_objet=$id");
85 85
 		foreach ($s as $row) {
86 86
 			if (email_valide($row['email'])) {
87
-				$r .= ', ' . $row['email'];
87
+				$r .= ', '.$row['email'];
88 88
 			}
89 89
 		}
90 90
 		$args[2] = substr($r, 2);
Please login to merge, or discard this patch.
ecrire/balise/formulaire_inscription.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
  **/
18 18
 
19 19
 if (!defined('_ECRIRE_INC_VERSION')) {
20
-	return;
20
+    return;
21 21
 }
22 22
 
23 23
 include_spip('base/abstract_sql');
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
  *     Pile complétée du code compilé
44 44
  **/
45 45
 function balise_FORMULAIRE_INSCRIPTION($p) {
46
-	return calculer_balise_dynamique($p, 'FORMULAIRE_INSCRIPTION', array());
46
+    return calculer_balise_dynamique($p, 'FORMULAIRE_INSCRIPTION', array());
47 47
 }
48 48
 
49 49
 /**
@@ -72,9 +72,9 @@  discard block
 block discarded – undo
72 72
  *   - chaîne vide sinon.
73 73
  */
74 74
 function balise_FORMULAIRE_INSCRIPTION_stat($args, $context_compil) {
75
-	list($mode, $id, $retour) = array_pad($args, 3, null);
76
-	include_spip('action/inscrire_auteur');
77
-	$mode = tester_statut_inscription($mode, $id);
75
+    list($mode, $id, $retour) = array_pad($args, 3, null);
76
+    include_spip('action/inscrire_auteur');
77
+    $mode = tester_statut_inscription($mode, $id);
78 78
 
79
-	return $mode ? array($mode, $id, $retour) : '';
79
+    return $mode ? array($mode, $id, $retour) : '';
80 80
 }
Please login to merge, or discard this patch.
ecrire/balise/login_public.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
  **/
18 18
 
19 19
 if (!defined("_ECRIRE_INC_VERSION")) {
20
-	return;
20
+    return;
21 21
 }  #securite
22 22
 
23 23
 
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
  *     Pile complétée du code compilé
37 37
  **/
38 38
 function balise_LOGIN_PUBLIC($p, $nom = 'LOGIN_PUBLIC') {
39
-	return calculer_balise_dynamique($p, $nom, array('url'));
39
+    return calculer_balise_dynamique($p, $nom, array('url'));
40 40
 }
41 41
 
42 42
 /**
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
  *   Liste (url, login) des arguments collectés.
58 58
  */
59 59
 function balise_LOGIN_PUBLIC_stat($args, $context_compil) {
60
-	return array(isset($args[1]) ? $args[1] : $args[0], (isset($args[2]) ? $args[2] : ''));
60
+    return array(isset($args[1]) ? $args[1] : $args[0], (isset($args[2]) ? $args[2] : ''));
61 61
 }
62 62
 
63 63
 /**
@@ -74,12 +74,12 @@  discard block
 block discarded – undo
74 74
  *     Liste : Chemin du squelette, durée du cache, contexte
75 75
  **/
76 76
 function balise_LOGIN_PUBLIC_dyn($url, $login) {
77
-	include_spip('balise/formulaire_');
78
-	if (!$url    # pas d'url passee en filtre ou dans le contexte
79
-		and !$url = _request('url') # ni d'url passee par l'utilisateur
80
-	) {
81
-		$url = parametre_url(self(), '', '', '&');
82
-	}
77
+    include_spip('balise/formulaire_');
78
+    if (!$url    # pas d'url passee en filtre ou dans le contexte
79
+        and !$url = _request('url') # ni d'url passee par l'utilisateur
80
+    ) {
81
+        $url = parametre_url(self(), '', '', '&');
82
+    }
83 83
 
84
-	return balise_FORMULAIRE__dyn('login', $url, $login, false);
84
+    return balise_FORMULAIRE__dyn('login', $url, $login, false);
85 85
 }
Please login to merge, or discard this patch.
ecrire/balise/logo_.php 2 patches
Indentation   +115 added lines, -115 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
  **/
18 18
 
19 19
 if (!defined('_ECRIRE_INC_VERSION')) {
20
-	return;
20
+    return;
21 21
 }
22 22
 
23 23
 
@@ -54,84 +54,84 @@  discard block
 block discarded – undo
54 54
  */
55 55
 function balise_LOGO__dist($p) {
56 56
 
57
-	preg_match(',^LOGO_([A-Z_]+?)(|_NORMAL|_SURVOL|_RUBRIQUE)$,i', $p->nom_champ, $regs);
58
-	$type = strtolower($regs[1]);
59
-	$suite_logo = $regs[2];
60
-
61
-	// cas de #LOGO_SITE_SPIP
62
-	if ($type == 'site_spip') {
63
-		$type = 'site';
64
-		$_id_objet = "\"'0'\"";
65
-	}
66
-
67
-	$id_objet = id_table_objet($type);
68
-	if (!isset($_id_objet)) {
69
-		$_id_objet = champ_sql($id_objet, $p);
70
-	}
71
-
72
-	$fichier = ($p->etoile === '**') ? -1 : 0;
73
-	$coord = array();
74
-	$align = $lien = '';
75
-	$mode_logo = '';
76
-
77
-	if ($p->param and !$p->param[0][0]) {
78
-		$params = $p->param[0];
79
-		array_shift($params);
80
-		foreach ($params as $a) {
81
-			if ($a[0]->type === 'texte') {
82
-				$n = $a[0]->texte;
83
-				if (is_numeric($n)) {
84
-					$coord[] = $n;
85
-				} elseif (in_array($n, array('top', 'left', 'right', 'center', 'bottom'))) {
86
-					$align = $n;
87
-				} elseif (in_array($n, array('auto', 'icone', 'apercu', 'vignette'))) {
88
-					$mode_logo = $n;
89
-				}
90
-			} else {
91
-				$lien = calculer_liste($a, $p->descr, $p->boucles, $p->id_boucle);
92
-			}
93
-		}
94
-	}
95
-
96
-	$coord_x = !$coord ? 0 : intval(array_shift($coord));
97
-	$coord_y = !$coord ? 0 : intval(array_shift($coord));
98
-
99
-	if ($p->etoile === '*') {
100
-		include_spip('balise/url_');
101
-		$lien = generer_generer_url_arg($type, $p, $_id_objet);
102
-	}
103
-
104
-	$connect = $p->id_boucle ? $p->boucles[$p->id_boucle]->sql_serveur : '';
105
-	if ($type == 'document') {
106
-		$qconnect = _q($connect);
107
-		$doc = "quete_document($_id_objet, $qconnect)";
108
-		if ($fichier) {
109
-			$code = "quete_logo_file($doc, $qconnect)";
110
-		} else {
111
-			$code = "quete_logo_document($doc, " . ($lien ? $lien : "''") . ", '$align', '$mode_logo', $coord_x, $coord_y, $qconnect)";
112
-		}
113
-		// (x=non-faux ? y : '') pour affecter x en retournant y
114
-		if ($p->descr['documents']) {
115
-			$code = '(($doublons["documents"] .= ",". '
116
-				. $_id_objet
117
-				. ") ? $code : '')";
118
-		}
119
-	} elseif ($connect) {
120
-		$code = "''";
121
-		spip_log('Les logos distants ne sont pas prevus');
122
-	} else {
123
-		$code = logo_survol($id_objet, $_id_objet, $type, $align, $fichier, $lien, $p, $suite_logo);
124
-	}
125
-
126
-	// demande de reduction sur logo avec ecriture spip 2.1 : #LOGO_xxx{200, 0}
127
-	if ($coord_x or $coord_y) {
128
-		$code = "filtrer('image_graver',filtrer('image_reduire'," . $code . ", '$coord_x', '$coord_y'))";
129
-	}
130
-
131
-	$p->code = $code;
132
-	$p->interdire_scripts = false;
133
-
134
-	return $p;
57
+    preg_match(',^LOGO_([A-Z_]+?)(|_NORMAL|_SURVOL|_RUBRIQUE)$,i', $p->nom_champ, $regs);
58
+    $type = strtolower($regs[1]);
59
+    $suite_logo = $regs[2];
60
+
61
+    // cas de #LOGO_SITE_SPIP
62
+    if ($type == 'site_spip') {
63
+        $type = 'site';
64
+        $_id_objet = "\"'0'\"";
65
+    }
66
+
67
+    $id_objet = id_table_objet($type);
68
+    if (!isset($_id_objet)) {
69
+        $_id_objet = champ_sql($id_objet, $p);
70
+    }
71
+
72
+    $fichier = ($p->etoile === '**') ? -1 : 0;
73
+    $coord = array();
74
+    $align = $lien = '';
75
+    $mode_logo = '';
76
+
77
+    if ($p->param and !$p->param[0][0]) {
78
+        $params = $p->param[0];
79
+        array_shift($params);
80
+        foreach ($params as $a) {
81
+            if ($a[0]->type === 'texte') {
82
+                $n = $a[0]->texte;
83
+                if (is_numeric($n)) {
84
+                    $coord[] = $n;
85
+                } elseif (in_array($n, array('top', 'left', 'right', 'center', 'bottom'))) {
86
+                    $align = $n;
87
+                } elseif (in_array($n, array('auto', 'icone', 'apercu', 'vignette'))) {
88
+                    $mode_logo = $n;
89
+                }
90
+            } else {
91
+                $lien = calculer_liste($a, $p->descr, $p->boucles, $p->id_boucle);
92
+            }
93
+        }
94
+    }
95
+
96
+    $coord_x = !$coord ? 0 : intval(array_shift($coord));
97
+    $coord_y = !$coord ? 0 : intval(array_shift($coord));
98
+
99
+    if ($p->etoile === '*') {
100
+        include_spip('balise/url_');
101
+        $lien = generer_generer_url_arg($type, $p, $_id_objet);
102
+    }
103
+
104
+    $connect = $p->id_boucle ? $p->boucles[$p->id_boucle]->sql_serveur : '';
105
+    if ($type == 'document') {
106
+        $qconnect = _q($connect);
107
+        $doc = "quete_document($_id_objet, $qconnect)";
108
+        if ($fichier) {
109
+            $code = "quete_logo_file($doc, $qconnect)";
110
+        } else {
111
+            $code = "quete_logo_document($doc, " . ($lien ? $lien : "''") . ", '$align', '$mode_logo', $coord_x, $coord_y, $qconnect)";
112
+        }
113
+        // (x=non-faux ? y : '') pour affecter x en retournant y
114
+        if ($p->descr['documents']) {
115
+            $code = '(($doublons["documents"] .= ",". '
116
+                . $_id_objet
117
+                . ") ? $code : '')";
118
+        }
119
+    } elseif ($connect) {
120
+        $code = "''";
121
+        spip_log('Les logos distants ne sont pas prevus');
122
+    } else {
123
+        $code = logo_survol($id_objet, $_id_objet, $type, $align, $fichier, $lien, $p, $suite_logo);
124
+    }
125
+
126
+    // demande de reduction sur logo avec ecriture spip 2.1 : #LOGO_xxx{200, 0}
127
+    if ($coord_x or $coord_y) {
128
+        $code = "filtrer('image_graver',filtrer('image_reduire'," . $code . ", '$coord_x', '$coord_y'))";
129
+    }
130
+
131
+    $p->code = $code;
132
+    $p->interdire_scripts = false;
133
+
134
+    return $p;
135 135
 }
136 136
 
137 137
 /**
@@ -158,41 +158,41 @@  discard block
 block discarded – undo
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," .
165
-		(($suite == '_RUBRIQUE') ?
166
-			champ_sql('id_rubrique', $p) :
167
-			(($type == 'rubrique') ? "quete_parent($_id_objet)" : "''")) .
168
-		', ' . intval($fichier) . ')';
169
-
170
-	if ($fichier) {
171
-		return $code;
172
-	}
173
-
174
-	// class spip_logos a supprimer ulterieurement (transition douce vers spip_logo)
175
-	// cf http://core.spip.net/issues/2483
176
-	$class = 'spip_logo ';
177
-	if ($align) {
178
-		$class .= "spip_logo_$align ";
179
-	}
180
-	$class .= 'spip_logos';
181
-	$style = '';
182
-	if (in_array($align, array('left', 'right'))) {
183
-		$style = "float:$align";
184
-		$align = '';
185
-	}
186
-	$code = "\n((!is_array(\$l = $code)) ? '':\n (" .
187
-		'"<img class=\"' . $class . '\" alt=\"\"' .
188
-		($style ? " style=\\\"$style\\\"" : '') .
189
-		($align ? " align=\\\"$align\\\"" : '') .
190
-		' src=\"$l[0]\"" . $l[2] .  ($l[1] ? " onmouseover=\"this.src=\'$l[1]\'\" onmouseout=\"this.src=\'$l[0]\'\"" : "") . \' />\'))';
191
-
192
-	if (!$lien) {
193
-		return $code;
194
-	}
195
-
196
-	return ('(strlen($logo=' . $code . ')?\'<a href="\' .' . $lien . ' . \'">\' . $logo . \'</a>\':\'\')');
161
+    $code = "quete_logo('$id_objet', '" .
162
+        (($suite == '_SURVOL') ? 'off' :
163
+            (($suite == '_NORMAL') ? 'on' : 'ON')) .
164
+        "', $_id_objet," .
165
+        (($suite == '_RUBRIQUE') ?
166
+            champ_sql('id_rubrique', $p) :
167
+            (($type == 'rubrique') ? "quete_parent($_id_objet)" : "''")) .
168
+        ', ' . intval($fichier) . ')';
169
+
170
+    if ($fichier) {
171
+        return $code;
172
+    }
173
+
174
+    // class spip_logos a supprimer ulterieurement (transition douce vers spip_logo)
175
+    // cf http://core.spip.net/issues/2483
176
+    $class = 'spip_logo ';
177
+    if ($align) {
178
+        $class .= "spip_logo_$align ";
179
+    }
180
+    $class .= 'spip_logos';
181
+    $style = '';
182
+    if (in_array($align, array('left', 'right'))) {
183
+        $style = "float:$align";
184
+        $align = '';
185
+    }
186
+    $code = "\n((!is_array(\$l = $code)) ? '':\n (" .
187
+        '"<img class=\"' . $class . '\" alt=\"\"' .
188
+        ($style ? " style=\\\"$style\\\"" : '') .
189
+        ($align ? " align=\\\"$align\\\"" : '') .
190
+        ' src=\"$l[0]\"" . $l[2] .  ($l[1] ? " onmouseover=\"this.src=\'$l[1]\'\" onmouseout=\"this.src=\'$l[0]\'\"" : "") . \' />\'))';
191
+
192
+    if (!$lien) {
193
+        return $code;
194
+    }
195
+
196
+    return ('(strlen($logo=' . $code . ')?\'<a href="\' .' . $lien . ' . \'">\' . $logo . \'</a>\':\'\')');
197 197
 
198 198
 }
Please login to merge, or discard this patch.
Spacing   +12 added lines, -14 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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;
@@ -183,16 +181,16 @@  discard block
 block discarded – undo
183 181
 		$style = "float:$align";
184 182
 		$align = '';
185 183
 	}
186
-	$code = "\n((!is_array(\$l = $code)) ? '':\n (" .
187
-		'"<img class=\"' . $class . '\" alt=\"\"' .
188
-		($style ? " style=\\\"$style\\\"" : '') .
189
-		($align ? " align=\\\"$align\\\"" : '') .
184
+	$code = "\n((!is_array(\$l = $code)) ? '':\n (".
185
+		'"<img class=\"'.$class.'\" alt=\"\"'.
186
+		($style ? " style=\\\"$style\\\"" : '').
187
+		($align ? " align=\\\"$align\\\"" : '').
190 188
 		' src=\"$l[0]\"" . $l[2] .  ($l[1] ? " onmouseover=\"this.src=\'$l[1]\'\" onmouseout=\"this.src=\'$l[0]\'\"" : "") . \' />\'))';
191 189
 
192 190
 	if (!$lien) {
193 191
 		return $code;
194 192
 	}
195 193
 
196
-	return ('(strlen($logo=' . $code . ')?\'<a href="\' .' . $lien . ' . \'">\' . $logo . \'</a>\':\'\')');
194
+	return ('(strlen($logo='.$code.')?\'<a href="\' .'.$lien.' . \'">\' . $logo . \'</a>\':\'\')');
197 195
 
198 196
 }
Please login to merge, or discard this patch.
ecrire/balise/url_.php 2 patches
Indentation   +155 added lines, -155 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
  **/
20 20
 
21 21
 if (!defined('_ECRIRE_INC_VERSION')) {
22
-	return;
22
+    return;
23 23
 }
24 24
 
25 25
 /**
@@ -37,14 +37,14 @@  discard block
 block discarded – undo
37 37
  *     Code compilé
38 38
  **/
39 39
 function generer_generer_url($type, $p) {
40
-	$_id = interprete_argument_balise(1, $p);
40
+    $_id = interprete_argument_balise(1, $p);
41 41
 
42
-	if (!$_id) {
43
-		$primary = id_table_objet($type);
44
-		$_id = champ_sql($primary, $p);
45
-	}
42
+    if (!$_id) {
43
+        $primary = id_table_objet($type);
44
+        $_id = champ_sql($primary, $p);
45
+    }
46 46
 
47
-	return generer_generer_url_arg($type, $p, $_id);
47
+    return generer_generer_url_arg($type, $p, $_id);
48 48
 }
49 49
 
50 50
 /**
@@ -73,29 +73,29 @@  discard block
 block discarded – undo
73 73
  *     Code compilé
74 74
  **/
75 75
 function generer_generer_url_arg($type, $p, $_id) {
76
-	if ($s = trouver_nom_serveur_distant($p)) {
77
-
78
-		// si une fonction de generation des url a ete definie pour ce connect l'utiliser
79
-		if (function_exists($f = 'generer_generer_url_' . $s)) {
80
-			return $f($type, $_id, $s);
81
-		}
82
-		if (!$GLOBALS['connexions'][strtolower($s)]['spip_connect_version']) {
83
-			return null;
84
-		}
85
-		$s = _q($s);
86
-		# exception des urls de documents sur un serveur distant...
87
-		if ($type == 'document') {
88
-			return
89
-				"quete_meta('adresse_site', $s) . '/' .\n\t" .
90
-				"quete_meta('dir_img', $s) . \n\t" .
91
-				"quete_fichier($_id,$s)";
92
-		}
93
-		$s = ", '', '', $s, quete_meta('type_urls', $s)";
94
-	} else {
95
-		$s = ", '', '', true";
96
-	}
97
-
98
-	return "urlencode_1738(generer_url_entite($_id, '$type'$s))";
76
+    if ($s = trouver_nom_serveur_distant($p)) {
77
+
78
+        // si une fonction de generation des url a ete definie pour ce connect l'utiliser
79
+        if (function_exists($f = 'generer_generer_url_' . $s)) {
80
+            return $f($type, $_id, $s);
81
+        }
82
+        if (!$GLOBALS['connexions'][strtolower($s)]['spip_connect_version']) {
83
+            return null;
84
+        }
85
+        $s = _q($s);
86
+        # exception des urls de documents sur un serveur distant...
87
+        if ($type == 'document') {
88
+            return
89
+                "quete_meta('adresse_site', $s) . '/' .\n\t" .
90
+                "quete_meta('dir_img', $s) . \n\t" .
91
+                "quete_fichier($_id,$s)";
92
+        }
93
+        $s = ", '', '', $s, quete_meta('type_urls', $s)";
94
+    } else {
95
+        $s = ", '', '', true";
96
+    }
97
+
98
+    return "urlencode_1738(generer_url_entite($_id, '$type'$s))";
99 99
 }
100 100
 
101 101
 
@@ -120,27 +120,27 @@  discard block
 block discarded – undo
120 120
  */
121 121
 function balise_URL__dist($p) {
122 122
 
123
-	$nom = $p->nom_champ;
124
-	if ($nom === 'URL_') {
125
-		$msg = array('zbug_balise_sans_argument', array('balise' => ' URL_'));
126
-		erreur_squelette($msg, $p);
127
-		$p->interdire_scripts = false;
128
-
129
-		return $p;
130
-	} elseif ($f = charger_fonction($nom, 'balise', true)) {
131
-		return $f($p);
132
-	} else {
133
-		$nom = strtolower($nom);
134
-		$code = generer_generer_url(substr($nom, 4), $p);
135
-		$code = champ_sql($nom, $p, $code);
136
-		$p->code = $code;
137
-		if (!$p->etoile) {
138
-			$p->code = "vider_url($code)";
139
-		}
140
-		$p->interdire_scripts = false;
141
-
142
-		return $p;
143
-	}
123
+    $nom = $p->nom_champ;
124
+    if ($nom === 'URL_') {
125
+        $msg = array('zbug_balise_sans_argument', array('balise' => ' URL_'));
126
+        erreur_squelette($msg, $p);
127
+        $p->interdire_scripts = false;
128
+
129
+        return $p;
130
+    } elseif ($f = charger_fonction($nom, 'balise', true)) {
131
+        return $f($p);
132
+    } else {
133
+        $nom = strtolower($nom);
134
+        $code = generer_generer_url(substr($nom, 4), $p);
135
+        $code = champ_sql($nom, $p, $code);
136
+        $p->code = $code;
137
+        if (!$p->etoile) {
138
+            $p->code = "vider_url($code)";
139
+        }
140
+        $p->interdire_scripts = false;
141
+
142
+        return $p;
143
+    }
144 144
 }
145 145
 
146 146
 /**
@@ -164,20 +164,20 @@  discard block
 block discarded – undo
164 164
  */
165 165
 function balise_URL_ARTICLE_dist($p) {
166 166
 
167
-	// Cas particulier des boucles (SYNDIC_ARTICLES)
168
-	if ($p->type_requete == 'syndic_articles') {
169
-		$code = champ_sql('url', $p);
170
-	} else {
171
-		$code = generer_generer_url('article', $p);
172
-	}
167
+    // Cas particulier des boucles (SYNDIC_ARTICLES)
168
+    if ($p->type_requete == 'syndic_articles') {
169
+        $code = champ_sql('url', $p);
170
+    } else {
171
+        $code = generer_generer_url('article', $p);
172
+    }
173 173
 
174
-	$p->code = $code;
175
-	if (!$p->etoile) {
176
-		$p->code = "vider_url($code)";
177
-	}
178
-	$p->interdire_scripts = false;
174
+    $p->code = $code;
175
+    if (!$p->etoile) {
176
+        $p->code = "vider_url($code)";
177
+    }
178
+    $p->interdire_scripts = false;
179 179
 
180
-	return $p;
180
+    return $p;
181 181
 }
182 182
 
183 183
 /**
@@ -197,21 +197,21 @@  discard block
 block discarded – undo
197 197
  *     Pile complétée par le code à générer
198 198
  */
199 199
 function balise_URL_SITE_dist($p) {
200
-	$code = champ_sql('url_site', $p);
201
-	if (strpos($code, '@$Pile[0]') !== false) {
202
-		$code = generer_generer_url('site', $p);
203
-		if ($code === null) {
204
-			return null;
205
-		}
206
-	} else {
207
-		if (!$p->etoile) {
208
-			$code = "calculer_url($code,'','url', \$connect)";
209
-		}
210
-	}
211
-	$p->code = $code;
212
-	$p->interdire_scripts = false;
213
-
214
-	return $p;
200
+    $code = champ_sql('url_site', $p);
201
+    if (strpos($code, '@$Pile[0]') !== false) {
202
+        $code = generer_generer_url('site', $p);
203
+        if ($code === null) {
204
+            return null;
205
+        }
206
+    } else {
207
+        if (!$p->etoile) {
208
+            $code = "calculer_url($code,'','url', \$connect)";
209
+        }
210
+    }
211
+    $p->code = $code;
212
+    $p->interdire_scripts = false;
213
+
214
+    return $p;
215 215
 }
216 216
 
217 217
 // Autres balises URL_*, qui ne concernent pas une table
@@ -230,11 +230,11 @@  discard block
 block discarded – undo
230 230
  *     Pile complétée par le code à générer
231 231
  */
232 232
 function balise_URL_SITE_SPIP_dist($p) {
233
-	$p->code = "sinon(\$GLOBALS['meta']['adresse_site'],'.')";
234
-	$p->code = "spip_htmlspecialchars(" . $p->code . ")";
235
-	$p->interdire_scripts = false;
233
+    $p->code = "sinon(\$GLOBALS['meta']['adresse_site'],'.')";
234
+    $p->code = "spip_htmlspecialchars(" . $p->code . ")";
235
+    $p->interdire_scripts = false;
236 236
 
237
-	return $p;
237
+    return $p;
238 238
 }
239 239
 
240 240
 
@@ -263,42 +263,42 @@  discard block
 block discarded – undo
263 263
  */
264 264
 function balise_URL_PAGE_dist($p) {
265 265
 
266
-	$code = interprete_argument_balise(1, $p);
267
-	$args = interprete_argument_balise(2, $p);
268
-	if ($args == null) {
269
-		$args = "''";
270
-	}
271
-
272
-	if ($s = trouver_nom_serveur_distant($p)) {
273
-		// si une fonction de generation des url a ete definie pour ce connect l'utiliser
274
-		// elle devra aussi traiter le cas derogatoire type=page
275
-		if (function_exists($f = 'generer_generer_url_' . $s)) {
276
-			if ($args and $args !== "''") {
277
-				$code .= ", $args";
278
-			}
279
-			$code = $f('page', $code, $s);
280
-
281
-			return $p;
282
-		}
283
-		$s = 'connect=' . addslashes($s);
284
-		$args = (($args and $args !== "''") ? "$args . '&$s'" : "'$s'");
285
-	}
286
-
287
-	if (!$code) {
288
-		$noentities = $p->etoile ? "'&'" : '';
289
-		$code = "url_de_base() . preg_replace(',^./,', '', self($noentities))";
290
-	} else {
291
-		if (!$args) {
292
-			$args = "''";
293
-		}
294
-		$noentities = $p->etoile ? ", true" : '';
295
-		$code = "generer_url_public($code, $args$noentities)";
296
-	}
297
-	$p->code = $code;
298
-	spip_log("Calcul url page : connect vaut $s ca donne :" . $p->code . " args $args", _LOG_INFO);
299
-
300
-	#$p->interdire_scripts = true;
301
-	return $p;
266
+    $code = interprete_argument_balise(1, $p);
267
+    $args = interprete_argument_balise(2, $p);
268
+    if ($args == null) {
269
+        $args = "''";
270
+    }
271
+
272
+    if ($s = trouver_nom_serveur_distant($p)) {
273
+        // si une fonction de generation des url a ete definie pour ce connect l'utiliser
274
+        // elle devra aussi traiter le cas derogatoire type=page
275
+        if (function_exists($f = 'generer_generer_url_' . $s)) {
276
+            if ($args and $args !== "''") {
277
+                $code .= ", $args";
278
+            }
279
+            $code = $f('page', $code, $s);
280
+
281
+            return $p;
282
+        }
283
+        $s = 'connect=' . addslashes($s);
284
+        $args = (($args and $args !== "''") ? "$args . '&$s'" : "'$s'");
285
+    }
286
+
287
+    if (!$code) {
288
+        $noentities = $p->etoile ? "'&'" : '';
289
+        $code = "url_de_base() . preg_replace(',^./,', '', self($noentities))";
290
+    } else {
291
+        if (!$args) {
292
+            $args = "''";
293
+        }
294
+        $noentities = $p->etoile ? ", true" : '';
295
+        $code = "generer_url_public($code, $args$noentities)";
296
+    }
297
+    $p->code = $code;
298
+    spip_log("Calcul url page : connect vaut $s ca donne :" . $p->code . " args $args", _LOG_INFO);
299
+
300
+    #$p->interdire_scripts = true;
301
+    return $p;
302 302
 }
303 303
 
304 304
 
@@ -325,24 +325,24 @@  discard block
 block discarded – undo
325 325
  */
326 326
 function balise_URL_ECRIRE_dist($p) {
327 327
 
328
-	$code = interprete_argument_balise(1, $p);
329
-	if (!$code) {
330
-		$fonc = "''";
331
-	} else {
332
-		$fonc = $code;
333
-		$args = interprete_argument_balise(2, $p);
334
-		if ($args === null) {
335
-			$args = "''";
336
-		}
337
-		$noentities = $p->etoile ? ", true" : '';
338
-		if (($args != "''") or $noentities) {
339
-			$fonc .= ",$args$noentities";
340
-		}
341
-	}
342
-	$p->code = 'generer_url_ecrire(' . $fonc . ')';
343
-	$p->interdire_scripts = false;
344
-
345
-	return $p;
328
+    $code = interprete_argument_balise(1, $p);
329
+    if (!$code) {
330
+        $fonc = "''";
331
+    } else {
332
+        $fonc = $code;
333
+        $args = interprete_argument_balise(2, $p);
334
+        if ($args === null) {
335
+            $args = "''";
336
+        }
337
+        $noentities = $p->etoile ? ", true" : '';
338
+        if (($args != "''") or $noentities) {
339
+            $fonc .= ",$args$noentities";
340
+        }
341
+    }
342
+    $p->code = 'generer_url_ecrire(' . $fonc . ')';
343
+    $p->interdire_scripts = false;
344
+
345
+    return $p;
346 346
 }
347 347
 
348 348
 
@@ -368,23 +368,23 @@  discard block
 block discarded – undo
368 368
  *     Pile complétée par le code à générer
369 369
  */
370 370
 function balise_URL_ACTION_AUTEUR_dist($p) {
371
-	$p->descr['session'] = true;
372
-
373
-	$p->code = interprete_argument_balise(1, $p);
374
-	$args = interprete_argument_balise(2, $p);
375
-	if ($args != "''" && $args !== null) {
376
-		$p->code .= "," . $args;
377
-	}
378
-	$redirect = interprete_argument_balise(3, $p);
379
-	if ($redirect != "''" && $redirect !== null) {
380
-		if ($args == "''" || $args === null) {
381
-			$p->code .= ",''";
382
-		}
383
-		$p->code .= "," . $redirect;
384
-	}
385
-
386
-	$p->code = "generer_action_auteur(" . $p->code . ")";
387
-	$p->interdire_scripts = false;
388
-
389
-	return $p;
371
+    $p->descr['session'] = true;
372
+
373
+    $p->code = interprete_argument_balise(1, $p);
374
+    $args = interprete_argument_balise(2, $p);
375
+    if ($args != "''" && $args !== null) {
376
+        $p->code .= "," . $args;
377
+    }
378
+    $redirect = interprete_argument_balise(3, $p);
379
+    if ($redirect != "''" && $redirect !== null) {
380
+        if ($args == "''" || $args === null) {
381
+            $p->code .= ",''";
382
+        }
383
+        $p->code .= "," . $redirect;
384
+    }
385
+
386
+    $p->code = "generer_action_auteur(" . $p->code . ")";
387
+    $p->interdire_scripts = false;
388
+
389
+    return $p;
390 390
 }
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 	if ($s = trouver_nom_serveur_distant($p)) {
77 77
 
78 78
 		// si une fonction de generation des url a ete definie pour ce connect l'utiliser
79
-		if (function_exists($f = 'generer_generer_url_' . $s)) {
79
+		if (function_exists($f = 'generer_generer_url_'.$s)) {
80 80
 			return $f($type, $_id, $s);
81 81
 		}
82 82
 		if (!$GLOBALS['connexions'][strtolower($s)]['spip_connect_version']) {
@@ -86,8 +86,8 @@  discard block
 block discarded – undo
86 86
 		# exception des urls de documents sur un serveur distant...
87 87
 		if ($type == 'document') {
88 88
 			return
89
-				"quete_meta('adresse_site', $s) . '/' .\n\t" .
90
-				"quete_meta('dir_img', $s) . \n\t" .
89
+				"quete_meta('adresse_site', $s) . '/' .\n\t".
90
+				"quete_meta('dir_img', $s) . \n\t".
91 91
 				"quete_fichier($_id,$s)";
92 92
 		}
93 93
 		$s = ", '', '', $s, quete_meta('type_urls', $s)";
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
  */
232 232
 function balise_URL_SITE_SPIP_dist($p) {
233 233
 	$p->code = "sinon(\$GLOBALS['meta']['adresse_site'],'.')";
234
-	$p->code = "spip_htmlspecialchars(" . $p->code . ")";
234
+	$p->code = "spip_htmlspecialchars(".$p->code.")";
235 235
 	$p->interdire_scripts = false;
236 236
 
237 237
 	return $p;
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
 	if ($s = trouver_nom_serveur_distant($p)) {
273 273
 		// si une fonction de generation des url a ete definie pour ce connect l'utiliser
274 274
 		// elle devra aussi traiter le cas derogatoire type=page
275
-		if (function_exists($f = 'generer_generer_url_' . $s)) {
275
+		if (function_exists($f = 'generer_generer_url_'.$s)) {
276 276
 			if ($args and $args !== "''") {
277 277
 				$code .= ", $args";
278 278
 			}
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
 
281 281
 			return $p;
282 282
 		}
283
-		$s = 'connect=' . addslashes($s);
283
+		$s = 'connect='.addslashes($s);
284 284
 		$args = (($args and $args !== "''") ? "$args . '&$s'" : "'$s'");
285 285
 	}
286 286
 
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
 		$code = "generer_url_public($code, $args$noentities)";
296 296
 	}
297 297
 	$p->code = $code;
298
-	spip_log("Calcul url page : connect vaut $s ca donne :" . $p->code . " args $args", _LOG_INFO);
298
+	spip_log("Calcul url page : connect vaut $s ca donne :".$p->code." args $args", _LOG_INFO);
299 299
 
300 300
 	#$p->interdire_scripts = true;
301 301
 	return $p;
@@ -339,7 +339,7 @@  discard block
 block discarded – undo
339 339
 			$fonc .= ",$args$noentities";
340 340
 		}
341 341
 	}
342
-	$p->code = 'generer_url_ecrire(' . $fonc . ')';
342
+	$p->code = 'generer_url_ecrire('.$fonc.')';
343 343
 	$p->interdire_scripts = false;
344 344
 
345 345
 	return $p;
@@ -373,17 +373,17 @@  discard block
 block discarded – undo
373 373
 	$p->code = interprete_argument_balise(1, $p);
374 374
 	$args = interprete_argument_balise(2, $p);
375 375
 	if ($args != "''" && $args !== null) {
376
-		$p->code .= "," . $args;
376
+		$p->code .= ",".$args;
377 377
 	}
378 378
 	$redirect = interprete_argument_balise(3, $p);
379 379
 	if ($redirect != "''" && $redirect !== null) {
380 380
 		if ($args == "''" || $args === null) {
381 381
 			$p->code .= ",''";
382 382
 		}
383
-		$p->code .= "," . $redirect;
383
+		$p->code .= ",".$redirect;
384 384
 	}
385 385
 
386
-	$p->code = "generer_action_auteur(" . $p->code . ")";
386
+	$p->code = "generer_action_auteur(".$p->code.")";
387 387
 	$p->interdire_scripts = false;
388 388
 
389 389
 	return $p;
Please login to merge, or discard this patch.
ecrire/balise/menu_lang.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
  **/
18 18
 
19 19
 if (!defined('_ECRIRE_INC_VERSION')) {
20
-	return;
20
+    return;
21 21
 }
22 22
 
23 23
 /**
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
  *     Pile complétée du code compilé
38 38
  **/
39 39
 function balise_MENU_LANG($p) {
40
-	return calculer_balise_dynamique($p, 'MENU_LANG', array('lang'));
40
+    return calculer_balise_dynamique($p, 'MENU_LANG', array('lang'));
41 41
 }
42 42
 
43 43
 /**
@@ -55,11 +55,11 @@  discard block
 block discarded – undo
55 55
  *   Liste (lang) des arguments collectés et fournis.
56 56
  */
57 57
 function balise_MENU_LANG_stat($args, $context_compil) {
58
-	if (strpos($GLOBALS['meta']['langues_multilingue'], ',') === false) {
59
-		return '';
60
-	}
58
+    if (strpos($GLOBALS['meta']['langues_multilingue'], ',') === false) {
59
+        return '';
60
+    }
61 61
 
62
-	return $args;
62
+    return $args;
63 63
 }
64 64
 
65 65
 /**
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
  *     Liste : Chemin du squelette, durée du cache, contexte
76 76
  **/
77 77
 function balise_MENU_LANG_dyn($opt) {
78
-	include_spip('balise/menu_lang_ecrire');
78
+    include_spip('balise/menu_lang_ecrire');
79 79
 
80
-	return menu_lang_pour_tous('var_lang', $opt);
80
+    return menu_lang_pour_tous('var_lang', $opt);
81 81
 }
Please login to merge, or discard this patch.