cache_forumstick.php 719 B

1234567891011121314151617181920212223242526272829303132
  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_forumstick.php 24152 2011-08-26 10:04:08Z zhangguosheng $
  7. */
  8. if(!defined('IN_DISCUZ')) {
  9. exit('Access Denied');
  10. }
  11. function build_cache_forumstick() {
  12. $data = array();
  13. $forumstickthreads = C::t('common_setting')->fetch('forumstickthreads', true);
  14. $forumstickcached = array();
  15. if($forumstickthreads) {
  16. foreach($forumstickthreads as $forumstickthread) {
  17. foreach($forumstickthread['forums'] as $fid) {
  18. $forumstickcached[$fid][] = $forumstickthread['tid'];
  19. }
  20. }
  21. $data = $forumstickcached;
  22. } else {
  23. $data = array();
  24. }
  25. savecache('forumstick', $data);
  26. }
  27. ?>