X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=GroupCountries.php;h=fdd8fca9f78d43656c164faae8545e0ba0f5de10;hb=refs%2Fheads%2Fmaster;hp=8ba6a62a460289949be3776a78cba2e10116a1c7;hpb=2192c844f62e8f77bdb6e362d22cb7ec1577520f;p=Pman.Core diff --git a/GroupCountries.php b/GroupCountries.php index 8ba6a62a..fdd8fca9 100644 --- a/GroupCountries.php +++ b/GroupCountries.php @@ -15,7 +15,7 @@ class Pman_Core_GroupCountries extends Pman parent::getAuth(); // load company! $au = $this->getAuthUser(); if (!$au) { - $this->jerr("Not authenticated", array('authFailure' => true)); + $this->jerror("LOGIN-NOAUTH", "Not authenticated", array('authFailure' => true)); } if ($au->company()->comptype != 'OWNER') { $this->jerr("Permission Denied" ); @@ -24,12 +24,12 @@ class Pman_Core_GroupCountries extends Pman return true; } - function get() + function get($v, $opts=array()) { - $this->post(); + $this->post($v); } - function post() + function post($v) { if (!$this->hasPerm( 'Core.Groups','E')) { // editing groups.. $this->jerr("PERMISSION DENIED"); @@ -46,7 +46,7 @@ class Pman_Core_GroupCountries extends Pman function addPersonToCountry($users) { foreach($users as $id){ - $p = DB_DataObject::factory('Person'); + $p = DB_DataObject::factory('core_person'); if(!$p->get($id)){ $this->jerr('This Person is not exsiting'); } @@ -63,7 +63,7 @@ class Pman_Core_GroupCountries extends Pman function subPersonToCountry($users) { foreach($users as $id){ - $p = DB_DataObject::factory('Person'); + $p = DB_DataObject::factory('core_person'); if(!$p->get($id)){ $this->jerr('This Person is not exsiting'); }