diff --git a/include/class.config.php b/include/class.config.php index c51814bebc73aef1ae3a9052db364d2702798c04..e54c0d7392d8268c9b273ed2f802a562dcaf20b3 100644 --- a/include/class.config.php +++ b/include/class.config.php @@ -67,22 +67,35 @@ class Config { return !$this->isSystemOnline(); } + function isHelpDeskOnline() { + return $this->isSystemOnline(); + } + function isSystemOnline() { - return ($this->config['isonline']); + return ($this->config['isonline'] && !$this->isUpgradePending()); } - function isKnowledgebaseEnabled() { + function isUpgradePending() { + return (defined('SCHEMA_SIGNATURE') && strcasecmp($this->getSchemaSignature(), SCHEMA_SIGNATURE)); + } + function isKnowledgebaseEnabled() { require_once(INCLUDE_DIR.'class.faq.php'); return ($this->config['enable_kb'] && FAQ::countPublishedFAQs()); } function getVersion() { - return '1.7-DPR2'; + return THIS_VERSION; } function getSchemaSignature() { - return $this->config['schema_signature']; + + if($this->config['schema_signature']) + return $this->config['schema_signature']; + elseif($this->config['ostversion']) //old version 1.6 st. + return md5($this->config['ostversion']); + + return null; } function setMysqlTZ($tz) {