diff --git a/config/config.sample.php b/config/config.sample.php index 71d1aa3a02..9f6ef668c5 100644 --- a/config/config.sample.php +++ b/config/config.sample.php @@ -738,13 +738,6 @@ $CONFIG = array( */ 'log_query' => false, -/** - * Log successful cron runs. - * - * Defaults to ``true`` - */ -'cron_log' => true, - /** * Enables log rotation and limits the total size of logfiles. The default is 0, * or no rotation. Specify a size in bytes, for example 104857600 (100 megabytes diff --git a/cron.php b/cron.php index 74935db0da..b7443ef3ce 100644 --- a/cron.php +++ b/cron.php @@ -152,9 +152,7 @@ try { } // Log the successful cron execution - if (\OC::$server->getConfig()->getSystemValue('cron_log', true)) { - \OC::$server->getConfig()->setAppValue('core', 'lastcron', time()); - } + \OC::$server->getConfig()->setAppValue('core', 'lastcron', time()); exit(); } catch (Exception $ex) { diff --git a/lib/private/Settings/Admin/Server.php b/lib/private/Settings/Admin/Server.php index 994d927aff..f9512928e5 100644 --- a/lib/private/Settings/Admin/Server.php +++ b/lib/private/Settings/Admin/Server.php @@ -130,7 +130,6 @@ class Server implements ISettings { // Background jobs 'backgroundjobs_mode' => $this->config->getAppValue('core', 'backgroundjobs_mode', 'ajax'), - 'cron_log' => $this->config->getSystemValue('cron_log', true), 'lastcron' => $this->config->getAppValue('core', 'lastcron', false), 'cronErrors' => $this->config->getAppValue('core', 'cronErrors'), 'cli_based_cron_possible' => function_exists('posix_getpwuid'), diff --git a/settings/templates/settings/admin/server.php b/settings/templates/settings/admin/server.php index 407badcff4..ab30f8e770 100644 --- a/settings/templates/settings/admin/server.php +++ b/settings/templates/settings/admin/server.php @@ -156,28 +156,26 @@

t('Background jobs'));?>

- -

- - - - t("Last job ran %s.", [$relative_time]));?> - - - - - t("Last job execution ran %s. Something seems wrong.", [$relative_time]));?> - - +

+ + + + t("Last job ran %s.", [$relative_time]));?> + + - t("Background job didn’t run yet!")); - endif; ?> -

- + + t("Last job execution ran %s. Something seems wrong.", [$relative_time]));?> + + + + t("Background job didn’t run yet!")); + endif; ?> +

diff --git a/tests/lib/Settings/Admin/ServerTest.php b/tests/lib/Settings/Admin/ServerTest.php index a71aef0178..106390f25a 100644 --- a/tests/lib/Settings/Admin/ServerTest.php +++ b/tests/lib/Settings/Admin/ServerTest.php @@ -80,12 +80,12 @@ class ServerTest extends TestCase { ->with('core', 'backgroundjobs_mode', 'ajax') ->willReturn('ajax'); $this->config - ->expects($this->at(4)) + ->expects($this->at(3)) ->method('getAppValue') ->with('core', 'lastcron', false) ->willReturn(false); $this->config - ->expects($this->at(5)) + ->expects($this->at(4)) ->method('getAppValue') ->with('core', 'cronErrors') ->willReturn(''); @@ -94,11 +94,6 @@ class ServerTest extends TestCase { ->method('getSystemValue') ->with('check_for_working_wellknown_setup', true) ->willReturn(true); - $this->config - ->expects($this->at(3)) - ->method('getSystemValue') - ->with('cron_log', true) - ->willReturn(true); $this->l10n ->expects($this->at(0)) ->method('t') @@ -139,7 +134,6 @@ class ServerTest extends TestCase { // Background jobs 'backgroundjobs_mode' => 'ajax', - 'cron_log' => true, 'lastcron' => false, 'cronErrors' => '', 'cli_based_cron_possible' => true,