Private GIT

Skip to content
Snippets Groups Projects
Commit 95dc6d23 authored by Laurent Pinsivy's avatar Laurent Pinsivy Committed by Kev
Browse files

ref #5269 - check if wiki is configured and extend error message (#5278)

* ref #5269 - check if wiki is configured and extend error message

* better wheck of kb wiki url

* Fix kb synhcronization error display
parent ee819bb0
No related branches found
No related tags found
No related merge requests found
......@@ -35,5 +35,9 @@
require_once realpath(dirname(__FILE__) . "/../www/class/centreon-knowledge/wikiApi.class.php");
try {
$wikiApi = new WikiApi();
$wikiApi->synchronize();
} catch (Exception $e) {
echo $e->getMessage() . "\n";
}
......@@ -64,8 +64,10 @@ class Wiki
}
$res->free();
if (!count($options)) {
throw new \Exception('Wiki is not configured.');
if (!isset($options['kb_wiki_url']) || $options['kb_wiki_url'] == '') {
throw new \Exception(
'Wiki is not configured. ' .
'You can disable cron in /etc/crond.d/centreon for wiki synchronization.');
}
if (!preg_match('#^http://|https://#', $options['kb_wiki_url'])) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment