FIX: change url to something random after content delete.
In this way, deleted page will no longer "occupy" url.
This commit is contained in:
@@ -221,6 +221,9 @@ class EditContent extends Controller
|
|||||||
->with('error', trans('admin/contents.invalidPage'));
|
->with('error', trans('admin/contents.invalidPage'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// change url to something unique
|
||||||
|
$page->url = uniqid($page->url.'_');
|
||||||
|
|
||||||
list ($revision, $changedColumns) = $page->updateWithHistory(['status' => 'status'], ['status' => Content::STATUS_DELETED]);
|
list ($revision, $changedColumns) = $page->updateWithHistory(['status' => 'status'], ['status' => Content::STATUS_DELETED]);
|
||||||
|
|
||||||
// was something changed?
|
// was something changed?
|
||||||
|
|||||||
Reference in New Issue
Block a user