Skip to content

Commit

Permalink
Removed deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
aimeos committed Oct 28, 2019
1 parent 7e87f3e commit 26984b3
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 260 deletions.
63 changes: 0 additions & 63 deletions admin/jqadm/src/Admin/JQAdm/Common/Decorator/Cache.php

This file was deleted.

48 changes: 0 additions & 48 deletions admin/jqadm/src/Admin/JQAdm/Common/Decorator/Index.php

This file was deleted.

7 changes: 6 additions & 1 deletion admin/jqadm/src/Admin/JQAdm/Product/Standard.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ public function create()
*/
public function delete()
{
$tags = ['product'];
$view = $this->getView();
$context = $this->getContext();

Expand All @@ -141,7 +142,7 @@ public function delete()
$search->setConditions( $search->compare( '==', 'product.id', $ids ) );
$items = $manager->searchItems( $search, $this->getDomains() );

foreach( $items as $item )
foreach( $items as $id => $item )
{
$view->item = $item;

Expand All @@ -150,12 +151,14 @@ public function delete()
}

$manager->saveItem( $view->item );
$tags[] = 'product-' . $id;
}

$manager->deleteItems( array_keys( $items ) );
$manager->commit();

\Aimeos\MShop::create( $context, 'index' )->deleteItems( array_keys( $items ) );
$context->getCache()->deleteByTags( $tags );

$this->nextAction( $view, 'search', 'product', null, 'delete' );
return;
Expand Down Expand Up @@ -253,6 +256,8 @@ public function save()
$manager->commit();

\Aimeos\MShop::create( $context, 'index' )->rebuild( [$item->getId() => $item] );
$context->getCache()->deleteByTags( ['product', 'product-' . $item->getId()] );


$this->nextAction( $view, $view->param( 'next' ), 'product', $view->item->getId(), 'save' );
return;
Expand Down
80 changes: 0 additions & 80 deletions admin/jqadm/tests/Admin/JQAdm/Common/Decorator/CacheTest.php

This file was deleted.

54 changes: 0 additions & 54 deletions admin/jqadm/tests/Admin/JQAdm/Common/Decorator/IndexTest.php

This file was deleted.

2 changes: 1 addition & 1 deletion admin/jqadm/tests/Admin/JQAdm/Product/StandardTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ public function testGetSubClientUnknown()

public function testGetSubClientDecorators()
{
$this->context->getConfig()->set( 'admin/jqadm/product/media/decorators/global', array( 'Cache' ) );
$this->context->getConfig()->set( 'admin/jqadm/product/media/decorators/global', array( 'Page' ) );

$result = $this->object->getSubClient( 'media' );
$this->assertInstanceOf( \Aimeos\Admin\JQAdm\Iface::class, $result );
Expand Down
13 changes: 0 additions & 13 deletions config/admin/jqadm.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,6 @@
],
],
],
'product' => [
'decorators' => [
'global' => ['Index'],
],
],
],
'common' => [
'decorators' => [
Expand Down Expand Up @@ -99,9 +94,6 @@
],
],
'product' => [
'decorators' => [
'global' => ['Cache'],
],
'standard' => [
'subparts' => [
'selection' => 'selection',
Expand Down Expand Up @@ -169,11 +161,6 @@
],
],
],
'product/category' => [
'decorators' => [
'local' => ['Cache'],
],
],
'service' => [
'standard' => [
'subparts' => [
Expand Down

0 comments on commit 26984b3

Please sign in to comment.