diff --git a/db_backups/README b/db_backups/README new file mode 100644 index 0000000..fbc260d --- /dev/null +++ b/db_backups/README @@ -0,0 +1 @@ +This directory will contain the backups of your database, stored before each global payback. Make sure it is readable *AND* writable by the script. diff --git a/install.php b/install.php index 774e5c4..712c76e 100644 --- a/install.php +++ b/install.php @@ -9,7 +9,11 @@ } if(!is_writable('data/')) { - $error = "The script seems to be unable to write to data/ folder (to write the data/config.php configuration file). You should give write access during install and disable them after (chmod 777 -R data/ to install and chmod 755 -R data/ after installation for example)."; + $error = "The script seems to be unable to write to data/ folder (to write the data/config.php configuration file). You should give write access during install and disable them after (chmod 777 -R data/ to install and chmod 755 -R data/ after installation for example). You'll need right access on this folder each time you will want to edit settings."; + $block_form = true; + } + if(!is_writable('db_backups/')) { + $error = "The script seems to be unable to write to db_backups/ folder (to write the database backups). You should give write access."; $block_form = true; } diff --git a/tpl/default_en/manage_paybacks.html b/tpl/default_en/manage_paybacks.html new file mode 100644 index 0000000..c57ad74 --- /dev/null +++ b/tpl/default_en/manage_paybacks.html @@ -0,0 +1,43 @@ +{include="header"} + +{if condition="!empty($list)"} +
List of previous global paybacks :
+You can add a global payback using this page. Such a payback aims at minimizing as much as possible the number of individual paybacks between users. So, the index page table will be resetted and a new table will be created. This new table will be available in the "see global paybacks" page and will contain as least exchange as possible.
+ +For eample, if a user A owes 5{$currency} to a user B and if B owes 5{$currency} to C, after the global paybacks, these paybacks will simplify and A will owe 5{$currency} to C only.
+ +Note : It's not possible to revert this operation, unless you handle the restoration of data in your database manually. Be sure you want to launch this procedure before clicking on the button below.
+ +Note : A backup of your database right now will be made and stored in the db_backup folder at the root of your instance. You'll be able to restore the current status of your database in case of error from your part.
+ +If you confirm the creation of a global payback, please select right below the users you want to include in the payback.
+ + +{/if} +{include="footer"} diff --git a/tpl/default_fr/manage_paybacks.html b/tpl/default_fr/manage_paybacks.html index c8ca15e..7b1a096 100644 --- a/tpl/default_fr/manage_paybacks.html +++ b/tpl/default_fr/manage_paybacks.html @@ -21,7 +21,7 @@Note : Cette opération est irréversible sans mettre les mains dans la base de données.
-Note : Un backup de votre base de données à l'heure actuelle sera effectué et stocké dans le répertoire backups à la racine de l'instance. Vous pourrez ainsi restaurer la base de données en cas d'erreur de votre part.
+Note : Un backup de votre base de données à l'heure actuelle sera effectué et stocké dans le répertoire db_backups à la racine de l'instance. Vous pourrez ainsi restaurer la base de données en cas d'erreur de votre part.