X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Foptions_identities.php;h=026ae1f1a56c37dc50034f9c4581b81b353a7b20;hb=284a0d8a7f0396b04cb9ba956a6117cad862a5c5;hp=d2dfd035924558a7fd5d61bfa78c8991d3439b16;hpb=d7746ca528435f81ef08a354eb5c2399a27b15cc;p=squirrelmail.git diff --git a/src/options_identities.php b/src/options_identities.php index d2dfd035..026ae1f1 100644 --- a/src/options_identities.php +++ b/src/options_identities.php @@ -3,353 +3,217 @@ /** * 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-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. */ -define('SM_PATH','../'); +/** + * 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'); + +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 .= '