* Removes and inserts data records on shutdown.
*/
public function shutdown() {
+ WCF::getDB()->beginTransaction();
// remove outdated entries
if (count($this->resetFields)) {
$sql = "DELETE FROM wcf".WCF_N."_user_storage
foreach ($this->resetFields as $userID => $data) {
foreach ($data as $packageID => $fields) {
foreach ($fields as $field) {
- $statement->execute(array(
+ $statement->executeUnbuffered(array(
$userID,
$field,
$packageID
foreach ($this->updateFields as $userID => $data) {
foreach ($data as $packageID => $fieldValues) {
foreach ($fieldValues as $field => $fieldValue) {
- $statement->execute(array(
+ $statement->executeUnbuffered(array(
$userID,
$field,
$fieldValue,
}
}
}
+ WCF::getDB()->commitTransaction();
$this->resetFields = $this->updateFields = array();
}