Compare commits

...

2 commits

Author SHA1 Message Date
David Prevot c7a83045fc [WIP] sudo script doesn’t work yet
All checks were successful
gitea/evoadmin-mail/pipeline/head This commit looks good
2023-07-24 17:58:25 +02:00
David Prevot 145b406c48 tfix 2023-07-24 17:57:20 +02:00
2 changed files with 5 additions and 4 deletions

View file

@ -1,7 +1,7 @@
<?php
class Config {
private static $name='Evoadmin Mail', $mail='root@localhost', $log_level='error', $ldap=array(), $quota_path='';
private static $name='Evoadmin Mail', $mail='root@localhost', $log_level='error', $ldap=array(), $quota_path='', $evoexec=array();
public static function load() {
$file = getenv("EVOADMINMAIL_CONFIG_FILE") or $file = '../config/config.ini';
$ini = parse_ini_file($file, true);
@ -10,6 +10,7 @@ class Config {
self::$log_level = $ini['global']['log_level'];
self::$ldap = $ini['ldap'];
self::$quota_path = $ini['quota']['path'];
self::$evoexec = $ini['evoexec'];
}
public static function getName() {

View file

@ -139,7 +139,7 @@ class FormController {
PageController::$alerts[] = array('type' => 1, 'message' => 'Suppression du domaine '.self::$form['cn'].' ...');
try {
self::$server->delDomain(self::$form['cn']);
PageController::$alerts[] = array('type' => 0, 'message' => 'Suppression effectué.');
PageController::$alerts[] = array('type' => 0, 'message' => 'Suppression effectuée.');
} catch (Exception $e_ad) {
PageController::$alerts[] = array('type' => 2, 'message' => $e_ad->getMessage());
}
@ -149,8 +149,8 @@ class FormController {
private static function delAccount() {
PageController::$alerts[] = array('type' => 1, 'message' => 'Suppression du compte '.self::$form['uid'].'...');
try {
self::$domain->delAccount(self::$form['uid'],self::$form['cn']);
PageController::$alerts[] = array('type' => 0, 'message' => "Suppression effectué.");
self::$domain->delAccount(self::$form['uid'],self::$form['domain']);
PageController::$alerts[] = array('type' => 0, 'message' => "Suppression effectuée."));
} catch (Exception $e) {
PageController::$alerts[] = array('type' => 2, 'message' => $e->getMessage());
}