X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=src%2Foptions_identities.php;h=bb9dcaeb194d972a6eaa3e1a0a7b6dd9f5f18c85;hp=809210f966788a527468bbbdc8dd594d89e6029d;hb=0bbf8622773554348ff9dc200e7e01411a81be0b;hpb=a6c45e38b7ae30f709c314c55f9657a35dab8b10 diff --git a/src/options_identities.php b/src/options_identities.php index 809210f9..bb9dcaeb 100644 --- a/src/options_identities.php +++ b/src/options_identities.php @@ -3,352 +3,231 @@ /** * 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-2007 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 -*/ -if (!empty($_POST)) { - extract($_POST); +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(); } -/* got 'em all */ - if (isset($return)) { - SaveUpdateFunction(); - header('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 .= '