@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | **/ |
| 18 | 18 | |
| 19 | 19 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 20 | - return; |
|
| 20 | + return; |
|
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | /** |
@@ -26,12 +26,12 @@ discard block |
||
| 26 | 26 | * @return void |
| 27 | 27 | */ |
| 28 | 28 | function action_annuler_job_dist() { |
| 29 | - $securiser_action = charger_fonction('securiser_action', 'inc'); |
|
| 30 | - $id_job = $securiser_action(); |
|
| 29 | + $securiser_action = charger_fonction('securiser_action', 'inc'); |
|
| 30 | + $id_job = $securiser_action(); |
|
| 31 | 31 | |
| 32 | - if ($id_job = intval($id_job) |
|
| 33 | - and autoriser('annuler', 'job', $id_job) |
|
| 34 | - ) { |
|
| 35 | - job_queue_remove($id_job); |
|
| 36 | - } |
|
| 32 | + if ($id_job = intval($id_job) |
|
| 33 | + and autoriser('annuler', 'job', $id_job) |
|
| 34 | + ) { |
|
| 35 | + job_queue_remove($id_job); |
|
| 36 | + } |
|
| 37 | 37 | } |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | **/ |
| 18 | 18 | |
| 19 | 19 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 20 | - return; |
|
| 20 | + return; |
|
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | /** |
@@ -28,47 +28,47 @@ discard block |
||
| 28 | 28 | * @return void |
| 29 | 29 | */ |
| 30 | 30 | function enregistre_modif_plugin() { |
| 31 | - include_spip('inc/plugin'); |
|
| 32 | - // recuperer les plugins dans l'ordre des $_POST |
|
| 33 | - $test = array(); |
|
| 34 | - foreach (liste_plugin_files() as $file) { |
|
| 35 | - $test['s' . substr(md5(_DIR_PLUGINS . $file), 0, 16)] = $file; |
|
| 36 | - } |
|
| 37 | - if (defined('_DIR_PLUGINS_SUPPL')) { |
|
| 38 | - foreach (liste_plugin_files(_DIR_PLUGINS_SUPPL) as $file) { |
|
| 39 | - $test['s' . substr(md5(_DIR_PLUGINS_SUPPL . $file), 0, 16)] = $file; |
|
| 40 | - } |
|
| 41 | - } |
|
| 31 | + include_spip('inc/plugin'); |
|
| 32 | + // recuperer les plugins dans l'ordre des $_POST |
|
| 33 | + $test = array(); |
|
| 34 | + foreach (liste_plugin_files() as $file) { |
|
| 35 | + $test['s' . substr(md5(_DIR_PLUGINS . $file), 0, 16)] = $file; |
|
| 36 | + } |
|
| 37 | + if (defined('_DIR_PLUGINS_SUPPL')) { |
|
| 38 | + foreach (liste_plugin_files(_DIR_PLUGINS_SUPPL) as $file) { |
|
| 39 | + $test['s' . substr(md5(_DIR_PLUGINS_SUPPL . $file), 0, 16)] = $file; |
|
| 40 | + } |
|
| 41 | + } |
|
| 42 | 42 | |
| 43 | - $plugin = array(); |
|
| 43 | + $plugin = array(); |
|
| 44 | 44 | |
| 45 | - foreach ($_POST as $choix => $val) { |
|
| 46 | - if (isset($test[$choix]) && $val == 'O') { |
|
| 47 | - $plugin[] = $test[$choix]; |
|
| 48 | - } |
|
| 49 | - } |
|
| 45 | + foreach ($_POST as $choix => $val) { |
|
| 46 | + if (isset($test[$choix]) && $val == 'O') { |
|
| 47 | + $plugin[] = $test[$choix]; |
|
| 48 | + } |
|
| 49 | + } |
|
| 50 | 50 | |
| 51 | - spip_log("Changement des plugins actifs par l'auteur " . $GLOBALS['visiteur_session']['id_auteur'] . ": " . join(',', |
|
| 52 | - $plugin)); |
|
| 53 | - ecrire_plugin_actifs($plugin); |
|
| 51 | + spip_log("Changement des plugins actifs par l'auteur " . $GLOBALS['visiteur_session']['id_auteur'] . ": " . join(',', |
|
| 52 | + $plugin)); |
|
| 53 | + ecrire_plugin_actifs($plugin); |
|
| 54 | 54 | |
| 55 | - // Chaque fois que l'on valide des plugins, on memorise la liste de ces plugins comme etant "interessants", avec un score initial, qui sera decremente a chaque tour : ainsi un plugin active pourra reter visible a l'ecran, jusqu'a ce qu'il tombe dans l'oubli. |
|
| 56 | - $plugins_interessants = @unserialize($GLOBALS['meta']['plugins_interessants']); |
|
| 57 | - if (!is_array($plugins_interessants)) { |
|
| 58 | - $plugins_interessants = array(); |
|
| 59 | - } |
|
| 55 | + // Chaque fois que l'on valide des plugins, on memorise la liste de ces plugins comme etant "interessants", avec un score initial, qui sera decremente a chaque tour : ainsi un plugin active pourra reter visible a l'ecran, jusqu'a ce qu'il tombe dans l'oubli. |
|
| 56 | + $plugins_interessants = @unserialize($GLOBALS['meta']['plugins_interessants']); |
|
| 57 | + if (!is_array($plugins_interessants)) { |
|
| 58 | + $plugins_interessants = array(); |
|
| 59 | + } |
|
| 60 | 60 | |
| 61 | - $plugins_interessants2 = array(); |
|
| 61 | + $plugins_interessants2 = array(); |
|
| 62 | 62 | |
| 63 | - foreach ($plugins_interessants as $plug => $score) { |
|
| 64 | - if ($score > 1) { |
|
| 65 | - $plugins_interessants2[$plug] = $score - 1; |
|
| 66 | - } |
|
| 67 | - } |
|
| 68 | - foreach ($plugin as $plug) { |
|
| 69 | - $plugins_interessants2[$plug] = 10; |
|
| 70 | - } // score initial |
|
| 71 | - ecrire_meta('plugins_interessants', serialize($plugins_interessants2)); |
|
| 63 | + foreach ($plugins_interessants as $plug => $score) { |
|
| 64 | + if ($score > 1) { |
|
| 65 | + $plugins_interessants2[$plug] = $score - 1; |
|
| 66 | + } |
|
| 67 | + } |
|
| 68 | + foreach ($plugin as $plug) { |
|
| 69 | + $plugins_interessants2[$plug] = 10; |
|
| 70 | + } // score initial |
|
| 71 | + ecrire_meta('plugins_interessants', serialize($plugins_interessants2)); |
|
| 72 | 72 | } |
| 73 | 73 | |
| 74 | 74 | /** |
@@ -80,13 +80,13 @@ discard block |
||
| 80 | 80 | */ |
| 81 | 81 | function action_activer_plugins_dist() { |
| 82 | 82 | |
| 83 | - $securiser_action = charger_fonction('securiser_action', 'inc'); |
|
| 84 | - $securiser_action(); |
|
| 83 | + $securiser_action = charger_fonction('securiser_action', 'inc'); |
|
| 84 | + $securiser_action(); |
|
| 85 | 85 | |
| 86 | - if (!autoriser('configurer', '_plugins')) { |
|
| 87 | - die('erreur'); |
|
| 88 | - } |
|
| 89 | - // forcer la maj des meta pour les cas de modif de numero de version base via phpmyadmin |
|
| 90 | - lire_metas(); |
|
| 91 | - enregistre_modif_plugin(); |
|
| 86 | + if (!autoriser('configurer', '_plugins')) { |
|
| 87 | + die('erreur'); |
|
| 88 | + } |
|
| 89 | + // forcer la maj des meta pour les cas de modif de numero de version base via phpmyadmin |
|
| 90 | + lire_metas(); |
|
| 91 | + enregistre_modif_plugin(); |
|
| 92 | 92 | } |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | **/ |
| 18 | 18 | |
| 19 | 19 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 20 | - return; |
|
| 20 | + return; |
|
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | /** |
@@ -34,14 +34,14 @@ discard block |
||
| 34 | 34 | * @return void |
| 35 | 35 | */ |
| 36 | 36 | function action_ajouter_lien_dist($arg = null) { |
| 37 | - if (is_null($arg)) { |
|
| 38 | - $securiser_action = charger_fonction('securiser_action', 'inc'); |
|
| 39 | - $arg = $securiser_action(); |
|
| 40 | - } |
|
| 37 | + if (is_null($arg)) { |
|
| 38 | + $securiser_action = charger_fonction('securiser_action', 'inc'); |
|
| 39 | + $arg = $securiser_action(); |
|
| 40 | + } |
|
| 41 | 41 | |
| 42 | - $arg = explode("-", $arg); |
|
| 43 | - list($objet_source, $ids, $objet_lie, $idl) = $arg; |
|
| 42 | + $arg = explode("-", $arg); |
|
| 43 | + list($objet_source, $ids, $objet_lie, $idl) = $arg; |
|
| 44 | 44 | |
| 45 | - include_spip('action/editer_liens'); |
|
| 46 | - objet_associer(array($objet_source => $ids), array($objet_lie => $idl)); |
|
| 45 | + include_spip('action/editer_liens'); |
|
| 46 | + objet_associer(array($objet_source => $ids), array($objet_lie => $idl)); |
|
| 47 | 47 | } |
@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | * @package SPIP\Core\Queue |
| 17 | 17 | **/ |
| 18 | 18 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 19 | - return; |
|
| 19 | + return; |
|
| 20 | 20 | } |
| 21 | 21 | |
| 22 | 22 | /** |
@@ -25,12 +25,12 @@ discard block |
||
| 25 | 25 | * @return void |
| 26 | 26 | */ |
| 27 | 27 | function action_purger_queue_dist() { |
| 28 | - $securiser_action = charger_fonction('securiser_action', 'inc'); |
|
| 29 | - $securiser_action(); |
|
| 28 | + $securiser_action = charger_fonction('securiser_action', 'inc'); |
|
| 29 | + $securiser_action(); |
|
| 30 | 30 | |
| 31 | - if (autoriser('purger', 'queue')) { |
|
| 32 | - include_spip('inc/queue'); |
|
| 33 | - queue_purger(); |
|
| 34 | - } |
|
| 31 | + if (autoriser('purger', 'queue')) { |
|
| 32 | + include_spip('inc/queue'); |
|
| 33 | + queue_purger(); |
|
| 34 | + } |
|
| 35 | 35 | |
| 36 | 36 | } |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | **/ |
| 18 | 18 | |
| 19 | 19 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 20 | - return; |
|
| 20 | + return; |
|
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | /** |
@@ -25,25 +25,25 @@ discard block |
||
| 25 | 25 | */ |
| 26 | 26 | function action_auth_dist() { |
| 27 | 27 | |
| 28 | - $securiser_action = charger_fonction('securiser_action', 'inc'); |
|
| 29 | - $arg = $securiser_action(); |
|
| 30 | - |
|
| 31 | - if (!preg_match(",^(\w+)[/](.+)$,", $arg, $r)) { |
|
| 32 | - spip_log("action_auth_dist $arg pas compris"); |
|
| 33 | - } else { |
|
| 34 | - $auth_methode = $r[1]; |
|
| 35 | - $login = $r[2]; |
|
| 36 | - include_spip('inc/auth'); |
|
| 37 | - $res = auth_terminer_identifier_login($auth_methode, $login); |
|
| 38 | - |
|
| 39 | - if (is_string($res)) { // Erreur |
|
| 40 | - $redirect = _request('redirect'); |
|
| 41 | - $redirect = parametre_url($redirect, 'var_erreur', $res, '&'); |
|
| 42 | - include_spip('inc/headers'); |
|
| 43 | - redirige_par_entete($redirect); |
|
| 44 | - } |
|
| 45 | - |
|
| 46 | - // sinon on loge l'auteur identifie, et on finit (redirection automatique) |
|
| 47 | - auth_loger($res); |
|
| 48 | - } |
|
| 28 | + $securiser_action = charger_fonction('securiser_action', 'inc'); |
|
| 29 | + $arg = $securiser_action(); |
|
| 30 | + |
|
| 31 | + if (!preg_match(",^(\w+)[/](.+)$,", $arg, $r)) { |
|
| 32 | + spip_log("action_auth_dist $arg pas compris"); |
|
| 33 | + } else { |
|
| 34 | + $auth_methode = $r[1]; |
|
| 35 | + $login = $r[2]; |
|
| 36 | + include_spip('inc/auth'); |
|
| 37 | + $res = auth_terminer_identifier_login($auth_methode, $login); |
|
| 38 | + |
|
| 39 | + if (is_string($res)) { // Erreur |
|
| 40 | + $redirect = _request('redirect'); |
|
| 41 | + $redirect = parametre_url($redirect, 'var_erreur', $res, '&'); |
|
| 42 | + include_spip('inc/headers'); |
|
| 43 | + redirige_par_entete($redirect); |
|
| 44 | + } |
|
| 45 | + |
|
| 46 | + // sinon on loge l'auteur identifie, et on finit (redirection automatique) |
|
| 47 | + auth_loger($res); |
|
| 48 | + } |
|
| 49 | 49 | } |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | */ |
| 18 | 18 | |
| 19 | 19 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 20 | - return; |
|
| 20 | + return; |
|
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | /** |
@@ -32,28 +32,28 @@ discard block |
||
| 32 | 32 | */ |
| 33 | 33 | function action_desinstaller_plugin_dist() { |
| 34 | 34 | |
| 35 | - $securiser_action = charger_fonction('securiser_action', 'inc'); |
|
| 36 | - $arg = $securiser_action(); |
|
| 37 | - list($dir_plugins, $plugin) = explode("::", $arg); |
|
| 38 | - $dir_type = "_DIR_PLUGINS"; |
|
| 39 | - if (defined('_DIR_PLUGINS_SUPPL') and $dir_plugins == _DIR_PLUGINS_SUPPL) { |
|
| 40 | - $dir_type = "_DIR_PLUGINS_SUPPL"; |
|
| 41 | - } |
|
| 42 | - $installer_plugins = charger_fonction('installer', 'plugins'); |
|
| 43 | - $infos = $installer_plugins($plugin, 'uninstall', $dir_type); |
|
| 44 | - if ($infos and !$infos['install_test'][0]) { |
|
| 45 | - include_spip('inc/plugin'); |
|
| 46 | - ecrire_plugin_actifs(array($plugin), false, 'enleve'); |
|
| 47 | - $erreur = ''; |
|
| 48 | - } else { |
|
| 49 | - $erreur = 'erreur_plugin_desinstalation_echouee'; |
|
| 50 | - } |
|
| 51 | - if ($redirect = _request('redirect')) { |
|
| 52 | - include_spip('inc/headers'); |
|
| 53 | - if ($erreur) { |
|
| 54 | - $redirect = parametre_url($redirect, 'erreur', $erreur); |
|
| 55 | - } |
|
| 56 | - $redirect = str_replace('&', '&', $redirect); |
|
| 57 | - redirige_par_entete($redirect); |
|
| 58 | - } |
|
| 35 | + $securiser_action = charger_fonction('securiser_action', 'inc'); |
|
| 36 | + $arg = $securiser_action(); |
|
| 37 | + list($dir_plugins, $plugin) = explode("::", $arg); |
|
| 38 | + $dir_type = "_DIR_PLUGINS"; |
|
| 39 | + if (defined('_DIR_PLUGINS_SUPPL') and $dir_plugins == _DIR_PLUGINS_SUPPL) { |
|
| 40 | + $dir_type = "_DIR_PLUGINS_SUPPL"; |
|
| 41 | + } |
|
| 42 | + $installer_plugins = charger_fonction('installer', 'plugins'); |
|
| 43 | + $infos = $installer_plugins($plugin, 'uninstall', $dir_type); |
|
| 44 | + if ($infos and !$infos['install_test'][0]) { |
|
| 45 | + include_spip('inc/plugin'); |
|
| 46 | + ecrire_plugin_actifs(array($plugin), false, 'enleve'); |
|
| 47 | + $erreur = ''; |
|
| 48 | + } else { |
|
| 49 | + $erreur = 'erreur_plugin_desinstalation_echouee'; |
|
| 50 | + } |
|
| 51 | + if ($redirect = _request('redirect')) { |
|
| 52 | + include_spip('inc/headers'); |
|
| 53 | + if ($erreur) { |
|
| 54 | + $redirect = parametre_url($redirect, 'erreur', $erreur); |
|
| 55 | + } |
|
| 56 | + $redirect = str_replace('&', '&', $redirect); |
|
| 57 | + redirige_par_entete($redirect); |
|
| 58 | + } |
|
| 59 | 59 | } |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | **/ |
| 18 | 18 | |
| 19 | 19 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 20 | - return; |
|
| 20 | + return; |
|
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | /** |
@@ -25,34 +25,34 @@ discard block |
||
| 25 | 25 | **/ |
| 26 | 26 | function action_instituer_langue_rubrique_dist() { |
| 27 | 27 | |
| 28 | - $securiser_action = charger_fonction('securiser_action', 'inc'); |
|
| 29 | - $arg = $securiser_action(); |
|
| 30 | - $changer_lang = _request('changer_lang'); |
|
| 31 | - |
|
| 32 | - list($id_rubrique, $id_parent) = preg_split('/\W/', $arg); |
|
| 33 | - |
|
| 34 | - if ($changer_lang |
|
| 35 | - and $id_rubrique > 0 |
|
| 36 | - and $GLOBALS['meta']['multi_rubriques'] == 'oui' |
|
| 37 | - and ($GLOBALS['meta']['multi_secteurs'] == 'non' or $id_parent == 0) |
|
| 38 | - ) { |
|
| 39 | - if ($changer_lang != "herit") { |
|
| 40 | - sql_updateq('spip_rubriques', array('lang' => $changer_lang, 'langue_choisie' => 'oui'), |
|
| 41 | - "id_rubrique=$id_rubrique"); |
|
| 42 | - } else { |
|
| 43 | - if ($id_parent == 0) { |
|
| 44 | - $langue_parent = $GLOBALS['meta']['langue_site']; |
|
| 45 | - } else { |
|
| 46 | - $langue_parent = sql_getfetsel("lang", "spip_rubriques", "id_rubrique=$id_parent"); |
|
| 47 | - } |
|
| 48 | - sql_updateq('spip_rubriques', array('lang' => $langue_parent, 'langue_choisie' => 'non'), |
|
| 49 | - "id_rubrique=$id_rubrique"); |
|
| 50 | - } |
|
| 51 | - include_spip('inc/rubriques'); |
|
| 52 | - calculer_langues_rubriques(); |
|
| 53 | - |
|
| 54 | - // invalider les caches marques de cette rubrique |
|
| 55 | - include_spip('inc/invalideur'); |
|
| 56 | - suivre_invalideur("id='rubrique/$id_rubrique'"); |
|
| 57 | - } |
|
| 28 | + $securiser_action = charger_fonction('securiser_action', 'inc'); |
|
| 29 | + $arg = $securiser_action(); |
|
| 30 | + $changer_lang = _request('changer_lang'); |
|
| 31 | + |
|
| 32 | + list($id_rubrique, $id_parent) = preg_split('/\W/', $arg); |
|
| 33 | + |
|
| 34 | + if ($changer_lang |
|
| 35 | + and $id_rubrique > 0 |
|
| 36 | + and $GLOBALS['meta']['multi_rubriques'] == 'oui' |
|
| 37 | + and ($GLOBALS['meta']['multi_secteurs'] == 'non' or $id_parent == 0) |
|
| 38 | + ) { |
|
| 39 | + if ($changer_lang != "herit") { |
|
| 40 | + sql_updateq('spip_rubriques', array('lang' => $changer_lang, 'langue_choisie' => 'oui'), |
|
| 41 | + "id_rubrique=$id_rubrique"); |
|
| 42 | + } else { |
|
| 43 | + if ($id_parent == 0) { |
|
| 44 | + $langue_parent = $GLOBALS['meta']['langue_site']; |
|
| 45 | + } else { |
|
| 46 | + $langue_parent = sql_getfetsel("lang", "spip_rubriques", "id_rubrique=$id_parent"); |
|
| 47 | + } |
|
| 48 | + sql_updateq('spip_rubriques', array('lang' => $langue_parent, 'langue_choisie' => 'non'), |
|
| 49 | + "id_rubrique=$id_rubrique"); |
|
| 50 | + } |
|
| 51 | + include_spip('inc/rubriques'); |
|
| 52 | + calculer_langues_rubriques(); |
|
| 53 | + |
|
| 54 | + // invalider les caches marques de cette rubrique |
|
| 55 | + include_spip('inc/invalideur'); |
|
| 56 | + suivre_invalideur("id='rubrique/$id_rubrique'"); |
|
| 57 | + } |
|
| 58 | 58 | } |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | */ |
| 18 | 18 | |
| 19 | 19 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 20 | - return; |
|
| 20 | + return; |
|
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | /** |
@@ -31,17 +31,17 @@ discard block |
||
| 31 | 31 | */ |
| 32 | 32 | function action_debloquer_edition_dist() { |
| 33 | 33 | |
| 34 | - $securiser_action = charger_fonction('securiser_action', 'inc'); |
|
| 35 | - $arg = $securiser_action(); |
|
| 34 | + $securiser_action = charger_fonction('securiser_action', 'inc'); |
|
| 35 | + $arg = $securiser_action(); |
|
| 36 | 36 | |
| 37 | - if ($arg) { |
|
| 38 | - include_spip('inc/drapeau_edition'); |
|
| 39 | - if ($arg == 'tous') { |
|
| 40 | - debloquer_tous($GLOBALS['visiteur_session']['id_auteur']); |
|
| 41 | - } else { |
|
| 42 | - $arg = explode("-", $arg); |
|
| 43 | - list($objet, $id_objet) = $arg; |
|
| 44 | - debloquer_edition($GLOBALS['visiteur_session']['id_auteur'], $id_objet, $objet); |
|
| 45 | - } |
|
| 46 | - } |
|
| 37 | + if ($arg) { |
|
| 38 | + include_spip('inc/drapeau_edition'); |
|
| 39 | + if ($arg == 'tous') { |
|
| 40 | + debloquer_tous($GLOBALS['visiteur_session']['id_auteur']); |
|
| 41 | + } else { |
|
| 42 | + $arg = explode("-", $arg); |
|
| 43 | + list($objet, $id_objet) = $arg; |
|
| 44 | + debloquer_edition($GLOBALS['visiteur_session']['id_auteur'], $id_objet, $objet); |
|
| 45 | + } |
|
| 46 | + } |
|
| 47 | 47 | } |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | */ |
| 18 | 18 | |
| 19 | 19 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 20 | - return; |
|
| 20 | + return; |
|
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | /** |
@@ -28,20 +28,20 @@ discard block |
||
| 28 | 28 | * @return void |
| 29 | 29 | */ |
| 30 | 30 | function action_confirmer_email_dist() { |
| 31 | - $securiser_action = charger_fonction('securiser_action', 'inc'); |
|
| 32 | - $arg = $securiser_action(); |
|
| 31 | + $securiser_action = charger_fonction('securiser_action', 'inc'); |
|
| 32 | + $arg = $securiser_action(); |
|
| 33 | 33 | |
| 34 | - include_spip('inc/filtres'); |
|
| 35 | - if ($GLOBALS['visiteur_session']['id_auteur'] and email_valide($arg)) { |
|
| 36 | - include_spip('action/editer_auteur'); |
|
| 37 | - auteur_modifier($GLOBALS['visiteur_session']['id_auteur'], array('email' => $arg)); |
|
| 38 | - } |
|
| 39 | - // verifier avant de rediriger pour invalider le message de confirmation |
|
| 40 | - // si ca n'a pas marche |
|
| 41 | - if ($redirect = _request('redirect') and !$arg == sql_getfetsel('email', 'spip_auteurs', |
|
| 42 | - 'id_auteur=' . intval($GLOBALS['visiteur_session'])) |
|
| 43 | - ) { |
|
| 44 | - $GLOBALS['redirect'] = parametre_url($redirect, 'email_modif', ''); |
|
| 45 | - } |
|
| 34 | + include_spip('inc/filtres'); |
|
| 35 | + if ($GLOBALS['visiteur_session']['id_auteur'] and email_valide($arg)) { |
|
| 36 | + include_spip('action/editer_auteur'); |
|
| 37 | + auteur_modifier($GLOBALS['visiteur_session']['id_auteur'], array('email' => $arg)); |
|
| 38 | + } |
|
| 39 | + // verifier avant de rediriger pour invalider le message de confirmation |
|
| 40 | + // si ca n'a pas marche |
|
| 41 | + if ($redirect = _request('redirect') and !$arg == sql_getfetsel('email', 'spip_auteurs', |
|
| 42 | + 'id_auteur=' . intval($GLOBALS['visiteur_session'])) |
|
| 43 | + ) { |
|
| 44 | + $GLOBALS['redirect'] = parametre_url($redirect, 'email_modif', ''); |
|
| 45 | + } |
|
| 46 | 46 | |
| 47 | 47 | } |