mirror of
https://github.com/vichan-devel/vichan.git
synced 2025-01-19 01:24:05 +01:00
allow wildcard for catalog theme
This commit is contained in:
parent
89a31794d9
commit
dba38b10d4
@ -1,6 +1,15 @@
|
||||
<?php
|
||||
require 'info.php';
|
||||
|
||||
function get_all_boards() {
|
||||
$boards = [];
|
||||
$query = query("SELECT uri FROM ``boards``") or error(db_error());
|
||||
while ($board = $query->fetch(PDO::FETCH_ASSOC)) {
|
||||
$boards[] = $board['uri'];
|
||||
}
|
||||
return $boards;
|
||||
}
|
||||
|
||||
function catalog_build($action, $settings, $board) {
|
||||
global $config;
|
||||
|
||||
@ -13,6 +22,11 @@
|
||||
|
||||
$boards = explode(' ', $settings['boards']);
|
||||
|
||||
if (in_array('*', $boards)) {
|
||||
$boards = get_all_boards();
|
||||
}
|
||||
|
||||
|
||||
if ($action == 'all') {
|
||||
foreach ($boards as $board) {
|
||||
$b = new Catalog();
|
||||
|
Loading…
x
Reference in New Issue
Block a user