From 4f24b29dabdaf08d323da55e75a49cdcc414372e Mon Sep 17 00:00:00 2001 From: Krivchikov Dmitry Date: Mon, 21 May 2018 10:35:50 +0300 Subject: [PATCH] FIX - description --- controllers/PointController.php | 1 + views/layouts/default.php | 4 ++-- views/layouts/page.php | 3 +++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/controllers/PointController.php b/controllers/PointController.php index 9c139de..3dff1e6 100644 --- a/controllers/PointController.php +++ b/controllers/PointController.php @@ -55,6 +55,7 @@ class PointController extends Controller $point->descriptionHtml = nl2br($point->descriptionHtml); $point->name = htmlspecialchars($point->name); App::setConfig('title', $point->name . ' – wikipoints.ru'); + App::setConfig('description', mb_substr(Helper::replaceLinks($point->description), 0, 99, 'UTF-8') . '…'); self::addVar('pointLat', $point->lat); self::addVar('pointLng', $point->lng); self::addVar('pointId', $point->id); diff --git a/views/layouts/default.php b/views/layouts/default.php index bd41292..0b3adfd 100644 --- a/views/layouts/default.php +++ b/views/layouts/default.php @@ -6,8 +6,8 @@ <?= App::getConfig('title') ?> - - + + diff --git a/views/layouts/page.php b/views/layouts/page.php index a37036d..31c8d3d 100644 --- a/views/layouts/page.php +++ b/views/layouts/page.php @@ -5,6 +5,9 @@ + <?= App::getConfig('title') ?> + +