Skip to content

Commit 7ea48a0

Browse files
author
Kristan Kenney
committed
Merge branch 'webui-refresh-winterfell' into develop
2 parents aad05e3 + 1633bdc commit 7ea48a0

File tree

127 files changed

+4413
-5837
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

127 files changed

+4413
-5837
lines changed

bin/v-list-mail-account

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ format=${4-shell}
1717

1818
# Includes
1919
source $HESTIA/func/main.sh
20+
source $HESTIA/conf/hestia.conf
2021

2122
# JSON list function
2223
json_list() {
@@ -30,7 +31,8 @@ json_list() {
3031
"U_DISK": "'$U_DISK'",
3132
"SUSPENDED": "'$SUSPENDED'",
3233
"TIME": "'$TIME'",
33-
"DATE": "'$DATE'"
34+
"DATE": "'$DATE'",
35+
"WEBMAIL_ALIAS": "'$WEBMAIL_ALIAS.$domain'"
3436
}'
3537
echo '}'
3638
}
@@ -47,20 +49,21 @@ shell_list() {
4749
echo "SUSPENDED: $SUSPENDED"
4850
echo "TIME: $TIME"
4951
echo "DATE: $DATE"
52+
echo "WEBMAIL_ALIAS: $WEBMAIL_ALIAS.$domain"
5053
}
5154

5255
# PLAIN list function
5356
plain_list() {
5457
echo -ne "$account\t$ALIAS\t$FWD\t$FWD_ONLY\t$AUTOREPLY\t$QUOTA\t"
55-
echo -e "$U_DISK\t$SUSPENDED\t$TIME\t$DATE"
58+
echo -e "$U_DISK\t$SUSPENDED\t$TIME\t$DATE\t$WEBMAIL_ALIAS.$domain"
5659
}
5760

5861
# CSV list function
5962
csv_list() {
6063
echo -n "ACCOUNT,ALIAS,FWD,FWD_ONLY,AUTOREPLY,QUOTA,U_DISK"
6164
echo "SUSPENDED,TIME,DATE"
6265
echo -n "$ACCOUNT,\"$ALIAS\",\"$FWD\",$FWD_ONLY,$AUTOREPLY,$QUOTA,"
63-
echo "$U_DISK,$SUSPENDED,$TIME,$DATE"
66+
echo "$U_DISK,$SUSPENDED,$TIME,$DATE\t$WEBMAIL_ALIAS.$domain"
6467
}
6568

6669

bin/v-list-mail-domain

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ format=${3-shell}
1616

1717
# Includes
1818
source $HESTIA/func/main.sh
19+
source $HESTIA/conf/hestia.conf
1920

2021
# JSON list function
2122
json_list() {
@@ -32,8 +33,9 @@ json_list() {
3233
"LETSENCRYPT": "'$LETSENCRYPT'",
3334
"SUSPENDED": "'$SUSPENDED'",
3435
"TIME": "'$TIME'",
35-
"DATE": "'$DATE'"
36-
}'
36+
"DATE": "'$DATE'",
37+
"WEBMAIL_ALIAS": "'$WEBMAIL_ALIAS.$domain'"
38+
}'
3739
echo '}'
3840
}
3941

@@ -51,20 +53,21 @@ shell_list() {
5153
echo "SUSPENDED: $SUSPENDED"
5254
echo "TIME: $TIME"
5355
echo "DATE: $DATE"
56+
echo "WEBMAIL_ALIAS: $WEBMAIL_ALIAS.$domain"
5457
}
5558

5659
# PLAIN list function
5760
plain_list() {
5861
echo -ne "$DOMAIN\t$ANTIVIRUS\t$ANTISPAM\t$DKIM\t$CATCHALL\t"
59-
echo -e "$ACCOUNTS\t$U_DISK\t$SSL\t$LETSENCRYPT\t$SUSPENDED\t$TIME\t$DATE"
62+
echo -e "$ACCOUNTS\t$U_DISK\t$SSL\t$LETSENCRYPT\t$SUSPENDED\t$TIME\t$DATE\t$WEBMAIL_ALIAS.$domain"
6063
}
6164

6265
# CSV list function
6366
csv_list() {
6467
echo -n "DOMAIN,ANTIVIRUS,ANTISPAM,DKIM,CATCHALL,ACCOUNTS,U_DISK,"
6568
echo "SSL,LETSENCRYPT,SUSPENDED,TIME,DATE"
6669
echo -n "$DOMAIN,$ANTIVIRUS,$ANTISPAM,$DKIM,$CATCHALL,$ACCOUNTS,$U_DISK"
67-
echo "$SSL,$LETSENCRYPT,$SUSPENDED,$TIME,$DATE"
70+
echo "$SSL,$LETSENCRYPT,$SUSPENDED,$TIME,$DATE,$WEBMAIL_ALIAS.$domain"
6871
}
6972

7073

install/upgrade/0.10.0-190430.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ HESTIA_BACKUP="/root/hst_upgrade/$(date +%d%m%Y%H%M)"
66
hestiacp="$HESTIA/install/deb"
77

88
# Add webmail alias variable to system configuration if non-existent
9-
webmail_alias_check=$(cat $HESTIA/conf/hestia.conf | grep WEBMAIL_ALIAS)
9+
WEBMAIL_ALIAS_CHECK=$(cat $HESTIA/conf/hestia.conf | grep WEBMAIL_ALIAS)
1010
if [ -z "$WEBMAIL_ALIAS_CHECK" ]; then
1111
echo "(*) Adding global webmail alias to system configuration..."
1212
sed -i "/WEBMAIL_ALIAS/d" $HESTIA/conf/hestia.conf
@@ -305,6 +305,8 @@ for user in `ls /usr/local/hestia/data/users/`; do
305305
sleep 1
306306
done
307307

308+
# Adding upgrade notification
309+
$BIN/v-add-user-notification admin 'Upgrade complete' 'Your server has been updated to v0.10.0.<br>Please report any bugs on GitHub at<br>https://github.com/hestiacp/hestiacp/Issues<br><br>Have a great day!'
308310
# Restart server services
309311
echo "(*) Restarting services..."
310312
sleep 5

web/add/mail/index.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,24 @@
66
// Main include
77
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
88

9+
// Get all user domains
10+
exec (HESTIA_CMD."v-list-mail-domains ".escapeshellarg($user)." json", $output, $return_var);
11+
$user_domains = json_decode(implode('', $output), true);
12+
$user_domains = array_keys($user_domains);
13+
unset($output);
14+
15+
$v_domain = $_GET['domain'];
16+
if(!empty($v_domain)){
17+
if(!in_array($v_domain, $user_domains)) {
18+
header("Location: /list/mail/");
19+
exit;
20+
}
21+
// Set webmail alias
22+
exec (HESTIA_CMD."v-list-mail-domain ".escapeshellarg($user)." ".escapeshellarg($v_domain)." json", $output, $return_var);
23+
$data = json_decode(implode('', $output), true);
24+
unset($output);
25+
$v_webmail_alias = $data[$v_domain]['WEBMAIL_ALIAS'];
26+
}
927

1028
// Check POST request for mail domain
1129
if (!empty($_POST['ok'])) {

web/copy/package/index.php

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?php
2+
// Init
3+
error_reporting(NULL);
4+
ob_start();
5+
session_start();
6+
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
7+
8+
// Check token
9+
if ((!isset($_GET['token'])) || ($_SESSION['token'] != $_GET['token'])) {
10+
header('location: /login/');
11+
exit();
12+
}
13+
14+
// Check user
15+
if ($_SESSION['user'] != 'admin') {
16+
header("Location: /list/user");
17+
exit;
18+
}
19+
20+
// Check package argument
21+
if (empty($_GET['package'])) {
22+
header("Location: /list/package/");
23+
exit;
24+
}
25+
26+
if ($_SESSION['user'] == 'admin') {
27+
if (!empty($_GET['package'])) {
28+
$v_package = escapeshellarg($_GET['package']);
29+
exec (HESTIA_CMD."v-copy-user-package ".$v_package." ".$v_package."-copy", $output, $return_var);
30+
}
31+
32+
if ($return_var != 0) {
33+
$error = implode('<br>', $output);
34+
if (empty($error)) $error = 'Error: unable to copy package.';
35+
$_SESSION['error_msg'] = $error;
36+
}
37+
unset($output);
38+
}
39+
40+
header("Location: /list/package/");
41+
exit;

web/css/animate.css

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3557,13 +3557,17 @@
35573557
}
35583558

35593559
.animated {
3560-
-webkit-animation-duration: 1s;
3561-
animation-duration: 1s;
3560+
-webkit-animation-duration: 0.3s;
3561+
animation-duration: 0.3s;
35623562
-webkit-animation-fill-mode: both;
35633563
animation-fill-mode: both;
35643564
}
35653565

3566-
.animated.infinite {
3566+
.animated.extended {
3567+
-webkit-animation-duration: 0.6s;
3568+
animation-duration: 0.6s;
3569+
}
3570+
.animated.long {
35673571
-webkit-animation-iteration-count: infinite;
35683572
animation-iteration-count: infinite;
35693573
}

0 commit comments

Comments
 (0)