From: Chris Date: Wed, 19 Mar 2014 05:13:03 +0000 (+0800) Subject: GroupCountries.php X-Git-Url: http://git.roojs.org/?p=Pman.Core;a=commitdiff_plain;h=b0c44a9fc0bdf79ff91d53a8b6d3a616393db312 GroupCountries.php --- 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(); + } }