X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Fmain.inc;h=1a2478e9f6a9580c54aa0d50d354f05be1d3981f;hb=c31829537f02787dd94654820dd74168c054b8c4;hp=b1876099aff2346b8b4020a189cdb296697e190d;hpb=29bfc95a3b218ab90694535a0e94acd380b738b5;p=fa-stable.git diff --git a/includes/main.inc b/includes/main.inc index b1876099..1a2478e9 100644 --- a/includes/main.inc +++ b/includes/main.inc @@ -11,7 +11,6 @@ ***********************************************************************/ include_once($path_to_root . "/includes/db/connect_db.inc"); -include_once($path_to_root . "/includes/reserved.inc"); include_once($path_to_root . "/includes/errors.inc"); include_once($path_to_root . "/includes/types.inc"); include_once($path_to_root . "/includes/systypes.inc"); @@ -57,17 +56,17 @@ function end_page($no_menu=false, $is_index=false) page_footer($no_menu, $is_index); } -function flush_dir($path) +function flush_dir($path, $wipe = false) { $dir = opendir($path); while(false !== ($fname = readdir($dir))) { - if($fname=='.' || $fname=='..' || $fname=='index.php') continue; + if($fname=='.' || $fname=='..' || (!$wipe && $fname=='index.php')) continue; if(is_dir($path.'/'.$fname)) { - flush_dir($path.'/'.$fname); - @rmdir($path.'/'.$fname); + flush_dir($path.'/'.$fname, $wipe); + if ($wipe) @rmdir($path.'/'.$fname); } else @unlink($path.'/'.$fname); - } + } } function cache_js_file($fpath, $text) @@ -141,10 +140,11 @@ function js_compress($sJS) $inNormalComment = false; //loop through line's characters and take out any literal strings, replace them with ___i___ where i is the index of this string - for($j=0;$j