Skip to content

Commit

Permalink
Improve the Content module
Browse files Browse the repository at this point in the history
  • Loading branch information
LuckyCyborg committed Jul 17, 2019
1 parent eb5e756 commit 5c2a34a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
2 changes: 1 addition & 1 deletion app/Platform/Bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// Define The Application Version
//--------------------------------------------------------------------------

define('VERSION', '1.1.2');
define('VERSION', '1.1.3');

//--------------------------------------------------------------------------
// Set PHP Error Reporting Options
Expand Down
11 changes: 3 additions & 8 deletions modules/Content/Controllers/Admin/Posts.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});
Expand All @@ -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();

//
Expand Down

0 comments on commit 5c2a34a

Please sign in to comment.