commit a7a3aba204005528b354fbfbe8d3be96bee54572
parent 68c920e155d171f3848cbb0b5ab5fb79dce2c739
Author: Felicitus <felicitus@felicitus.org>
Date: Thu, 5 Jan 2012 00:14:41 +0100
Added a configuration to skip cronjob tests. This is important on Windows, so that the users don't get bugged by the "cronjob is not running" messages every time. We need to implement a cronjob emulation soon.
Diffstat:
3 files changed, 35 insertions(+), 5 deletions(-)
diff --git a/config.php.template b/config.php.template
@@ -112,6 +112,12 @@ Configuration::setOption("partkeepr.frontend.autologin.password", null);
Configuration::setOption("partkeepr.frontend.debug", false);
/**
+ * Specifies if cronjobs should be checked. Disable this on Windows unless we have an automatic cronjob runner
+ * emulation implemented.
+ */
+Configuration::setOption("partkeepr.cronjobs.disablecheck", false);
+
+/**
* Specifies if password changing is allowed.
*/
Configuration::setOption("partkeepr.frontend.allow_password_change", true);
diff --git a/src/backend/de/RaumZeitLabor/PartKeepr/System/SystemService.php b/src/backend/de/RaumZeitLabor/PartKeepr/System/SystemService.php
@@ -1,6 +1,8 @@
<?php
namespace de\RaumZeitLabor\PartKeepr\System;
+use de\RaumZeitLabor\PartKeepr\Util\Configuration;
+
declare(encoding = 'UTF-8');
use de\RaumZeitLabor\PartKeepr\Service\Service,
@@ -51,7 +53,13 @@ class SystemService extends Service {
*/
public function getSystemStatus () {
- $inactiveCronjobs = CronLoggerManager::getInstance()->getInactiveCronjobs();
+ if (Configuration::getOption("partkeepr.cronjobs.disablecheck", false) === true) {
+ // Skip cronjob tests
+ $inactiveCronjobs = array();
+ } else {
+ $inactiveCronjobs = CronLoggerManager::getInstance()->getInactiveCronjobs();
+ }
+
return array("data" =>
array(
diff --git a/src/setup/js/SetupWizard.js b/src/setup/js/SetupWizard.js
@@ -77,7 +77,7 @@ Ext.define('PartKeeprSetup.SetupWizard', {
cards.push(Ext.create("PartKeeprSetup.DatabaseSetupCard"));
cards.push(Ext.create('Ext.ux.wizard.Card', {
- title: 'Setup Complete',
+ title: 'Cron Setup',
showTitle: true,
titleCls: '',
titleStyle: 'font-size: 2.5em;',
@@ -85,13 +85,29 @@ Ext.define('PartKeeprSetup.SetupWizard', {
items: [{
border: false,
bodyStyle: 'background:none;',
- html: "<b>PartKeepr is now set-up.</b><br/><br/>"+
- "Please set up the following cronjobs:<br/><br/><code>"+
+ autoScroll: true,
+ html: "Please set up the following cronjobs:<br/><br/><code>"+
"0 0,24 * * * /usr/bin/php <path-to-partkeepr>/CreateStatisticSnapshot.php<br/>"+
"0 0,6,12,18 * * * /usr/bin/php <path-to-partkeepr>/UpdatePartCacheData.php<br/>"+
"0 0 */2 * * /usr/bin/php <path-to-partkeepr>/CheckForUpdates.php<br/>"+
"0 0 */2 * * /usr/bin/php <path-to-partkeepr>/UpdateTipsOfTheDay.php<br/>"+
- "</code><br/><br/>"+
+ "</code><br/>If you cannot run cronjobs (e.g. you are on Windows), you can disable the "+
+ "cronjobs by adding the following line to your config.php file:<br/><br/>"+
+ '<code>Configuration::setOption("partkeepr.cronjobs.disablecheck", true);</code>'
+ }]
+ }));
+
+ cards.push(Ext.create('Ext.ux.wizard.Card', {
+ title: 'Setup Complete',
+ showTitle: true,
+ titleCls: '',
+ titleStyle: 'font-size: 2.5em;',
+ cls: 'x-partkeepr-setup-basecard',
+ items: [{
+ border: false,
+ bodyStyle: 'background:none;',
+ autoScroll: true,
+ html: "<b>PartKeepr is now set-up.</b><br/><br/>"+
"If possible, set your web server's document root to the <b>frontend</b> directory.<br/><br/>"+
"To open PartKeepr, open the 'frontend' directory using your browser.<br/><br/>"+
"The default username/password combination is <b>admin/admin</b>"