fixing syscp-feature-request #1236 (cron doesnt delete user directories)
This commit is contained in:
@@ -52,7 +52,8 @@ function safe_exec($exec_string, &$return_value = false)
|
||||
$settings['system']['awstats_updateall_command'],
|
||||
'openssl',
|
||||
'unzip',
|
||||
'php'
|
||||
'php',
|
||||
'rm'
|
||||
);
|
||||
|
||||
//
|
||||
|
||||
@@ -51,6 +51,15 @@ function inserttask($type, $param1 = '', $param2 = '', $param3 = '')
|
||||
$db->query('INSERT INTO `' . TABLE_PANEL_TASKS . '` (`type`, `data`) VALUES ("2", "' . $db->escape($data) . '")');
|
||||
$doupdate = true;
|
||||
}
|
||||
elseif($type == '6'
|
||||
&& $param1 != '')
|
||||
{
|
||||
$data = Array();
|
||||
$data['loginname'] = $param1;
|
||||
$data = serialize($data);
|
||||
$db->query('INSERT INTO `' . TABLE_PANEL_TASKS . '` (`type`, `data`) VALUES ("6", "' . $db->escape($data) . '")');
|
||||
$doupdate = true;
|
||||
}
|
||||
|
||||
if($doupdate === true
|
||||
&& (int)$settings['system']['realtime_port'] !== 0)
|
||||
|
||||
@@ -63,3 +63,35 @@ function ask_yesno($text, $yesfile, $params = array(), $targetname = '')
|
||||
eval("echo \"" . getTemplate('misc/question_yesno', '1') . "\";");
|
||||
exit;
|
||||
}
|
||||
|
||||
function ask_yesno_withcheckbox($text, $chk_text, $yesfile, $params = array(), $targetname = '')
|
||||
{
|
||||
global $userinfo, $db, $s, $header, $footer, $lng;
|
||||
|
||||
$hiddenparams = '';
|
||||
|
||||
if(is_array($params))
|
||||
{
|
||||
foreach($params as $field => $value)
|
||||
{
|
||||
$hiddenparams.= '<input type="hidden" name="' . htmlspecialchars($field) . '" value="' . htmlspecialchars($value) . '" />' . "\n";
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($lng['question'][$text]))
|
||||
{
|
||||
$text = $lng['question'][$text];
|
||||
}
|
||||
|
||||
if(isset($lng['question'][$chk_text]))
|
||||
{
|
||||
$chk_text = $lng['question'][$chk_text];
|
||||
}
|
||||
|
||||
$checkbox = makecheckbox('delete_userfiles', $chk_text, '1', false, '0', true, true);
|
||||
|
||||
$text = strtr($text, array('%s' => $targetname));
|
||||
eval("echo \"" . getTemplate('misc/question_yesno_checkbox', '1') . "\";");
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user