![]() |
My first step to contributing
Hello Till,
Let this be my first thread to understanding ISPConfig3 code structure so that I can contribute. My first contribution is add a new API function for downloading and restoring of backup files through API. Please help as much as possible in this thread to achieve that goal. Then I can hit more complex functions. Will keep you updated along the way .. Joseph |
Complete
Hello Till,
Here is the backup download / restore API function. I have tested it and it works. You may however advice on the code formats and if any suggestions especially in the area of reporting errors. Code:
//* Backup download and restoration by Abdi JosephCode:
try I will attach the finel remoting.inc.php file on your approval. |
The function is generally fine, just a few minor things:
- The permission check is missing. - Errors are not returned as soap faults. - The params array contains only one value if I see it correctly, you should use $action as parameter and not $params array. About the syntax, please use { ... } in if / else statements. Here my proposed changes (untested): Code:
//* Backup download and restoration by Abdi Joseph |
Thanks for that information Till,
I have made the changes accordingly and tested it and yes it works fine! What is the way forward in this regard now to have this function added to the future versions? First I guess I need to prepare the API documenation and example file, right? Joseph |
Finel Changes
1 Attachment(s)
Hello Till,
Please find attached my entire changes ... The attachment includes: 1. /interface/lib/classes/remoting.inc 2. API documentation (sites_web_domain_backup.html) 3. API navigation file (navigation.html) 4. API example file (sites_web_domain_backup.php) I have tested these API changes on my production server and everything works fine. I just made a slight change to the proposed code though: Instead of return true, I changed to return SUCCESS and Instead of return false, I changed to return FAIL Let me know if there any comments or suggestions .. Joseph |
Thanks for your contribution. I've added it to the bugtracker as proposed for inclusion.
Quote:
|
1 Attachment(s)
Hello Till,
Please find attached ALL new changes applied with return being to TRUE and FALSE. Changes include in 1. remoting.inc.php 2. sites_web_domain_backup.html (API documentation file) 3. sites_web_domain_backup.php (API example file) Joseph |
Hi,
and Thanx for nice Job. |
Your welcome :)
Have you tested it? |
Hi
i Code today get function for this Backup method. greetz |
| All times are GMT +2. The time now is 22:35. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.