Added task 10 to description of outstanding tasks, refs #814
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
This commit is contained in:
@@ -18,18 +18,18 @@
|
|||||||
/*
|
/*
|
||||||
* Function getNextCronjobs
|
* Function getNextCronjobs
|
||||||
*
|
*
|
||||||
* checks which cronjobs have to be executed
|
* checks which cronjobs have to be executed
|
||||||
*
|
*
|
||||||
* @return array array of cron-files which are to be executed
|
* @return array array of cron-files which are to be executed
|
||||||
*/
|
*/
|
||||||
function getNextCronjobs()
|
function getNextCronjobs()
|
||||||
{
|
{
|
||||||
global $db;
|
global $db;
|
||||||
|
|
||||||
$query = "SELECT `id`, `cronfile` FROM `".TABLE_PANEL_CRONRUNS."` WHERE `interval` <> '0' AND `isactive` = '1' AND (";
|
$query = "SELECT `id`, `cronfile` FROM `".TABLE_PANEL_CRONRUNS."` WHERE `interval` <> '0' AND `isactive` = '1' AND (";
|
||||||
|
|
||||||
$intervals = getIntervalOptions();
|
$intervals = getIntervalOptions();
|
||||||
|
|
||||||
$x = 0;
|
$x = 0;
|
||||||
foreach($intervals as $name => $ival)
|
foreach($intervals as $name => $ival)
|
||||||
{
|
{
|
||||||
@@ -37,23 +37,23 @@ function getNextCronjobs()
|
|||||||
|
|
||||||
if($x == 0) {
|
if($x == 0) {
|
||||||
$query.= '(UNIX_TIMESTAMP(DATE_ADD(FROM_UNIXTIME(`lastrun`), INTERVAL '.$ival.')) <= UNIX_TIMESTAMP() AND `interval`=\''.$ival.'\')';
|
$query.= '(UNIX_TIMESTAMP(DATE_ADD(FROM_UNIXTIME(`lastrun`), INTERVAL '.$ival.')) <= UNIX_TIMESTAMP() AND `interval`=\''.$ival.'\')';
|
||||||
} else {
|
} else {
|
||||||
$query.= ' OR (UNIX_TIMESTAMP(DATE_ADD(FROM_UNIXTIME(`lastrun`), INTERVAL '.$ival.')) <= UNIX_TIMESTAMP() AND `interval`=\''.$ival.'\')';
|
$query.= ' OR (UNIX_TIMESTAMP(DATE_ADD(FROM_UNIXTIME(`lastrun`), INTERVAL '.$ival.')) <= UNIX_TIMESTAMP() AND `interval`=\''.$ival.'\')';
|
||||||
}
|
}
|
||||||
$x++;
|
$x++;
|
||||||
}
|
}
|
||||||
|
|
||||||
$query.= ');';
|
$query.= ');';
|
||||||
|
|
||||||
$result = $db->query($query);
|
$result = $db->query($query);
|
||||||
|
|
||||||
$cron_files = array();
|
$cron_files = array();
|
||||||
while($row = $db->fetch_array($result))
|
while($row = $db->fetch_array($result))
|
||||||
{
|
{
|
||||||
$cron_files[] = $row['cronfile'];
|
$cron_files[] = $row['cronfile'];
|
||||||
$db->query("UPDATE `".TABLE_PANEL_CRONRUNS."` SET `lastrun` = UNIX_TIMESTAMP() WHERE `id` ='".(int)$row['id']."';");
|
$db->query("UPDATE `".TABLE_PANEL_CRONRUNS."` SET `lastrun` = UNIX_TIMESTAMP() WHERE `id` ='".(int)$row['id']."';");
|
||||||
}
|
}
|
||||||
|
|
||||||
return $cron_files;
|
return $cron_files;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -63,10 +63,10 @@ function includeCronjobs($debugHandler, $pathtophpfiles)
|
|||||||
global $settings;
|
global $settings;
|
||||||
|
|
||||||
$cronjobs = getNextCronjobs();
|
$cronjobs = getNextCronjobs();
|
||||||
|
|
||||||
$jobs_to_run = array();
|
$jobs_to_run = array();
|
||||||
$cron_path = makeCorrectDir($pathtophpfiles.'/scripts/jobs/');
|
$cron_path = makeCorrectDir($pathtophpfiles.'/scripts/jobs/');
|
||||||
|
|
||||||
if($cronjobs !== false
|
if($cronjobs !== false
|
||||||
&& is_array($cronjobs)
|
&& is_array($cronjobs)
|
||||||
&& isset($cronjobs[0]))
|
&& isset($cronjobs[0]))
|
||||||
@@ -77,7 +77,7 @@ function includeCronjobs($debugHandler, $pathtophpfiles)
|
|||||||
$jobs_to_run[] = $cron_file;
|
$jobs_to_run[] = $cron_file;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $jobs_to_run;
|
return $jobs_to_run;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -103,7 +103,7 @@ function getIntervalOptions()
|
|||||||
$cronlog->logAction(CRON_ACTION, LOG_ERROR, "Invalid SQL-Interval ".$row['interval']." detected. Please fix this in the database.");
|
$cronlog->logAction(CRON_ACTION, LOG_ERROR, "Invalid SQL-Interval ".$row['interval']." detected. Please fix this in the database.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $cron_intervals;
|
return $cron_intervals;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -111,14 +111,14 @@ function getIntervalOptions()
|
|||||||
function getCronjobsLastRun()
|
function getCronjobsLastRun()
|
||||||
{
|
{
|
||||||
global $db, $lng;
|
global $db, $lng;
|
||||||
|
|
||||||
$query = "SELECT `lastrun`, `desc_lng_key` FROM `".TABLE_PANEL_CRONRUNS."` WHERE `isactive` = '1' ORDER BY `cronfile` ASC";
|
$query = "SELECT `lastrun`, `desc_lng_key` FROM `".TABLE_PANEL_CRONRUNS."` WHERE `isactive` = '1' ORDER BY `cronfile` ASC";
|
||||||
$result = $db->query($query);
|
$result = $db->query($query);
|
||||||
|
|
||||||
$cronjobs_last_run = '';
|
$cronjobs_last_run = '';
|
||||||
|
|
||||||
while($row = $db->fetch_array($result))
|
while($row = $db->fetch_array($result))
|
||||||
{
|
{
|
||||||
$lastrun = $lng['cronjobs']['notyetrun'];
|
$lastrun = $lng['cronjobs']['notyetrun'];
|
||||||
if($row['lastrun'] > 0) {
|
if($row['lastrun'] > 0) {
|
||||||
$lastrun = date('d.m.Y H:i:s', $row['lastrun']);
|
$lastrun = date('d.m.Y H:i:s', $row['lastrun']);
|
||||||
@@ -129,18 +129,18 @@ function getCronjobsLastRun()
|
|||||||
|
|
||||||
eval("\$cronjobs_last_run .= \"" . getTemplate("index/overview_item") . "\";");
|
eval("\$cronjobs_last_run .= \"" . getTemplate("index/overview_item") . "\";");
|
||||||
}
|
}
|
||||||
|
|
||||||
return $cronjobs_last_run;
|
return $cronjobs_last_run;
|
||||||
}
|
}
|
||||||
|
|
||||||
function toggleCronStatus($module = null, $isactive = 0)
|
function toggleCronStatus($module = null, $isactive = 0)
|
||||||
{
|
{
|
||||||
global $db;
|
global $db;
|
||||||
|
|
||||||
if($isactive != 1) {
|
if($isactive != 1) {
|
||||||
$isactive = 0;
|
$isactive = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
$query = "UPDATE `".TABLE_PANEL_CRONRUNS."` SET `isactive` = '".(int)$isactive."' WHERE `module` = '".$module."'";
|
$query = "UPDATE `".TABLE_PANEL_CRONRUNS."` SET `isactive` = '".(int)$isactive."' WHERE `module` = '".$module."'";
|
||||||
$db->query($query);
|
$db->query($query);
|
||||||
|
|
||||||
@@ -149,10 +149,10 @@ function toggleCronStatus($module = null, $isactive = 0)
|
|||||||
function getOutstandingTasks()
|
function getOutstandingTasks()
|
||||||
{
|
{
|
||||||
global $db, $lng;
|
global $db, $lng;
|
||||||
|
|
||||||
$query = "SELECT * FROM `".TABLE_PANEL_TASKS."` ORDER BY `type` ASC";
|
$query = "SELECT * FROM `".TABLE_PANEL_TASKS."` ORDER BY `type` ASC";
|
||||||
$result = $db->query($query);
|
$result = $db->query($query);
|
||||||
|
|
||||||
$value = '<ul class="cronjobtask">';
|
$value = '<ul class="cronjobtask">';
|
||||||
$tasks = '';
|
$tasks = '';
|
||||||
while($row = $db->fetch_array($result))
|
while($row = $db->fetch_array($result))
|
||||||
@@ -161,7 +161,7 @@ function getOutstandingTasks()
|
|||||||
{
|
{
|
||||||
$row['data'] = unserialize($row['data']);
|
$row['data'] = unserialize($row['data']);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* rebuilding webserver-configuration
|
* rebuilding webserver-configuration
|
||||||
*/
|
*/
|
||||||
@@ -208,16 +208,23 @@ function getOutstandingTasks()
|
|||||||
}
|
}
|
||||||
$task_desc = $lng['tasks']['deleting_customerfiles'];
|
$task_desc = $lng['tasks']['deleting_customerfiles'];
|
||||||
$task_desc = str_replace('%loginname%', $loginname, $task_desc);
|
$task_desc = str_replace('%loginname%', $loginname, $task_desc);
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
|
* Set FS - quota
|
||||||
|
*/
|
||||||
|
elseif($row['type'] == '10')
|
||||||
|
{
|
||||||
|
$task_desc = $lng['tasks']['diskspace_set_quota'];
|
||||||
|
}
|
||||||
|
|
||||||
if($task_desc != '') {
|
if($task_desc != '') {
|
||||||
$tasks .= '<li>'.$task_desc.'</li>';
|
$tasks .= '<li>'.$task_desc.'</li>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$query2 = "SELECT DISTINCT `Task` FROM `".TABLE_APS_TASKS."` ORDER BY `Task` ASC";
|
$query2 = "SELECT DISTINCT `Task` FROM `".TABLE_APS_TASKS."` ORDER BY `Task` ASC";
|
||||||
$result2 = $db->query($query2);
|
$result2 = $db->query($query2);
|
||||||
|
|
||||||
while($row2 = $db->fetch_array($result2))
|
while($row2 = $db->fetch_array($result2))
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
@@ -262,7 +269,7 @@ function getOutstandingTasks()
|
|||||||
{
|
{
|
||||||
$task_desc = $lng['tasks']['aps_task_sysdownload'];
|
$task_desc = $lng['tasks']['aps_task_sysdownload'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if($task_desc != '') {
|
if($task_desc != '') {
|
||||||
$tasks .= '<li>'.$task_desc.'</li>';
|
$tasks .= '<li>'.$task_desc.'</li>';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1881,6 +1881,7 @@ $lng['country']['ZW'] = "Zimbabwe";
|
|||||||
// ADDED IN FROXLOR 0.9.22-svn1
|
// ADDED IN FROXLOR 0.9.22-svn1
|
||||||
$lng['diskquota'] = 'Quota';
|
$lng['diskquota'] = 'Quota';
|
||||||
$lng['serversettings']['diskquota_enabled'] = 'Quota activated?';
|
$lng['serversettings']['diskquota_enabled'] = 'Quota activated?';
|
||||||
$lng['serversettings']['diskquota_repquota_path']['description'] = 'Path to the repquota - tool';
|
$lng['serversettings']['diskquota_repquota_path']['description'] = 'Path to repquota';
|
||||||
$lng['serversettings']['diskquota_quotatool_path']['description'] = 'Path to quotatool';
|
$lng['serversettings']['diskquota_quotatool_path']['description'] = 'Path to quotatool';
|
||||||
$lng['serversettings']['diskquota_customer_partition']['description'] = 'Partition, on which the customer files are stored';
|
$lng['serversettings']['diskquota_customer_partition']['description'] = 'Partition, on which the customer files are stored';
|
||||||
|
$lng['tasks']['diskspace_set_quota'] = 'Set quota on filesystem';
|
||||||
@@ -1612,6 +1612,7 @@ $lng['serversettings']['backup_bigfile'] = 'Backup von Kundenverzeichnissen und
|
|||||||
// ADDED IN FROXLOR 0.9.22-svn1
|
// ADDED IN FROXLOR 0.9.22-svn1
|
||||||
$lng['diskquota'] = 'Quota';
|
$lng['diskquota'] = 'Quota';
|
||||||
$lng['serversettings']['diskquota_enabled'] = 'Quota aktiviert?';
|
$lng['serversettings']['diskquota_enabled'] = 'Quota aktiviert?';
|
||||||
$lng['serversettings']['diskquota_repquota_path']['description'] = 'Pfad zu dem repquota - Tool';
|
$lng['serversettings']['diskquota_repquota_path']['description'] = 'Pfad zu repquota';
|
||||||
$lng['serversettings']['diskquota_quotatool_path']['description'] = 'Pfad zu quotatool';
|
$lng['serversettings']['diskquota_quotatool_path']['description'] = 'Pfad zu quotatool';
|
||||||
$lng['serversettings']['diskquota_customer_partition']['description'] = 'Partition, auf welcher die Kundendaten liegen';
|
$lng['serversettings']['diskquota_customer_partition']['description'] = 'Partition, auf welcher die Kundendaten liegen';
|
||||||
|
$lng['tasks']['diskspace_set_quota'] = 'Quota auf dem Dateisystem setzen';
|
||||||
Reference in New Issue
Block a user