Here.

Sent from the phpGroupWare forums @ forums.phpGroupWare.org
/* Create non-web directories needed for FUDforum operation */
        $dir_ar = array('include', 'src', 'errors', 'messages', 'files', 'thm', 
'sql', 'tmp', 'cache', 'errors/.nntp', 'errors/.mlist');
        if (!is_dir($fud_write_dir)) {
                mkdir($fud_write_dir, 0700);
        }
        while (list(,$d) = each($dir_ar)) {
                if (!is_dir("{$fud_write_dir}/{$d}")) {
                        mkdir("{$fud_write_dir}/{$d}", 0700);
                }
                if (is_dir(PHPGW_SERVER_ROOT."/fudforum/setup/base/{$d}")) {
                        $dir = 
opendir(PHPGW_SERVER_ROOT."/fudforum/setup/base/{$d}");
                        #readdir($dir); readdir($dir);
                        while ($f = readdir($dir)) {
                                if ($f != "." && $f != ".." && $f != ".svn" && 
$f != ".htaccess") {
                                        if 
(!is_dir(PHPGW_SERVER_ROOT."/fudforum/setup/base/{$d}/{$f}")) {
                                                
copy(PHPGW_SERVER_ROOT."/fudforum/setup/base/{$d}/{$f}", 
"{$DATA_DIR}{$d}/{$f}");
                                                chmod("{$DATA_DIR}{$d}/{$f}", 
0600);
                                        } else {
                                                $dir_ar[] = "{$d}/{$f}";
                                        }
                                }
                        }
                        closedir($dir);
                }
        }

        /* Create web directories & files needed FUDforum operations */
        copy(PHPGW_SERVER_ROOT."/fudforum/setup/base/www_root/blank.gif", 
PHPGW_SERVER_ROOT."/fudforum/blank.gif");
        copy(PHPGW_SERVER_ROOT."/fudforum/setup/base/www_root/lib.js", 
PHPGW_SERVER_ROOT."/fudforum/lib.js");
        $dir_ar = array('adm', 'images');
        while (list(,$d) = each($dir_ar)) {
                if (!is_dir("{$WWW_ROOT_DISK}/{$d}")) {
                        mkdir("{$WWW_ROOT_DISK}/{$d}", 0700);
                }
                if 
(is_dir(PHPGW_SERVER_ROOT."/fudforum/setup/base/www_root/{$d}")) {
                        $dir = 
opendir(PHPGW_SERVER_ROOT."/fudforum/setup/base/www_root/{$d}");
                        #readdir($dir); readdir($dir);
                        while ($f = readdir($dir)) {
                                if ($f != "." && $f != ".." && $f != ".svn" && 
$f != ".htaccess") {
                                        if 
(!is_dir(PHPGW_SERVER_ROOT."/fudforum/setup/base/www_root/{$d}/{$f}")) {
                                                
copy(PHPGW_SERVER_ROOT."/fudforum/setup/base/www_root/{$d}/{$f}", 
"{$WWW_ROOT_DISK}{$d}/{$f}");
                                                
chmod("{$WWW_ROOT_DISK}{$d}/{$f}", 0600);
                                        } else {
                                                $dir_ar[] = "{$d}/{$f}";
                                        }
                                }
                        }
                        closedir($dir);
                }
        }

_______________________________________________
phpGroupWare-developers mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/phpgroupware-developers

Reply via email to