From af0d7cf5c8d3964cc714183d44b6b931efba4f30 Mon Sep 17 00:00:00 2001
From: VladimirCherkasov <vcherckasov@yandex.ru>
Date: Thu, 9 Jul 2015 16:35:50 +0300
Subject: [PATCH] minor changes in support model

---
 media/js/testik.js                                    | 11 -----------
 ~dev_rating/application/classes/Model/Support.php     |  7 +++++--
 .../application/views/admin/requests/errors.twig      |  3 +--
 3 files changed, 6 insertions(+), 15 deletions(-)
 delete mode 100644 media/js/testik.js

diff --git a/media/js/testik.js b/media/js/testik.js
deleted file mode 100644
index 5badcd440..000000000
--- a/media/js/testik.js
+++ /dev/null
@@ -1,11 +0,0 @@
-/**
- * Created by ami96_000 on 02.07.2015.
- */
-$(function(){
-    var faculty=$('#faculty');
-    faculty.change(function () {
-        alert(
-        faculty.find('option:selected').val());
-    });
-
-});
\ No newline at end of file
diff --git a/~dev_rating/application/classes/Model/Support.php b/~dev_rating/application/classes/Model/Support.php
index 71c381dfa..fc25fcf7e 100644
--- a/~dev_rating/application/classes/Model/Support.php
+++ b/~dev_rating/application/classes/Model/Support.php
@@ -25,10 +25,13 @@ class Model_Support extends Model
             ->execute()->get('Num');
     }
 
-    public static function getReports($userID) {
-        $query = 'CALL `GetRequests`(0, 100, :account, "all")';
+    public static function getReports($userID, $offset = 0, $count = 1000, $statusFilter = 'all') {
+        $query = 'CALL `GetRequests`(:offset, :count, :account, :filter)';
         return DB::query(Database::SELECT, $query)
             ->param(':account', $userID)
+            ->param(':offset', $offset)
+            ->param(':count', $count)
+            ->param(':filter', $statusFilter)
             ->execute()->as_array();
     }
 }
diff --git a/~dev_rating/application/views/admin/requests/errors.twig b/~dev_rating/application/views/admin/requests/errors.twig
index 9e3a5c567..d472ec972 100644
--- a/~dev_rating/application/views/admin/requests/errors.twig
+++ b/~dev_rating/application/views/admin/requests/errors.twig
@@ -11,8 +11,7 @@
                 <td>{{ ind }} </td>
                 <td>{{ req.ID }}</td>
                 <td>{{ req.Title }}</td>
-
-                <td>{{ req.Description|raw}}</td>
+                <td>{{ req.Status}}</td>
             </tr>
         {% endfor %}
     </table>
-- 
GitLab