mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-14 00:39:57 +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,18 +449,27 @@
|
|||
* @brief Get a list of groups
|
||||
**/
|
||||
function getGroups($site_srl = 0) {
|
||||
if(!$GLOBALS['__group_info__'][$site_srl]) {
|
||||
if(!isset($site_srl)) $site_srl = 0;
|
||||
if(!$GLOBALS['__group_info__'][$site_srl])
|
||||
{
|
||||
$result = array();
|
||||
|
||||
if(!isset($site_srl))
|
||||
{
|
||||
$site_srl = 0;
|
||||
}
|
||||
$args->site_srl = $site_srl;
|
||||
$args->sort_index = 'list_order';
|
||||
$args->order_type = 'asc';
|
||||
$output = executeQuery('member.getGroups', $args);
|
||||
if(!$output->data) return;
|
||||
$output = executeQueryArray('member.getGroups', $args);
|
||||
if(!$output->toBool() || !$output->data)
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
||||
$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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue