All *_list() functions now return html code instead direct display, *_list_cells...
[fa-stable.git] / includes / main.inc
index f52d88c6088a5d383ffa926f80dddab4c5d75484..fcb8b99ac5ac4c7ce4ac4fbb3fe073e64bba5a01 100644 (file)
@@ -28,13 +28,15 @@ include_once($path_to_root . "/includes/ui/ui_controls.inc");
 function page($title, $no_menu=false, $is_index=false, $onload="", $js="", $script_only=false)
 {
 
-       global $path_to_root;
+       global $path_to_root, $page_security;
+
 
        $hide_menu = $no_menu;
 
        include($path_to_root . "/includes/page/header.inc");
 
        page_header($title, $no_menu, $is_index, $onload, $js);
+       check_page_security($page_security);
 //     error_box();
        if($script_only) {              
                echo '<noscript>';
@@ -59,7 +61,7 @@ function flush_dir($path, $wipe = false)
 {
        $dir = opendir($path);
        while(false !== ($fname = readdir($dir))) {
-               if($fname=='.' || $fname=='..' || (!$wipe && $fname=='index.php')) continue;
+               if($fname=='.' || $fname=='..' || $fname=='CVS' || (!$wipe && $fname=='index.php')) continue;
                if(is_dir($path.'/'.$fname)) {
                    flush_dir($path.'/'.$fname, $wipe);
                    if ($wipe) @rmdir($path.'/'.$fname);
@@ -274,7 +276,7 @@ function array_remove(&$array, $index, $len=1)
        array_splice($array, $index, $len);
 }
 
-function array_replace(&$array, $index, $len, $elements)
+function array_substitute(&$array, $index, $len, $elements)
 {
        array_splice($array, $index, $len);
        array_insert($array, $index, $elements);