Merged changes from stable branch up to 2.3.23.
[fa-stable.git] / doc / api_changes.txt
1 Changes in framework API introduced in FrontAccounting 2.4
2 ----------------------------------------------------------
3 The list does not contain changes made in user interface files.
4
5 Changed functions:
6  company_db_inc: 
7         update_company_prefs($params)
8         get_company_pref($prefs = null)
9         get_company_prefs()
10  maintenance_db.inc:
11         db_backup($conn, $ext='no', $comm='', $path='')
12         db_export($conn, $filename, $zip='no', $comment='', $no_default=false)
13         save_to_file($path, $zip, $fileData)
14  tax_types_db.inc:
15         get_tax_type_default_rate($type_id) => get_tax_type_rate($type_id)
16
17 Before 2.4:
18         get_tax_type_default_rate($type_id)
19 Now:
20         get_tax_type_rate($type_id)
21 Description:
22         Misleading function name changed.
23
24 Before 2.4:
25         update_company_prefs( $params, $pref = TB_PREF )
26 Now:
27         update_company_prefs($params)
28 Description:
29         $pref parameter has been removed. All calls should be done after switch to selected company database with 
30         set_global_connection($company).
31
32 Before 2.4:
33         get_company_pref($prefs = null, $tbpref = null)
34 Now:
35         get_company_pref($prefs = null)
36 Description:
37         $tbpref parameter has been removed. All calls should be done after switch to selected company database with 
38         set_global_connection($company).
39
40 Before 2.4:
41         get_company_prefs($tbpref = TB_PREF)
42 Now:
43         get_company_prefs()
44 Description:
45         $tbpref parameter has been removed. All calls should be done after switch to selected company database with 
46         set_global_connection($company).
47
48 Before 2.4:
49         db_backup($conn, $ext='no', $comm='', $tbpref = TB_PREF)
50 Now:
51         db_backup($conn, $ext='no', $comm='', $path='')
52 Description: 
53         $tbpref parameter has been removed. Calls should be done after switch to selected company database with 
54         set_global_connection($company).
55         $path parameter has been added: path to storage directory for generated backup file. If not set defaults to BACKUP_PATH.
56
57 Before 2.4:
58         db_export($conn, $filename, $zip='no', $comment='', $tbpref = TB_PREF, $no_default=false)
59 Now:
60         db_export($conn, $filename, $zip='no', $comment='')
61 Description:
62         $tbpref parameter has been removed. Calls should be done after switch to selected company database with 
63         set_global_connection($company). Also removed obsolete $no_default parameter.
64         $filename now have to contain full path to target directory.
65
66 Before 2.4:
67         save_to_file($backupfile, $zip, $fileData)
68 Now:
69         save_to_file($path, $zip, $fileData)
70 Description:
71         $path parameter have to contain full path to file, no assumptions to target folder is done inside function.