|
@@ -1442,7 +1442,10 @@ class PostRepository
|
|
DB::beginTransaction();
|
|
DB::beginTransaction();
|
|
try {
|
|
try {
|
|
$topicIds = explode(',', $post->topic_ids);
|
|
$topicIds = explode(',', $post->topic_ids);
|
|
- if(in_array($toTopicId, $topicIds)) continue;
|
|
|
|
|
|
+ if(in_array($toTopicId, $topicIds)){
|
|
|
|
+ DB::rollBack();
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
foreach($topicIds as &$val){
|
|
foreach($topicIds as &$val){
|
|
if($val == $topicId) $val = $toTopicId;
|
|
if($val == $topicId) $val = $toTopicId;
|
|
}
|
|
}
|