From 90eee866fcd91b6dac7a9f98e9acb18425838c8f Mon Sep 17 00:00:00 2001 From: marcdeb1 Date: Wed, 19 Dec 2018 00:57:43 +0100 Subject: [PATCH] Block list page --- src/Controller/MainController.php | 2 +- src/Template/Main/blocks.ctp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Controller/MainController.php b/src/Controller/MainController.php index afa7757..aa52061 100644 --- a/src/Controller/MainController.php +++ b/src/Controller/MainController.php @@ -292,7 +292,7 @@ class MainController extends AppController { $page = intval($this->request->query('page')); $conn = ConnectionManager::get('default'); - $stmt = $conn->execute('SELECT COUNT(id) AS Total FROM Blocks'); + $stmt = $conn->execute('SELECT COUNT(id) AS Total FROM block'); $count = $stmt->fetch(\PDO::FETCH_OBJ); $numBlocks = $count->Total; diff --git a/src/Template/Main/blocks.ctp b/src/Template/Main/blocks.ctp index 17ff11c..442b897 100644 --- a/src/Template/Main/blocks.ctp +++ b/src/Template/Main/blocks.ctp @@ -181,10 +181,10 @@ - Height ?> - d0ifficulty, 8, '.', '') ?> + height ?> + difficulty, 8, '.', '') ?> height - $block->height) + 1), 0, '', ',') ?> - transaction_hashes)) ?> + transaction_hashes)) ?> block_size / 1024, 2) . 'KB' ?> nonce ?> block_time)->format('d M Y H:i:s') ?> UTC