Commit d4db6047 authored by tbrehm's avatar tbrehm

Fixed a php warning and removed -f switch from userdel command in jailkit plugin.

parent a2cb1442
......@@ -153,10 +153,12 @@ function _getSysState() {
$html .= $data['html_server'];
/* get all VE's of this server */
$veInfo = $data['ve_info'];
foreach ($veInfo as $info) {
for ($i = 0; $i < sizeof($serverData); $i++) {
if ($serverData[$i]['server_name'] == $info['hostname']) {
$html = str_replace('##VE_INFO##', $serverData[$i]['html_ve'] . '##VE_INFO##', $html);
if(is_array($veInfo)) {
foreach ($veInfo as $info) {
for ($i = 0; $i < sizeof($serverData); $i++) {
if ($serverData[$i]['server_name'] == $info['hostname']) {
$html = str_replace('##VE_INFO##', $serverData[$i]['html_ve'] . '##VE_INFO##', $html);
}
}
}
}
......
......@@ -160,7 +160,7 @@ class shelluser_jailkit_plugin {
//exec('rm -rf '.$data['old']['dir'].$jailkit_chroot_userhome);
if(@is_dir($data['old']['dir'].$jailkit_chroot_userhome)) {
$command = 'userdel -f';
$command = 'userdel';
$command .= ' '.escapeshellcmd($data['old']['username']);
exec($command);
$app->log("Jailkit Plugin -> delete chroot home:".$data['old']['dir'].$jailkit_chroot_userhome,LOGLEVEL_DEBUG);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment