Merged latest changes from stable branch.
[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=null)
12         db_export($conn, $filename, $zip='no', $comment='', $no_default=false)
13         save_to_file($path, $zip, $fileData)
14
15
16 Before 2.4:
17         update_company_prefs( $params, $pref = TB_PREF )
18 Now:
19         update_company_prefs($params)
20 Description:
21         $pref parameter has been removed. All calls should be done after switch to selected company database with 
22         set_global_connection($company).
23
24 Before 2.4:
25         get_company_pref($prefs = null, $tbpref = null)
26 Now:
27         get_company_pref($prefs = null)
28 Description:
29         $tbpref 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_prefs($tbpref = TB_PREF)
34 Now:
35         get_company_prefs()
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         db_backup($conn, $ext='no', $comm='', $tbpref = TB_PREF)
42 Now:
43         db_backup($conn, $ext='no', $comm='', $path=null)
44 Description: 
45         $tbpref parameter has been removed. Calls should be done after switch to selected company database with 
46         set_global_connection($company).
47         $path parameter has been added: path to storage directory for generated backup file. If not set defaults to BACKUP_PATH.
48
49 Before 2.4:
50         db_export($conn, $filename, $zip='no', $comment='', $tbpref = TB_PREF, $no_default=false)
51 Now:
52         db_export($conn, $filename, $zip='no', $comment='')
53 Description:
54         $tbpref parameter has been removed. Calls should be done after switch to selected company database with 
55         set_global_connection($company). Also removed obsolete $no_default parameter.
56         $filename now have to contain full path to target directory.
57
58 Before 2.4:
59         save_to_file($backupfile, $zip, $fileData)
60 Now:
61         save_to_file($path, $zip, $fileData)
62 Description:
63         $path parameter have to contain full path to file, no assumptions to target folder is done inside function.