From f3454d78a2fdb04795d27326dfb17c1eb5f9eb5e Mon Sep 17 00:00:00 2001 From: Akinwale Ariwodola Date: Mon, 31 Jul 2017 19:41:43 +0100 Subject: [PATCH] fix claims publisher name display --- sql/lbryexplorer.ddl.sql | 2 +- src/Template/Main/claims.ctp | 14 +++++++++++--- src/Template/Main/index.ctp | 7 +++++-- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/sql/lbryexplorer.ddl.sql b/sql/lbryexplorer.ddl.sql index 10b8f69..f624d4c 100644 --- a/sql/lbryexplorer.ddl.sql +++ b/sql/lbryexplorer.ddl.sql @@ -163,7 +163,7 @@ CREATE TABLE `TransactionsAddresses` `AddressId` BIGINT UNSIGNED NOT NULL, `DebitAmount` DECIMAL(18,8) DEFAULT 0 NOT NULL COMMENT 'Sum of the inputs to this address for the tx', `CreditAmount` DECIMAL(18,8) DEFAULT 0 NOT NULL COMMENT 'Sum of the outputs to this address for the tx', - `TransactionTime` DATETIME DEFAULT UTC_TIMESTAMP() NOT NULL, + `LatestTransactionTime` DATETIME DEFAULT UTC_TIMESTAMP() NOT NULL, PRIMARY KEY `PK_TransactionAddress` (`TransactionId`, `AddressId`), FOREIGN KEY `Idx_TransactionsAddressesTransaction` (`TransactionId`) REFERENCES `Transactions` (`Id`), FOREIGN KEY `Idx_TransactionsAddressesAddress` (`AddressId`) REFERENCES `Addresses` (`Id`), diff --git a/src/Template/Main/claims.ctp b/src/Template/Main/claims.ctp index 21d6fd0..67a3327 100644 --- a/src/Template/Main/claims.ctp +++ b/src/Template/Main/claims.ctp @@ -41,10 +41,13 @@ $a = ['purple', 'orange', 'blue', 'teal', 'green', 'yellow']; $autoThumbText = ''; $link = $claim->Name; +$rawLink = $claim->Name; if (isset($claim->Publisher->Name)) { $link = urlencode($claim->Publisher->Name) . '/' . $link; + $rawLink = $claim->Publisher->Name . '/' . $rawLink; } $link = 'lbry://' . $link; +$rawLink = 'lbry://' . $rawLink; if ($claim->ClaimType == 1) { $autoThumbText = strtoupper(substr($claim->Name, 1, min( strlen($claim->Name), 10 ))); } else { $str = str_replace(' ', '', (strlen(trim($claim->Title)) > 0) ? $claim->Title : $claim->Name); $autoThumbText = strtoupper(mb_substr($str, 0, min( strlen($str), 10 ))); @@ -163,10 +166,13 @@ if (strlen(trim($desc)) == 0) { $autoThumbText = ''; $link = $claim->Name; + $rawLink = $claim->Name; if (isset($claim->Publisher->Name)) { $link = urlencode($claim->Publisher->Name) . '/' . $link; + $rawLink = $claim->Publisher->Name . '/' . $rawLink; } $link = 'lbry://' . $link; + $rawLink = 'lbry://' . $rawLink; $cost = ''; if (isset($claim->Price) && $claim->Price > 0) { $cost = $this->Amount->formatCurrency($claim->Price) . ' LBC'; @@ -218,7 +224,7 @@ if (strlen(trim($desc)) == 0) {
ClaimType == 1 ? $claim->Name : ((strlen(trim($claim->Title)) > 0) ? $claim->Title : 'No Title') ?>
- +
Description)) > 0 ? $claim->Description : 'No description available' ?>
@@ -286,11 +292,13 @@ if (strlen(trim($desc)) == 0) { } $autoThumbText = ''; $link = $claim->Name; + $rawLink = $claim->Name; if (isset($claim->Publisher->Name)) { $link = urlencode($claim->Publisher->Name) . '/' . $link; + $rawLink = $claim->Publisher->Name . '/' . $rawLink; } $link = 'lbry://' . $link; - + $rawLink = 'lbry://' . $rawLink; $cost = ''; if (isset($claim->Price) && $claim->Price > 0) { $cost = $this->Amount->formatCurrency($claim->Price) . ' LBC'; @@ -342,7 +350,7 @@ if (strlen(trim($desc)) == 0) {