Commit 8e752972 by 冷斌

fix bug

parent 532c3369
...@@ -102,9 +102,6 @@ class DynamicController extends AdminbaseController ...@@ -102,9 +102,6 @@ class DynamicController extends AdminbaseController
{ {
$id = intval(I("get.id")); $id = intval(I("get.id"));
$report = M("users_report_dynamic")->where("id=$id")->find(); $report = M("users_report_dynamic")->where("id=$id")->find();
if (empty($report)) {
return $this->index();
}
$dynamic = $this->dynamic_model->where("id={$report['dynamic_id']}")->find(); $dynamic = $this->dynamic_model->where("id={$report['dynamic_id']}")->find();
$userinfo = getUserInfo($report['uid']); $userinfo = getUserInfo($report['uid']);
$userinfo2 = getUserInfo($dynamic['uid']); $userinfo2 = getUserInfo($dynamic['uid']);
...@@ -131,7 +128,7 @@ class DynamicController extends AdminbaseController ...@@ -131,7 +128,7 @@ class DynamicController extends AdminbaseController
M("users_dynamic")->where("dynamic_id={$id}")->delete(); M("users_dynamic")->where("dynamic_id={$id}")->delete();
M("users_report_dynamic")->where("dynamic_id={$id}")->delete(); M("users_report_dynamic")->where("dynamic_id={$id}")->delete();
} }
$this->success("更新成功!"); $this->success("更新成功!", U('dynamic/index'));
} }
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment