17 lines
467 B
PHP
17 lines
467 B
PHP
<?php
|
|
namespace Misuzu;
|
|
|
|
if(!$msz->authInfo->getPerms('global')->check(Perm::G_NEWS_CATEGORIES_MANAGE))
|
|
Template::throwError(403);
|
|
|
|
$pagination = new Pagination($msz->news->countCategories(), 15);
|
|
|
|
if(!$pagination->hasValidOffset())
|
|
Template::throwError(404);
|
|
|
|
$categories = $msz->news->getCategories(pagination: $pagination);
|
|
|
|
Template::render('manage.news.categories', [
|
|
'news_categories' => $categories,
|
|
'categories_pagination' => $pagination,
|
|
]);
|