File tree Expand file tree Collapse file tree 4 files changed +12
-3
lines changed
Expand file tree Collapse file tree 4 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ function loadContentRefresh(pagename) {
66 document . getElementById ( 'pageContent' ) . innerHTML = o . responseText ;
77 } ,
88 failure : function ( o ) {
9- alert ( 'Ajax Request was not successful.' ) ;
9+ alert ( 'Ajax Request was not successful.' + pagename ) ;
1010 }
1111 }
1212
Original file line number Diff line number Diff line change 104104
105105$ app ->tpl ->setVar ("log " ,$ log );
106106$ app ->tpl ->setVar ("logfile " ,$ logfile );
107+ $ app ->tpl ->setVar ("logfile_id " ,$ logfile_id );
107108
108109
109110$ app ->tpl_defaults ();
Original file line number Diff line number Diff line change 11< div style ="margin-left:30px;margin-top:30px; "> < b > < tmpl _var name ="logfile "> </ b > < br /> < br />
2- < select name ="refreshinterval " id ="refreshinterval " onChange ="loadContentRefresh('monitor/index .php?log=mail_log ') ">
2+ < select name ="refreshinterval " id ="refreshinterval " onChange ="loadContentRefresh('monitor/logview .php?log={tmpl_var name= " logfile_id "} ')">
33 {tmpl_var name="refresh"}
44</ select > < br /> < br />
55< tmpl _var name ="log "> </ div >
Original file line number Diff line number Diff line change @@ -67,8 +67,16 @@ function user_insert($event_name,$data) {
6767
6868 // Create the maildir, if it does not exist
6969 if (!is_dir ($ data ['new ' ]['maildir ' ])) {
70- exec ("su -c 'mkdir -p " .escapeshellcmd ($ data ['new ' ]['maildir ' ])."' " .$ mail_config ['mailuser_name ' ]);
70+ $ tmp_path = $ data ['new ' ]['maildir ' ];
71+ $ tmp_path_parts = explode ('/ ' ,$ tmp_path );
72+ unset($ tmp_path_parts [count ($ tmp_path_parts )-2 ]);
73+ $ maildomain_path = implode ('/ ' ,$ tmp_path_parts );
74+ if (!is_dir ($ maildomain_path )) {
75+ exec ("su -c 'mkdir -p " .escapeshellcmd ($ maildomain_path )."' " .$ mail_config ['mailuser_name ' ]);
76+ $ app ->log ('Created Directory: ' .$ maildomain_path ,LOGLEVEL_DEBUG );
77+ }
7178 exec ("su -c 'maildirmake " .escapeshellcmd ($ data ['new ' ]['maildir ' ])."' " .$ mail_config ['mailuser_name ' ]);
79+ $ app ->log ('Executed: ' ."su -c 'maildirmake " .escapeshellcmd ($ data ['new ' ]['maildir ' ])."' " .$ mail_config ['mailuser_name ' ],LOGLEVEL_DEBUG );
7280 //exec('maildirmake '.escapeshellcmd($data['new']['maildir']));
7381 exec ('chown -R ' .$ mail_config ['mailuser_name ' ].': ' .$ mail_config ['mailuser_group ' ].' ' .escapeshellcmd ($ data ['new ' ]['maildir ' ]));
7482 $ app ->log ('Created Maildir: ' .$ data ['new ' ]['maildir ' ],LOGLEVEL_DEBUG );
You can’t perform that action at this time.
0 commit comments