From 512e0ad7b842e4d1e0be96315d86b233093b2059 Mon Sep 17 00:00:00 2001 From: printempw Date: Sun, 7 Feb 2016 15:18:27 +0800 Subject: [PATCH] fixed a big motherfucking bug when uploading a same skin --- includes/User.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/User.class.php b/includes/User.class.php index 92ed6905..81e51e13 100644 --- a/includes/User.class.php +++ b/includes/User.class.php @@ -3,7 +3,7 @@ * @Author: printempw * @Date: 2016-01-16 23:01:33 * @Last Modified by: prpr - * @Last Modified time: 2016-02-06 23:32:13 + * @Last Modified time: 2016-02-07 15:16:44 */ class User @@ -103,11 +103,11 @@ class User } public function setTexture($type, $file) { - $hash = Utils::upload($file); // Remove the original texture first if ($this->getTexture($type) != "") Utils::remove("./textures/".$this->getTexture($type)); $this->updateLastModified(); + $hash = Utils::upload($file); if ($type == "steve" | $type == "alex" | $type == "cape") return $this->db->update($this->uname, 'hash_'.$type, $hash); return false;