summaryrefslogtreecommitdiffstats
path: root/modules-available/vmstore/hooks/main-warning.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules-available/vmstore/hooks/main-warning.inc.php')
-rw-r--r--modules-available/vmstore/hooks/main-warning.inc.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/modules-available/vmstore/hooks/main-warning.inc.php b/modules-available/vmstore/hooks/main-warning.inc.php
new file mode 100644
index 00000000..ca2d1382
--- /dev/null
+++ b/modules-available/vmstore/hooks/main-warning.inc.php
@@ -0,0 +1,10 @@
+<?php
+
+/*
+ * Hook for main page: Show warning if vmstore not configured yet; set "warning" flag if so
+ */
+
+if (!is_array(Property::getVmStoreConfig())) {
+ Message::addError('vmstore.vmstore-not-configured', true); // Always specify module prefix since this is running in main
+ $needSetup = true; // Set $needSetup to true if you want a warning badge to appear in the menu
+}