Skip to content

Commit

Permalink
* More $boarddir to ROOT_DIR. (OriginalFiles.php)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nao committed Mar 21, 2014
1 parent 317f05d commit 67effb0
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions core/app/OriginalFiles.php
Expand Up @@ -57,13 +57,8 @@ function create_settings_file()
file_put_contents(ROOT_DIR . $target, $file . "\n?" . '>');
}

function create_generic_folders($root_dir = '')
function create_generic_folders()
{
global $boarddir;

if (empty($boarddir))
$boarddir = $root_dir;

$folders = array(
'attachments' => true,
'gz' => array(
Expand All @@ -86,12 +81,12 @@ function create_generic_folders($root_dir = '')

foreach ($folders as $key => $folder)
{
if (!file_exists($boarddir . '/' . $key))
create_generic_folder($boarddir, $key);
if (!file_exists(ROOT_DIR . '/' . $key))
create_generic_folder(ROOT_DIR, $key);
if (is_array($folder))
foreach ($folder as $sub_folder)
if (!file_exists($boarddir . '/' . $key . '/' . $sub_folder))
create_generic_folder($boarddir, $key . '/' . $sub_folder);
if (!file_exists(ROOT_DIR . '/' . $key . '/' . $sub_folder))
create_generic_folder(ROOT_DIR, $key . '/' . $sub_folder);
}
}

Expand Down

0 comments on commit 67effb0

Please sign in to comment.