1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2025-02-02 12:57:35 +01:00

Merge pull request #877 from perdedora/fix-themes-871

Use FETCH_ASSOC instead of NUM
This commit is contained in:
Lorenzo Yario 2025-01-17 09:50:44 -06:00 committed by GitHub
commit 4530aea0bd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -14,7 +14,7 @@ function rebuild_themes(string $action, $boardname = false): void {
// OK, we already have themes loaded // OK, we already have themes loaded
} else { } else {
$query = query("SELECT `theme` FROM ``theme_settings`` WHERE `name` IS NULL AND `value` IS NULL") or error(db_error()); $query = query("SELECT `theme` FROM ``theme_settings`` WHERE `name` IS NULL AND `value` IS NULL") or error(db_error());
$themes = $query->fetchAll(\PDO::FETCH_NUM); $themes = $query->fetchAll(\PDO::FETCH_ASSOC);
\Cache::set("themes", $themes); \Cache::set("themes", $themes);
} }
@ -31,10 +31,10 @@ function rebuild_themes(string $action, $boardname = false): void {
} }
if (PHP_SAPI === 'cli') { if (PHP_SAPI === 'cli') {
echo "Rebuilding theme ".$theme[0]."... "; echo "Rebuilding theme ".$theme['theme']."... ";
} }
rebuild_theme($theme[0], $action, $boardname); rebuild_theme($theme['theme'], $action, $boardname);
if (PHP_SAPI === 'cli') { if (PHP_SAPI === 'cli') {
echo "done\n"; echo "done\n";