Completed
Push — master ( 565410...3576c2 )
by cam
04:33
created
ecrire/inc/chercher_logo.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 	$mode = preg_replace(",\W,", '', $mode);
41 41
 	if ($mode) {
42 42
 		// chercher dans la base
43
-		$mode_document = 'logo' . $mode;
43
+		$mode_document = 'logo'.$mode;
44 44
 		$objet = objet_type($_id_objet);
45 45
 		$doc = sql_fetsel('D.*', 'spip_documents AS D JOIN spip_documents_liens AS L ON L.id_document=D.id_document', "D.mode=".sql_quote($mode_document)." AND L.objet=".sql_quote($objet)." AND id_objet=".intval($id));
46 46
 		if ($doc) {
@@ -51,10 +51,10 @@  discard block
 block discarded – undo
51 51
 		# TODO : deprecated
52 52
 		# attention au cas $id = '0' pour LOGO_SITE_SPIP : utiliser intval()
53 53
 		$type = type_du_logo($_id_objet);
54
-		$nom = $type . $mode . intval($id);
54
+		$nom = $type.$mode.intval($id);
55 55
 
56 56
 		foreach ($GLOBALS['formats_logos'] as $format) {
57
-			if (@file_exists($d = (_DIR_LOGOS . $nom . '.' . $format))) {
57
+			if (@file_exists($d = (_DIR_LOGOS.$nom.'.'.$format))) {
58 58
 				return array($d, _DIR_LOGOS, $nom, $format, @filemtime($d));
59 59
 			}
60 60
 		}
Please login to merge, or discard this patch.
ecrire/action/editer_logo.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -80,14 +80,14 @@  discard block
 block discarded – undo
80 80
 	include_spip('inc/chercher_logo');
81 81
 
82 82
 	$mode = preg_replace(",\W,", '', $etat);
83
-	if (!$mode){
83
+	if (!$mode) {
84 84
 		spip_log("logo_modifier : etat $etat invalide", 'logo');
85 85
 		$erreur = 'etat invalide';
86 86
 
87 87
 		return $erreur;
88 88
 	}
89 89
 	// chercher dans la base
90
-	$mode_document = 'logo' . $mode;
90
+	$mode_document = 'logo'.$mode;
91 91
 
92 92
 	// supprimer le logo eventueel existant
93 93
 	// TODO : si un logo existe, le modifier plutot que supprimer + reinserer (mais il faut gerer le cas ou il est utilise par plusieurs objets, donc pas si simple)
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 		$tmp_name = false;
111 111
 		if (file_exists($source)) {
112 112
 			$tmp_name = $source;
113
-		} elseif (file_exists($f = determine_upload() . $source)) {
113
+		} elseif (file_exists($f = determine_upload().$source)) {
114 114
 			$tmp_name = $f;
115 115
 		}
116 116
 		if (!$tmp_name) {
Please login to merge, or discard this patch.