FIX: change url to something random after content delete.

In this way, deleted page will no longer "occupy" url.
This commit is contained in:
Michal Kváček
2016-04-06 01:48:14 +02:00
parent afc2af6e9b
commit 4594e84945
@@ -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?