Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
- Implemented enhancement #016993: transactions in content/trash must…
… be reduced

(cherry picked from commit e9888af)

Conflicts:

	doc/changelogs/4.4/unstable/CHANGELOG-4.4.0alpha4-to-4.4.0alpha5
  • Loading branch information
Bertrand Dunogier committed Jul 15, 2010
1 parent b497787 commit fa4d15e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
5 changes: 2 additions & 3 deletions doc/changelogs/4.3/CHANGELOG-4.3.0-to-4.3.1
Expand Up @@ -81,6 +81,5 @@ Changes from 4.3.0 to 4.3.1
(Merged from master (4.4alpha5) commit 7a8e080)
- Fixed bug #016824: Filenames with international characters are garbled in IE
(Merged from master (4.4alpha5) commit c5af0e8)
- Fixed bug #016766: Class Group override condition isn't implemented for content/edit.tpl
(Merged from master (4.4alpha5) commit 642ab88)

- Implemented enhancement #016993: transactions in content/trash must be reduced
(Merged from master (4.4alpha5) commit e9888af)
9 changes: 1 addition & 8 deletions kernel/content/trash.php
Expand Up @@ -59,8 +59,6 @@
{
$deleteIDArray = $http->postVariable( 'DeleteIDArray' );

$db = eZDB::instance();
$db->begin();
foreach ( $deleteIDArray as $deleteID )
{

Expand All @@ -70,13 +68,11 @@
null,
null,
true );
eZDebug::writeNotice( $deleteID, "deleteID" );
foreach ( $objectList as $object )
foreach ( $objectList as $object )
{
$object->purge();
}
}
$db->commit();
}
else
{
Expand All @@ -89,7 +85,6 @@
$access = $user->hasAccessTo( 'content', 'cleantrash' );
if ( $access['accessWord'] == 'yes' )
{
$db = eZDB::instance();
while ( true )
{
// Fetch 100 objects at a time, to limit transaction size
Expand All @@ -102,12 +97,10 @@
if ( count( $objectList ) < 1 )
break;

$db->begin();
foreach ( $objectList as $object )
{
$object->purge();
}
$db->commit();
}
}
else
Expand Down

0 comments on commit fa4d15e

Please sign in to comment.