From 7f55b0d600ec65efd3e07795e2cd4fe0c1ffedde Mon Sep 17 00:00:00 2001 From: Florent Bruneau Date: Thu, 7 Oct 2010 14:00:35 +0200 Subject: [PATCH] Use XDB::startTransaction() and XDB::commit(). Signed-off-by: Florent Bruneau --- modules/admin.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/admin.php b/modules/admin.php index f76102d..b16b1f7 100644 --- a/modules/admin.php +++ b/modules/admin.php @@ -818,8 +818,7 @@ class AdminModule extends PLModule $page->killError("La formation n'est pas reconnue:" . Env::t('edu_type') . '.'); } - XDB::execute("SET AUTOCOMMIT = 0"); - XDB::execute("START TRANSACTION"); + XDB::startTransaction(); foreach ($lines as $line) { if ($infos = self::formatNewUser($page, $line, $separator, $hrpromo, 6)) { $sex = self::formatSex($page, $infos[3], $line); @@ -864,7 +863,7 @@ class AdminModule extends PLModule } } } - XDB::execute("COMMIT"); + XDB::commit(); } else if (Env::t('add_type') == 'account') { $type = Env::t('type'); $newAccounts = array(); -- 2.1.4