Completed
Push — master ( 164984...4573fe )
by cam
05:19
created
ecrire/inc/plonger.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -34,9 +34,9 @@  discard block
 block discarded – undo
34 34
 
35 35
 	$res = sql_select("rub1.id_rubrique, rub1.titre, rub1.id_parent, rub1.lang, rub1.langue_choisie, rub2.id_rubrique AS id_enfant",
36 36
 		"spip_rubriques AS rub1 LEFT JOIN spip_rubriques AS rub2 ON (rub1.id_rubrique = rub2.id_parent)",
37
-		"rub1.id_parent = " . sql_quote($id_rubrique) . "
38
-			AND rub1.id_rubrique!=" . sql_quote($exclu) . "
39
-			AND (rub2.id_rubrique IS NULL OR rub2.id_rubrique!=" . sql_quote($exclu) . ")", "", "0+rub1.titre,rub1.titre");
37
+		"rub1.id_parent = ".sql_quote($id_rubrique)."
38
+			AND rub1.id_rubrique!=" . sql_quote($exclu)."
39
+			AND (rub2.id_rubrique IS NULL OR rub2.id_rubrique!=" . sql_quote($exclu).")", "", "0+rub1.titre,rub1.titre");
40 40
 
41 41
 	while ($row = sql_fetch($res)) {
42 42
 		if (autoriser('voir', 'rubrique', $row['id_rubrique'])) {
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 				if ($row['langue_choisie'] != 'oui') {
47 47
 					$t .= ' <small title="'
48 48
 						. traduire_nom_langue($row['lang'])
49
-						. '">[' . $row['lang'] . ']</small>';
49
+						. '">['.$row['lang'].']</small>';
50 50
 				}
51 51
 				$ordre[$row['id_rubrique']] = $t;
52 52
 			}
@@ -54,14 +54,14 @@  discard block
 block discarded – undo
54 54
 	}
55 55
 	$next = isset($list[$col]) ? $list[$col] : 0;
56 56
 	if ($ordre) {
57
-		$rec = generer_url_ecrire('plonger', "rac=$idom&exclus=$exclu&do=$do&col=" . ($col + 1));
57
+		$rec = generer_url_ecrire('plonger', "rac=$idom&exclus=$exclu&do=$do&col=".($col + 1));
58 58
 		$info = generer_url_ecrire('informer', "type=rubrique&rac=$idom&do=$do&id=");
59
-		$args = "'$idom',this,$col,'" . $GLOBALS['spip_lang_left'] . "','$info',event";
59
+		$args = "'$idom',this,$col,'".$GLOBALS['spip_lang_left']."','$info',event";
60 60
 
61 61
 		foreach ($ordre as $id => $titrebrut) {
62 62
 			$titre = supprimer_numero($titrebrut);
63 63
 
64
-			$classe1 = 'petit-item ' . ($id_rubrique ? 'petite-rubrique' : "petit-secteur");
64
+			$classe1 = 'petit-item '.($id_rubrique ? 'petite-rubrique' : "petit-secteur");
65 65
 			if (isset($rub[$id]["enfants"])) {
66 66
 				$classe2 = " class='rub-ouverte'";
67 67
 				$url = "\nhref='$rec&amp;id=$id'";
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 				$url = "\nhref='javascript:void(0)'";
71 71
 			}
72 72
 
73
-			$js_func = $do . '_selection_titre';
73
+			$js_func = $do.'_selection_titre';
74 74
 			$click = "\nonclick=\"changerhighlight(this.parentNode.parentNode.parentNode);\nreturn "
75 75
 				. (!is_array($list) ? ' false'
76 76
 					: "aff_selection_provisoire($id,$args)")
@@ -97,14 +97,14 @@  discard block
 block discarded – undo
97 97
 		}
98 98
 	}
99 99
 
100
-	$idom2 = $idom . "_col_" . ($col + 1);
100
+	$idom2 = $idom."_col_".($col + 1);
101 101
 	$left = ($col * 250);
102 102
 
103 103
 	return http_img_pack("loader.svg", "",
104
-		"class='loader' style='visibility: hidden; position: absolute; " . $GLOBALS['spip_lang_left'] . ": "
104
+		"class='loader' style='visibility: hidden; position: absolute; ".$GLOBALS['spip_lang_left'].": "
105 105
 		. ($left - 30)
106 106
 		. "px; top: 2px; z-index: 2;' id='img_$idom2'")
107
-	. "<div style='width: 250px; height: 100%; overflow: auto; position: absolute; top: 0px; " . $GLOBALS['spip_lang_left'] . ": "
107
+	. "<div style='width: 250px; height: 100%; overflow: auto; position: absolute; top: 0px; ".$GLOBALS['spip_lang_left'].": "
108 108
 	. ($left - 250)
109 109
 	. "px;'>"
110 110
 	. $ret
Please login to merge, or discard this patch.
ecrire/inc/selectionner.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 
55 55
 	if ($aff_racine) {
56 56
 		$info = generer_url_ecrire('informer', "type=rubrique&rac=$idom&do=$do&id=");
57
-		$idom3 = $idom . "_selection";
57
+		$idom3 = $idom."_selection";
58 58
 
59 59
 		$onClick = "jQuery(this).parent().addClass('on');jQuery('#choix_parent_principal .on').removeClass('on'); aff_selection(0, '$idom3', '$info', event);return false;";
60 60
 
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 				textebrut(_T('info_racine_site')))),
64 64
 			"\n\r", "  ");
65 65
 
66
-		$js_func = $do . '_selection_titre';
66
+		$js_func = $do.'_selection_titre';
67 67
 		$ondbClick = "$js_func('$ondbClick',0,'selection_rubrique','id_parent');";
68 68
 
69 69
 		$aff_racine = "<div class='petit-item petite-racine item'>"
@@ -104,12 +104,12 @@  discard block
 block discarded – undo
104 104
  **/
105 105
 function construire_selectionner_hierarchie($idom, $liste, $racine, $url, $name, $url_init = '') {
106 106
 
107
-	$idom1 = $idom . "_champ_recherche";
108
-	$idom2 = $idom . "_principal";
109
-	$idom3 = $idom . "_selection";
110
-	$idom4 = $idom . "_col_1";
111
-	$idom5 = 'img_' . $idom4;
112
-	$idom6 = $idom . "_fonc";
107
+	$idom1 = $idom."_champ_recherche";
108
+	$idom2 = $idom."_principal";
109
+	$idom3 = $idom."_selection";
110
+	$idom4 = $idom."_col_1";
111
+	$idom5 = 'img_'.$idom4;
112
+	$idom6 = $idom."_fonc";
113 113
 
114 114
 	return "<div id='$idom'>"
115 115
 	. "<a id='$idom6' style='visibility: hidden;'"
@@ -117,9 +117,9 @@  discard block
 block discarded – undo
117 117
 	. "></a>"
118 118
 	. "<div class='recherche_rapide_parent formulaire_recherche'>"
119 119
 	. http_img_pack("loader.svg", "",
120
-		"class='loader' style='visibility: hidden;float:" . $GLOBALS['spip_lang_right'] . "' id='$idom5'")
120
+		"class='loader' style='visibility: hidden;float:".$GLOBALS['spip_lang_right']."' id='$idom5'")
121 121
 	. ""
122
-	. "<input style='width: 10em;float:" . $GLOBALS['spip_lang_right'] . ";' type='text' class='text search' id='$idom1' placeholder='" . _T('info_rechercher') . "'"
122
+	. "<input style='width: 10em;float:".$GLOBALS['spip_lang_right'].";' type='text' class='text search' id='$idom1' placeholder='"._T('info_rechercher')."'"
123 123
 	// eliminer Return car il provoque la soumission (balise unique)
124 124
 	// et eliminer Tab pour la navigation au clavier
125 125
 	// ce serait encore mieux de ne le faire que s'il y a encore plusieurs
@@ -166,8 +166,8 @@  discard block
 block discarded – undo
166 166
 
167 167
 	$liste = $id_rubrique;
168 168
 	$id_rubrique = intval($id_rubrique);
169
-	while ($id_rubrique = sql_getfetsel("id_parent", "spip_rubriques", "id_rubrique = " . $id_rubrique)) {
170
-		$liste = $id_rubrique . ",$liste";
169
+	while ($id_rubrique = sql_getfetsel("id_parent", "spip_rubriques", "id_rubrique = ".$id_rubrique)) {
170
+		$liste = $id_rubrique.",$liste";
171 171
 	}
172 172
 
173 173
 	return explode(',', "0,$liste");
Please login to merge, or discard this patch.