Increate cut length from 50 to 70, use multibyte strlen

This commit is contained in:
Vencislav Atanasov 2016-10-16 20:46:27 +03:00
parent 117c405747
commit bdd3caa101
1 changed files with 2 additions and 2 deletions

View File

@ -9,7 +9,7 @@
$data = require __DIR__ . DIRECTORY_SEPARATOR . 'load.php'; $data = require __DIR__ . DIRECTORY_SEPARATOR . 'load.php';
$cut_len = 50; $cut_len = 70;
$cfp_url = 'http://cfp.openfest.org'; $cfp_url = 'http://cfp.openfest.org';
$time = 0; $time = 0;
$date = 0; $date = 0;
@ -57,7 +57,7 @@ foreach ($data['slots'] as $slot_id => $slot) {
$lines[] = '<td>TBA</td>'; $lines[] = '<td>TBA</td>';
} }
else { else {
$title = mb_substr($event['title'], 0, $cut_len) . (strlen($event['title']) > $cut_len ? '...' : ''); $title = mb_substr($event['title'], 0, $cut_len) . (mb_strlen($event['title']) > $cut_len ? '...' : '');
$speakers = ''; $speakers = '';
if (count($event['participant_user_ids']) > 0) { if (count($event['participant_user_ids']) > 0) {