diff --git a/ground/controllers/PageController.php b/ground/controllers/PageController.php index ef116a0..bfc9927 100644 --- a/ground/controllers/PageController.php +++ b/ground/controllers/PageController.php @@ -76,9 +76,11 @@ class PageController extends Controller $point->categoryName = $categories[$point->categoryId]['name']; $point->descriptionHtml = Helper::replaceLinks($point->descriptionHtml); preg_match_all("/.*?(([.?!](?:\s|$))|$)/s", $point->descriptionHtml, $items); - $randomPoint = Point::model()->getRandom(); $similarPoints = Point::model()->getAll(array('where' => 'categoryId = '.$point->categoryId.' AND `id` <> '.$point->id.' ORDER BY RAND() LIMIT 6;')); $closestPoints = Point::model()->getClosestPoints($pointId); + $randomPoint = Point::model()->getRandom(); + $randomPoint->description = mb_substr($randomPoint->description, 0, 400, 'UTF-8'); + $randomPoint->description = Helper::replaceLinks($randomPoint->description); self::render('point.php', array( 'point' => $point,