From ed508182b5d6f256937ed5b8c43aea96c308b7bf Mon Sep 17 00:00:00 2001 From: Niko Storni Date: Mon, 3 Dec 2018 17:55:33 -0500 Subject: [PATCH] fix more deprecations --- config/bootstrap.php | 2 +- src/Controller/MainController.php | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/config/bootstrap.php b/config/bootstrap.php index f49adcf..be3fe73 100644 --- a/config/bootstrap.php +++ b/config/bootstrap.php @@ -153,7 +153,7 @@ ConnectionManager::setConfig(Configure::consume('Datasources')); Email::setConfigTransport(Configure::consume('EmailTransport')); Email::setConfig(Configure::consume('Email')); Log::setConfig(Configure::consume('Log')); -Security::salt(Configure::consume('Security.salt')); +Security::setSalt(Configure::consume('Security.salt')); /* * The default crypto extension in 3.0 is OpenSSL. diff --git a/src/Controller/MainController.php b/src/Controller/MainController.php index 1995d8a..bc31e0a 100644 --- a/src/Controller/MainController.php +++ b/src/Controller/MainController.php @@ -129,7 +129,7 @@ class MainController extends AppController { // paginate claims $offset = 0; $pageLimit = 96; - $page = intval($this->request->query('page')); + $page = intval($this->request->getQuery('page')); $conn = ConnectionManager::get('default'); $stmt = $conn->execute('SELECT COUNT(Id) AS Total FROM Claims'); @@ -330,7 +330,7 @@ class MainController extends AppController { } public function find() { - $criteria = $this->request->query('q'); + $criteria = $this->request->getQuery('q'); $this->loadModel('Blocks'); $this->loadModel('Claims'); @@ -385,7 +385,7 @@ class MainController extends AppController { // paginate blocks $offset = 0; $pageLimit = 50; - $page = intval($this->request->query('page')); + $page = intval($this->request->getQuery('page')); $conn = ConnectionManager::get('default'); $stmt = $conn->execute('SELECT COUNT(Id) AS Total FROM Blocks'); @@ -453,7 +453,7 @@ class MainController extends AppController { $this->loadModel('Outputs'); $this->loadModel('Claims'); - $sourceAddress = $this->request->query('address'); + $sourceAddress = $this->request->getQuery('address'); $tx = $this->Transactions->find()->select( ['Id', 'BlockHash', 'InputCount', 'OutputCount', 'Hash', 'Value', 'TransactionTime', 'TransactionSize', 'Created', 'Version', 'LockTime', 'Raw'])->where(['Hash' => $hash])->first(); @@ -550,7 +550,7 @@ class MainController extends AppController { $offset = 0; $pageLimit = 50; $numTransactions = 0; - $page = intval($this->request->query('page')); + $page = intval($this->request->getQuery('page')); $canTag = false; $totalRecvAmount = 0; @@ -583,7 +583,7 @@ class MainController extends AppController { $stmt = $conn->execute('SELECT COUNT(TransactionId) AS Total FROM TransactionsAddresses WHERE AddressId = ?', [$addressId]); $count = $stmt->fetch(\PDO::FETCH_OBJ); $numTransactions = $count->Total; - $all = $this->request->query('all'); + $all = $this->request->getQuery('all'); if ($all === 'true') { $offset = 0; $pageLimit = $numTransactions;