X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=includes%2Fmain.inc;h=f52d88c6088a5d383ffa926f80dddab4c5d75484;hb=6bdb8986a143a35e8f8a1c318bd14fab839000b2;hp=b1876099aff2346b8b4020a189cdb296697e190d;hpb=29bfc95a3b218ab90694535a0e94acd380b738b5;p=fa-stable.git diff --git a/includes/main.inc b/includes/main.inc index b1876099..f52d88c6 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"); @@ -25,7 +24,6 @@ include_once($path_to_root . "/includes/db/audit_trail_db.inc"); include_once($path_to_root . "/admin/db/users_db.inc"); include_once($path_to_root . "/includes/ui/ui_view.inc"); include_once($path_to_root . "/includes/ui/ui_controls.inc"); -include_once($path_to_root . "/installed_extensions.php"); function page($title, $no_menu=false, $is_index=false, $onload="", $js="", $script_only=false) { @@ -57,17 +55,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 +139,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