Changeset 76981 in spip-zone
- Timestamp:
- Oct 5, 2013, 11:15:59 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
_plugins_/trad-lang/trunk/action/tradlang_creer_langue_cible.php
r70914 r76981 1 1 <?php 2 if (!defined("_ECRIRE_INC_VERSION")) return; 3 2 4 /** 3 5 * Action permettant de creer une langue cible depuis la langue mère d'un module … … 5 7 * @return 6 8 */ 7 8 if (!defined("_ECRIRE_INC_VERSION")) return;9 10 9 function action_tradlang_creer_langue_cible_dist(){ 11 10 $securiser_action = charger_fonction('securiser_action', 'inc'); 12 11 $arg = $securiser_action(); 13 if (!preg_match(",^(\w+)$,", $arg, $r)) 14 spip_log("action_tradlang_creer_langue_cible $arg pas compris"); 12 if (!preg_match(",^(\w+)$,", $arg, $r)){ 13 spip_log("action_tradlang_creer_langue_cible $arg pas compris",'tradlang.'._LOG_ERREUR); 14 return false; 15 } 15 16 16 17 $id_tradlang_module = intval($arg); … … 18 19 include_spip('inc/autoriser'); 19 20 $lang_crea = _request('lang_crea'); 20 if($lang_crea && $id_tradlang_module&& autoriser('modifier','tradlang')){21 if($lang_crea && intval($arg) && autoriser('modifier','tradlang')){ 21 22 // Import de la langue mere 22 $infos_module = sql_fetsel('*','spip_tradlang_modules','id_tradlang_module='.intval($ id_tradlang_module));23 $infos_module = sql_fetsel('*','spip_tradlang_modules','id_tradlang_module='.intval($arg)); 23 24 if(!$infos_module) 24 spip_log('tradlang_creer_langue_cible : infos_module non existant','tradlang ');25 spip_log('tradlang_creer_langue_cible : infos_module non existant','tradlang.'._LOG_ERREUR); 25 26 else{ 26 27 $ajouter_code_langue = charger_fonction('tradlang_ajouter_code_langue','inc'); 27 28 $ajouter_code_langue($infos_module,$lang_crea); 28 29 } 29 /**30 * Le cache est invalidé dans $ajouter_code_langue31 */32 30 }else 33 spip_log("action_tradlang_creer_langue_cible : Module $module_nom inexistant", "tradlang");31 spip_log("action_tradlang_creer_langue_cible : Module $module_nom inexistant",'tradlang.'._LOG_ERREUR); 34 32 35 33 $redirect = _request('redirect');
Note: See TracChangeset
for help on using the changeset viewer.