From: aude Date: Tue, 6 Nov 2012 10:31:58 +0000 (+0000) Subject: (bug 41796) follow-up for Ic9e728f8, release db connection in ORMRow X-Git-Tag: 1.31.0-rc.0~21730 X-Git-Url: http://git.cyclocoop.org/data/Fool?a=commitdiff_plain;h=a4323613c683d4438955c1b34fa352d1e37d4f0c;p=lhc%2Fweb%2Fwiklou.git (bug 41796) follow-up for Ic9e728f8, release db connection in ORMRow Change-Id: Id6943933d5ceef212515836b179c90180dac691a --- diff --git a/includes/db/ORMRow.php b/includes/db/ORMRow.php index 1753afe115..a8d0850204 100644 --- a/includes/db/ORMRow.php +++ b/includes/db/ORMRow.php @@ -356,6 +356,8 @@ abstract class ORMRow implements IORMRow { is_null( $functionName ) ? __METHOD__ : $functionName ); + $this->table->releaseConnection( $dbw ); + // DatabaseBase::update does not always return true for success as documented... return $success !== false; } @@ -399,6 +401,8 @@ abstract class ORMRow implements IORMRow { $this->setField( 'id', $dbw->insertId() ); } + $this->table->releaseConnection( $dbw ); + return $success; } @@ -573,6 +577,8 @@ abstract class ORMRow implements IORMRow { $this->setField( $field, $this->getField( $field ) + $amount ); } + $this->table->releaseConnection( $dbw ); + return $success; }