cache_modreasons.php 560 B

1234567891011121314151617181920212223
  1. <?php
  2. /**
  3. * [Discuz!] (C)2001-2099 Comsenz Inc.
  4. * This is NOT a freeware, use is subject to license terms
  5. *
  6. * $Id: cache_modreasons.php 24152 2011-08-26 10:04:08Z zhangguosheng $
  7. */
  8. if(!defined('IN_DISCUZ')) {
  9. exit('Access Denied');
  10. }
  11. function build_cache_modreasons() {
  12. $settings = C::t('common_setting')->fetch_all(array('modreasons', 'userreasons'));
  13. foreach($settings as $key => $data) {
  14. $data = str_replace(array("\r\n", "\r"), array("\n", "\n"), $data);
  15. $data = explode("\n", trim($data));
  16. savecache($key, $data);
  17. }
  18. }
  19. ?>