修改thinkcmf默认发布状态,改为默认发布


从数据库中查看,post_status默认是1,如图:

20190131183738_副本.jpg

但是,后台代码中,初始化了0:

//状态只能设置默认值。未发布、未置顶、未推荐
$data['post']['post_status'] = 0;
$data['post']['is_top']      = 0;
$data['post']['recommended'] = 0;

修改为:

//状态只能设置默认值。未发布、未置顶、未推荐
$data['post']['post_status'] = 1;
$data['post']['is_top']      = 0;
$data['post']['recommended'] = 0;

代码位置:\app\portal\controller\AdminArticleController.php,121行。版本号:ThinkCMF-5.0.190111