X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Fmain.inc;h=db1576bf50d748ad38b2b0bdd7b1b160dfcba57d;hb=29a830f28694733a997b3095aecc8b192f7b7187;hp=161911c608b512b87559d7e7ff2569b21ae8427d;hpb=46c5f7a65a7659a44ae8254c63152074363d3987;p=fa-stable.git diff --git a/includes/main.inc b/includes/main.inc index 161911c6..db1576bf 100644 --- a/includes/main.inc +++ b/includes/main.inc @@ -46,16 +46,16 @@ function page($title, $no_menu=false, $is_index=false, $onload="", $js="", $scri } } -function end_page($no_menu=false, $is_index=false, $hide_back_link=false, $type_no=0, $trans_no=0) +function end_page($no_menu=false, $is_index=false, $final_screen=false, $type_no=0, $trans_no=0) { global $path_to_root; - if (!$is_index && !$hide_back_link && function_exists('hyperlink_back')) - hyperlink_back(true, $no_menu, $type_no, $trans_no); + if (!$is_index && function_exists('hyperlink_back')) + hyperlink_back(true, $no_menu, $type_no, $trans_no, $final_screen); div_end(); // end of _page_body section include($path_to_root . "/includes/page/footer.inc"); - page_footer($no_menu, $is_index, $hide_back_link); + page_footer($no_menu, $is_index); } function cache_js_file($fpath, $text) @@ -256,9 +256,9 @@ function check_write($path) { if ($path == ''//|| $path == '.' || $path == '..' ) return 0; - + return is_writable($path) ? (is_dir($path) ? 1 : -1) - : (is_file($path) ? 0 : ($path == '.' ? 0 : check_write(dirname($path)))); + : (is_file($path) ? 0 : ($path == '.' || $path == '..' ? 0 : check_write(dirname($path)))); } /* @@ -348,6 +348,7 @@ function find_custom_file($rep) Changes all not POSIX compatible chars to underscore. */ function clean_file_name($filename) { + $filename = str_replace(chr(0), '', $filename); return preg_replace('/[^a-zA-Z0-9.\-_]/', '_', $filename); }