Fixed typo in location variable.
[fa-stable.git] / includes / current_user.inc
index 51c03ee626f0e29f75fa453e756a541732a31bd8..0a5b7481dc381bba29617ae769f30ef60a24dae0 100644 (file)
@@ -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) { 
@@ -217,7 +218,7 @@ if (!floatcmp($value1, $value2))
        compare value is 0
 */
 
-define('FLOAT_COMP_DELTA', 0.0000001);
+define('FLOAT_COMP_DELTA', 0.004);
 
 function floatcmp($a, $b)
 {
@@ -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)) {