projects
/
Pman.Core
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
PHP7 fix
[Pman.Core]
/
GroupCountries.php
diff --git
a/GroupCountries.php
b/GroupCountries.php
index
460255d
..
e694d8d
100644
(file)
--- a/
GroupCountries.php
+++ b/
GroupCountries.php
@@
-24,12
+24,12
@@
class Pman_Core_GroupCountries extends Pman
return true;
}
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");
{
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){
function addPersonToCountry($users)
{
foreach($users as $id){
- $p = DB_DataObject::factory('
P
erson');
+ $p = DB_DataObject::factory('
core_p
erson');
if(!$p->get($id)){
$this->jerr('This Person is not exsiting');
}
if(!$p->get($id)){
$this->jerr('This Person is not exsiting');
}
@@
-57,12
+57,13
@@
class Pman_Core_GroupCountries extends Pman
$p->countries = implode(',', $c);
$p->update();
}
$p->countries = implode(',', $c);
$p->update();
}
+ $this->jok(true);
}
function subPersonToCountry($users)
{
foreach($users as $id){
}
function subPersonToCountry($users)
{
foreach($users as $id){
- $p = DB_DataObject::factory('
P
erson');
+ $p = DB_DataObject::factory('
core_p
erson');
if(!$p->get($id)){
$this->jerr('This Person is not exsiting');
}
if(!$p->get($id)){
$this->jerr('This Person is not exsiting');
}
@@
-70,12
+71,12
@@
class Pman_Core_GroupCountries extends Pman
if(($key = array_search($_REQUEST['country'], $c)) !== false) {
unset($c[$key]);
}
if(($key = array_search($_REQUEST['country'], $c)) !== false) {
unset($c[$key]);
}
- sort($c);
+ sort($c);
// print_r($c);
$p->countries = implode(',', $c);
$p->update();
}
// print_r($c);
$p->countries = implode(',', $c);
$p->update();
}
-
+ $this->jok(true);
}
}
}
}