File tree Expand file tree Collapse file tree 3 files changed +10
-6
lines changed
Expand file tree Collapse file tree 3 files changed +10
-6
lines changed Original file line number Diff line number Diff line change 5252
5353 // Set domain name to lowercase and remove www prefix
5454 $ v_domain = preg_replace ("/^www./i " , "" , $ _POST ['v_domain ' ]);
55+ $ v_domain = escapeshellarg ($ v_domain );
5556 $ v_domain = strtolower ($ v_domain );
56- exec (HESTIA_CMD ."v-list-mail-domain " .$ user ." " .escapeshellarg ($ v_domain )." json " , $ output , $ return_var );
57- $ data = json_decode (implode ('' , $ output ), true );
58- unset($ output );
59- $ v_webmail_alias = $ data [$ v_domain ]['WEBMAIL_ALIAS ' ];
6057
6158 // Add mail domain
6259 if (empty ($ _SESSION ['error_msg ' ])) {
170167 unset($ output );
171168 }
172169
170+ // Get webmail url
171+ if (empty ($ _SESSION ['error_msg ' ])) {
172+ list ($ http_host , $ port ) = explode (': ' , $ _SERVER ["HTTP_HOST " ].": " );
173+ $ webmail = "http:// " .$ hostname ."/ " .$ v_webmail_alias ."/ " ;
174+ if (!empty ($ _SESSION ['WEBMAIL_ALIAS ' ])) $ webmail = $ _SESSION ['WEBMAIL_ALIAS ' ];
175+ }
176+
173177 // Email login credentials
174178 if ((!empty ($ v_send_email )) && (empty ($ _SESSION ['error_msg ' ]))) {
175179 $ to = $ v_send_email ;
Original file line number Diff line number Diff line change 190190 </ tr >
191191 < tr >
192192 < td > < ?=__('Webmail URL')?> :</ td >
193- < td > < div > < a class ="vst " href ="<?=$v_webmail_alias?> " target ="_blank "> < ?=$v_webmail_alias?> < i > </ i > </ a > </ div > </ td >
193+ < td > < div > < a class ="vst " href ="http:// <?=$v_webmail_alias?> " target ="_blank "> http:// < ?=$v_webmail_alias?> < i > </ i > </ a > </ div > </ td >
194194 </ tr >
195195 </ table >
196196 </ div >
Original file line number Diff line number Diff line change 201201 </ tr >
202202 < tr >
203203 < td > < ?=__('Webmail URL')?> :</ td >
204- < td > < div > < a class ="vst " href ="<?=$v_webmail_alias?> " target ="_blank "> < ?=$v_webmail_alias?> < i > </ i > </ a > </ div > </ td >
204+ < td > < div > < a class ="vst " href ="http:// <?=$v_webmail_alias?> " target ="_blank "> http:// < ?=$v_webmail_alias?> < i > </ i > </ a > </ div > </ td >
205205 </ tr >
206206 </ table >
207207 </ div >
You can’t perform that action at this time.
0 commit comments