Completed
Push — master ( 1d2283...7fdd0e )
by cam
04:59
created
ecrire/maj/v019.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -512,12 +512,14 @@
 block discarded – undo
512 512
 	)
513 513
 );
514 514
 
515
-if ($GLOBALS['meta']['version_installee'] > 1.950) // 1.950 lisait un bug dans auxiliaires.php corrige a present
515
+if ($GLOBALS['meta']['version_installee'] > 1.950) {
516
+    // 1.950 lisait un bug dans auxiliaires.php corrige a present
516 517
 {
517 518
 	$GLOBALS['maj'][1955] = array(
518 519
 		array('sql_alter', "TABLE spip_urls CHANGE `maj` date DATETIME DEFAULT '0000-00-00 00:00:00' NOT NULL")
519 520
 	);
520 521
 }
522
+}
521 523
 
522 524
 // la mise a jour vers 1.938 contient une erreur
523 525
 // il faut supprimer l'autoincrement avant de supprimer la PRIMARY KEY
Please login to merge, or discard this patch.
ecrire/genie/maintenance.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,10 +71,12 @@
 block discarded – undo
71 71
 			foreach ($GLOBALS[$com] as $table => $desc) {
72 72
 				if (!sql_select('*', $table, '', '', '', 1)
73 73
 					and !defined('spip_interdire_cache')
74
-				) # cas "LOST CONNECTION"
74
+				) {
75
+				    # cas "LOST CONNECTION"
75 76
 				{
76 77
 					$crash[] = $table;
77 78
 				}
79
+				}
78 80
 			}
79 81
 		}
80 82
 		#$crash[] = 'test';
Please login to merge, or discard this patch.
ecrire/public/cacher.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -187,9 +187,11 @@
 block discarded – undo
187 187
 	// Sinon comparer l'age du fichier a sa duree de cache
188 188
 	$duree = intval($page['entetes']['X-Spip-Cache']);
189 189
 	$cache_mark = (isset($GLOBALS['meta']['cache_mark']) ? $GLOBALS['meta']['cache_mark'] : 0);
190
-	if ($duree == 0)  #CACHE{0}
190
+	if ($duree == 0) {
191
+	    #CACHE{0}
191 192
 	{
192 193
 		return -1;
194
+	}
193 195
 	} // sauf pour les bots, qui utilisent toujours le cache
194 196
 	else {
195 197
 		if ((!_IS_BOT and $date + $duree < $now)
Please login to merge, or discard this patch.
ecrire/public/balises.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2884,8 +2884,7 @@
 block discarded – undo
2884 2884
 	$_const = interprete_argument_balise(1, $p);
2885 2885
 	if (!strlen($_const)) {
2886 2886
 		$p->code = "''";
2887
-	}
2888
-	else {
2887
+	} else {
2889 2888
 		$p->code = "(defined($_const)?constant($_const):'')";
2890 2889
 	}
2891 2890
 	$p->interdire_scripts = false;
Please login to merge, or discard this patch.
ecrire/public/evaluer_page.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -65,12 +65,10 @@
 block discarded – undo
65 65
 			$code = trim(highlight_string($code,true));
66 66
 			erreur_squelette("L".$erreur['line'].": ".$erreur['message']."<br />".$code,array($page['source'],'',$erreur['file'],'',$GLOBALS['spip_lang']));
67 67
 			$page['texte'] = "<!-- Erreur -->";
68
-		}
69
-		else {
68
+		} else {
70 69
 			$page['texte'] = ob_get_contents();
71 70
 		}
72
-	}
73
-	catch (Exception $e){
71
+	} catch (Exception $e){
74 72
 		$code = $page['texte'];
75 73
 		$GLOBALS['numero_ligne_php'] = 1;
76 74
 		if (!function_exists('numerote_ligne_php')){
Please login to merge, or discard this patch.
ecrire/public/debusquer.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -362,9 +362,11 @@  discard block
 block discarded – undo
362 362
 			if (!preg_match('/^(.*)(<\?.*\?>)(.*)$/s', $v[0], $r)) {
363 363
 				$y = substr_count($v[0], "\n");
364 364
 			} else {
365
-				if ($v[1][0] == '#') // balise dynamique
365
+				if ($v[1][0] == '#') {
366
+				    // balise dynamique
366 367
 				{
367 368
 					$incl = $GLOBALS['debug_objets']['resultat'][$v[2]];
369
+				}
368 370
 				} else // inclusion
369 371
 				{
370 372
 					$incl = $GLOBALS['debug_objets']['squelette'][trouve_squelette_inclus($v[0])];
@@ -397,12 +399,14 @@  discard block
 block discarded – undo
397 399
 	preg_match('/include\(.(.*).php3?.\);/', $script, $reg);
398 400
 	// si le script X.php n'est pas ecrire/public.php
399 401
 	// on suppose qu'il prend le squelette X.html (pas sur, mais y a pas mieux)
400
-	if ($reg[1] == 'ecrire/public') // si c'est bien ecrire/public on cherche le param 'fond'
402
+	if ($reg[1] == 'ecrire/public') {
403
+	    // si c'est bien ecrire/public on cherche le param 'fond'
401 404
 	{
402 405
 		if (!preg_match("/'fond' => '([^']*)'/", $script, $reg)) // a defaut on cherche le param 'page'
403 406
 		{
404 407
 			if (!preg_match("/'param' => '([^']*)'/", $script, $reg)) {
405 408
 				$reg[1] = "inconnu";
409
+	}
406 410
 			}
407 411
 		}
408 412
 	}
Please login to merge, or discard this patch.
ecrire/inc/cvt_multietapes.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -92,10 +92,12 @@
 block discarded – undo
92 92
 			$store = &$_GET;
93 93
 		}
94 94
 
95
-		foreach ($c as $k => $v) // on ecrase pas si saisi a nouveau !
95
+		foreach ($c as $k => $v) {
96
+		    // on ecrase pas si saisi a nouveau !
96 97
 		{
97 98
 			if (!isset($store[$k])) {
98 99
 				$_REQUEST[$k] = $store[$k] = $v;
100
+		}
99 101
 			} // mais si tableau des deux cotes, on merge avec priorite a la derniere saisie
100 102
 			elseif (is_array($store[$k])
101 103
 				and is_array($v)
Please login to merge, or discard this patch.
ecrire/inc/xml.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -154,9 +154,11 @@
 block discarded – undo
154 154
 			}
155 155
 			$content = substr($txt, 0, $p);
156 156
 			$txt = substr($txt, $p + $ncclos);
157
-			if ($profondeur == 0 or strpos($content, "<") === false) // eviter une recursion si pas utile
157
+			if ($profondeur == 0 or strpos($content, "<") === false) {
158
+			    // eviter une recursion si pas utile
158 159
 			{
159 160
 				$out[$tag][] = importer_charset($content, $charset);
161
+			}
160 162
 			}//$content;
161 163
 			else {
162 164
 				$out[$tag][] = spip_xml_parse($content, $strict, $clean, $profondeur - 1);
Please login to merge, or discard this patch.
ecrire/inc/queue.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -429,9 +429,11 @@
 block discarded – undo
429 429
 	if ($periode = queue_is_cron_job($row['fonction'], $row['inclure'])) {
430 430
 		// relancer avec les nouveaux arguments de temps
431 431
 		include_spip('inc/genie');
432
-		if ($result < 0) // relancer tout de suite, mais en baissant la priorite
432
+		if ($result < 0) {
433
+		    // relancer tout de suite, mais en baissant la priorite
433 434
 		{
434 435
 			queue_genie_replan_job($row['fonction'], $periode, 0 - $result, null, $row['priorite'] - 1);
436
+		}
435 437
 		} else // relancer avec la periode prevue
436 438
 		{
437 439
 			queue_genie_replan_job($row['fonction'], $periode, $time);
Please login to merge, or discard this patch.