Compare commits
6 commits
debian/1.0
...
master
Author | SHA1 | Date | |
---|---|---|---|
8b1e791d2f | |||
bd6e653b19 | |||
f9ee642682 | |||
0257f25e92 | |||
2d312b605a | |||
65449431f9 |
|
@ -7,7 +7,7 @@ pipeline {
|
|||
}
|
||||
steps {
|
||||
script {
|
||||
sh 'gbp buildpackage'
|
||||
sh 'gbp buildpackage --git-export-dir=build-area'
|
||||
}
|
||||
archiveArtifacts allowEmptyArchive: true, artifacts: 'build-area/*.gz,build-area/*.bz2,build-area/*.xz,build-area/*.deb,build-area/*.dsc,build-area/*.changes,build-area/*.buildinfo,build-area/*.build,build-area/lintian.txt'
|
||||
}
|
||||
|
|
|
@ -98,11 +98,13 @@ class FormController {
|
|||
,'mailaccept' => array('filter' => FILTER_DEFAULT, 'flags' => FILTER_FORCE_ARRAY)
|
||||
), true);
|
||||
|
||||
self::$form['mailaccept'] = array_map(function($value) {
|
||||
if (!empty($value)) {
|
||||
return $value.'@'.self::$form['domain'];
|
||||
}
|
||||
}, self::$form['mailaccept']);
|
||||
if (!empty(self::$form['mailaccept'])) {
|
||||
self::$form['mailaccept'] = array_map(function($value) {
|
||||
if (!empty($value)) {
|
||||
return $value.'@'.self::$form['domain'];
|
||||
}
|
||||
}, self::$form['mailaccept']);
|
||||
}
|
||||
|
||||
if (!empty(self::$form['password'])) { self::filterPassword(); }
|
||||
|
||||
|
@ -150,7 +152,7 @@ class FormController {
|
|||
PageController::$alerts[] = array('type' => 1, 'message' => 'Suppression du compte '.self::$form['uid'].'...');
|
||||
try {
|
||||
self::$domain->delAccount(self::$form['uid'],self::$form['domain']);
|
||||
PageController::$alerts[] = array('type' => 0, 'message' => "Suppression effectuée."));
|
||||
PageController::$alerts[] = array('type' => 0, 'message' => "Suppression effectuée.");
|
||||
} catch (Exception $e) {
|
||||
PageController::$alerts[] = array('type' => 2, 'message' => $e->getMessage());
|
||||
}
|
||||
|
|
|
@ -1,18 +1,13 @@
|
|||
<?php
|
||||
|
||||
if (file_exists(stream_resolve_include_path('Twig/autoload.php'))) {
|
||||
require_once 'Twig/autoload.php';
|
||||
} elseif (stream_resolve_include_path(file_exists('Twig/Autoloader.php'))) {
|
||||
require_once 'Twig/Autoloader.php';
|
||||
Twig_Autoloader::register();
|
||||
}
|
||||
require_once '/usr/share/php/Twig/autoload.php';
|
||||
|
||||
class MailNotify {
|
||||
private static $twig, $adminmail;
|
||||
|
||||
public static function init() {
|
||||
$loader = new Twig_Loader_Filesystem('tpl/mail');
|
||||
self::$twig = new Twig_Environment($loader, array(
|
||||
$loader = new Twig\Loader\FilesystemLoader('tpl/mail');
|
||||
self::$twig = new Twig\Environment($loader, array(
|
||||
'cache' => false
|
||||
));
|
||||
|
||||
|
|
|
@ -1,11 +1,6 @@
|
|||
<?php
|
||||
|
||||
if (file_exists(stream_resolve_include_path('Twig/autoload.php'))) {
|
||||
require_once 'Twig/autoload.php';
|
||||
} elseif (stream_resolve_include_path(file_exists('Twig/Autoloader.php'))) {
|
||||
require_once 'Twig/Autoloader.php';
|
||||
Twig_Autoloader::register();
|
||||
}
|
||||
require_once '/usr/share/php/Twig/autoload.php';
|
||||
|
||||
class PageController {
|
||||
public static $alerts=array();
|
||||
|
@ -14,8 +9,8 @@ class PageController {
|
|||
public static function init(LdapServer $server=NULL) {
|
||||
self::$server = $server;
|
||||
|
||||
$loader = new Twig_Loader_Filesystem('tpl/page');
|
||||
self::$twig = new Twig_Environment($loader, array(
|
||||
$loader = new Twig\Loader\FilesystemLoader('tpl/page');
|
||||
self::$twig = new Twig\Environment($loader, array(
|
||||
'cache' => false
|
||||
));
|
||||
|
||||
|
@ -65,12 +60,14 @@ class PageController {
|
|||
if (!empty($_GET['domain']) && in_array($_GET['domain'], $allowed_params)) { self::$params['domain'] = $_GET['domain']; }
|
||||
if (!empty($_GET['account']) && in_array($_GET['account'], $allowed_params)) { self::$params['account'] = $_GET['account']; }
|
||||
if (!empty($_GET['alias']) && in_array($_GET['alias'], $allowed_params)) { self::$params['alias'] = $_GET['alias']; }
|
||||
self::$params = array_merge(filter_input_array(INPUT_GET, array(
|
||||
'domain' => FILTER_SANITIZE_URL
|
||||
,'account' => FILTER_SANITIZE_EMAIL
|
||||
,'alias' => array('filter' => FILTER_SANITIZE_STRING, 'flags' => FILTER_FLAG_STRIP_HIGH)
|
||||
), true)
|
||||
, self::$params);
|
||||
if (!empty($_GET['domain'])) {
|
||||
self::$params = array_merge(filter_input_array(INPUT_GET, array(
|
||||
'domain' => FILTER_SANITIZE_URL
|
||||
,'account' => FILTER_SANITIZE_EMAIL
|
||||
,'alias' => array('filter' => FILTER_SANITIZE_STRING, 'flags' => FILTER_FLAG_STRIP_HIGH)
|
||||
), true)
|
||||
, self::$params);
|
||||
}
|
||||
|
||||
unset($_GET);
|
||||
//die(var_dump(self::$params));
|
||||
|
@ -102,7 +99,7 @@ class PageController {
|
|||
}
|
||||
|
||||
private static function logout() {
|
||||
session_unset('EVOADMIN_SESS');
|
||||
session_unset();
|
||||
session_destroy();
|
||||
print self::$twig->render('login.html', array(
|
||||
'page_name' => Config::getName().' - Login'
|
||||
|
|
Loading…
Reference in a new issue