mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-31 00:59:58 +09:00
issue 1907 modified a function of 'getGroups' to return empty array when group list is null.
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.3.2@11002 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
603db8e837
commit
5a5eba40dc
1 changed files with 22 additions and 13 deletions
|
|
@ -449,24 +449,33 @@
|
||||||
* @brief Get a list of groups
|
* @brief Get a list of groups
|
||||||
**/
|
**/
|
||||||
function getGroups($site_srl = 0) {
|
function getGroups($site_srl = 0) {
|
||||||
if(!$GLOBALS['__group_info__'][$site_srl]) {
|
if(!$GLOBALS['__group_info__'][$site_srl])
|
||||||
if(!isset($site_srl)) $site_srl = 0;
|
{
|
||||||
$args->site_srl = $site_srl;
|
$result = array();
|
||||||
|
|
||||||
|
if(!isset($site_srl))
|
||||||
|
{
|
||||||
|
$site_srl = 0;
|
||||||
|
}
|
||||||
|
$args->site_srl = $site_srl;
|
||||||
$args->sort_index = 'list_order';
|
$args->sort_index = 'list_order';
|
||||||
$args->order_type = 'asc';
|
$args->order_type = 'asc';
|
||||||
$output = executeQuery('member.getGroups', $args);
|
$output = executeQueryArray('member.getGroups', $args);
|
||||||
if(!$output->data) return;
|
if(!$output->toBool() || !$output->data)
|
||||||
|
{
|
||||||
|
return array();
|
||||||
|
}
|
||||||
|
|
||||||
$group_list = $output->data;
|
$group_list = $output->data;
|
||||||
if(!is_array($group_list)) $group_list = array($group_list);
|
|
||||||
|
|
||||||
foreach($group_list as $val) {
|
foreach($group_list as $val)
|
||||||
$result[$val->group_srl] = $val;
|
{
|
||||||
}
|
$result[$val->group_srl] = $val;
|
||||||
|
}
|
||||||
|
|
||||||
$GLOBALS['__group_info__'][$site_srl] = $result;
|
$GLOBALS['__group_info__'][$site_srl] = $result;
|
||||||
}
|
}
|
||||||
return $GLOBALS['__group_info__'][$site_srl];
|
return $GLOBALS['__group_info__'][$site_srl];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue