From: Florent Bruneau Date: Thu, 7 Oct 2010 12:00:35 +0000 (+0200) Subject: Use XDB::startTransaction() and XDB::commit(). X-Git-Tag: xorg/1.0.1~81 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=7f55b0d600ec65efd3e07795e2cd4fe0c1ffedde;p=platal.git Use XDB::startTransaction() and XDB::commit(). Signed-off-by: Florent Bruneau --- 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();