From: Raphaël Barrois Date: Sun, 20 Feb 2011 01:05:24 +0000 (+0100) Subject: Ensure that UFC_SchoolId is exportable X-Git-Tag: xorg/1.1.0~1^2~14 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=7563eb0c214749f30bef91c1cb2315515644a786;p=platal.git Ensure that UFC_SchoolId is exportable Signed-off-by: Raphaël Barrois --- diff --git a/classes/userfilter/conditions.inc.php b/classes/userfilter/conditions.inc.php index 7a2ded5..b782311 100644 --- a/classes/userfilter/conditions.inc.php +++ b/classes/userfilter/conditions.inc.php @@ -166,6 +166,12 @@ abstract class UserFilterCondition implements PlFilterCondition $cond = new $class($values); break; + case 'school_id': + $values = $export->v('values', array()); + $school_type = $export->s('school_type'); + $cond = new UFC_SchoolId($school_type, $values); + break; + case 'has_profile': $class = 'ufc_' . str_replace('_', '', $type); $cond = new $class(); @@ -487,6 +493,14 @@ class UFC_SchoolId extends UserFilterCondition } return XDB::format('p.' . $type . '_id IN {?}', $ids); } + + public function export() + { + $export = $this->buildExport('school_id'); + $export['school_type'] = $this->type; + $export['values'] = $this->ids; + return $export; + } } // }}} // {{{ class UFC_EducationSchool