fix #8131 - chinese translations
[Pman.Core] / GroupCountries.php
index f367b73..fdd8fca 100644 (file)
@@ -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');
             }
@@ -71,7 +71,7 @@ class Pman_Core_GroupCountries extends Pman
             if(($key = array_search($_REQUEST['country'], $c)) !== false) {
                 unset($c[$key]);
             }
-            sort($c);
+            sort($c); 
 //            print_r($c);
             $p->countries = implode(',', $c);
             $p->update();