action.php 592 B

12345678910111213141516171819202122
  1. <?php
  2. //Sauvegarde des configurations de client
  3. Action::register('client_map_setting_save',function(&$response){
  4. global $myUser,$_,$conf;
  5. User::check_access('clientmap','configure');
  6. //Si input file "multiple", possibilité de normlaiser le
  7. //tableau $_FILES récupéré avec la fonction => normalize_php_files();
  8. foreach(Configuration::setting('clientmap') as $key=>$value){
  9. if(!is_array($value)) continue;
  10. $allowed[] = $key;
  11. }
  12. foreach ($_['fields'] as $key => $value) {
  13. if(in_array($key, $allowed))
  14. $conf->put($key,$value);
  15. }
  16. });
  17. ?>