X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=src%2Foptions_identities.php;h=6467a0f2d6d2d117996a03ca787ddd1dce7eb1db;hp=12cf4de78ba64f5b27c57c95aa0cc05b360e31dc;hb=bd3ebe3f8f07fd1b4294a30ef0c09a641eea1e77;hpb=6fd953618853477f6ffe569ce3c9733ca9f9c2d0 diff --git a/src/options_identities.php b/src/options_identities.php index 12cf4de7..6467a0f2 100644 --- a/src/options_identities.php +++ b/src/options_identities.php @@ -3,357 +3,237 @@ /** * options_identities.php * - * Copyright (c) 1999-2004 The SquirrelMail Project Team - * Licensed under the GNU GPL. For full terms see the file COPYING. - * * Display Identities Options * + * @copyright 1999-2017 The SquirrelMail Project Team + * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @version $Id$ * @package squirrelmail + * @subpackage prefs + * @since 1.1.3 */ +/** This is the options_identities page */ +define('PAGE_NAME', 'options_identities'); + /** - * 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'); -require_once(SM_PATH . 'functions/global.php'); -require_once(SM_PATH . 'functions/display_messages.php'); -require_once(SM_PATH . 'functions/html.php'); - -/* POST data var names are dynamic because - of the possible multiple idents so lets get - them all - FIXME! This circumvents the benefits of rg=0 -*/ -if (!empty($_POST)) { - extract($_POST); +require_once(SM_PATH . 'functions/identity.php'); +require_once(SM_PATH . 'functions/forms.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(); } -/* got 'em all */ - if (isset($return)) { - SaveUpdateFunction(); - header('Location: '.get_location().'/options_personal.php'); - exit(); - } - - displayPageHeader($color, 'None'); - - $Info = do_hook('options_identities_process', 0); - if ($Info[1]) { - SaveUpdateFunction(); - } - - if (CheckAndDoDefault() || CheckAndDoPromote()) { - SaveUpdateFunction(); - } - if (isset($update) || CheckForDelete()) { - SaveUpdateFunction(); - } - - do_hook('options_identities_top'); - LoadInfo($full_name, $email_address, $reply_to, $signature, ''); - $td_str = ''; - $td_str .= '