[0000290] Can't upload files
[fa-stable.git] / admin / db / company_db.inc
index 521851386c458b319ba848dea8ecfd06e8486f6b..e13690926a47b2b2a554f7cb88094dd6f0d7d710 100644 (file)
@@ -32,7 +32,7 @@ function update_company_prefs( $params, $pref = TB_PREF )
 */
 function get_company_pref($prefs = null, $tbpref = null)
 {
-       global $SysPrefs, $core_version;
+       global $SysPrefs, $db_version;
        
        if (!isset($_SESSION['SysPrefs']->prefs)) { // cached preferences
 
@@ -54,7 +54,7 @@ function get_company_pref($prefs = null, $tbpref = null)
                $SysPrefs = &$_SESSION['SysPrefs'];
 
                // update current db status for info in log file
-               $SysPrefs->db_ok = $SysPrefs->prefs['version_id'] == $core_version;
+               $SysPrefs->db_ok = $SysPrefs->prefs['version_id'] == $db_version;
        }
 
        $all = $_SESSION['SysPrefs']->prefs;
@@ -84,7 +84,7 @@ function get_base_sales_type()
 function get_company_extensions($id = -1) {
        global $path_to_root;
 
-       $file = $path_to_root.($id == -1 ? '' : '/company/'.$id).'/installed_extensions.php';
+       $file = $path_to_root.($id == -1 ? '' : '/company/'.(int)$id).'/installed_extensions.php';
        $installed_extensions = array();
        if (is_file($file)) {
                include($file);