Add some PHPDoc comments for ease of programming #87

Merged
lpoujol merged 6 commits from mtrossevin/evoadmin-web:doc-comments into unstable 2024-04-22 16:58:40 +02:00
2 changed files with 21 additions and 1 deletions
Showing only changes of commit 10ceade38c - Show all commits

View file

@ -31,6 +31,12 @@ else {
$cache = $conf['cache'];
}
/**
* Create a new domain (local only)
* @param FormPage $form
* @param string $admin_mail
* @return array
*/
function web_add($form, $admin_mail) {
global $conf;
@ -84,6 +90,12 @@ function web_add($form, $admin_mail) {
return array($exec_cmd, $exec_return, $exec_output);
}
/**
* Create a new domain (cluster only)
* @param FormPage $form
* @param string $admin_mail
* @return array
*/
function web_add_cluster($form, $admin_mail) {
global $cache;
global $conf;

View file

@ -229,6 +229,12 @@ if ($action=="add") {
$_SESSION['error']=null;
$_SESSION['form']=null;
/**
* Format Byte representation in human readable format (power of 1024)
* @param float|int $bytes
* @param int|null $precision
* @return string Human formatted amount of bytes
*/
function formatBytes($bytes, $precision = 2) {
$bytes *= 1024;
$units = array('o', 'Ko', 'Mo', 'Go', 'To');
@ -242,7 +248,9 @@ function formatBytes($bytes, $precision = 2) {
return round($bytes, $precision) . ' ' . $units[$pow];
}
/**
* @return string[]
*/
function get_owner_list() {
$owner_list = array();