Skip to content

Commit

Permalink
- Implemented enhancement #016993: transactions in content/trash must…
Browse files Browse the repository at this point in the history
… 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 7790052 commit 0e7fc24
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
6 changes: 4 additions & 2 deletions doc/changelogs/4.1/CHANGELOG-4.1.4-to-4.1.5
Expand Up @@ -9,6 +9,8 @@ Changes from 4.1.4 to 4.1.5
(Merged from trunk (4.3.0alpha1) rev. 24346)
- Implemented enhancement #15441: eZDBSchemaInterface subclasses do not allow to dump/rebuild a proper schema: table columns are always sorted
(Merged from trunk (4.3.0beta1) rev. 24974)
- Implemented enhancement #016993: transactions in content/trash must be reduced
(Merged from master (4.4alpha5) commit e9888af)

*Design:

Expand All @@ -21,7 +23,7 @@ Changes from 4.1.4 to 4.1.5
*Scripts:
- Fixed bug #15522: Upgrade script for node assignments which are left behind
(Merged from trunk (4.3.0beta2) rev. 25109)

*Translations:

*Bugfixes:
Expand Down Expand Up @@ -121,7 +123,7 @@ Changes from 4.1.4 to 4.1.5
(Merged from trunk (4.3.0beta1) rev. 24902)
- Fixed bug #14615: Database errors in search engine logic using PHP 5.2.9
(Merged from trunk (4.3.0beta1) rev. 24906)
- Fixed bug #15823: Running cache clearing procedure from upgrade 4.2.0 using root removes all linux system files
- Fixed bug #15823: Running cache clearing procedure from upgrade 4.2.0 using root removes all linux system files
(Merged from trunk (4.3.0beta1) rev. 24912)
- Fixed bug #015673: eZCollaborationItemHandler::handleCollaborationEvent() not oracle compatible
(Merged from trunk (4.3.0beta1) rev. 24957)
Expand Down
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 0e7fc24

Please sign in to comment.