cache_relatedlink.php 554 B

12345678910111213141516171819202122232425262728
  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_relatedlink.php 24479 2011-09-21 06:40:33Z liulanbo $
  7. */
  8. if(!defined('IN_DISCUZ')) {
  9. exit('Access Denied');
  10. }
  11. function build_cache_relatedlink() {
  12. global $_G;
  13. $data = array();
  14. $query = C::t('common_relatedlink')->range();
  15. foreach($query as $link) {
  16. if(substr($link['url'], 0, 7) != 'http://') {
  17. $link['url'] = 'http://'.$link['url'];
  18. }
  19. $data[] = $link;
  20. }
  21. savecache('relatedlink', $data);
  22. }
  23. ?>