From 9a6abd1f1023ef0d49430e480eda8c0fc9676fb3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Jacob?= Date: Fri, 22 Apr 2011 16:15:16 +0200 Subject: [PATCH] Uses same constants for UserFilter::GRADE_*** and Profile::DEGREE_*. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Jacob --- classes/userfilter.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/classes/userfilter.php b/classes/userfilter.php index 83cf251..9dd25c6 100644 --- a/classes/userfilter.php +++ b/classes/userfilter.php @@ -764,9 +764,9 @@ class UserFilter extends PlFilter /** EDUCATION */ - const GRADE_ING = 'Ing.'; - const GRADE_PHD = 'PhD'; - const GRADE_MST = 'M%'; + const GRADE_ING = Profile::DEGREE_X; + const GRADE_PHD = Profile::DEGREE_D; + const GRADE_MST = Profile::DEGREE_M; static public function isGrade($grade) { return ($grade !== 0) && ($grade == self::GRADE_ING || $grade == self::GRADE_PHD || $grade == self::GRADE_MST); @@ -813,7 +813,7 @@ class UserFilter extends PlFilter foreach ($this->pepe as $grade => $sub) { if ($this->isGrade($grade)) { $joins['pe' . $sub] = PlSqlJoin::left('profile_education', '$ME.eduid = pee.id AND $ME.pid = $PID'); - $joins['pede' . $sub] = PlSqlJoin::inner('profile_education_degree_enum', '$ME.id = pe' . $sub . '.degreeid AND $ME.abbreviation LIKE {?}', $grade); + $joins['pede' . $sub] = PlSqlJoin::inner('profile_education_degree_enum', '$ME.id = pe' . $sub . '.degreeid AND $ME.degree LIKE {?}', $grade); } else { $joins['pe' . $sub] = PlSqlJoin::left('profile_education', '$ME.pid = $PID'); $joins['pee' . $sub] = PlSqlJoin::inner('profile_education_enum', '$ME.id = pe' . $sub . '.eduid'); -- 2.1.4