Merge branch 'hotfix'

This commit is contained in:
Krivchikov Dmitry 2014-10-05 19:27:44 +04:00
commit 5ad030ae5a
4 changed files with 13 additions and 2 deletions

View File

@ -96,10 +96,21 @@ class JsonController extends Controller
$errors = array();
if (!App::$user)
{
$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();
$ordering = $_POST['ordering'];

BIN
public/ico/building.png Normal file

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