Merge branch 'hotfix'
This commit is contained in:
commit
5ad030ae5a
|
|
@ -96,10 +96,21 @@ class JsonController extends Controller
|
||||||
$errors = array();
|
$errors = array();
|
||||||
|
|
||||||
if (!App::$user)
|
if (!App::$user)
|
||||||
|
{
|
||||||
$errors[8] = 'Вы не авторизованы! Пожалуйста, войдите.';
|
$errors[8] = 'Вы не авторизованы! Пожалуйста, войдите.';
|
||||||
if (isset($_POST['id']) && $_POST['id'] && App::$user->isAdmin == 0)
|
}
|
||||||
$errors[9] = 'Редактирование точек достурно только администратору!';
|
|
||||||
|
|
||||||
|
if (isset($_POST['id']) && $_POST['id'] && App::$user->isAdmin == 0)
|
||||||
|
{
|
||||||
|
$point = new Point();
|
||||||
|
$id = (int) $_POST['id'];
|
||||||
|
$point = $point->getByPK($id);
|
||||||
|
|
||||||
|
if ($point->author != App::$user->id || ($point->date+1800 < time() ))
|
||||||
|
{
|
||||||
|
$errors[9] = 'Редактирование точек достурно только администратору!';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$photos = $images = array();
|
$photos = $images = array();
|
||||||
$ordering = $_POST['ordering'];
|
$ordering = $_POST['ordering'];
|
||||||
|
|
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 919 B |
Binary file not shown.
|
Before Width: | Height: | Size: 1.2 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 886 B |
Loading…
Reference in New Issue