diff --git a/app/Platform/Bootstrap.php b/app/Platform/Bootstrap.php index e29bd63f..c772d814 100644 --- a/app/Platform/Bootstrap.php +++ b/app/Platform/Bootstrap.php @@ -14,7 +14,7 @@ // Define The Application Version //-------------------------------------------------------------------------- -define('VERSION', '1.1.2'); +define('VERSION', '1.1.3'); //-------------------------------------------------------------------------- // Set PHP Error Reporting Options diff --git a/modules/Content/Controllers/Admin/Posts.php b/modules/Content/Controllers/Admin/Posts.php index fd8b0e63..0f3c3d47 100644 --- a/modules/Content/Controllers/Admin/Posts.php +++ b/modules/Content/Controllers/Admin/Posts.php @@ -441,14 +441,10 @@ public function destroy($id) // Fire the starting event. Event::dispatch('content.post.deleting', array($post)); - if ($type == 'revision') { - } // Delete the Post. - $taxonomies = $post->taxonomies; - $post->taxonomies()->detach(); - $taxonomies->each(function ($taxonomy) + $post->taxonomies->each(function ($taxonomy) { $taxonomy->updateCount(); }); @@ -467,15 +463,14 @@ public function destroy($id) protected function deleteRevision(Post $revision) { + $post = $revision->parent()->first(); + if (preg_match('#^(?:\d+)-revision-v(\d+)$#', $revision->name, $matches) !== 1) { $version = 0; } else { $version = (int) $matches[1]; } - $post = $revision->parent()->first(); - - // Delete the Post Revision. $revision->delete(); //