FIX: fix duplicate url
In this way, deleted page will no longer "occupy" url.
This commit is contained in:
@@ -222,7 +222,9 @@ class EditContent extends Controller
|
||||
}
|
||||
|
||||
// change url to something unique
|
||||
$page->url = uniqid($page->url.'_');
|
||||
$oldURL = $page->url;
|
||||
$page->url = uniqid($page->url.'_deleted');
|
||||
$page->save();
|
||||
|
||||
list ($revision, $changedColumns) = $page->updateWithHistory(['status' => 'status'], ['status' => Content::STATUS_DELETED]);
|
||||
|
||||
@@ -241,7 +243,7 @@ class EditContent extends Controller
|
||||
->route('content.overview')
|
||||
->with('success', trans('admin/contents.pageDeleted', [
|
||||
'name' => $page->title,
|
||||
'url' => $page->url
|
||||
'url' => $oldURL
|
||||
]));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user