Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#322 Modul forum: mkdir doesnt work

v2.13
closed
RUSSO Bruno
5
2012-09-17
2005-09-27
Anonymous
No

In the module forum there is a problem with the command
"mkdir".

The create mode isnt set there anywhere. So the
attachments cannot be saved.

Discussion

  • Logged In: NO

    I thik i've find a solition :D

    I'm not a programmer, but i supposed that the error of the
    mkdir command was the necessity of the "recursive" option of
    mkdir...

    than i've checked php.net for recursive mkdir fuctions and
    i've find some examples lines to make a recursive directory,
    i've changed the $working_directory and tested....IT WORK :D


    $working_directory = $GO_CONFIG->file_storage_path.'forum/'.$id;
    do {
    $dir = $working_directory;
    while (!@mkdir($dir,0777)) {
    $dir = dirname($dir);
    if ($dir == '/' || is_dir($dir))
    break;
    }
    } while ($dir != $working_directory);


    I dont know if this is a correct patch, but the new forum
    creation make the correct dir structure and now the attach
    file work :D

    :D
    spokke@virtualbrain.info