本帖最后由 zhongl28 于 2012-4-10 10:47 编辑
我的站点从2.0升级到2.5后,后台关闭站点设置为否,无论如何更新缓存仍然显示论坛关闭,我查看数据库发现skey->bbclosed是0,即关闭。所以有理由怀疑2.5的缓存机制有问题!为了不影响使用,我暂时通过以下方法打开站点。
找到 \source\class\discuz\discuz_application.php 文件 521-529行,将其注释。
方法如下:- if($this->var['setting']['bbclosed']) {
- if($this->var['uid'] && ($this->var['group']['allowvisit'] == 2 || $this->var['groupid'] == 1)) {
- } elseif(in_array(CURSCRIPT, array('admin', 'member', 'api')) || defined('ALLOWGUEST') && ALLOWGUEST) {
- } else {
- $closedreason = C::t('common_setting')->fetch('closedreason');
- $closedreason = str_replace(':', ':', $closedreason);
- showmessage($closedreason ? $closedreason : 'board_closed', NULL, array('adminemail' => $this->var['setting']['adminemail']), array('login' => 1));
- }
- }
复制代码 改为- // if($this->var['setting']['bbclosed']) {
- // if($this->var['uid'] && ($this->var['group']['allowvisit'] == 2 || $this->var['groupid'] == 1)) {
- // } elseif(in_array(CURSCRIPT, array('admin', 'member', 'api')) || defined('ALLOWGUEST') && ALLOWGUEST) {
- // } else {
- // $closedreason = C::t('common_setting')->fetch('closedreason');
- // $closedreason = str_replace(':', ':', $closedreason);
- // showmessage($closedreason ? $closedreason : 'board_closed', NULL, array('adminemail' => $this->var['setting']['adminemail']), array('login' => 1));
- // }
- // }
复制代码 |