Changeset 93617 in spip-zone for _core_/plugins/mots/action/supprimer_groupe_mots.php
- Timestamp:
- Dec 13, 2015, 11:44:49 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
_core_/plugins/mots/action/supprimer_groupe_mots.php
r93092 r93617 16 16 * @package SPIP\Mots\Actions 17 17 */ 18 if (!defined("_ECRIRE_INC_VERSION")) return; 18 if (!defined("_ECRIRE_INC_VERSION")) { 19 return; 20 } 19 21 20 22 include_spip('inc/filtres'); … … 27 29 * Supprime le groupe uniquement si on en a l'autorisation. Cela implique 28 30 * qu'il n'y ait pas de mots clés dans le groupe. 29 * 31 * 30 32 * @param null|int $id_groupe 31 33 * Identifiant du groupe à supprimer. En absence utilise l'argument 32 34 * de l'action sécurisée. 33 35 */ 34 function action_supprimer_groupe_mots_dist($id_groupe = null) {36 function action_supprimer_groupe_mots_dist($id_groupe = null) { 35 37 36 if (is_null($id_groupe)) {38 if (is_null($id_groupe)) { 37 39 $securiser_action = charger_fonction('securiser_action', 'inc'); 38 40 $id_groupe = $securiser_action(); … … 40 42 41 43 include_spip('inc/autoriser'); 42 if (autoriser('supprimer','groupemots',$id_groupe)){ 43 sql_delete("spip_groupes_mots", "id_groupe=" .intval($id_groupe)); 44 if (autoriser('supprimer', 'groupemots', $id_groupe)) { 45 sql_delete("spip_groupes_mots", "id_groupe=" . intval($id_groupe)); 46 } else { 47 spip_log("action_supprimer_groupe_mots_dist $id_groupe interdit", _LOG_INFO_IMPORTANTE); 44 48 } 45 else46 spip_log("action_supprimer_groupe_mots_dist $id_groupe interdit",_LOG_INFO_IMPORTANTE);47 49 } 48 50
Note: See TracChangeset
for help on using the changeset viewer.