From 17e666538b6416a5a9169b28da5d178d5bb6c633 Mon Sep 17 00:00:00 2001
From: Cerdic <cedric@yterium.com>
Date: Thu, 16 Feb 2012 07:53:36 +0000
Subject: [PATCH] =?UTF-8?q?2=20coquilles=20(fonction=20pas=20utilis=C3=A9e?=
 =?UTF-8?q?=20a=20priori)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 ecrire/req/mysql.php | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/ecrire/req/mysql.php b/ecrire/req/mysql.php
index fa227f5cc9..c57ec30b59 100644
--- a/ecrire/req/mysql.php
+++ b/ecrire/req/mysql.php
@@ -853,8 +853,9 @@ function spip_get_lock($nom, $timeout = 0) {
 	define('_LOCK_TIME', intval(time()/3600-316982));
 
 	$connexion = &$GLOBALS['connexions'][0];
+	$bd = $connexion['db'];
 	$prefixe = $connexion['prefixe'];
-	$nom = "$bd:$prefix:$nom" .  _LOCK_TIME;
+	$nom = "$bd:$prefixe:$nom" .  _LOCK_TIME;
 
 	$connexion['last'] = $q = "SELECT GET_LOCK(" . _q($nom) . ", $timeout) AS n";
 	$q = @sql_fetch(mysql_query($q));
@@ -866,8 +867,9 @@ function spip_get_lock($nom, $timeout = 0) {
 function spip_release_lock($nom) {
 
 	$connexion = &$GLOBALS['connexions'][0];
+	$bd = $connexion['db'];
 	$prefixe = $connexion['prefixe'];
-	$nom = "$bd:$prefix:$nom" . _LOCK_TIME;
+	$nom = "$bd:$prefixe:$nom" . _LOCK_TIME;
 
 	$connexion['last'] = $q = "SELECT RELEASE_LOCK(" . _q($nom) . ")";
 	@mysql_query($q);
-- 
GitLab