From b0c44a9fc0bdf79ff91d53a8b6d3a616393db312 Mon Sep 17 00:00:00 2001 From: Chris Date: Wed, 19 Mar 2014 13:13:03 +0800 Subject: [PATCH] GroupCountries.php --- GroupCountries.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/GroupCountries.php b/GroupCountries.php index 1b9e16fb..150a65b4 100644 --- a/GroupCountries.php +++ b/GroupCountries.php @@ -60,6 +60,20 @@ class Pman_Core_GroupCountries extends Pman function supPersonToCountry($users) { + foreach($users as $id){ + $p = DB_DataObject::factory('Person'); + if(!$p->get($id)){ + $this->jerr('This Person is not exsiting'); + } + $c = explode(',', $p->countries); + if(($key = array_search($_REQUEST['country'], $c)) !== false) { + unset($c[$key]); + } + ksort($c); + print_r($c); +// $p->countries = implode(',', $c); +// $p->update(); + } } -- 2.39.2