From 3a3c3355d03754dbb02cbcc2626d0710e1ab5e82 Mon Sep 17 00:00:00 2001 From: xamgore <xamgore@ya.ru> Date: Wed, 24 Jun 2015 19:33:29 +0300 Subject: [PATCH] Removed Model_Grades::getDegreeTitle() method Use RusLang::tr() function instead. --- .../application/classes/Controller/Environment/Student.php | 4 ---- ~dev_rating/application/classes/Model/Grades.php | 6 +----- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/~dev_rating/application/classes/Controller/Environment/Student.php b/~dev_rating/application/classes/Controller/Environment/Student.php index e43278526..a2d662ac6 100644 --- a/~dev_rating/application/classes/Controller/Environment/Student.php +++ b/~dev_rating/application/classes/Controller/Environment/Student.php @@ -15,9 +15,5 @@ class Controller_Environment_Student extends Controller_Environment_User parent::before(); $this->user->checkAccess(User::RIGHTS_STUDENT); - - // todo: remove it, english only - $uniDegree = $this->user->Degree; - $this->user->Degree = Model_Grades::getDegreeTitle($uniDegree); } } \ No newline at end of file diff --git a/~dev_rating/application/classes/Model/Grades.php b/~dev_rating/application/classes/Model/Grades.php index eadae6ec2..c46125cc3 100644 --- a/~dev_rating/application/classes/Model/Grades.php +++ b/~dev_rating/application/classes/Model/Grades.php @@ -22,10 +22,6 @@ class Model_Grades extends Model return $list; } - public static function getDegreeTitle($degree) { - return RusLang::tr($degree); - } - public static function getDegreeType($degree) { switch ($degree) { case 'Бакалавр': @@ -52,7 +48,7 @@ class Model_Grades extends Model $i++; } - $list[$i]['Title'] = self::getDegreeTitle($row['Degree']); + $list[$i]['Title'] = RusLang::tr($row['Degree']); $list[$i]['Grades'][] = $row; } -- GitLab