通知设置 新通知
程序升级后移动端显示都是空的怎么办?
小码站 回复了问题 • 2 人关注 • 1 个回复 • 131 次浏览 • 2019-10-20 11:09
有没有3.3.2升级到3.3.3的升级包呢?只能下载官方的完整安装包不适合升级吧
回复dsy4511 发起了问题 • 1 人关注 • 0 个回复 • 350 次浏览 • 2019-08-14 11:44
文章逻辑删除后,统计数量出错!
程_什么么 发表了文章 • 1 个评论 • 354 次浏览 • 2019-08-10 19:35
文章逻辑删除后,数量统计不正确!
看了下模块
代码顺序搞错了
/models/article.php 文件
原代码 先统计的数据,再更新的文章is_del 状态!
public function remove_article($article_id,$whereDel = false)
{
if (!$article_info = $this->get_article_info_by_id($article_id))
{
return false;
}
$delWhere = null;
$isdel = 1;
if($whereDel !== false){
$delWhere = ' and is_del != 1';
$isdel = $whereDel;
}
$this->update('topic_relation', ['is_del'=>$isdel],"`type` = 'article' AND item_id = " . intval($article_id).$delWhere);// 删除话题关联
$this->update('posts_index', ['is_del'=>$isdel],'post_type="article" and post_id = ' . intval($article_id).$delWhere);
$this->update('user_action_history', ['is_del'=>$isdel],'associate_id = ' . intval($article_id).$delWhere);
$this->shutdown_update('users', array(
'article_count' => $this->count('article', 'is_del=0 and uid = ' . intval($article_info['uid']))
), 'uid = ' . intval($article_info['uid']));
$this->model('topic')->update_discuss_count(3);
AWS_APP::cache()->clean();
return $this->update('article', ['is_del'=>$isdel],'id = ' . intval($article_id).$delWhere);
}
修改成
public function remove_article($article_id,$whereDel = false)
{
if (!$article_info = $this->get_article_info_by_id($article_id))
{
return false;
}
$delWhere = null;
$isdel = 1;
if($whereDel !== false){
$delWhere = ' and is_del != 1';
$isdel = $whereDel;
}
$this->update('topic_relation', ['is_del'=>$isdel],"`type` = 'article' AND item_id = " . intval($article_id).$delWhere);// 删除话题关联
$this->update('posts_index', ['is_del'=>$isdel],'post_type="article" and post_id = ' . intval($article_id).$delWhere);
$this->update('user_action_history', ['is_del'=>$isdel],'associate_id = ' . intval($article_id).$delWhere);
$this->update('article', ['is_del'=>$isdel],'id = ' . intval($article_id).$delWhere);
$this->shutdown_update('users', array(
'article_count' => $this->count('article', 'is_del=0 and uid = ' . intval($article_info['uid']))
), 'uid = ' . intval($article_info['uid']));
$this->model('topic')->update_discuss_count(3);
AWS_APP::cache()->clean();
return true;
}
下面的恢复文章 类模块也按此修改
public function recover_question($article_id,$whereDel = false)
(粗心大意,恢复文章类 翻译成了 恢复问题 ) 。。。。
动态 数据数量问题
程_什么么 发表了文章 • 0 个评论 • 301 次浏览 • 2019-08-08 02:40
如果数据删除了,但是动态还是会记数。
比如显示数量显示10条。 如果你把最前面的10条动态数据删除了,则动态页面就没有内容显示,因为把删除的10条数据 也统计了,但是删除的内容其实是不会显示的。
解决办法:
在system/class/cls_action_log_class.inc.php
找到 get_actions_fresh_by_where
在这个类下面增加一个判断
$where = '(' . $where . ') AND is_del = 0';
升级bug:3.1.9升级版本到3.2.2出现了问题,本地已经成功安装了wecenter3.2.2,专栏等都可以正常使用,但是我导入3.1.9的数据库sql文件后,网站就无法在导航页找到专栏了
fanta 回复了问题 • 2 人关注 • 1 个回复 • 652 次浏览 • 2019-05-04 21:44
UA引起的后台登录问题,登录成功,但验证失败导致反复登录却无登录状态
kenw2004 发表了文章 • 1 个评论 • 572 次浏览 • 2019-04-18 01:49
{
AWS_APP::session()->admin_login = AWS_APP::crypt()->encode(json_encode(array(
'uid' => $uid,
'UA' => md5($_SERVER['HTTP_USER_AGENT']),
'ip' => fetch_ip(),
)));
}
unset(AWS_APP::session()->admin_login);
H::ajax_json_output(AWS_APP::RSM(null, -1, AWS_APP::lang()->_t('会话超时, 请重新登录')));
} else {
H::redirect_msg(AWS_APP::lang()->_t('会话超时, 请重新登录'), '/admin/login/url-' . base64_encode($_SERVER['REQUEST_URI']));
}
}