X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Foptions_identities.php;h=aada8abe7034a995659b1f056ee4ede7b8bac633;hb=9ae70b623b5bda18ee4b60d9481d49d057b2f508;hp=91744c7964225302cc6372fd37878669b17bfeff;hpb=8f6f9ba5df6491d396aa690dcf3e5b9070a565ca;p=squirrelmail.git diff --git a/src/options_identities.php b/src/options_identities.php index 91744c79..aada8abe 100644 --- a/src/options_identities.php +++ b/src/options_identities.php @@ -3,354 +3,237 @@ /** * options_identities.php * - * Copyright (c) 1999-2003 The SquirrelMail Project Team - * Licensed under the GNU GPL. For full terms see the file COPYING. - * * Display Identities Options * - * $Id$ + * @copyright 1999-2014 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 */ -/** Path for SquirrelMail required files. */ -define('SM_PATH','../'); +/** This is the options_identities page */ +define('PAGE_NAME', 'options_identities'); + +/** + * Include the SquirrelMail initialization file. + */ +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 .= '