вики-ссылки на странице точки в блоке случайной точки
This commit is contained in:
parent
8dd3d4d3b8
commit
4d79b89218
|
|
@ -76,9 +76,11 @@ class PageController extends Controller
|
||||||
$point->categoryName = $categories[$point->categoryId]['name'];
|
$point->categoryName = $categories[$point->categoryId]['name'];
|
||||||
$point->descriptionHtml = Helper::replaceLinks($point->descriptionHtml);
|
$point->descriptionHtml = Helper::replaceLinks($point->descriptionHtml);
|
||||||
preg_match_all("/.*?(([.?!](?:\s|$))|$)/s", $point->descriptionHtml, $items);
|
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;'));
|
$similarPoints = Point::model()->getAll(array('where' => 'categoryId = '.$point->categoryId.' AND `id` <> '.$point->id.' ORDER BY RAND() LIMIT 6;'));
|
||||||
$closestPoints = Point::model()->getClosestPoints($pointId);
|
$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(
|
self::render('point.php', array(
|
||||||
'point' => $point,
|
'point' => $point,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue