}
 }
 
-function check_errors ()
+function check_errors ($cfg)
 {
     if (file_exists (JIRAFEAU_ROOT . 'install.php')
-        && !file_exists (JIRAFEAU_ROOT . 'lib/config.local.php'))
+        && !($cfg['installation_done'] === true))
     {
         header('Location: install.php'); 
         exit;
     $out['link_code'] = trim ($c[9]);
     if (trim ($c[10]) == 'C')
            $out['crypted'] = true;
+    else
+           $out['crypted'] = false;
     
     return $out;
 }