X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Fcurrent_user.inc;h=0a5b7481dc381bba29617ae769f30ef60a24dae0;hb=7840540918bfd37c886877a5d52e3ba0b3373289;hp=60964cbb8ad1224b7be575b42976755c2ab9f83f;hpb=f30537908e67494d74831f50490df4b965e657ff;p=fa-stable.git diff --git a/includes/current_user.inc b/includes/current_user.inc index 60964cbb..0a5b7481 100644 --- a/includes/current_user.inc +++ b/includes/current_user.inc @@ -76,6 +76,7 @@ class current_user if ($Auth_Result) { $myrow = get_user_by_login($loginname); + $this->old_db = isset($myrow["full_access"]); if (! @$myrow["inactive"]) { if ($this->old_db) { @@ -433,6 +434,11 @@ function user_startup_tab() return $_SESSION["wa_current_user"]->prefs->start_up_tab(); } +function user_check_access($sec_area) +{ + return $_SESSION["wa_current_user"]->can_access($sec_area); +} + function set_user_prefs($prefs) { $_SESSION["wa_current_user"]->update_prefs($prefs); @@ -544,6 +550,7 @@ function flush_dir($path, $wipe = false) $dir = opendir($path); if(!$dir) return; + while(false !== ($fname = readdir($dir))) { if($fname=='.' || $fname=='..' || $fname=='CVS' || (!$wipe && $fname=='index.php')) continue; if(is_dir($path.'/'.$fname)) {