upgrade.php 953 B

12345678910111213141516171819202122232425262728293031323334353637383940
  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: upgrade.php 33387 2013-06-05 03:21:26Z jeffjzhang $
  7. */
  8. if(!defined('IN_DISCUZ')) {
  9. exit('Access Denied');
  10. }
  11. if ($_GET['fromversion'] < 1.04) {
  12. $my_search_data = array(
  13. 'status' => 0,
  14. 'allow_hot_topic' => 1,
  15. 'allow_thread_related' => 1,
  16. 'allow_recommend_related' => 1,
  17. 'allow_thread_related_bottom' => 0,
  18. 'allow_forum_recommend' => 1,
  19. 'allow_forum_related' => 0,
  20. 'allow_collection_related' => 1,
  21. 'allow_search_suggest' => 0,
  22. 'cp_version' => 1,
  23. 'recwords_lifetime' => 21600,
  24. );
  25. if (is_array($_G['setting']['my_search_data'])) {
  26. $my_search_data = array_merge($my_search_data, $_G['setting']['my_search_data']);
  27. }
  28. $insertData = serialize($my_search_data);
  29. $sql = <<<EOF
  30. REPLACE INTO pre_common_setting VALUES ('my_search_data', '{$insertData}');
  31. EOF;
  32. runquery($sql);
  33. }
  34. $finish = TRUE;