From 2d59ca30f1764c8e5626a1e8c3dc6ed1023c4c49 Mon Sep 17 00:00:00 2001 From: Akinwale Ariwodola Date: Sat, 17 Jun 2017 19:22:39 +0100 Subject: [PATCH] temporary fix for titles with multibyte characters in the claims explorer --- src/Template/Main/claims.ctp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Template/Main/claims.ctp b/src/Template/Main/claims.ctp index 17f2e67..a304ad1 100644 --- a/src/Template/Main/claims.ctp +++ b/src/Template/Main/claims.ctp @@ -47,7 +47,7 @@ if (isset($claim->Publisher->Name)) { $link = 'lbry://' . $link; 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(substr($str, 0, min( strlen($str), 10 ))); + $autoThumbText = strtoupper(mb_substr($str, 0, min( strlen($str), 10 ))); } $cost = 'Free'; @@ -190,7 +190,7 @@ if (strlen(trim($desc)) == 0) { 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(substr($str, 0, min( strlen($str), 10 ))); + $autoThumbText = strtoupper(mb_substr($str, 0, min( strlen($str), 10 ))); } ?> @@ -314,7 +314,7 @@ if (strlen(trim($desc)) == 0) { 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(substr($str, 0, min( strlen($str), 10 ))); + $autoThumbText = strtoupper(mb_substr($str, 0, min( strlen($str), 10 ))); } ?>