Completed
Pull Request — master (#39)
by
unknown
09:06
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/plugins/afficher_plugin.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -102,10 +102,12 @@
 block discarded – undo
102 102
 
103 103
 	// si le plugin CFG est la, l'essayer
104 104
 	if (defined('_DIR_PLUGIN_CFG')) {
105
-		if (include_spip('inc/cfg')) // test CFG version >= 1.0.5
105
+		if (include_spip('inc/cfg')) {
106
+		    // test CFG version >= 1.0.5
106 107
 		{
107 108
 			if ($cfg = icone_lien_cfg("$dir$nom", "cfg")) {
108 109
 				return "<div class='cfg_link'>$cfg</div>";
110
+		}
109 111
 			}
110 112
 		}
111 113
 	}
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/public/composer.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -357,10 +357,12 @@
 block discarded – undo
357 357
 
358 358
 	// et reparagrapher si necessaire (coherence avec le cas descriptif)
359 359
 	// une introduction a tojours un <p>
360
-	if ($GLOBALS['toujours_paragrapher']) // Fermer les paragraphes
360
+	if ($GLOBALS['toujours_paragrapher']) {
361
+	    // Fermer les paragraphes
361 362
 	{
362 363
 		$texte = paragrapher($texte, $GLOBALS['toujours_paragrapher']);
363 364
 	}
365
+	}
364 366
 
365 367
 	return $texte;
366 368
 }
Please login to merge, or discard this patch.
ecrire/public/assembler.php 1 patch
Braces   +9 added lines, -4 removed lines patch added patch discarded remove patch
@@ -469,9 +469,11 @@  discard block
 block discarded – undo
469 469
 				$contexte[$var] = $val;
470 470
 			} else {
471 471
 				$args = explode('=', $val);
472
-				if (count($args) >= 2) // Flashvars=arg1=machin&arg2=truc genere plus de deux args
472
+				if (count($args) >= 2) {
473
+				    // Flashvars=arg1=machin&arg2=truc genere plus de deux args
473 474
 				{
474 475
 					$contexte[trim($args[0])] = substr($val, strlen($args[0]) + 1);
476
+				}
475 477
 				} else // notation abregee
476 478
 				{
477 479
 					$contexte[trim($val)] = trim($val);
@@ -626,8 +628,8 @@  discard block
 block discarded – undo
626 628
 function page_base_href(&$texte) {
627 629
 	static $set_html_base = null;
628 630
 	if (is_null($set_html_base)) {
629
-		if (!defined('_SET_HTML_BASE'))
630
-			// si la profondeur est superieure a 1
631
+		if (!defined('_SET_HTML_BASE')) {
632
+					// si la profondeur est superieure a 1
631 633
 			// est que ce n'est pas une url page ni une url action
632 634
 			// activer par defaut
633 635
 		{
@@ -635,6 +637,7 @@  discard block
 block discarded – undo
635 637
 				$GLOBALS['profondeur_url'] >= (_DIR_RESTREINT ? 1 : 2)
636 638
 				and _request(_SPIP_PAGE) !== 'login'
637 639
 				and !_request('action')) ? true : false);
640
+		}
638 641
 		} else {
639 642
 			$set_html_base = _SET_HTML_BASE;
640 643
 		}
@@ -688,8 +691,10 @@  discard block
 block discarded – undo
688 691
 // et demarrent par X-Spip-...
689 692
 // http://code.spip.net/@envoyer_entetes
690 693
 function envoyer_entetes($entetes) {
691
-	foreach ($entetes as $k => $v) #	if (strncmp($k, 'X-Spip-', 7))
694
+	foreach ($entetes as $k => $v) {
695
+	    #	if (strncmp($k, 'X-Spip-', 7))
692 696
 	{
693 697
 		@header(strlen($v) ? "$k: $v" : $k);
694 698
 	}
699
+	}
695 700
 }
Please login to merge, or discard this patch.