From 6519a25d1d2eef322ab837edc350157ea26e87ef Mon Sep 17 00:00:00 2001 From: Krivchikov Dmitry Date: Thu, 6 Aug 2015 23:32:41 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A0=D0=B0=D0=B7=D1=80=D0=B5=D1=88=D0=B5?= =?UTF-8?q?=D0=BD=D0=BE=20=D1=80=D0=B5=D0=B4=D0=B0=D0=BA=D1=82=D0=B8=D1=80?= =?UTF-8?q?=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D0=B5=20=D1=81=D0=B2=D0=BE=D0=B8?= =?UTF-8?q?=D1=85=20=D1=82=D0=BE=D1=87=D0=B5=D0=BA,=20=D0=B5=D1=81=D0=BB?= =?UTF-8?q?=D0=B8=20=D0=BE=D0=BD=D0=B8=20=D0=B5=D1=89=D1=91=20=D0=BD=D0=B5?= =?UTF-8?q?=20=D0=BE=D1=82=D0=BC=D0=BE=D0=B4=D0=B5=D1=80=D0=B8=D1=80=D0=BE?= =?UTF-8?q?=D0=B2=D0=B0=D0=BD=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ground/controllers/JsonController.php | 4 ++-- public/js/map.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ground/controllers/JsonController.php b/ground/controllers/JsonController.php index f3322b4..31fea64 100644 --- a/ground/controllers/JsonController.php +++ b/ground/controllers/JsonController.php @@ -124,9 +124,9 @@ class JsonController extends Controller $id = (int) $_POST['id']; $point = $point->getByPK($id); - if ($point->author != App::$user->id || ($point->date + 1800 < time() )) + if ($point->author != App::$user->id || $point->moderate == 1) { - $errors[9] = 'Редактирование точек достурно только администратору!'; + $errors[9] = 'Редактирование точек достурно только администратору или автору!'; } } diff --git a/public/js/map.js b/public/js/map.js index c535e0d..6faf704 100644 --- a/public/js/map.js +++ b/public/js/map.js @@ -283,7 +283,7 @@ function drawInfoPopup(id, showPopup) { description += ''; description += ''; - if (isAdmin == '1') + if (isAdmin == '1' || data.moderate == "hide") { description += ''; if (getURLParameter('edit') == 'true')