mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
CommunityContent/Listing
* generally use indexed/non-asssociative arrays when returning content
This commit is contained in:
@@ -178,7 +178,7 @@ class CommunityContent
|
||||
}
|
||||
}
|
||||
|
||||
return $comments;
|
||||
return array_values($comments);
|
||||
}
|
||||
|
||||
public static function getCommentReplies(int $commentId, int $limit = 0, ?int &$nFound = 0) : array
|
||||
@@ -440,7 +440,7 @@ class CommunityContent
|
||||
unset($v['user']);
|
||||
}
|
||||
|
||||
return $videos;
|
||||
return array_values($videos);
|
||||
}
|
||||
|
||||
public static function getScreenshots(int $typeOrUser = 0, int $typeId = 0, int &$nFound = 0, bool $dateFmt = true) : array
|
||||
@@ -484,7 +484,7 @@ class CommunityContent
|
||||
unset($s['user']);
|
||||
}
|
||||
|
||||
return $screenshots;
|
||||
return array_values($screenshots);
|
||||
}
|
||||
|
||||
public static function getAll(int $type, int $typeId, array &$jsg) : array
|
||||
|
||||
@@ -95,7 +95,7 @@ class UtilityPage extends GenericPage
|
||||
else
|
||||
{
|
||||
array_walk($data, fn(&$d) => $d['date'] = date(Util::$dateFormatInternal, $d['date']));
|
||||
$this->lvTabs[] = ['commentpreview', ['data' => array_values($data)]];
|
||||
$this->lvTabs[] = ['commentpreview', ['data' => $data]];
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -126,7 +126,7 @@ class UtilityPage extends GenericPage
|
||||
else
|
||||
{
|
||||
array_walk($data, fn(&$d) => $d['date'] = date(Util::$dateFormatInternal, $d['date']));
|
||||
$this->lvTabs[] = ['screenshot', ['data' => array_values($data)]];
|
||||
$this->lvTabs[] = ['screenshot', ['data' => $data]];
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -157,7 +157,7 @@ class UtilityPage extends GenericPage
|
||||
else
|
||||
{
|
||||
array_walk($data, fn(&$d) => $d['date'] = date(Util::$dateFormatInternal, $d['date']));
|
||||
$this->lvTabs[] = ['video', ['data' => array_values($data)]];
|
||||
$this->lvTabs[] = ['video', ['data' => $data]];
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user