Completed
Push — spip-3.0 ( e817f1...17e51e )
by cam
13:14 queued 05:30
created
ecrire/exec/install.php 2 patches
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -22,30 +22,30 @@
 block discarded – undo
22 22
 // http://doc.spip.org/@exec_install_dist
23 23
 function exec_install_dist()
24 24
 {
25
-	$etape = _request('etape');
26
-	$deja = (_FILE_CONNECT AND analyse_fichier_connection(_FILE_CONNECT));
27
-
28
-	// Si deja installe, on n'a plus le droit qu'a l'etape chmod
29
-	// pour chgt post-install ou aux etapes supplementaires
30
-	// de declaration de base externes.
31
-	// Mais alors il faut authentifier car ecrire/index.php l'a omis
32
-
33
-	if ($deja AND in_array($etape, array('chmod', 'sup1', 'sup2'))) {
34
-
35
-		$auth = charger_fonction('auth', 'inc');
36
-		if (!$auth()) {
37
-			verifier_visiteur();
38
-			$deja = (!autoriser('configurer'));
39
-		}
40
-	}
41
-	if ($deja) {
42
-		// Rien a faire ici
43
-	  	echo minipres();
44
-	} else {
45
-		include_spip('base/create');
46
-		$fonc = charger_fonction("etape_$etape", 'install');
47
-		$fonc();
48
-	}
25
+    $etape = _request('etape');
26
+    $deja = (_FILE_CONNECT AND analyse_fichier_connection(_FILE_CONNECT));
27
+
28
+    // Si deja installe, on n'a plus le droit qu'a l'etape chmod
29
+    // pour chgt post-install ou aux etapes supplementaires
30
+    // de declaration de base externes.
31
+    // Mais alors il faut authentifier car ecrire/index.php l'a omis
32
+
33
+    if ($deja AND in_array($etape, array('chmod', 'sup1', 'sup2'))) {
34
+
35
+        $auth = charger_fonction('auth', 'inc');
36
+        if (!$auth()) {
37
+            verifier_visiteur();
38
+            $deja = (!autoriser('configurer'));
39
+        }
40
+    }
41
+    if ($deja) {
42
+        // Rien a faire ici
43
+            echo minipres();
44
+    } else {
45
+        include_spip('base/create');
46
+        $fonc = charger_fonction("etape_$etape", 'install');
47
+        $fonc();
48
+    }
49 49
 }
50 50
 
51 51
 ?>
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,9 @@
 block discarded – undo
10 10
  *  Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne.   *
11 11
 \***************************************************************************/
12 12
 
13
-if (!defined('_ECRIRE_INC_VERSION')) return;
13
+if (!defined('_ECRIRE_INC_VERSION')) {
14
+    return;
15
+}
14 16
 
15 17
 include_spip('inc/minipres');
16 18
 include_spip('inc/install');
Please login to merge, or discard this patch.
ecrire/exec/informer.php 2 patches
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -19,17 +19,17 @@
 block discarded – undo
19 19
 // http://doc.spip.org/@exec_informer_dist
20 20
 function exec_informer_dist()
21 21
 {
22
-	$id = intval(_request('id'));
23
-	$col = intval(_request('col'));
24
-	$exclus = intval(_request('exclus'));
25
-	$do = _request('do');
22
+    $id = intval(_request('id'));
23
+    $col = intval(_request('col'));
24
+    $exclus = intval(_request('exclus'));
25
+    $do = _request('do');
26 26
 
27
-	if (preg_match('/^\w*$/', $do)) {
28
-		if (!$do) $do = 'aff';
27
+    if (preg_match('/^\w*$/', $do)) {
28
+        if (!$do) $do = 'aff';
29 29
 	
30
-		$informer = charger_fonction('informer', 'inc');
31
-		$res = $informer($id, $col, $exclus, _request('rac'), _request('type'), $do);
32
-	} else $res = '';
33
-	ajax_retour($res);
30
+        $informer = charger_fonction('informer', 'inc');
31
+        $res = $informer($id, $col, $exclus, _request('rac'), _request('type'), $do);
32
+    } else $res = '';
33
+    ajax_retour($res);
34 34
 }
35 35
 ?>
Please login to merge, or discard this patch.
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -10,7 +10,9 @@  discard block
 block discarded – undo
10 10
  *  Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne.   *
11 11
 \***************************************************************************/
12 12
 
13
-if (!defined('_ECRIRE_INC_VERSION')) return;
13
+if (!defined('_ECRIRE_INC_VERSION')) {
14
+    return;
15
+}
14 16
 
15 17
 include_spip('inc/actions');
16 18
 
@@ -25,11 +27,15 @@  discard block
 block discarded – undo
25 27
 	$do = _request('do');
26 28
 
27 29
 	if (preg_match('/^\w*$/', $do)) {
28
-		if (!$do) $do = 'aff';
30
+		if (!$do) {
31
+		    $do = 'aff';
32
+		}
29 33
 	
30 34
 		$informer = charger_fonction('informer', 'inc');
31 35
 		$res = $informer($id, $col, $exclus, _request('rac'), _request('type'), $do);
32
-	} else $res = '';
36
+	} else {
37
+	    $res = '';
38
+	}
33 39
 	ajax_retour($res);
34 40
 }
35 41
 ?>
Please login to merge, or discard this patch.
ecrire/exec/403.php 3 patches
Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -17,37 +17,37 @@
 block discarded – undo
17 17
  */
18 18
 function exec_403_dist(){
19 19
 
20
-	$exec = _request('exec');
20
+    $exec = _request('exec');
21 21
 
22
-	$titre = "exec_$exec";
23
-	$navigation = "";
24
-	$extra = "";
22
+    $titre = "exec_$exec";
23
+    $navigation = "";
24
+    $extra = "";
25 25
 
26
-	$contenu = "<h1>"._T('info_acces_interdit')."</h1>"
27
-		. _L("Vous n'avez pas le droit d'acc&eacute;der à la page <b>@exec@</b>.",array('exec'=>_request('exec')));
26
+    $contenu = "<h1>"._T('info_acces_interdit')."</h1>"
27
+        . _L("Vous n'avez pas le droit d'acc&eacute;der à la page <b>@exec@</b>.",array('exec'=>_request('exec')));
28 28
 
29
-	if (_request('var_zajax')) {
30
-		include_spip('inc/actions');
31
-		ajax_retour($contenu);
32
-	}
33
-	else {
34
-		include_spip('inc/presentation'); // alleger les inclusions avec un inc/presentation_mini
29
+    if (_request('var_zajax')) {
30
+        include_spip('inc/actions');
31
+        ajax_retour($contenu);
32
+    }
33
+    else {
34
+        include_spip('inc/presentation'); // alleger les inclusions avec un inc/presentation_mini
35 35
 
36
-		$commencer_page = charger_fonction('commencer_page','inc');
37
-		echo $commencer_page($titre);
36
+        $commencer_page = charger_fonction('commencer_page','inc');
37
+        echo $commencer_page($titre);
38 38
 
39
-		echo debut_gauche("403_$exec",true);
40
-		echo recuperer_fond('prive/squelettes/navigation/dist',array());
41
-		echo pipeline('affiche_gauche',array('args'=>array('exec'=>'403','exec_erreur'=>$exec),'data'=>''));
39
+        echo debut_gauche("403_$exec",true);
40
+        echo recuperer_fond('prive/squelettes/navigation/dist',array());
41
+        echo pipeline('affiche_gauche',array('args'=>array('exec'=>'403','exec_erreur'=>$exec),'data'=>''));
42 42
 
43
-		echo creer_colonne_droite("403",true);
44
-		echo pipeline('affiche_droite',array('args'=>array('exec'=>'403','exec_erreur'=>$exec),'data'=>''));
43
+        echo creer_colonne_droite("403",true);
44
+        echo pipeline('affiche_droite',array('args'=>array('exec'=>'403','exec_erreur'=>$exec),'data'=>''));
45 45
 
46
-		echo debut_droite("403",true);
47
-		echo pipeline('affiche_milieu',array('args'=>array('exec'=>'403','exec_erreur'=>$exec),'data'=>$contenu));
46
+        echo debut_droite("403",true);
47
+        echo pipeline('affiche_milieu',array('args'=>array('exec'=>'403','exec_erreur'=>$exec),'data'=>$contenu));
48 48
 
49
-		echo fin_gauche(),fin_page();
50
-	}
49
+        echo fin_gauche(),fin_page();
50
+    }
51 51
 }
52 52
 
53 53
 ?>
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 /**
16 16
  * Un exec d'acces interdit
17 17
  */
18
-function exec_403_dist(){
18
+function exec_403_dist() {
19 19
 
20 20
 	$exec = _request('exec');
21 21
 
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 	$extra = "";
25 25
 
26 26
 	$contenu = "<h1>"._T('info_acces_interdit')."</h1>"
27
-		. _L("Vous n'avez pas le droit d'acc&eacute;der à la page <b>@exec@</b>.",array('exec'=>_request('exec')));
27
+		. _L("Vous n'avez pas le droit d'acc&eacute;der à la page <b>@exec@</b>.", array('exec'=>_request('exec')));
28 28
 
29 29
 	if (_request('var_zajax')) {
30 30
 		include_spip('inc/actions');
@@ -33,20 +33,20 @@  discard block
 block discarded – undo
33 33
 	else {
34 34
 		include_spip('inc/presentation'); // alleger les inclusions avec un inc/presentation_mini
35 35
 
36
-		$commencer_page = charger_fonction('commencer_page','inc');
36
+		$commencer_page = charger_fonction('commencer_page', 'inc');
37 37
 		echo $commencer_page($titre);
38 38
 
39
-		echo debut_gauche("403_$exec",true);
40
-		echo recuperer_fond('prive/squelettes/navigation/dist',array());
41
-		echo pipeline('affiche_gauche',array('args'=>array('exec'=>'403','exec_erreur'=>$exec),'data'=>''));
39
+		echo debut_gauche("403_$exec", true);
40
+		echo recuperer_fond('prive/squelettes/navigation/dist', array());
41
+		echo pipeline('affiche_gauche', array('args'=>array('exec'=>'403', 'exec_erreur'=>$exec), 'data'=>''));
42 42
 
43
-		echo creer_colonne_droite("403",true);
44
-		echo pipeline('affiche_droite',array('args'=>array('exec'=>'403','exec_erreur'=>$exec),'data'=>''));
43
+		echo creer_colonne_droite("403", true);
44
+		echo pipeline('affiche_droite', array('args'=>array('exec'=>'403', 'exec_erreur'=>$exec), 'data'=>''));
45 45
 
46
-		echo debut_droite("403",true);
47
-		echo pipeline('affiche_milieu',array('args'=>array('exec'=>'403','exec_erreur'=>$exec),'data'=>$contenu));
46
+		echo debut_droite("403", true);
47
+		echo pipeline('affiche_milieu', array('args'=>array('exec'=>'403', 'exec_erreur'=>$exec), 'data'=>$contenu));
48 48
 
49
-		echo fin_gauche(),fin_page();
49
+		echo fin_gauche(), fin_page();
50 50
 	}
51 51
 }
52 52
 
Please login to merge, or discard this patch.
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -10,7 +10,9 @@  discard block
 block discarded – undo
10 10
  *  Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne.   *
11 11
 \***************************************************************************/
12 12
 
13
-if (!defined('_ECRIRE_INC_VERSION')) return;
13
+if (!defined('_ECRIRE_INC_VERSION')) {
14
+    return;
15
+}
14 16
 
15 17
 /**
16 18
  * Un exec d'acces interdit
@@ -29,8 +31,7 @@  discard block
 block discarded – undo
29 31
 	if (_request('var_zajax')) {
30 32
 		include_spip('inc/actions');
31 33
 		ajax_retour($contenu);
32
-	}
33
-	else {
34
+	} else {
34 35
 		include_spip('inc/presentation'); // alleger les inclusions avec un inc/presentation_mini
35 36
 
36 37
 		$commencer_page = charger_fonction('commencer_page','inc');
Please login to merge, or discard this patch.
ecrire/exec/base_delete_all.php 3 patches
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -15,30 +15,30 @@
 block discarded – undo
15 15
 // http://doc.spip.org/@exec_delete_all_dist
16 16
 function exec_base_delete_all_dist()
17 17
 {
18
-	include_spip('inc/autoriser');
19
-	if (!autoriser('detruire')) {
20
-		include_spip('inc/minipres');
21
-		echo minipres();
22
-	} else {
23
-		include_spip('base/dump');
24
-		$res = base_lister_toutes_tables('',array(),array(),true);
25
-		if (!$res) {
26
-		  	include_spip('inc/minipres');
27
-			spip_log("Erreur base de donnees");
28
-			echo minipres(_T('info_travaux_titre'), _T('titre_probleme_technique'). "<p><tt>".sql_errno()." ".sql_error()."</tt></p>");
29
-		} else {
30
-			$res = base_saisie_tables('delete', $res);
31
-			include_spip('inc/headers');
32
-			$res = "\n<ol style='text-align:left'><li>\n" .
33
-			  join("</li>\n<li>", $res) .
34
-			  '</li></ol>';
35
-			$admin = charger_fonction('admin', 'inc');
36
-			$res = $admin('delete_all', _T('titre_page_delete_all'), $res);
37
-			if (!$res)
38
-				redirige_url_ecrire('install','');
39
-			else echo $res;
40
-		}
41
-	}
18
+    include_spip('inc/autoriser');
19
+    if (!autoriser('detruire')) {
20
+        include_spip('inc/minipres');
21
+        echo minipres();
22
+    } else {
23
+        include_spip('base/dump');
24
+        $res = base_lister_toutes_tables('',array(),array(),true);
25
+        if (!$res) {
26
+                include_spip('inc/minipres');
27
+            spip_log("Erreur base de donnees");
28
+            echo minipres(_T('info_travaux_titre'), _T('titre_probleme_technique'). "<p><tt>".sql_errno()." ".sql_error()."</tt></p>");
29
+        } else {
30
+            $res = base_saisie_tables('delete', $res);
31
+            include_spip('inc/headers');
32
+            $res = "\n<ol style='text-align:left'><li>\n" .
33
+                join("</li>\n<li>", $res) .
34
+                '</li></ol>';
35
+            $admin = charger_fonction('admin', 'inc');
36
+            $res = $admin('delete_all', _T('titre_page_delete_all'), $res);
37
+            if (!$res)
38
+                redirige_url_ecrire('install','');
39
+            else echo $res;
40
+        }
41
+    }
42 42
 }
43 43
 
44 44
 ?>
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -21,21 +21,21 @@
 block discarded – undo
21 21
 		echo minipres();
22 22
 	} else {
23 23
 		include_spip('base/dump');
24
-		$res = base_lister_toutes_tables('',array(),array(),true);
24
+		$res = base_lister_toutes_tables('', array(), array(), true);
25 25
 		if (!$res) {
26 26
 		  	include_spip('inc/minipres');
27 27
 			spip_log("Erreur base de donnees");
28
-			echo minipres(_T('info_travaux_titre'), _T('titre_probleme_technique'). "<p><tt>".sql_errno()." ".sql_error()."</tt></p>");
28
+			echo minipres(_T('info_travaux_titre'), _T('titre_probleme_technique')."<p><tt>".sql_errno()." ".sql_error()."</tt></p>");
29 29
 		} else {
30 30
 			$res = base_saisie_tables('delete', $res);
31 31
 			include_spip('inc/headers');
32
-			$res = "\n<ol style='text-align:left'><li>\n" .
33
-			  join("</li>\n<li>", $res) .
32
+			$res = "\n<ol style='text-align:left'><li>\n".
33
+			  join("</li>\n<li>", $res).
34 34
 			  '</li></ol>';
35 35
 			$admin = charger_fonction('admin', 'inc');
36 36
 			$res = $admin('delete_all', _T('titre_page_delete_all'), $res);
37 37
 			if (!$res)
38
-				redirige_url_ecrire('install','');
38
+				redirige_url_ecrire('install', '');
39 39
 			else echo $res;
40 40
 		}
41 41
 	}
Please login to merge, or discard this patch.
Braces   +8 added lines, -4 removed lines patch added patch discarded remove patch
@@ -10,7 +10,9 @@  discard block
 block discarded – undo
10 10
  *  Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne.   *
11 11
 \***************************************************************************/
12 12
 
13
-if (!defined('_ECRIRE_INC_VERSION')) return;
13
+if (!defined('_ECRIRE_INC_VERSION')) {
14
+    return;
15
+}
14 16
 
15 17
 // http://doc.spip.org/@exec_delete_all_dist
16 18
 function exec_base_delete_all_dist()
@@ -34,9 +36,11 @@  discard block
 block discarded – undo
34 36
 			  '</li></ol>';
35 37
 			$admin = charger_fonction('admin', 'inc');
36 38
 			$res = $admin('delete_all', _T('titre_page_delete_all'), $res);
37
-			if (!$res)
38
-				redirige_url_ecrire('install','');
39
-			else echo $res;
39
+			if (!$res) {
40
+							redirige_url_ecrire('install','');
41
+			} else {
42
+			    echo $res;
43
+			}
40 44
 		}
41 45
 	}
42 46
 }
Please login to merge, or discard this patch.
ecrire/exec/info_plugin.php 3 patches
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -5,23 +5,23 @@
 block discarded – undo
5 5
 include_spip('inc/actions');
6 6
 // http://doc.spip.org/@exec_info_plugin_dist
7 7
 function exec_info_plugin_dist() {
8
-	if (!autoriser('configurer', '_plugins')) {
9
-		include_spip('inc/minipres');
10
-		echo minipres();
11
-	} else {
12
-		$plug = _DIR_RACINE . _request('plugin');
13
-		$get_infos = charger_fonction('get_infos','plugins');
14
-		$dir = "";
15
-		if (strncmp($plug,_DIR_PLUGINS,strlen(_DIR_PLUGINS))==0)
16
-			$dir = _DIR_PLUGINS;
17
-		elseif (strncmp($plug,_DIR_PLUGINS_DIST,strlen(_DIR_PLUGINS_DIST))==0)
18
-			$dir = _DIR_PLUGINS_DIST;
19
-		if ($dir)
20
-			$plug = substr($plug,strlen($dir));
21
-		$info = $get_infos($plug,false,$dir);
22
-		$afficher_plugin = charger_fonction("afficher_plugin","plugins");
23
-		ajax_retour(affiche_bloc_plugin($plug, $info, $dir));
24
-	}
8
+    if (!autoriser('configurer', '_plugins')) {
9
+        include_spip('inc/minipres');
10
+        echo minipres();
11
+    } else {
12
+        $plug = _DIR_RACINE . _request('plugin');
13
+        $get_infos = charger_fonction('get_infos','plugins');
14
+        $dir = "";
15
+        if (strncmp($plug,_DIR_PLUGINS,strlen(_DIR_PLUGINS))==0)
16
+            $dir = _DIR_PLUGINS;
17
+        elseif (strncmp($plug,_DIR_PLUGINS_DIST,strlen(_DIR_PLUGINS_DIST))==0)
18
+            $dir = _DIR_PLUGINS_DIST;
19
+        if ($dir)
20
+            $plug = substr($plug,strlen($dir));
21
+        $info = $get_infos($plug,false,$dir);
22
+        $afficher_plugin = charger_fonction("afficher_plugin","plugins");
23
+        ajax_retour(affiche_bloc_plugin($plug, $info, $dir));
24
+    }
25 25
 }
26 26
 
27 27
 ?>
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -9,17 +9,17 @@
 block discarded – undo
9 9
 		include_spip('inc/minipres');
10 10
 		echo minipres();
11 11
 	} else {
12
-		$plug = _DIR_RACINE . _request('plugin');
13
-		$get_infos = charger_fonction('get_infos','plugins');
12
+		$plug = _DIR_RACINE._request('plugin');
13
+		$get_infos = charger_fonction('get_infos', 'plugins');
14 14
 		$dir = "";
15
-		if (strncmp($plug,_DIR_PLUGINS,strlen(_DIR_PLUGINS))==0)
15
+		if (strncmp($plug, _DIR_PLUGINS, strlen(_DIR_PLUGINS)) == 0)
16 16
 			$dir = _DIR_PLUGINS;
17
-		elseif (strncmp($plug,_DIR_PLUGINS_DIST,strlen(_DIR_PLUGINS_DIST))==0)
17
+		elseif (strncmp($plug, _DIR_PLUGINS_DIST, strlen(_DIR_PLUGINS_DIST)) == 0)
18 18
 			$dir = _DIR_PLUGINS_DIST;
19 19
 		if ($dir)
20
-			$plug = substr($plug,strlen($dir));
21
-		$info = $get_infos($plug,false,$dir);
22
-		$afficher_plugin = charger_fonction("afficher_plugin","plugins");
20
+			$plug = substr($plug, strlen($dir));
21
+		$info = $get_infos($plug, false, $dir);
22
+		$afficher_plugin = charger_fonction("afficher_plugin", "plugins");
23 23
 		ajax_retour(affiche_bloc_plugin($plug, $info, $dir));
24 24
 	}
25 25
 }
Please login to merge, or discard this patch.
Braces   +11 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,6 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (!defined('_ECRIRE_INC_VERSION')) return;
3
+if (!defined('_ECRIRE_INC_VERSION')) {
4
+    return;
5
+}
4 6
 
5 7
 include_spip('inc/actions');
6 8
 // http://doc.spip.org/@exec_info_plugin_dist
@@ -12,12 +14,14 @@  discard block
 block discarded – undo
12 14
 		$plug = _DIR_RACINE . _request('plugin');
13 15
 		$get_infos = charger_fonction('get_infos','plugins');
14 16
 		$dir = "";
15
-		if (strncmp($plug,_DIR_PLUGINS,strlen(_DIR_PLUGINS))==0)
16
-			$dir = _DIR_PLUGINS;
17
-		elseif (strncmp($plug,_DIR_PLUGINS_DIST,strlen(_DIR_PLUGINS_DIST))==0)
18
-			$dir = _DIR_PLUGINS_DIST;
19
-		if ($dir)
20
-			$plug = substr($plug,strlen($dir));
17
+		if (strncmp($plug,_DIR_PLUGINS,strlen(_DIR_PLUGINS))==0) {
18
+					$dir = _DIR_PLUGINS;
19
+		} elseif (strncmp($plug,_DIR_PLUGINS_DIST,strlen(_DIR_PLUGINS_DIST))==0) {
20
+					$dir = _DIR_PLUGINS_DIST;
21
+		}
22
+		if ($dir) {
23
+					$plug = substr($plug,strlen($dir));
24
+		}
21 25
 		$info = $get_infos($plug,false,$dir);
22 26
 		$afficher_plugin = charger_fonction("afficher_plugin","plugins");
23 27
 		ajax_retour(affiche_bloc_plugin($plug, $info, $dir));
Please login to merge, or discard this patch.
ecrire/exec/base_repair.php 3 patches
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -25,25 +25,25 @@
 block discarded – undo
25 25
  */
26 26
 function exec_base_repair_dist()
27 27
 {
28
-	$ok = false;
29
-	if (!spip_connect())
30
-		$message =  _T('titre_probleme_technique');
31
-	else {
32
-		$version_sql = sql_version();
33
-		if (!$version_sql)
34
-			$message = _T('avis_erreur_connexion_mysql');
35
-		else {
36
-			$message = _T('texte_requetes_echouent');
37
-			$ok = true;
38
-		}
39
-		$action = _T('texte_tenter_reparation');
40
-	}
41
-	if ($ok) {
42
-		$admin = charger_fonction('admin', 'inc');
43
-		echo $admin('repair', $action, $message, true);
44
-	} else {
45
-		include_spip('inc/minipres');
46
-		echo minipres(_T('titre_reparation'), "<p>$message</p>");
47
-	}
28
+    $ok = false;
29
+    if (!spip_connect())
30
+        $message =  _T('titre_probleme_technique');
31
+    else {
32
+        $version_sql = sql_version();
33
+        if (!$version_sql)
34
+            $message = _T('avis_erreur_connexion_mysql');
35
+        else {
36
+            $message = _T('texte_requetes_echouent');
37
+            $ok = true;
38
+        }
39
+        $action = _T('texte_tenter_reparation');
40
+    }
41
+    if ($ok) {
42
+        $admin = charger_fonction('admin', 'inc');
43
+        echo $admin('repair', $action, $message, true);
44
+    } else {
45
+        include_spip('inc/minipres');
46
+        echo minipres(_T('titre_reparation'), "<p>$message</p>");
47
+    }
48 48
 }
49 49
 ?>
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
 {
28 28
 	$ok = false;
29 29
 	if (!spip_connect())
30
-		$message =  _T('titre_probleme_technique');
30
+		$message = _T('titre_probleme_technique');
31 31
 	else {
32 32
 		$version_sql = sql_version();
33 33
 		if (!$version_sql)
Please login to merge, or discard this patch.
Braces   +9 added lines, -7 removed lines patch added patch discarded remove patch
@@ -10,7 +10,9 @@  discard block
 block discarded – undo
10 10
  *  Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne.   *
11 11
 \***************************************************************************/
12 12
 
13
-if (!defined('_ECRIRE_INC_VERSION')) return;
13
+if (!defined('_ECRIRE_INC_VERSION')) {
14
+    return;
15
+}
14 16
 
15 17
 /*
16 18
  * REMARQUE IMPORTANTE : SECURITE
@@ -26,13 +28,13 @@  discard block
 block discarded – undo
26 28
 function exec_base_repair_dist()
27 29
 {
28 30
 	$ok = false;
29
-	if (!spip_connect())
30
-		$message =  _T('titre_probleme_technique');
31
-	else {
31
+	if (!spip_connect()) {
32
+			$message =  _T('titre_probleme_technique');
33
+	} else {
32 34
 		$version_sql = sql_version();
33
-		if (!$version_sql)
34
-			$message = _T('avis_erreur_connexion_mysql');
35
-		else {
35
+		if (!$version_sql) {
36
+					$message = _T('avis_erreur_connexion_mysql');
37
+		} else {
36 38
 			$message = _T('texte_requetes_echouent');
37 39
 			$ok = true;
38 40
 		}
Please login to merge, or discard this patch.
ecrire/exec/puce_statut.php 3 patches
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -17,31 +17,31 @@
 block discarded – undo
17 17
 // http://doc.spip.org/@exec_puce_statut_dist
18 18
 function exec_puce_statut_dist()
19 19
 {
20
-	exec_puce_statut_args(_request('id'),  _request('type'));
20
+    exec_puce_statut_args(_request('id'),  _request('type'));
21 21
 }
22 22
 
23 23
 // http://doc.spip.org/@exec_puce_statut_args
24 24
 function exec_puce_statut_args($id, $type)
25 25
 {
26
-	if ($table_objet_sql = table_objet_sql($type)
27
-		AND $d = lister_tables_objets_sql($table_objet_sql)
28
-		AND isset($d['statut_textes_instituer'])
29
-	  AND $d['statut_textes_instituer']) {
30
-		$prim = id_table_objet($type);
31
-		$id = intval($id);
32
-		if (isset($d['field']['id_rubrique']))
33
-			$select = "id_rubrique,statut";
34
-		else
35
-			$select = "0 as id_rubrique,statut";
36
-		$r = sql_fetsel($select, $table_objet_sql, "$prim=$id");
37
-		$statut = $r['statut'];
38
-		$id_rubrique = $r['id_rubrique'];
39
-	}
40
-	else {
41
-		$id_rubrique = intval($id);
42
-		$statut = 'prop'; // arbitraire
43
-	}
44
-	$puce_statut = charger_fonction('puce_statut', 'inc');
45
-	ajax_retour($puce_statut($id,$statut,$id_rubrique,$type, true));
26
+    if ($table_objet_sql = table_objet_sql($type)
27
+        AND $d = lister_tables_objets_sql($table_objet_sql)
28
+        AND isset($d['statut_textes_instituer'])
29
+      AND $d['statut_textes_instituer']) {
30
+        $prim = id_table_objet($type);
31
+        $id = intval($id);
32
+        if (isset($d['field']['id_rubrique']))
33
+            $select = "id_rubrique,statut";
34
+        else
35
+            $select = "0 as id_rubrique,statut";
36
+        $r = sql_fetsel($select, $table_objet_sql, "$prim=$id");
37
+        $statut = $r['statut'];
38
+        $id_rubrique = $r['id_rubrique'];
39
+    }
40
+    else {
41
+        $id_rubrique = intval($id);
42
+        $statut = 'prop'; // arbitraire
43
+    }
44
+    $puce_statut = charger_fonction('puce_statut', 'inc');
45
+    ajax_retour($puce_statut($id,$statut,$id_rubrique,$type, true));
46 46
 }
47 47
 ?>
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 // http://doc.spip.org/@exec_puce_statut_dist
18 18
 function exec_puce_statut_dist()
19 19
 {
20
-	exec_puce_statut_args(_request('id'),  _request('type'));
20
+	exec_puce_statut_args(_request('id'), _request('type'));
21 21
 }
22 22
 
23 23
 // http://doc.spip.org/@exec_puce_statut_args
@@ -42,6 +42,6 @@  discard block
 block discarded – undo
42 42
 		$statut = 'prop'; // arbitraire
43 43
 	}
44 44
 	$puce_statut = charger_fonction('puce_statut', 'inc');
45
-	ajax_retour($puce_statut($id,$statut,$id_rubrique,$type, true));
45
+	ajax_retour($puce_statut($id, $statut, $id_rubrique, $type, true));
46 46
 }
47 47
 ?>
Please login to merge, or discard this patch.
Braces   +9 added lines, -7 removed lines patch added patch discarded remove patch
@@ -10,7 +10,9 @@  discard block
 block discarded – undo
10 10
  *  Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne.   *
11 11
 \***************************************************************************/
12 12
 
13
-if (!defined('_ECRIRE_INC_VERSION')) return;
13
+if (!defined('_ECRIRE_INC_VERSION')) {
14
+    return;
15
+}
14 16
 
15 17
 include_spip('inc/presentation');
16 18
 
@@ -29,15 +31,15 @@  discard block
 block discarded – undo
29 31
 	  AND $d['statut_textes_instituer']) {
30 32
 		$prim = id_table_objet($type);
31 33
 		$id = intval($id);
32
-		if (isset($d['field']['id_rubrique']))
33
-			$select = "id_rubrique,statut";
34
-		else
35
-			$select = "0 as id_rubrique,statut";
34
+		if (isset($d['field']['id_rubrique'])) {
35
+					$select = "id_rubrique,statut";
36
+		} else {
37
+					$select = "0 as id_rubrique,statut";
38
+		}
36 39
 		$r = sql_fetsel($select, $table_objet_sql, "$prim=$id");
37 40
 		$statut = $r['statut'];
38 41
 		$id_rubrique = $r['id_rubrique'];
39
-	}
40
-	else {
42
+	} else {
41 43
 		$id_rubrique = intval($id);
42 44
 		$statut = 'prop'; // arbitraire
43 45
 	}
Please login to merge, or discard this patch.
ecrire/exec/fond_monobloc.php 3 patches
Indentation   +78 added lines, -78 removed lines patch added patch discarded remove patch
@@ -22,84 +22,84 @@
 block discarded – undo
22 22
  */
23 23
 function exec_fond_monobloc_dist(){
24 24
 
25
-	// pas d'autorisation
26
-	// c'est au fond de les gerer avec #AUTORISER, et de renvoyer un fond vide le cas echeant
27
-	// qui declenchera un minipres acces interdit
28
-	$exec = _request('exec');
29
-	$fond = trim(recuperer_fond("prive/exec/$exec",$_REQUEST));
30
-	if (!$fond) {
31
-		include_spip('inc/minipres');
32
-		echo minipres();
33
-	} else {
34
-
35
-	$titre = "exec_$exec";
36
-	$hierarchie = "";
37
-	$navigation = "";
38
-	$extra = "";
39
-
40
-	// recuperer le titre dans le premier hn de la page
41
-	if (preg_match(",<h[1-6][^>]*>(.+)</h[1-6]>,Uims",$fond,$match)){
42
-		$titre = $match[1];
43
-	}
44
-
45
-	// recuperer la hierarchie (au-dessus du contenu)
46
-	if (preg_match(",<!--#hierarchie-->.+<!--/#hierarchie-->,Uims",$fond,$match)){
47
-		$hierarchie = $match[0];
48
-		$fond = str_replace($hierarchie,"",$fond);
49
-	}
50
-
51
-	// recuperer la navigation (colonne de gauche)
52
-	if (preg_match(",<!--#navigation-->.+<!--/#navigation-->,Uims",$fond,$match)){
53
-		$navigation = $match[0];
54
-		$fond = str_replace($navigation,"",$fond);
55
-	}
56
-
57
-	// recuperer les extras (colonne de droite)
58
-	if (preg_match(",<!--#extra-->.+<!--/#extra-->,Uims",$fond,$match)){
59
-		$extra = $match[0];
60
-		$fond = str_replace($extra,"",$fond);
61
-	}
62
-
63
-	include_spip('inc/presentation'); // alleger les inclusions avec un inc/presentation_mini
64
-	$commencer_page = charger_fonction('commencer_page','inc');
65
-	echo $commencer_page($titre);
66
-
67
-	if ($hierarchie){
68
-		echo debut_grand_cadre(true);
69
-		echo pipeline(
70
-			'affiche_hierarchie',
71
-			array(
72
-				'args' => array(
73
-					'exec' => $exec
74
-				),
75
-				'data' => $hierarchie
76
-			)
77
-		);
78
-		echo fin_grand_cadre(true);
79
-	}
80
-
81
-	echo debut_gauche("exec_$exec",true);
82
-
83
-	$contexte = array('exec'=>$exec);
84
-	if ($objet_exec = trouver_objet_exec($exec)){
85
-		$id = $objet_exec['id_table_objet'];
86
-		if (_request($id))
87
-			$contexte[$id] = _request($id);
88
-	}
89
-
90
-	echo $navigation;
91
-	echo pipeline('affiche_gauche',array('args'=>$contexte,'data'=>''));
92
-
93
-	echo creer_colonne_droite("exec_$exec",true);
94
-	echo $extra;
95
-	echo pipeline('affiche_droite',array('args'=>$contexte,'data'=>''));
96
-
97
-	echo debut_droite("exec_$exec",true);
98
-	echo $fond;
99
-	echo pipeline('affiche_milieu',array('args'=>$contexte,'data'=>''));
100
-
101
-	echo fin_gauche(),fin_page();
102
-	}
25
+    // pas d'autorisation
26
+    // c'est au fond de les gerer avec #AUTORISER, et de renvoyer un fond vide le cas echeant
27
+    // qui declenchera un minipres acces interdit
28
+    $exec = _request('exec');
29
+    $fond = trim(recuperer_fond("prive/exec/$exec",$_REQUEST));
30
+    if (!$fond) {
31
+        include_spip('inc/minipres');
32
+        echo minipres();
33
+    } else {
34
+
35
+    $titre = "exec_$exec";
36
+    $hierarchie = "";
37
+    $navigation = "";
38
+    $extra = "";
39
+
40
+    // recuperer le titre dans le premier hn de la page
41
+    if (preg_match(",<h[1-6][^>]*>(.+)</h[1-6]>,Uims",$fond,$match)){
42
+        $titre = $match[1];
43
+    }
44
+
45
+    // recuperer la hierarchie (au-dessus du contenu)
46
+    if (preg_match(",<!--#hierarchie-->.+<!--/#hierarchie-->,Uims",$fond,$match)){
47
+        $hierarchie = $match[0];
48
+        $fond = str_replace($hierarchie,"",$fond);
49
+    }
50
+
51
+    // recuperer la navigation (colonne de gauche)
52
+    if (preg_match(",<!--#navigation-->.+<!--/#navigation-->,Uims",$fond,$match)){
53
+        $navigation = $match[0];
54
+        $fond = str_replace($navigation,"",$fond);
55
+    }
56
+
57
+    // recuperer les extras (colonne de droite)
58
+    if (preg_match(",<!--#extra-->.+<!--/#extra-->,Uims",$fond,$match)){
59
+        $extra = $match[0];
60
+        $fond = str_replace($extra,"",$fond);
61
+    }
62
+
63
+    include_spip('inc/presentation'); // alleger les inclusions avec un inc/presentation_mini
64
+    $commencer_page = charger_fonction('commencer_page','inc');
65
+    echo $commencer_page($titre);
66
+
67
+    if ($hierarchie){
68
+        echo debut_grand_cadre(true);
69
+        echo pipeline(
70
+            'affiche_hierarchie',
71
+            array(
72
+                'args' => array(
73
+                    'exec' => $exec
74
+                ),
75
+                'data' => $hierarchie
76
+            )
77
+        );
78
+        echo fin_grand_cadre(true);
79
+    }
80
+
81
+    echo debut_gauche("exec_$exec",true);
82
+
83
+    $contexte = array('exec'=>$exec);
84
+    if ($objet_exec = trouver_objet_exec($exec)){
85
+        $id = $objet_exec['id_table_objet'];
86
+        if (_request($id))
87
+            $contexte[$id] = _request($id);
88
+    }
89
+
90
+    echo $navigation;
91
+    echo pipeline('affiche_gauche',array('args'=>$contexte,'data'=>''));
92
+
93
+    echo creer_colonne_droite("exec_$exec",true);
94
+    echo $extra;
95
+    echo pipeline('affiche_droite',array('args'=>$contexte,'data'=>''));
96
+
97
+    echo debut_droite("exec_$exec",true);
98
+    echo $fond;
99
+    echo pipeline('affiche_milieu',array('args'=>$contexte,'data'=>''));
100
+
101
+    echo fin_gauche(),fin_page();
102
+    }
103 103
 }
104 104
 
105 105
 ?>
Please login to merge, or discard this patch.
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -20,13 +20,13 @@  discard block
 block discarded – undo
20 20
  * deprecie, ne plus utiliser
21 21
  *
22 22
  */
23
-function exec_fond_monobloc_dist(){
23
+function exec_fond_monobloc_dist() {
24 24
 
25 25
 	// pas d'autorisation
26 26
 	// c'est au fond de les gerer avec #AUTORISER, et de renvoyer un fond vide le cas echeant
27 27
 	// qui declenchera un minipres acces interdit
28 28
 	$exec = _request('exec');
29
-	$fond = trim(recuperer_fond("prive/exec/$exec",$_REQUEST));
29
+	$fond = trim(recuperer_fond("prive/exec/$exec", $_REQUEST));
30 30
 	if (!$fond) {
31 31
 		include_spip('inc/minipres');
32 32
 		echo minipres();
@@ -38,33 +38,33 @@  discard block
 block discarded – undo
38 38
 	$extra = "";
39 39
 
40 40
 	// recuperer le titre dans le premier hn de la page
41
-	if (preg_match(",<h[1-6][^>]*>(.+)</h[1-6]>,Uims",$fond,$match)){
41
+	if (preg_match(",<h[1-6][^>]*>(.+)</h[1-6]>,Uims", $fond, $match)) {
42 42
 		$titre = $match[1];
43 43
 	}
44 44
 
45 45
 	// recuperer la hierarchie (au-dessus du contenu)
46
-	if (preg_match(",<!--#hierarchie-->.+<!--/#hierarchie-->,Uims",$fond,$match)){
46
+	if (preg_match(",<!--#hierarchie-->.+<!--/#hierarchie-->,Uims", $fond, $match)) {
47 47
 		$hierarchie = $match[0];
48
-		$fond = str_replace($hierarchie,"",$fond);
48
+		$fond = str_replace($hierarchie, "", $fond);
49 49
 	}
50 50
 
51 51
 	// recuperer la navigation (colonne de gauche)
52
-	if (preg_match(",<!--#navigation-->.+<!--/#navigation-->,Uims",$fond,$match)){
52
+	if (preg_match(",<!--#navigation-->.+<!--/#navigation-->,Uims", $fond, $match)) {
53 53
 		$navigation = $match[0];
54
-		$fond = str_replace($navigation,"",$fond);
54
+		$fond = str_replace($navigation, "", $fond);
55 55
 	}
56 56
 
57 57
 	// recuperer les extras (colonne de droite)
58
-	if (preg_match(",<!--#extra-->.+<!--/#extra-->,Uims",$fond,$match)){
58
+	if (preg_match(",<!--#extra-->.+<!--/#extra-->,Uims", $fond, $match)) {
59 59
 		$extra = $match[0];
60
-		$fond = str_replace($extra,"",$fond);
60
+		$fond = str_replace($extra, "", $fond);
61 61
 	}
62 62
 
63 63
 	include_spip('inc/presentation'); // alleger les inclusions avec un inc/presentation_mini
64
-	$commencer_page = charger_fonction('commencer_page','inc');
64
+	$commencer_page = charger_fonction('commencer_page', 'inc');
65 65
 	echo $commencer_page($titre);
66 66
 
67
-	if ($hierarchie){
67
+	if ($hierarchie) {
68 68
 		echo debut_grand_cadre(true);
69 69
 		echo pipeline(
70 70
 			'affiche_hierarchie',
@@ -78,27 +78,27 @@  discard block
 block discarded – undo
78 78
 		echo fin_grand_cadre(true);
79 79
 	}
80 80
 
81
-	echo debut_gauche("exec_$exec",true);
81
+	echo debut_gauche("exec_$exec", true);
82 82
 
83 83
 	$contexte = array('exec'=>$exec);
84
-	if ($objet_exec = trouver_objet_exec($exec)){
84
+	if ($objet_exec = trouver_objet_exec($exec)) {
85 85
 		$id = $objet_exec['id_table_objet'];
86 86
 		if (_request($id))
87 87
 			$contexte[$id] = _request($id);
88 88
 	}
89 89
 
90 90
 	echo $navigation;
91
-	echo pipeline('affiche_gauche',array('args'=>$contexte,'data'=>''));
91
+	echo pipeline('affiche_gauche', array('args'=>$contexte, 'data'=>''));
92 92
 
93
-	echo creer_colonne_droite("exec_$exec",true);
93
+	echo creer_colonne_droite("exec_$exec", true);
94 94
 	echo $extra;
95
-	echo pipeline('affiche_droite',array('args'=>$contexte,'data'=>''));
95
+	echo pipeline('affiche_droite', array('args'=>$contexte, 'data'=>''));
96 96
 
97
-	echo debut_droite("exec_$exec",true);
97
+	echo debut_droite("exec_$exec", true);
98 98
 	echo $fond;
99
-	echo pipeline('affiche_milieu',array('args'=>$contexte,'data'=>''));
99
+	echo pipeline('affiche_milieu', array('args'=>$contexte, 'data'=>''));
100 100
 
101
-	echo fin_gauche(),fin_page();
101
+	echo fin_gauche(), fin_page();
102 102
 	}
103 103
 }
104 104
 
Please login to merge, or discard this patch.
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -10,7 +10,9 @@  discard block
 block discarded – undo
10 10
  *  Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne.   *
11 11
 \***************************************************************************/
12 12
 
13
-if (!defined('_ECRIRE_INC_VERSION')) return;
13
+if (!defined('_ECRIRE_INC_VERSION')) {
14
+    return;
15
+}
14 16
 
15 17
 /**
16 18
  * Un exec generique qui utilise le fond homonyme de l'exec demande
@@ -83,8 +85,9 @@  discard block
 block discarded – undo
83 85
 	$contexte = array('exec'=>$exec);
84 86
 	if ($objet_exec = trouver_objet_exec($exec)){
85 87
 		$id = $objet_exec['id_table_objet'];
86
-		if (_request($id))
87
-			$contexte[$id] = _request($id);
88
+		if (_request($id)) {
89
+					$contexte[$id] = _request($id);
90
+		}
88 91
 	}
89 92
 
90 93
 	echo $navigation;
Please login to merge, or discard this patch.
ecrire/exec/fond.php 3 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -17,22 +17,22 @@
 block discarded – undo
17 17
 $GLOBALS['delais'] = 0;// pas de cache !
18 18
 // Securite
19 19
 if (strstr($fond, '/')) {
20
-	if (!include_spip('inc/autoriser')
21
-		OR !autoriser('webmestre')) {
22
-		include_spip('inc/minipres');
23
-		echo minipres();
24
-		exit;
25
-	}
20
+    if (!include_spip('inc/autoriser')
21
+        OR !autoriser('webmestre')) {
22
+        include_spip('inc/minipres');
23
+        echo minipres();
24
+        exit;
25
+    }
26 26
 }
27 27
 else
28
-	$fond = "prive/squelettes/$fond";
28
+    $fond = "prive/squelettes/$fond";
29 29
 
30 30
 // quelques inclusions et ini prealables
31 31
 include_spip('inc/commencer_page');
32 32
 
33 33
 function shutdown_error(){
34 34
 
35
-	// si on arrive ici avec un tampon non ferme : erreur fatale
35
+    // si on arrive ici avec un tampon non ferme : erreur fatale
36 36
 /*	if (ob_get_level()){
37 37
 		// envoyer tous les tampons
38 38
 		while (ob_get_level())
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 
15 15
 
16 16
 $fond = _request('exec');
17
-$GLOBALS['delais'] = 0;// pas de cache !
17
+$GLOBALS['delais'] = 0; // pas de cache !
18 18
 // Securite
19 19
 if (strstr($fond, '/')) {
20 20
 	if (!include_spip('inc/autoriser')
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 // quelques inclusions et ini prealables
31 31
 include_spip('inc/commencer_page');
32 32
 
33
-function shutdown_error(){
33
+function shutdown_error() {
34 34
 
35 35
 	// si on arrive ici avec un tampon non ferme : erreur fatale
36 36
 /*	if (ob_get_level()){
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
  * La fonction ne fait rien, c'est l'inclusion du fichier qui declenche le traitement
62 62
  *
63 63
  */
64
-function exec_fond_dist(){
64
+function exec_fond_dist() {
65 65
 
66 66
 }
67 67
 
Please login to merge, or discard this patch.
Braces   +5 added lines, -3 removed lines patch added patch discarded remove patch
@@ -10,7 +10,9 @@  discard block
 block discarded – undo
10 10
  *  Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne.   *
11 11
 \***************************************************************************/
12 12
 
13
-if (!defined('_ECRIRE_INC_VERSION')) return;
13
+if (!defined('_ECRIRE_INC_VERSION')) {
14
+    return;
15
+}
14 16
 
15 17
 
16 18
 $fond = _request('exec');
@@ -23,9 +25,9 @@  discard block
 block discarded – undo
23 25
 		echo minipres();
24 26
 		exit;
25 27
 	}
26
-}
27
-else
28
+} else {
28 29
 	$fond = "prive/squelettes/$fond";
30
+}
29 31
 
30 32
 // quelques inclusions et ini prealables
31 33
 include_spip('inc/commencer_page');
Please login to merge, or discard this patch.