Skip to content

Commit 72329a6

Browse files
committed
BUG FIX
bug fixes not deleting meta data when a content is deleted
1 parent 6ab1f94 commit 72329a6

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/Darryldecode/Backend/Base/Registrar/Registrar.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class Registrar {
1313
/**
1414
* the laravel backend version
1515
*/
16-
const VERSION = '1.0.8';
16+
const VERSION = '1.0.9';
1717
const VERSION_NAME = 'Alpha';
1818

1919
/**

src/Darryldecode/Backend/Components/ContentBuilder/Commands/DeleteContentCommand.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function __construct($id, $disablePermissionChecking = false)
4040
public function handle(Content $content, Dispatcher $dispatcher)
4141
{
4242
// get the content
43-
if( ! $c = $content->with(array('type'))->find($this->id) )
43+
if( ! $c = $content->with(array('type','metaData'))->find($this->id) )
4444
{
4545
return new CommandResult(false, "Content not found.", null, 404);
4646
}
@@ -61,6 +61,7 @@ public function handle(Content $content, Dispatcher $dispatcher)
6161
$dispatcher->fire($c->type->type.'.deleting', array($c));
6262

6363
// begin delete
64+
$c->metaData()->delete();
6465
$c->delete();
6566

6667
// fire deleted event

0 commit comments

Comments
 (0)