From fdf97c88325135dd0b2c963414e69574f8b96588 Mon Sep 17 00:00:00 2001 From: Sebastian Grewe Date: Wed, 10 Jul 2013 14:24:15 +0200 Subject: [PATCH] fixing config access in share class for archive purge --- public/include/classes/share.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/include/classes/share.class.php b/public/include/classes/share.class.php index dddabf33..7bcc6d14 100644 --- a/public/include/classes/share.class.php +++ b/public/include/classes/share.class.php @@ -165,12 +165,12 @@ class Share { $aBlock = $this->block->getBlock($aLastBlock['height'] - $this->config['archive']['maxrounds']); // Now that we know our block, remove those shares $stmt = $this->mysqli->prepare("DELETE FROM $this->tableArchive WHERE block_id < ? AND time < DATE_SUB(now(), INTERVAL ? MINUTE)"); - if ($this->checkStmt($stmt) && $stmt->bind_param('ii', $aBlock['id'], $config['archive']['maxage']) && $stmt->execute()) + if ($this->checkStmt($stmt) && $stmt->bind_param('ii', $aBlock['id'], $this->config['archive']['maxage']) && $stmt->execute()) return true; } else { // We are not running pplns, so we just need to keep shares of the past minutes $stmt = $this->mysqli->prepare("DELETE FROM $this->tableArchive WHERE time < DATE_SUB(now(), INTERVAL ? MINUTE)"); - if ($this->checkStmt($stmt) && $stmt->bind_param('i', $config['archive']['maxage']) && $stmt->execute()) + if ($this->checkStmt($stmt) && $stmt->bind_param('i', $this->config['archive']['maxage']) && $stmt->execute()) return true; } // Catchall