Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Optimized reloading for batchDelete - do not reload first object sinc…

…e there were no changes yet
  • Loading branch information...
commit 302a06d517a50cd57837b6857378caebed907784 1 parent a5ec235
@rozwell rozwell authored
View
2  data/generator/sfPropelModule/admin/parts/batchAction.php
@@ -53,7 +53,7 @@ protected function executeBatchDelete(sfWebRequest $request)
$this->dispatcher->notify(new sfEvent($this, 'admin.delete_object', array('object' => $object)));
// reload the object if it's in a tree to avoid breaking nested set structure
- if (method_exists($object, 'isInTree') && $object->isInTree())
+ if ($count && method_exists($object, 'isInTree') && $object->isInTree())
{
$object->reload();
}
View
2  data/generator/sfPropelModule/admin15/parts/batchAction.php
@@ -53,7 +53,7 @@ protected function executeBatchDelete(sfWebRequest $request)
$this->dispatcher->notify(new sfEvent($this, 'admin.delete_object', array('object' => $object)));
// reload the object if it's in a tree to avoid breaking nested set structure
- if (method_exists($object, 'isInTree') && $object->isInTree())
+ if ($count && method_exists($object, 'isInTree') && $object->isInTree())
{
$object->reload();
}
Please sign in to comment.
Something went wrong with that request. Please try again.