aboutsummaryrefslogtreecommitdiffstats
path: root/settings/templates/admin.php
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2015-02-27 20:04:52 +0100
committerLukas Reschke <lukas@owncloud.com>2015-02-27 20:20:34 +0100
commitb6d8a48ce1cefdd11db90d7a4b359f22b2906962 (patch)
tree97d515ceca808a54c932fc9d873488931ede4fc7 /settings/templates/admin.php
parent13b0b7dfaf6553411928677420d8d21fa352bb3e (diff)
downloadnextcloud-server-b6d8a48ce1cefdd11db90d7a4b359f22b2906962.tar.gz
nextcloud-server-b6d8a48ce1cefdd11db90d7a4b359f22b2906962.zip
Add detection for invalid CLI configuration for settings page
This change will log all failures that prevent the CLI cronjob from happening to the database and display a warning to administrators when an error happened. To test: 1. Configure some invalid CLI php.ini settings 2. Enable the CLI cronjob and run php cron.php 3. See the errors printed and also in the admin page 4. Configure the CLI settings correctly 5. Errors should be gone. Fixes https://github.com/owncloud/core/issues/13994
Diffstat (limited to 'settings/templates/admin.php')
-rw-r--r--settings/templates/admin.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/settings/templates/admin.php b/settings/templates/admin.php
index a82d5ee8545..abb33bbca11 100644
--- a/settings/templates/admin.php
+++ b/settings/templates/admin.php
@@ -212,7 +212,29 @@ if ($_['suggestedOverwriteCliUrl']) {
</div>
<?php
}
+
+if ($_['cronErrors']) {
+ ?>
+ <div class="section">
+ <h2><?php p($l->t('Cronjob encountered misconfiguration'));?></h2>
+
+ <span class="connectionwarning">
+ <?php p($l->t('It was not possible to execute the cronjob via CLI. The following technical errors have appeared:')); ?>
+ <br/>
+ <ol>
+ <?php foreach(json_decode($_['cronErrors']) as $error) { if(isset($error->error)) {?>
+ <li><?php p($error->error) ?></li>
+ <ul><li><?php p($error->hint) ?></li></ul>
+
+ <?php }};?>
+ </ol>
+ </span>
+
+ </div>
+<?php
+}
?>
+
<div id="postsetupchecks" class="section">
<h2><?php p($l->t('Configuration Checks'));?></h2>
<div class="loading"></div>