fix
This commit is contained in:
parent
0c730e0872
commit
a7475765e5
1 changed files with 4 additions and 4 deletions
|
@ -151,11 +151,11 @@ class Main {
|
||||||
$newsPosts = Database::fetch('news', true, null, ['id', true], ($limit ? [$limit] : null));
|
$newsPosts = Database::fetch('news', true, null, ['id', true], ($limit ? [$limit] : null));
|
||||||
|
|
||||||
// Get user data
|
// Get user data
|
||||||
foreach($newsPosts as $newsPost) {
|
foreach($newsPosts as $newsId => $newsPost) {
|
||||||
$newsPost['udata'] = Users::getUser($newsPost['uid']);
|
$newsPosts[$newsId]['udata'] = Users::getUser($newsPost['uid']);
|
||||||
$newsPost['gdata'] = Users::getGroup($newsPost['udata']['group_main']);
|
$newsPosts[$newsId]['gdata'] = Users::getGroup($newsPost['udata']['group_main']);
|
||||||
}
|
}
|
||||||
print_r($newsPosts);print '<br />';
|
|
||||||
// Return posts
|
// Return posts
|
||||||
return $newsPosts;
|
return $newsPosts;
|
||||||
|
|
||||||
|
|
Reference in a new issue