From 287f888f3b07ee389bed851cb0cfef0801e6707f Mon Sep 17 00:00:00 2001 From: Krivchikov Dmitry Date: Sat, 11 Oct 2014 23:27:56 +0400 Subject: [PATCH] FIX --- ground/controllers/JsonController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ground/controllers/JsonController.php b/ground/controllers/JsonController.php index 665d808..d2b3b53 100644 --- a/ground/controllers/JsonController.php +++ b/ground/controllers/JsonController.php @@ -113,7 +113,6 @@ class JsonController extends Controller } $photos = $images = array(); - $ordering = $_POST['ordering']; if (empty($errors) && !App::$request['ajax'] && isset($_POST['id']) && (int) $_POST['id']) { $id = (int) $_POST['id']; @@ -156,6 +155,7 @@ class JsonController extends Controller } $resPhotos = array(); + $ordering = $_POST['ordering']; foreach ($ordering as $order) { $resPhotos[] = $order == 'FILE' ? array_shift($photos) : array_shift($images);