Skip to content

Commit

Permalink
bugfix 文档移动到其它项目后,分享链接消失的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
mylxsw committed Sep 1, 2021
1 parent 631c38d commit 2670887
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/Http/Controllers/DocumentController.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
use App\Repositories\Document;
use App\Repositories\DocumentHistory;
use App\Repositories\DocumentScore;
use App\Repositories\PageShare;
use App\Repositories\Project;
use Carbon\Carbon;
use Illuminate\Http\Request;
Expand Down Expand Up @@ -650,6 +651,11 @@ public function move(Request $request, $project_id, $page_id)
'pid' => $targetPage->id ?? 0,
]);

// 修改文档分享信息
PageShare::where('page_id', $pageItem->id)->update([
'project_id' => $targetProject->id,
]);

// 修改子页面的project_id
$this->traverseNavigators(
$navigators,
Expand Down

0 comments on commit 2670887

Please sign in to comment.