Template/Update (Part 40)

* convert 'guides' (listing, viewing, writing & management)
 * don't allow comments on WIP guides
This commit is contained in:
Sarjuuk
2025-08-18 00:22:24 +02:00
parent cb523353fd
commit fef27c58e6
38 changed files with 1437 additions and 1165 deletions

View File

@@ -681,7 +681,7 @@ class User
if (!self::isLoggedIn() || self::isBanned(ACC_BAN_GUIDE))
return $result;
if ($guides = DB::Aowow()->select('SELECT `id`, `title`, `url` FROM ?_guides WHERE `userId` = ?d AND `status` <> ?d', self::$id, GUIDE_STATUS_ARCHIVED))
if ($guides = DB::Aowow()->select('SELECT `id`, `title`, `url` FROM ?_guides WHERE `userId` = ?d AND `status` <> ?d', self::$id, GuideMgr::STATUS_ARCHIVED))
{
// fix url
array_walk($guides, fn(&$x) => $x['url'] = '?guide='.($x['url'] ?: $x['id']));