action.php 681 B

123456789101112131415161718192021222324
  1. <?php
  2. global $_,$conf;
  3. switch($_['action']){
  4. //Reset des paramètres du thème
  5. case 'customiser_reset_theme':
  6. global $myUser,$_,$conf;
  7. if(!$myUser->can('customiser','configure')) throw new Exception("Permissions insuffisantes",403);
  8. if(file_exists(__DIR__.SLASH.'css'.SLASH.'theme.css'))
  9. unlink(__DIR__.SLASH.'css'.SLASH.'theme.css');
  10. header('location: setting.php?section=global.customiser');
  11. break;
  12. case 'customiser_theme_save':
  13. Action::write(function(&$response){
  14. global $myUser,$_,$conf;
  15. if(!$myUser->can('customiser','configure')) throw new Exception("Permissions insuffisantes",403);
  16. $conf->put('core_theme',$_['theme']);
  17. });
  18. break;
  19. }
  20. ?>