mirror of
https://github.com/vichan-devel/vichan.git
synced 2024-12-18 02:16:03 +01:00
setupBoard() function
This commit is contained in:
parent
0e8fb7c898
commit
9d5674fbfc
@ -24,6 +24,24 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function setupBoard($array) {
|
||||||
|
global $board;
|
||||||
|
|
||||||
|
$board = Array(
|
||||||
|
'id' => $array['id'],
|
||||||
|
'uri' => $array['uri'],
|
||||||
|
'name' => $array['title'],
|
||||||
|
'title' => $array['subtitle']);
|
||||||
|
|
||||||
|
$board['dir'] = sprintf(BOARD_PATH, $board['uri']);
|
||||||
|
$board['url'] = sprintf(BOARD_ABBREVIATION, $board['uri']);
|
||||||
|
|
||||||
|
if(!file_exists($board['dir'])) mkdir($board['dir'], 0777);
|
||||||
|
if(!file_exists($board['dir'] . DIR_IMG)) @mkdir($board['dir'] . DIR_IMG, 0777) or error("Couldn't create " . DIR_IMG . ". Check permissions.", true);
|
||||||
|
if(!file_exists($board['dir'] . DIR_THUMB)) @mkdir($board['dir'] . DIR_THUMB, 0777) or error("Couldn't create " . DIR_THUMB . ". Check permissions.", true);
|
||||||
|
if(!file_exists($board['dir'] . DIR_RES)) @mkdir($board['dir'] . DIR_RES, 0777) or error("Couldn't create " . DIR_RES . ". Check permissions.", true);
|
||||||
|
}
|
||||||
|
|
||||||
function post($post, $OP) {
|
function post($post, $OP) {
|
||||||
global $sql, $board;
|
global $sql, $board;
|
||||||
if($OP) {
|
if($OP) {
|
||||||
|
Loading…
Reference in New Issue
Block a user