From 5a677ce3ac7702b775524f166bafff5095dd2e5b Mon Sep 17 00:00:00 2001 From: Olav Morken <olav.morken@uninett.no> Date: Thu, 27 May 2010 09:02:03 +0000 Subject: [PATCH] metarefresh: Show warning if not enabled. git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2324 44740490-163a-0410-bde0-09ae8108e29a --- modules/metarefresh/bin/metarefresh.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/metarefresh/bin/metarefresh.php b/modules/metarefresh/bin/metarefresh.php index eff2c7313..c8a918122 100755 --- a/modules/metarefresh/bin/metarefresh.php +++ b/modules/metarefresh/bin/metarefresh.php @@ -13,6 +13,13 @@ $baseDir = dirname(dirname(dirname(dirname(__FILE__)))); /* Add library autoloader. */ require_once($baseDir . '/lib/_autoload.php'); +if(!SimpleSAML_Module::isModuleEnabled('metarefresh')) { + echo("You need to enable the metarefresh module before this script can be used.\n"); + echo("You can enable it by running the following command:\n"); + echo(' echo >"' . $baseDir . '/modules/metarefresh/enable' . "\"\n"); + exit(1); +} + /* Initialize the configuration. */ SimpleSAML_Configuration::setConfigDir($baseDir . '/config'); -- GitLab