X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Foptions_identities.php;h=db9b053156771249b81718be802717ee620082b1;hb=1a811a46752079f895c4f483fa77a77b3ef03fd9;hp=dcba7d5875a7d795a60552e3e16ea8a938a3e73a;hpb=82d304a0501324b276cabab1870755d5352bd21c;p=squirrelmail.git diff --git a/src/options_identities.php b/src/options_identities.php index dcba7d58..db9b0531 100644 --- a/src/options_identities.php +++ b/src/options_identities.php @@ -3,354 +3,222 @@ /** * 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 * - * $Id$ + * @copyright © 1999-2006 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. */ +/** + * Path for SquirrelMail required files. + * @ignore + */ define('SM_PATH','../'); /* 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); +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'); + +if (!sqgetGlobalVar('identities', $identities, SQ_SESSION)) { + $identities = get_identities(); } -/* got 'em all */ +sqgetGlobalVar('newidentities', $newidentities, SQ_POST); +sqgetGlobalVar('smaction', $smaction, SQ_POST); +sqgetGlobalVar('return', $return, SQ_POST); - 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 .= '