Textarea should not use proprietary wrap attribute (#1512681). Original
[squirrelmail.git] / src / options_identities.php
index a1bc729622b946ed2a9d3b0965640d3160b1722c..e6f348d4706d3f8273534578f3fd962a0f75fc65 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Display Identities Options
  *
- * @copyright © 1999-2005 The SquirrelMail Project Team
+ * @copyright © 1999-2006 The SquirrelMail Project Team
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  * @version $Id$
  * @package squirrelmail
  */
 
 /**
- * Path for SquirrelMail required files.
- * @ignore
+ * Include the SquirrelMail initialization file.
  */
-define('SM_PATH','../');
+require('../include/init.php');
 
 /* SquirrelMail required files. */
-require_once(SM_PATH . 'include/validate.php');
-include_once(SM_PATH . 'functions/global.php');
-include_once(SM_PATH . 'functions/display_messages.php');
-include_once(SM_PATH . 'functions/html.php');
-include_once(SM_PATH . 'functions/identity.php');
+require_once(SM_PATH . 'functions/identity.php');
+
+/* make sure that page is not available when $edit_identity is false */
+if (!$edit_identity) {
+    error_box(_("Editing identities is disabled."));
+    $oTemplate->display('footer.tpl');
+    die();
+}
 
 if (!sqgetGlobalVar('identities', $identities, SQ_SESSION)) {
     $identities = get_identities();