FIX - логика при просмотре страницы отклоненной точки
This commit is contained in:
parent
226509fb7a
commit
d9cb8f73f1
|
|
@ -44,11 +44,14 @@ class PointController extends Controller
|
||||||
self::addScript('//ulogin.ru/js/ulogin.js');
|
self::addScript('//ulogin.ru/js/ulogin.js');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($point->status != Point::statusPublished && !App::$user->isAdmin && $point->author != App::$user->id) {
|
if ($point->status != Point::statusPublished) {
|
||||||
App::error404();
|
if (!App::$user) {
|
||||||
|
App::error404();
|
||||||
|
} else if(!App::$user->isAdmin && $point->author != App::$user->id) {
|
||||||
|
App::error404();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$point->descriptionHtml = nl2br($point->description);
|
$point->descriptionHtml = nl2br($point->description);
|
||||||
$point->name = htmlspecialchars($point->name);
|
$point->name = htmlspecialchars($point->name);
|
||||||
App::setConfig('title', $point->name . ' – wikipoints.ru');
|
App::setConfig('title', $point->name . ' – wikipoints.ru');
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue