Fixed bug in set_company_pref()
authorJanusz Dobrowolski <janusz@frontaccounting.eu>
Wed, 26 Jan 2011 12:42:47 +0000 (12:42 +0000)
committerJanusz Dobrowolski <janusz@frontaccounting.eu>
Wed, 26 Jan 2011 12:42:47 +0000 (12:42 +0000)
admin/db/company_db.inc

index 0a01a7c493c7048fae374606ea6d520b11ee9b4b..0fc0af275783fa487ed282d10a911bf634d2242d 100644 (file)
@@ -78,7 +78,7 @@ function get_company_prefs($tbpref = TB_PREF)
 
 function set_company_pref($pref, $category, $type, $length, $value)
 {
-       $sql = "REPLACE `0_sys_prefs` SET `name`=".db_escape($pref).", `category`=".db_escape($category)
+       $sql = "REPLACE `".TB_PREF."sys_prefs` SET `name`=".db_escape($pref).", `category`=".db_escape($category)
                .", `type`=".db_escape($type).", `length`=".db_escape($length).", `value`=".db_escape($value);
        return db_query($sql, "cannot set company pref");
 }