Browse Source

优化

author
wanghongjun 8 months ago
parent
commit
e2feb4535f
  1. 4
      app/enterprise/controller/Posts.php

4
app/enterprise/controller/Posts.php

@ -114,7 +114,7 @@ class Posts extends BaseController
$whereAnd = " ( p.status = 1 and p.delete_time = 0"; $whereAnd = " ( p.status = 1 and p.delete_time = 0";
$whereOr = ''; $whereOr = '';
if ($friendUserId) { if (!empty($friendUserId)) {
// 验证是否为当前用户的好友 // 验证是否为当前用户的好友
if (!is_numeric($friendUserId)) { if (!is_numeric($friendUserId)) {
return warning(lang('system.error')); return warning(lang('system.error'));
@ -178,7 +178,7 @@ class Posts extends BaseController
['status', '=', 1], ['status', '=', 1],
['delete_time', '=', 0] ['delete_time', '=', 0]
]; ];
if ($friendUserId) { if (!empty($friendUserId)) {
// 验证是否为当前用户的好友 // 验证是否为当前用户的好友
if (!is_numeric($friendUserId)) { if (!is_numeric($friendUserId)) {
return warning(lang('system.error')); return warning(lang('system.error'));

Loading…
Cancel
Save