@@ -19,62 +19,62 @@ |
||
| 19 | 19 | function exec_upgrade_dist() |
| 20 | 20 | { |
| 21 | 21 | |
| 22 | - global $spip_version_base; |
|
| 23 | - if (!_FILE_CONNECT) |
|
| 24 | - redirige_url_ecrire("install"); |
|
| 22 | + global $spip_version_base; |
|
| 23 | + if (!_FILE_CONNECT) |
|
| 24 | + redirige_url_ecrire("install"); |
|
| 25 | 25 | |
| 26 | - // Si reinstallation necessaire, message ad hoc |
|
| 27 | - if (_request('reinstall')=='oui'){ |
|
| 28 | - include_spip('inc/minipres'); |
|
| 29 | - $r = minipres(_T('titre_page_upgrade'), |
|
| 30 | - "<p><b>" |
|
| 31 | - ._T('texte_nouvelle_version_spip_1') |
|
| 32 | - ."</b><p> " |
|
| 33 | - ._T('texte_nouvelle_version_spip_2', |
|
| 34 | - array('connect' => '<tt>'._FILE_CONNECT.'</tt>')) |
|
| 35 | - .generer_form_ecrire('upgrade', "<input type='hidden' name='reinstall' value='non' />", '', _T('bouton_relancer_installation'))); |
|
| 36 | - echo $r; |
|
| 37 | - } |
|
| 38 | - elseif (_request('fin')) { |
|
| 39 | - include_spip('inc/plugin'); |
|
| 40 | - actualise_plugins_actifs(); |
|
| 41 | - include_spip('inc/headers'); |
|
| 42 | - $res = generer_url_ecrire('admin_plugin','var_mode=recalcul'); |
|
| 43 | - echo redirige_formulaire($res); |
|
| 44 | - } |
|
| 45 | - else { |
|
| 26 | + // Si reinstallation necessaire, message ad hoc |
|
| 27 | + if (_request('reinstall')=='oui'){ |
|
| 28 | + include_spip('inc/minipres'); |
|
| 29 | + $r = minipres(_T('titre_page_upgrade'), |
|
| 30 | + "<p><b>" |
|
| 31 | + ._T('texte_nouvelle_version_spip_1') |
|
| 32 | + ."</b><p> " |
|
| 33 | + ._T('texte_nouvelle_version_spip_2', |
|
| 34 | + array('connect' => '<tt>'._FILE_CONNECT.'</tt>')) |
|
| 35 | + .generer_form_ecrire('upgrade', "<input type='hidden' name='reinstall' value='non' />", '', _T('bouton_relancer_installation'))); |
|
| 36 | + echo $r; |
|
| 37 | + } |
|
| 38 | + elseif (_request('fin')) { |
|
| 39 | + include_spip('inc/plugin'); |
|
| 40 | + actualise_plugins_actifs(); |
|
| 41 | + include_spip('inc/headers'); |
|
| 42 | + $res = generer_url_ecrire('admin_plugin','var_mode=recalcul'); |
|
| 43 | + echo redirige_formulaire($res); |
|
| 44 | + } |
|
| 45 | + else { |
|
| 46 | 46 | |
| 47 | - if (!isset($GLOBALS['meta']['version_installee'])) |
|
| 48 | - $GLOBALS['meta']['version_installee'] = 0.0; |
|
| 49 | - else $GLOBALS['meta']['version_installee'] = |
|
| 50 | - (double)str_replace(',', '.', $GLOBALS['meta']['version_installee']); |
|
| 51 | - # NB: str_replace car, sur club-internet, il semble que version_installe soit |
|
| 52 | - # enregistree au format '1,812' et non '1.812' |
|
| 47 | + if (!isset($GLOBALS['meta']['version_installee'])) |
|
| 48 | + $GLOBALS['meta']['version_installee'] = 0.0; |
|
| 49 | + else $GLOBALS['meta']['version_installee'] = |
|
| 50 | + (double)str_replace(',', '.', $GLOBALS['meta']['version_installee']); |
|
| 51 | + # NB: str_replace car, sur club-internet, il semble que version_installe soit |
|
| 52 | + # enregistree au format '1,812' et non '1.812' |
|
| 53 | 53 | |
| 54 | - // Erreur downgrade |
|
| 55 | - // (cas de double installation de fichiers SPIP sur une meme base) |
|
| 56 | - if ($spip_version_base<$GLOBALS['meta']['version_installee']) |
|
| 57 | - $commentaire = _T('info_mise_a_niveau_base_2'); |
|
| 58 | - // Commentaire standard upgrade |
|
| 59 | - else $commentaire = _T('texte_mise_a_niveau_base_1'); |
|
| 54 | + // Erreur downgrade |
|
| 55 | + // (cas de double installation de fichiers SPIP sur une meme base) |
|
| 56 | + if ($spip_version_base<$GLOBALS['meta']['version_installee']) |
|
| 57 | + $commentaire = _T('info_mise_a_niveau_base_2'); |
|
| 58 | + // Commentaire standard upgrade |
|
| 59 | + else $commentaire = _T('texte_mise_a_niveau_base_1'); |
|
| 60 | 60 | |
| 61 | - $commentaire .= "<br />[".$GLOBALS['meta']['version_installee']."/".$spip_version_base."]"; |
|
| 61 | + $commentaire .= "<br />[".$GLOBALS['meta']['version_installee']."/".$spip_version_base."]"; |
|
| 62 | 62 | |
| 63 | - $_POST['reinstall'] = 'non'; // pour copy_request dans admin |
|
| 64 | - include_spip('inc/headers'); |
|
| 65 | - $admin = charger_fonction('admin', 'inc'); |
|
| 66 | - $res = $admin('upgrade', _T('info_mise_a_niveau_base'), $commentaire); |
|
| 67 | - if ($res) |
|
| 68 | - echo $res; |
|
| 69 | - else { |
|
| 70 | - // effacer les alea pour forcer leur relecture |
|
| 71 | - // si jamais ils ont change pendant l'upgrade |
|
| 72 | - unset($GLOBALS['meta']['alea_ephemere']); |
|
| 73 | - unset($GLOBALS['meta']['alea_ephemere_ancien']); |
|
| 74 | - $res = redirige_action_auteur('purger', 'cache', 'upgrade', 'fin=oui', true); |
|
| 75 | - echo redirige_formulaire($res); |
|
| 76 | - } |
|
| 77 | - } |
|
| 63 | + $_POST['reinstall'] = 'non'; // pour copy_request dans admin |
|
| 64 | + include_spip('inc/headers'); |
|
| 65 | + $admin = charger_fonction('admin', 'inc'); |
|
| 66 | + $res = $admin('upgrade', _T('info_mise_a_niveau_base'), $commentaire); |
|
| 67 | + if ($res) |
|
| 68 | + echo $res; |
|
| 69 | + else { |
|
| 70 | + // effacer les alea pour forcer leur relecture |
|
| 71 | + // si jamais ils ont change pendant l'upgrade |
|
| 72 | + unset($GLOBALS['meta']['alea_ephemere']); |
|
| 73 | + unset($GLOBALS['meta']['alea_ephemere_ancien']); |
|
| 74 | + $res = redirige_action_auteur('purger', 'cache', 'upgrade', 'fin=oui', true); |
|
| 75 | + echo redirige_formulaire($res); |
|
| 76 | + } |
|
| 77 | + } |
|
| 78 | 78 | } |
| 79 | 79 | |
| 80 | 80 | ?> |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | redirige_url_ecrire("install"); |
| 25 | 25 | |
| 26 | 26 | // Si reinstallation necessaire, message ad hoc |
| 27 | - if (_request('reinstall')=='oui'){ |
|
| 27 | + if (_request('reinstall') == 'oui') { |
|
| 28 | 28 | include_spip('inc/minipres'); |
| 29 | 29 | $r = minipres(_T('titre_page_upgrade'), |
| 30 | 30 | "<p><b>" |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | include_spip('inc/plugin'); |
| 40 | 40 | actualise_plugins_actifs(); |
| 41 | 41 | include_spip('inc/headers'); |
| 42 | - $res = generer_url_ecrire('admin_plugin','var_mode=recalcul'); |
|
| 42 | + $res = generer_url_ecrire('admin_plugin', 'var_mode=recalcul'); |
|
| 43 | 43 | echo redirige_formulaire($res); |
| 44 | 44 | } |
| 45 | 45 | else { |
@@ -47,13 +47,13 @@ discard block |
||
| 47 | 47 | if (!isset($GLOBALS['meta']['version_installee'])) |
| 48 | 48 | $GLOBALS['meta']['version_installee'] = 0.0; |
| 49 | 49 | else $GLOBALS['meta']['version_installee'] = |
| 50 | - (double)str_replace(',', '.', $GLOBALS['meta']['version_installee']); |
|
| 50 | + (double) str_replace(',', '.', $GLOBALS['meta']['version_installee']); |
|
| 51 | 51 | # NB: str_replace car, sur club-internet, il semble que version_installe soit |
| 52 | 52 | # enregistree au format '1,812' et non '1.812' |
| 53 | 53 | |
| 54 | 54 | // Erreur downgrade |
| 55 | 55 | // (cas de double installation de fichiers SPIP sur une meme base) |
| 56 | - if ($spip_version_base<$GLOBALS['meta']['version_installee']) |
|
| 56 | + if ($spip_version_base < $GLOBALS['meta']['version_installee']) |
|
| 57 | 57 | $commentaire = _T('info_mise_a_niveau_base_2'); |
| 58 | 58 | // Commentaire standard upgrade |
| 59 | 59 | else $commentaire = _T('texte_mise_a_niveau_base_1'); |
@@ -10,7 +10,9 @@ discard block |
||
| 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 | include_spip('inc/headers'); |
@@ -20,8 +22,9 @@ discard block |
||
| 20 | 22 | { |
| 21 | 23 | |
| 22 | 24 | global $spip_version_base; |
| 23 | - if (!_FILE_CONNECT) |
|
| 24 | - redirige_url_ecrire("install"); |
|
| 25 | + if (!_FILE_CONNECT) { |
|
| 26 | + redirige_url_ecrire("install"); |
|
| 27 | + } |
|
| 25 | 28 | |
| 26 | 29 | // Si reinstallation necessaire, message ad hoc |
| 27 | 30 | if (_request('reinstall')=='oui'){ |
@@ -34,29 +37,32 @@ discard block |
||
| 34 | 37 | array('connect' => '<tt>'._FILE_CONNECT.'</tt>')) |
| 35 | 38 | .generer_form_ecrire('upgrade', "<input type='hidden' name='reinstall' value='non' />", '', _T('bouton_relancer_installation'))); |
| 36 | 39 | echo $r; |
| 37 | - } |
|
| 38 | - elseif (_request('fin')) { |
|
| 40 | + } elseif (_request('fin')) { |
|
| 39 | 41 | include_spip('inc/plugin'); |
| 40 | 42 | actualise_plugins_actifs(); |
| 41 | 43 | include_spip('inc/headers'); |
| 42 | 44 | $res = generer_url_ecrire('admin_plugin','var_mode=recalcul'); |
| 43 | 45 | echo redirige_formulaire($res); |
| 44 | - } |
|
| 45 | - else { |
|
| 46 | + } else { |
|
| 46 | 47 | |
| 47 | - if (!isset($GLOBALS['meta']['version_installee'])) |
|
| 48 | - $GLOBALS['meta']['version_installee'] = 0.0; |
|
| 49 | - else $GLOBALS['meta']['version_installee'] = |
|
| 48 | + if (!isset($GLOBALS['meta']['version_installee'])) { |
|
| 49 | + $GLOBALS['meta']['version_installee'] = 0.0; |
|
| 50 | + } else { |
|
| 51 | + $GLOBALS['meta']['version_installee'] = |
|
| 50 | 52 | (double)str_replace(',', '.', $GLOBALS['meta']['version_installee']); |
| 53 | + } |
|
| 51 | 54 | # NB: str_replace car, sur club-internet, il semble que version_installe soit |
| 52 | 55 | # enregistree au format '1,812' et non '1.812' |
| 53 | 56 | |
| 54 | 57 | // Erreur downgrade |
| 55 | 58 | // (cas de double installation de fichiers SPIP sur une meme base) |
| 56 | - if ($spip_version_base<$GLOBALS['meta']['version_installee']) |
|
| 57 | - $commentaire = _T('info_mise_a_niveau_base_2'); |
|
| 59 | + if ($spip_version_base<$GLOBALS['meta']['version_installee']) { |
|
| 60 | + $commentaire = _T('info_mise_a_niveau_base_2'); |
|
| 61 | + } |
|
| 58 | 62 | // Commentaire standard upgrade |
| 59 | - else $commentaire = _T('texte_mise_a_niveau_base_1'); |
|
| 63 | + else { |
|
| 64 | + $commentaire = _T('texte_mise_a_niveau_base_1'); |
|
| 65 | + } |
|
| 60 | 66 | |
| 61 | 67 | $commentaire .= "<br />[".$GLOBALS['meta']['version_installee']."/".$spip_version_base."]"; |
| 62 | 68 | |
@@ -64,9 +70,9 @@ discard block |
||
| 64 | 70 | include_spip('inc/headers'); |
| 65 | 71 | $admin = charger_fonction('admin', 'inc'); |
| 66 | 72 | $res = $admin('upgrade', _T('info_mise_a_niveau_base'), $commentaire); |
| 67 | - if ($res) |
|
| 68 | - echo $res; |
|
| 69 | - else { |
|
| 73 | + if ($res) { |
|
| 74 | + echo $res; |
|
| 75 | + } else { |
|
| 70 | 76 | // effacer les alea pour forcer leur relecture |
| 71 | 77 | // si jamais ils ont change pendant l'upgrade |
| 72 | 78 | unset($GLOBALS['meta']['alea_ephemere']); |
@@ -22,30 +22,30 @@ |
||
| 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 | ?> |
@@ -10,7 +10,9 @@ |
||
| 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'); |
@@ -19,17 +19,17 @@ |
||
| 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 | ?> |
@@ -10,7 +10,9 @@ discard block |
||
| 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 |
||
| 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 | ?> |
@@ -17,37 +17,37 @@ |
||
| 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é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é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 | ?> |
@@ -15,7 +15,7 @@ discard block |
||
| 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 |
||
| 24 | 24 | $extra = ""; |
| 25 | 25 | |
| 26 | 26 | $contenu = "<h1>"._T('info_acces_interdit')."</h1>" |
| 27 | - . _L("Vous n'avez pas le droit d'accéder à la page <b>@exec@</b>.",array('exec'=>_request('exec'))); |
|
| 27 | + . _L("Vous n'avez pas le droit d'accé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 |
||
| 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 | |
@@ -10,7 +10,9 @@ discard block |
||
| 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 |
||
| 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'); |
@@ -15,30 +15,30 @@ |
||
| 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 | ?> |
@@ -21,21 +21,21 @@ |
||
| 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 | } |
@@ -10,7 +10,9 @@ discard block |
||
| 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 |
||
| 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 | } |
@@ -5,23 +5,23 @@ |
||
| 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 | ?> |
@@ -9,17 +9,17 @@ |
||
| 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 | } |
@@ -1,6 +1,8 @@ discard block |
||
| 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 |
||
| 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)); |
@@ -25,25 +25,25 @@ |
||
| 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 | ?> |
@@ -27,7 +27,7 @@ |
||
| 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) |
@@ -10,7 +10,9 @@ discard block |
||
| 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 |
||
| 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 | } |
@@ -17,31 +17,31 @@ |
||
| 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 | ?> |
@@ -17,7 +17,7 @@ discard block |
||
| 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 |
||
| 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 | ?> |
@@ -10,7 +10,9 @@ discard block |
||
| 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 |
||
| 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 | } |
@@ -22,84 +22,84 @@ |
||
| 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 | ?> |
@@ -20,13 +20,13 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 | |
@@ -10,7 +10,9 @@ discard block |
||
| 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 |
||
| 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; |