optimizer_thread.php 964 B

12345678910111213141516171819202122232425262728293031323334353637
  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: optimizer_thread.php 31344 2012-08-15 04:01:32Z zhangjie $
  7. */
  8. if(!defined('IN_DISCUZ')) {
  9. exit('Access Denied');
  10. }
  11. class optimizer_thread {
  12. public function __construct() {
  13. }
  14. public function check() {
  15. $return = array();
  16. $status = helper_dbtool::gettablestatus(DB::table('forum_thread'), false);
  17. if($status && $status['Data_length'] > 400 * 1048576) {
  18. $return = array('status' => '1','type' => 'header', 'lang' => lang('optimizer', 'optimizer_thread_need_optimizer'));
  19. } else {
  20. $return = array('status' => '0', 'type' => 'header', 'lang' => lang('optimizer', 'optimizer_thread_no_need'));
  21. }
  22. return $return;
  23. }
  24. public function optimizer() {
  25. $adminfile = defined(ADMINSCRIPT) ? ADMINSCRIPT : 'admin.php';
  26. dheader('Location: '.$_G['siteurl'].$adminfile.'?action=postsplit&operation=manage');
  27. }
  28. }
  29. ?>