1 | <?php |
---|
2 | |
---|
3 | if (!defined("_ECRIRE_INC_VERSION")) return; |
---|
4 | |
---|
5 | function formulaires_tradlang_importer_langue_charger_dist($id_tradlang_module,$lang,$lang_orig) { |
---|
6 | $valeurs['_etapes'] = 2; |
---|
7 | $valeurs['lang_orig'] = $lang_orig; |
---|
8 | $valeurs['lang_cible'] = $lang; |
---|
9 | if(!$nom_mod = sql_getfetsel('nom_mod','spip_tradlang_modules','id_tradlang_module='.intval($id_tradlang_module))){ |
---|
10 | $valeurs['message_erreur'] = _T('tradlang:erreur_import_module_inexistant',array('id'=>$id_tradlang_module)); |
---|
11 | $valeurs['editable'] = false; |
---|
12 | }else{ |
---|
13 | if(_request('_etape') == '2'){ |
---|
14 | $module = sql_getfetsel('module','spip_tradlang_modules','id_tradlang_module='.intval($id_tradlang_module)); |
---|
15 | $fichier_module = $module.'_'.$lang.'.php'; |
---|
16 | $fichier_module_po = $module.'_'.$lang.'.po'; |
---|
17 | $dir_lang = sous_repertoire(_DIR_VAR, 'cache-tradlang'); |
---|
18 | $dest = $dir_lang.$fichier_module; |
---|
19 | $dest_po = $dir_lang.$fichier_module_po; |
---|
20 | if(file_exists($dest) || file_exists($dest_po)){ |
---|
21 | if(file_exists($dest)){ |
---|
22 | $modifs = $undefined = array(); |
---|
23 | $memtrad = $GLOBALS['idx_lang'] = 'i18n_'.crc32($module).'_tmp'; |
---|
24 | include $dest; |
---|
25 | |
---|
26 | /** |
---|
27 | * Recuperation des statuts dans le fichier |
---|
28 | */ |
---|
29 | $contenu=file_get_contents($dest); |
---|
30 | $contenu = str_replace("\t",'',$contenu); |
---|
31 | $tab=preg_split("/\r\n|\n\r|;\n|\n\/\/|\(\n|\n\);\n|\'\,\n|\n[\s\t]*(\')|\/\/[\s\t][0-9A-Z]\n[\s\t](\')/", $contenu,'-1',PREG_SPLIT_NO_EMPTY); |
---|
32 | $liste_trad=array(); |
---|
33 | reset($tab); |
---|
34 | |
---|
35 | while (list(,$ligne) = each($tab)){ |
---|
36 | $ligne = str_replace("\'",'',$ligne); |
---|
37 | if (strlen($ligne)>0) { |
---|
38 | if (preg_match("/\'(.*?)\'[\s\t]*=>[\s\t]*\'(.*?)\'[\s\t]*,{0,1}[\s\t]*(#.*)?/ms",$ligne,$matches)) { |
---|
39 | if (isset($matches[1]) and isset($matches[3]) and strlen(trim($matches[3]))>0 ) { |
---|
40 | list(,$comm)=explode("#",$matches[3]); |
---|
41 | if(in_array(trim($comm),array('NEW','MODIF','RELIRE'))) |
---|
42 | $liste_trad[$matches[1]]=trim($comm); |
---|
43 | } |
---|
44 | } |
---|
45 | } |
---|
46 | } |
---|
47 | reset($liste_trad); |
---|
48 | $keys_liste_trad = array_keys($liste_trad); |
---|
49 | |
---|
50 | $str_lang = $GLOBALS[$memtrad]; // on a vu certains fichiers faire des betises et modifier idx_lang |
---|
51 | // verifie si c'est un fichier langue |
---|
52 | if (!is_array($str_lang)) |
---|
53 | $erreurs['fichier_langue'] = _T('tradlang:erreur_upload_fichier_php_array',array('fichier'=>$file['name'])); |
---|
54 | else{ |
---|
55 | $langues_base = sql_allfetsel('id,str,statut','spip_tradlangs','id_tradlang_module='.intval($id_tradlang_module).' AND lang='.sql_quote($lang)); |
---|
56 | foreach($langues_base as $strings_id => $strings){ |
---|
57 | $str_lang[$strings['id']] = preg_replace(',^(<(MODIF|NEW|RELIRE|PLUS_UTILISE)>)+,US', '', $str_lang[$strings['id']]); |
---|
58 | if((strlen($str_lang[$strings['id']]) > 0) && $strings['str'] != $str_lang[$strings['id']]){ |
---|
59 | $modifs[$strings['id']] = array('orig'=>$strings['str'],'new'=>$str_lang[$strings['id']],'statut' => (in_array($strings['id'],$keys_liste_trad) ? $liste_trad[$strings['id']] : 'OK')); |
---|
60 | } |
---|
61 | elseif(strlen($str_lang[$strings['id']]) == 0){ |
---|
62 | $undefined[] = $strings['id']; |
---|
63 | } |
---|
64 | elseif(in_array($strings['id'],$keys_liste_trad) && ($strings['statut'] != $liste_trad[$strings['id']])){ |
---|
65 | $modifs[$strings['id']] = array('orig'=>$strings['str'],'new'=>$str_lang[$strings['id']],'statut' => $liste_trad[$strings['id']]); |
---|
66 | } |
---|
67 | elseif(!in_array($strings['id'],$keys_liste_trad) && $strings['statut'] != 'OK'){ |
---|
68 | $modifs[$strings['id']] = array('orig'=>$strings['str'],'new'=>$str_lang[$strings['id']],'statut' => 'OK'); |
---|
69 | } |
---|
70 | unset($langues_base[$strings_id]); |
---|
71 | } |
---|
72 | } |
---|
73 | } |
---|
74 | if(file_exists($dest_po)){ |
---|
75 | lire_fichier($dest_po,$contenu_po); |
---|
76 | preg_match_all(',(\#\, php-format|\#\, fuzzy\, php-format).*msgstr(.*)\#,Uims', $contenu_po,$matches); |
---|
77 | $array_po = array(); |
---|
78 | foreach($matches[0] as $match){ |
---|
79 | $statut = "OK"; |
---|
80 | preg_match(',\#\| msgid \"(.*)\"\n,Uims',$match,$matches); |
---|
81 | preg_match(',msgstr \"(.*)\n\#,Uims',$match,$matches_str); |
---|
82 | $str = rtrim(trim($matches_str[1]),'"'); |
---|
83 | $str = trim(str_replace("\"\n\"","\n",$str)); |
---|
84 | if(preg_match(',\#\, fuzzy\, php-format,',$match,$matches_statut)) |
---|
85 | $statut = "MODIF"; |
---|
86 | if($str != '') |
---|
87 | $array_po[$matches[1]] = array('str'=>$str,'statut'=>$statut); |
---|
88 | } |
---|
89 | $modifs = array(); |
---|
90 | $langues_base = sql_allfetsel('id,str,statut','spip_tradlangs','module='.sql_quote($module).' AND lang='.sql_quote($lang)); |
---|
91 | foreach($langues_base as $strings_id => $strings){ |
---|
92 | $str_lang[$strings['id']] = tradlang_utf8(preg_replace(',^(<(MODIF|NEW|PLUS_UTILISE)>)+,US', '', $str_lang[$strings['id']])); |
---|
93 | if(isset($array_po[$strings['id']]['str']) && strlen(trim($array_po[$strings['id']]['str'])) > 0){ |
---|
94 | if(($strings['str'] != $array_po[$strings['id']]['str']) OR ($strings['statut'] != $array_po[$strings['id']]['statut'])){ |
---|
95 | $modifs[$strings['id']] = array('orig'=>$strings['str'],'new'=>$array_po[$strings['id']]['str'],'statut'=>$array_po[$strings['id']]['statut']); |
---|
96 | } |
---|
97 | } |
---|
98 | unset($langues_base[$strings_id]); |
---|
99 | } |
---|
100 | } |
---|
101 | } |
---|
102 | $valeurs['_modifs'] = $modifs; |
---|
103 | } |
---|
104 | } |
---|
105 | if(count($undefined) > 0) |
---|
106 | $valeurs['message_erreur'] = singulier_ou_pluriel(count($undefined),'tradlang:item_non_defini_fichier','tradlang:item_non_defini_fichier_nb'); |
---|
107 | |
---|
108 | $valeurs['id_tradlang_module'] = $id_tradlang_module; |
---|
109 | return $valeurs; |
---|
110 | } |
---|
111 | |
---|
112 | function formulaires_tradlang_importer_langue_verifier_1_dist($id_tradlang_module,$lang) { |
---|
113 | $erreurs = array(); |
---|
114 | if(_request('_etape')==1){ |
---|
115 | $module = sql_getfetsel('module','spip_tradlang_modules','id_tradlang_module='.intval($id_tradlang_module)); |
---|
116 | $fichier_php = $module.'_'.$lang.'.php'; |
---|
117 | $fichier_po = $module.'_'.$lang.'.po'; |
---|
118 | $fichiers_module[] = $fichier_php; |
---|
119 | $fichiers_module[] = $fichier_po; |
---|
120 | $post = isset($_FILES) ? $_FILES : $GLOBALS['HTTP_POST_FILES']; |
---|
121 | $files = array(); |
---|
122 | include_spip('inc/joindre_document'); |
---|
123 | if (is_array($post)){ |
---|
124 | foreach ($post as $file) { |
---|
125 | if (!($file['error'] == 4)){ |
---|
126 | if (!in_array($file['name'],$fichiers_module)){ |
---|
127 | $fichier_module = $fichier_php.', '.$fichier_po; |
---|
128 | $erreurs['fichier_langue'] = _T('tradlang:erreur_upload_fichier_php',array('fichier'=>$file['name'],'fichier_attendu'=>$fichier_module)); |
---|
129 | } |
---|
130 | |
---|
131 | if(!$erreurs['fichier_langue']){ |
---|
132 | $dir_lang = sous_repertoire (_DIR_VAR, 'cache-tradlang'); |
---|
133 | $dest = $dir_lang.$file['name']; |
---|
134 | @move_uploaded_file($file['tmp_name'],$dest); |
---|
135 | if(!file_exists($dest)){ |
---|
136 | $erreurs['message_erreur'] = 'Fichier temporaire non créé'; |
---|
137 | } |
---|
138 | /** |
---|
139 | * Gestion du cas des fichiers php |
---|
140 | */ |
---|
141 | if($file['name'] == $fichier_php){ |
---|
142 | $memtrad = $GLOBALS['idx_lang'] = 'i18n_'.crc32($module).'_tmp'; |
---|
143 | include $dest; |
---|
144 | |
---|
145 | /** |
---|
146 | * Recuperation des statuts dans le fichier |
---|
147 | */ |
---|
148 | $contenu=file_get_contents($dest); |
---|
149 | $contenu = str_replace("\t",'',$contenu); |
---|
150 | $tab=preg_split("/\r\n|\n\r|;\n|\n\/\/|\(\n|\n\);\n|\'\,\n|\n[\s\t]*(\')|\/\/[\s\t][0-9A-Z]\n[\s\t](\')/", $contenu,'-1',PREG_SPLIT_NO_EMPTY); |
---|
151 | $liste_trad=array(); |
---|
152 | reset($tab); |
---|
153 | |
---|
154 | while (list(,$ligne) = each($tab)){ |
---|
155 | $ligne = str_replace("\'",'',$ligne); |
---|
156 | if (strlen($ligne)>0) { |
---|
157 | if (preg_match("/\'(.*?)\'[\s\t]*=>[\s\t]*\'(.*?)\'[\s\t]*,{0,1}[\s\t]*(#.*)?/ms",$ligne,$matches)) { |
---|
158 | if (isset($matches[1]) and isset($matches[3]) and strlen(trim($matches[3]))>0 ) { |
---|
159 | list(,$comm)=explode("#",$matches[3]); |
---|
160 | if(in_array(trim($comm),array('NEW','MODIF','RELIRE'))) |
---|
161 | $liste_trad[$matches[1]]=trim($comm); |
---|
162 | } |
---|
163 | } |
---|
164 | } |
---|
165 | } |
---|
166 | reset($liste_trad); |
---|
167 | $keys_liste_trad = array_keys($liste_trad); |
---|
168 | |
---|
169 | $str_lang = $GLOBALS[$memtrad]; |
---|
170 | // verifie si c'est un fichier langue |
---|
171 | if (!is_array($str_lang)) |
---|
172 | $erreurs['fichier_langue'] = _T('tradlang:erreur_upload_fichier_php_array',array('fichier'=>$file['name'])); |
---|
173 | else{ |
---|
174 | $langues_base = sql_allfetsel('id,str,statut','spip_tradlangs','id_tradlang_module='.intval($id_tradlang_module).' AND lang='.sql_quote($lang)); |
---|
175 | $modifs = array(); |
---|
176 | foreach($langues_base as $strings_id => $strings){ |
---|
177 | $str_lang[$strings['id']] = tradlang_utf8(preg_replace(',^(<(MODIF|NEW|PLUS_UTILISE)>)+,US', '', $str_lang[$strings['id']])); |
---|
178 | if($strings['str'] != $str_lang[$strings['id']]){ |
---|
179 | $modifs[$strings['id']] = array('orig'=>$strings['str'],'new'=>$str_lang[$strings['id']]); |
---|
180 | break; |
---|
181 | } |
---|
182 | if(in_array($strings['id'],$keys_liste_trad) && ($strings['statut'] != $liste_trad[$strings['id']])){ |
---|
183 | $modifs[$strings['id']] = array('orig'=>$strings['str'],'new'=>$str_lang[$strings['id']]); |
---|
184 | break; |
---|
185 | } |
---|
186 | } |
---|
187 | } |
---|
188 | } |
---|
189 | /** |
---|
190 | * Gestion du cas des fichiers .po |
---|
191 | */ |
---|
192 | else{ |
---|
193 | lire_fichier($dest,$contenu_po); |
---|
194 | preg_match_all(',(\#\, php-format|\#\, fuzzy\, php-format).*msgstr(.*)\#,Uims', $contenu_po,$matches); |
---|
195 | $array_po = array(); |
---|
196 | foreach($matches[0] as $match){ |
---|
197 | $statut = "OK"; |
---|
198 | preg_match(',\#\| msgid \"(.*)\"\n,Uims',$match,$matches); |
---|
199 | preg_match(',msgstr \"(.*)\n\#,Uims',$match,$matches_str); |
---|
200 | $str = rtrim(trim($matches_str[1]),'"'); |
---|
201 | $str = trim(str_replace("\"\n\"","\n",$str)); |
---|
202 | if(preg_match(',\#\, fuzzy\, php-format,',$match,$matches_statut)) |
---|
203 | $statut = "MODIF"; |
---|
204 | if($str != '') |
---|
205 | $array_po[$matches[1]] = array('str'=>$str,'statut'=>$statut); |
---|
206 | } |
---|
207 | $langues_base = sql_allfetsel('id,str,statut','spip_tradlangs','id_tradlang_module='.intval($id_tradlang_module).' AND lang='.sql_quote($lang)); |
---|
208 | $modifs = array(); |
---|
209 | foreach($langues_base as $strings_id => $strings){ |
---|
210 | $str_lang[$strings['id']] = tradlang_utf8(preg_replace(',^(<(MODIF|NEW|PLUS_UTILISE)>)+,US', '', $str_lang[$strings['id']])); |
---|
211 | if(isset($array_po[$strings['id']]['str']) && strlen(trim($array_po[$strings['id']]['str'])) > 0){ |
---|
212 | if(($strings['str'] != $array_po[$strings['id']]['str']) OR ($strings['statut'] != $array_po[$strings['id']]['statut'])){ |
---|
213 | $modifs[$strings['id']] = array('orig'=>$strings['str'],'new'=>$array_po[$strings['id']]['str'],'statut'=>$array_po[$strings['id']]['statut']); |
---|
214 | break; |
---|
215 | } |
---|
216 | } |
---|
217 | } |
---|
218 | } |
---|
219 | } |
---|
220 | } |
---|
221 | } |
---|
222 | } |
---|
223 | if (!count($post) && !$erreurs['fichier_langue']) |
---|
224 | $erreurs['fichier_langue'] = _T('medias:erreur_indiquez_un_fichier'); |
---|
225 | |
---|
226 | if(!count($modifs) && !$erreurs['fichier_langue']) |
---|
227 | $erreurs['fichier_langue'] = _T('tradlang:erreur_upload_aucune_modif'); |
---|
228 | } |
---|
229 | spip_log($modifs,'test.'._LOG_ERREUR); |
---|
230 | return $erreurs; |
---|
231 | } |
---|
232 | |
---|
233 | function formulaires_tradlang_importer_langue_verifier_2_dist($id_tradlang_module,$lang) { |
---|
234 | $module = sql_getfetsel('module','spip_tradlang_modules','id_tradlang_module='.intval($id_tradlang_module)); |
---|
235 | $fichier_php = $module.'_'.$lang.'.php'; |
---|
236 | $fichier_po = $module.'_'.$lang.'.po'; |
---|
237 | $dir_lang = sous_repertoire (_DIR_VAR, 'cache-tradlang'); |
---|
238 | $dest = $dir_lang.$fichier_php; |
---|
239 | $destpo = $dir_lang.$fichier_po; |
---|
240 | $modifs = $erreurs = array(); |
---|
241 | if(file_exists($dest)){ |
---|
242 | $memtrad = $GLOBALS['idx_lang'] = 'i18n_'.crc32($module).'_tmp'; |
---|
243 | include $dest; |
---|
244 | $str_lang = $GLOBALS[$memtrad]; // on a vu certains fichiers faire des betises et modifier idx_lang |
---|
245 | |
---|
246 | $langues_base = sql_allfetsel('*','spip_tradlangs','id_tradlang_module='.intval($id_tradlang_module).' AND lang='.sql_quote($lang)); |
---|
247 | $modifs = array(); |
---|
248 | foreach($langues_base as $strings_id => $strings){ |
---|
249 | if(_request($strings['id']) == 'oui') |
---|
250 | $modifs[] = $strings['id']; |
---|
251 | unset($langues_base[$strings_id]); |
---|
252 | } |
---|
253 | }else if(file_exists($destpo)){ |
---|
254 | $langues_base = sql_allfetsel('id','spip_tradlangs','id_tradlang_module='.intval($id_tradlang_module).' AND lang='.sql_quote($lang)); |
---|
255 | $modifs = array(); |
---|
256 | foreach($langues_base as $strings_id => $strings){ |
---|
257 | if(_request($strings['id']) == 'oui') |
---|
258 | $modifs[] = $strings['id']; |
---|
259 | unset($langues_base[$strings_id]); |
---|
260 | } |
---|
261 | } |
---|
262 | else |
---|
263 | $erreurs['message_erreur'] = "Le fichier temporaire $dest n'a pas été créé"; |
---|
264 | if(!count($modifs)) |
---|
265 | $erreurs['message_erreur'] = _T('tradlang:erreur_upload_choisir_une'); |
---|
266 | spip_log($modifs,'test.'._LOG_ERREUR); |
---|
267 | return $erreurs; |
---|
268 | } |
---|
269 | |
---|
270 | function formulaires_tradlang_importer_langue_traiter_dist($id_tradlang_module,$lang) { |
---|
271 | include_spip('action/editer_tradlang'); |
---|
272 | |
---|
273 | $module = sql_getfetsel('module','spip_tradlang_modules','id_tradlang_module='.intval($id_tradlang_module)); |
---|
274 | $fichier_php = $module.'_'.$lang.'.php'; |
---|
275 | $fichier_po = $module.'_'.$lang.'.po'; |
---|
276 | $dir_lang = sous_repertoire (_DIR_VAR, 'cache-tradlang'); |
---|
277 | $count=0; |
---|
278 | if(file_exists($dest = $dir_lang.$fichier_php)){ |
---|
279 | $memtrad = $GLOBALS['idx_lang'] = 'i18n_'.crc32($module).'_tmp'; |
---|
280 | include $dest; |
---|
281 | |
---|
282 | /** |
---|
283 | * Recuperation des statuts dans le fichier |
---|
284 | */ |
---|
285 | $contenu=file_get_contents($dest); |
---|
286 | $contenu = str_replace("\t",'',$contenu); |
---|
287 | $tab=preg_split("/\r\n|\n\r|;\n|\n\/\/|\(\n|\n\);\n|\'\,\n|\n[\s\t]*(\')|\/\/[\s\t][0-9A-Z]\n[\s\t](\')/", $contenu,'-1',PREG_SPLIT_NO_EMPTY); |
---|
288 | $liste_trad=array(); |
---|
289 | reset($tab); |
---|
290 | |
---|
291 | while (list(,$ligne) = each($tab)){ |
---|
292 | $ligne = str_replace("\'",'',$ligne); |
---|
293 | if (strlen($ligne)>0) { |
---|
294 | if (preg_match("/\'(.*?)\'[\s\t]*=>[\s\t]*\'(.*?)\'[\s\t]*,{0,1}[\s\t]*(#.*)?/ms",$ligne,$matches)) { |
---|
295 | if (isset($matches[1]) and isset($matches[3]) and strlen(trim($matches[3]))>0 ) { |
---|
296 | list(,$comm)=explode("#",$matches[3]); |
---|
297 | if(in_array(trim($comm),array('NEW','MODIF','RELIRE'))) |
---|
298 | $liste_trad[$matches[1]]=trim($comm); |
---|
299 | } |
---|
300 | } |
---|
301 | } |
---|
302 | } |
---|
303 | reset($liste_trad); |
---|
304 | $keys_liste_trad = array_keys($liste_trad); |
---|
305 | |
---|
306 | $str_lang = $GLOBALS[$memtrad]; // on a vu certains fichiers faire des betises et modifier idx_lang |
---|
307 | |
---|
308 | if (is_null($str_lang)) { |
---|
309 | spip_log("Erreur, fichier $module mal forme",'tradlang'); |
---|
310 | } |
---|
311 | |
---|
312 | $langues_base = sql_allfetsel('*','spip_tradlangs','module='.sql_quote($module).' AND lang='.sql_quote($lang)); |
---|
313 | $modifs = array(); |
---|
314 | foreach($langues_base as $strings_id => $strings){ |
---|
315 | if(_request($strings['id']) == 'oui'){ |
---|
316 | $set_new = tradlang_utf8(preg_replace(',^(<(MODIF|NEW|PLUS_UTILISE)>)+,US', '', $str_lang[$strings['id']])); |
---|
317 | $set = array('str'=>$set_new,'statut'=> (in_array($strings['id'],$keys_liste_trad) ? $liste_trad[$strings['id']] : 'OK')); |
---|
318 | tradlang_set($strings['id_tradlang'],$set); |
---|
319 | $count++; |
---|
320 | unset($langues_base[$strings_id]); |
---|
321 | } |
---|
322 | } |
---|
323 | spip_unlink($dest); |
---|
324 | } |
---|
325 | else if(file_exists($dest = $dir_lang.$fichier_po)){ |
---|
326 | lire_fichier($dest,$contenu_po); |
---|
327 | preg_match_all(',(\#\, php-format|\#\, fuzzy\, php-format).*msgstr(.*)\#,Uims', $contenu_po,$matches); |
---|
328 | $array_po = array(); |
---|
329 | foreach($matches[0] as $match){ |
---|
330 | $statut = "OK"; |
---|
331 | preg_match(',\#\| msgid \"(.*)\"\n,Uims',$match,$matches); |
---|
332 | preg_match(',msgstr \"(.*)\n\#,Uims',$match,$matches_str); |
---|
333 | $str = rtrim(trim($matches_str[1]),'"'); |
---|
334 | $str = trim(str_replace("\"\n\"","\n",$str)); |
---|
335 | if(preg_match(',\#\, fuzzy\, php-format,',$match,$matches_statut)){ |
---|
336 | $statut = "MODIF"; |
---|
337 | } |
---|
338 | if($str != '') |
---|
339 | $array_po[$matches[1]] = array('str'=>$str,'statut'=>$statut); |
---|
340 | } |
---|
341 | |
---|
342 | $langues_base = sql_allfetsel('id_tradlang,id,str,statut','spip_tradlangs','module='.sql_quote($module).' AND lang='.sql_quote($lang)); |
---|
343 | $modifs_po = array(); |
---|
344 | foreach($langues_base as $strings_id => $strings){ |
---|
345 | if(_request($strings['id']) == 'oui'){ |
---|
346 | $set=$instit=null; |
---|
347 | if(isset($array_po[$strings['id']]['str']) && strlen(trim($array_po[$strings['id']]['str'])) > 0){ |
---|
348 | $set = array('str'=>$array_po[$strings['id']]['str']); |
---|
349 | tradlang_set($strings['id_tradlang'],$set); |
---|
350 | $instit = array('statut'=>$array_po[$strings['id']]['statut']); |
---|
351 | instituer_tradlang($strings['id_tradlang'],$instit); |
---|
352 | $count++; |
---|
353 | unset($langues_base[$strings_id]); |
---|
354 | } |
---|
355 | } |
---|
356 | } |
---|
357 | spip_unlink($dest); |
---|
358 | } |
---|
359 | $res['editable'] = false; |
---|
360 | if($count > 1) |
---|
361 | $res['message_ok'] = _T('tradlang:message_upload_nb_modifies',array('nb'=>$count)); |
---|
362 | else |
---|
363 | $res['message_ok'] = _T('tradlang:message_upload_nb_modifies',array('nb'=>$count)); |
---|
364 | return $res; |
---|
365 | } |
---|
366 | ?> |
---|