Revision: 2b455861a6
Author:
tvsd...@gmail.com
Date: Fri Sep 4 10:50:38 2009
Log: Исправлена ошибка с попыткой создания дубликатов ключа 0, возникающая
при снятии вещей.
http://code.google.com/p/endspiel/source/detail?r=2b455861a6
Modified:
/lib/inventory.class.php
=======================================
--- /lib/inventory.class.php Thu Sep 3 11:09:48 2009
+++ /lib/inventory.class.php Fri Sep 4 10:50:38 2009
@@ -82,7 +82,7 @@
public function takeOffItem($slot)
{
- $stmt = Engine::get()->db->prepare('UPDATE `equipment` SET `itemid` = 0
WHERE `userid` = :id AND `slot` = :slot LIMIT 1;');
+ $stmt = Engine::get()->db->prepare('DELETE FROM `equipment` WHERE
`userid` = :id AND `slot` = :slot LIMIT 1;');
$stmt->bindValue(':id', $this->id);
$stmt->bindValue(':slot', $slot);
$stmt->execute();