Consistent use of return , payment refund handling
This commit is contained in:
@@ -42,21 +42,21 @@ class Model_Group extends Model_Auth_RoleDefault {
|
||||
* are also related to this group, in the group heirarchy.
|
||||
*/
|
||||
public function list_childgrps($incParent=FALSE) {
|
||||
$return = array();
|
||||
$result = array();
|
||||
|
||||
if (! $this->loaded())
|
||||
return $return;
|
||||
return $result;
|
||||
|
||||
foreach (ORM::factory('Group')->where_active()->and_where('parent_id','=',$this)->find_all() as $go) {
|
||||
array_push($return,$go);
|
||||
array_push($result,$go);
|
||||
|
||||
$return = array_merge($return,$go->list_childgrps());
|
||||
$result = array_merge($result,$go->list_childgrps());
|
||||
}
|
||||
|
||||
if ($incParent)
|
||||
array_push($return,$this);
|
||||
array_push($result,$this);
|
||||
|
||||
return $return;
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -64,21 +64,21 @@ class Model_Group extends Model_Auth_RoleDefault {
|
||||
* are also related to this group, in the group heirarchy.
|
||||
*/
|
||||
public function list_parentgrps($incParent=FALSE) {
|
||||
$return = array();
|
||||
$result = array();
|
||||
|
||||
if (! $this->loaded())
|
||||
return $return;
|
||||
return $result;
|
||||
|
||||
foreach (ORM::factory('Group')->where_active()->and_where('id','=',$this->parent_id)->find_all() as $go) {
|
||||
array_push($return,$go);
|
||||
array_push($result,$go);
|
||||
|
||||
$return = array_merge($return,$go->list_parentgrps());
|
||||
$result = array_merge($result,$go->list_parentgrps());
|
||||
}
|
||||
|
||||
if ($incParent)
|
||||
array_push($return,$this);
|
||||
array_push($result,$this);
|
||||
|
||||
return $return;
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
Reference in New Issue
Block a user