Split the recent_type()

The recent_type() only return post type. Add recent_category(), and recent_profile_posts()
This commit is contained in:
Dan 2025-03-26 18:36:15 +07:00
commit 0c300b5077
2 changed files with 81 additions and 121 deletions

View file

@ -284,7 +284,7 @@ get('/author/:name', function ($name) {
$posts = get_profile_posts($name, $page, $perpage);
$total = get_count('/'.$name.'/', 'dirname');
$total = get_profilecount($name);
if ($total === 0) {
not_found();
@ -1362,7 +1362,7 @@ get('/admin/mine', function () {
$posts = get_profile_posts($name, $page, $perpage);
$total = get_count('/'.$name.'/', 'dirname');
$total = get_profilecount($name);
$author = get_author($name);