From: tokul Date: Tue, 29 Mar 2005 16:16:53 +0000 (+0000) Subject: handle configuration error without displaying paths in error message. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=7bd637cf71670edde67db5499db0be42f7386772;p=squirrelmail.git handle configuration error without displaying paths in error message. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@9158 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/plugins/change_password/backend/template.php b/plugins/change_password/backend/template.php index 04176833..ed4d9451 100644 --- a/plugins/change_password/backend/template.php +++ b/plugins/change_password/backend/template.php @@ -36,7 +36,24 @@ $squirrelmail_plugin_hooks['change_password_init']['template'] = */ function cpw_template_init() { + global $color; + /** + * If SM_PATH isn't defined, define it. Required to include files. + * @ignore + */ + if (!defined('SM_PATH')) { + define('SM_PATH','../../../'); + } + + // load error_box() function + include_once(SM_PATH . 'functions/display_messages.php'); + + // plugin is not configured. Handle error gracefully. + error_box(_("No valid backend defined."),$color); + // close html and stop script execution + echo "\n"; + exit(); }