From a555fa56bf295d5e7c407f33a6744b70f6398543 Mon Sep 17 00:00:00 2001 From: Sebastian Grewe Date: Wed, 26 Mar 2014 11:15:42 +0100 Subject: [PATCH 1/2] [FIX] Removed duplicate method implementation Fixes #2020 once merged, thanks @Mezrin --- public/include/classes/share.class.php | 10 ---------- public/include/classes/statistics.class.php | 2 +- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/public/include/classes/share.class.php b/public/include/classes/share.class.php index 91f47c8f..47c67813 100644 --- a/public/include/classes/share.class.php +++ b/public/include/classes/share.class.php @@ -112,16 +112,6 @@ class Share Extends Base { return $this->sqlError(); } - /** - * Fetch the highest available share ID - **/ - function getMaxShareId() { - $stmt = $this->mysqli->prepare("SELECT MAX(id) AS id FROM $this->table"); - if ($this->checkStmt($stmt) && $stmt->execute() && $result = $stmt->get_result()) - return $result->fetch_object()->id; - return $this->sqlError(); - } - /** * Fetch the highest available share ID from archive **/ diff --git a/public/include/classes/statistics.class.php b/public/include/classes/statistics.class.php index c9de9d24..22f45c23 100644 --- a/public/include/classes/statistics.class.php +++ b/public/include/classes/statistics.class.php @@ -344,7 +344,7 @@ class Statistics extends Base { $data['data'][$row['id']]['is_anonymous'] = $row['is_anonymous']; } } - $data['share_id'] = $this->share->getMaxShareId(); + $data['share_id'] = $this->share->getLastInsertedShareId(); return $this->memcache->setCache(STATISTICS_ALL_USER_SHARES, $data); } return $this->sqlError(); From 3c6b6454b19f29f1a121ffe26011e76fea86b92c Mon Sep 17 00:00:00 2001 From: Nathan Patten Date: Thu, 27 Mar 2014 00:20:19 +1100 Subject: [PATCH 2/2] [FIX] Admin News Delete Icon --- public/templates/bootstrap/admin/news/default.tpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/templates/bootstrap/admin/news/default.tpl b/public/templates/bootstrap/admin/news/default.tpl index 8a45ae20..4c446416 100644 --- a/public/templates/bootstrap/admin/news/default.tpl +++ b/public/templates/bootstrap/admin/news/default.tpl @@ -53,11 +53,11 @@ {/section} -{/nocache} \ No newline at end of file +{/nocache}