From b455793d64b04ed76805c862363b4c71d2792d5e Mon Sep 17 00:00:00 2001 From: jangliss Date: Fri, 7 Feb 2003 23:09:16 +0000 Subject: [PATCH] Remove the unnecesary sqextractGlobalVar function, and replace with the new sqgetGlobalVar. This should fix the compose error that Ken Brush was having. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@4509 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/attachment_common.php | 2 +- functions/global.php | 13 ---------- src/compose.php | 46 ++++++++++++++++----------------- 3 files changed, 24 insertions(+), 37 deletions(-) diff --git a/functions/attachment_common.php b/functions/attachment_common.php index 573d72c7..eea42c5c 100644 --- a/functions/attachment_common.php +++ b/functions/attachment_common.php @@ -28,7 +28,7 @@ $FileExtensionToMimeType = array('bmp' => 'image/x-bitmap', 'vcf' => 'text/x-vcard'); /* Register browser-supported image types */ -sqextractGlobalVar('attachment_common_types'); +sqgetGlobalVar('attachment_common_types', $attachment_common_types); if (isset($attachment_common_types)) { /* Don't run this before being logged in. That may happen when plugins include mime.php */ diff --git a/functions/global.php b/functions/global.php index b2f7d16a..a048f3db 100644 --- a/functions/global.php +++ b/functions/global.php @@ -223,19 +223,6 @@ function sqgetGlobalVar($name, &$value, $search = SQ_INORDER) { return FALSE; } - -/** - * Search for the var $name in $_SESSION, $_POST, $_GET - * (in that order) and register it as a global var. - */ -function sqextractGlobalVar ($name) { - - global $$name; - - sqgetGlobalVar($name, $$name); - -} - function sqsession_destroy() { /* diff --git a/src/compose.php b/src/compose.php index e53592f3..29394e8e 100644 --- a/src/compose.php +++ b/src/compose.php @@ -42,23 +42,23 @@ if (isset($_POST['return'])) { if ( isset($_SESSION['composesession']) ) { $composesession = $_SESSION['composesession']; } -sqextractGlobalVar('action'); -sqextractGlobalVar('session'); -sqextractGlobalVar('mailbox'); -sqextractGlobalVar('identity'); -sqextractGlobalVar('send_to'); -sqextractGlobalVar('send_to_cc'); -sqextractGlobalVar('send_to_bcc'); -sqextractGlobalVar('subject'); -sqextractGlobalVar('body'); -sqextractGlobalVar('mailprio'); -sqextractGlobalVar('request_mdn'); -sqextractGlobalVar('request_dr'); -sqextractGlobalVar('html_addr_search'); -sqextractGlobalVar('mail_sent'); -sqextractGlobalVar('passed_id'); -sqextractGlobalVar('passed_ent_id'); -sqextractGlobalVar('send'); +sqgetGlobalVar('action',$action); +sqgetGlobalVar('session',$session); +sqgetGlobalVar('mailbox',$mailbox); +sqgetGlobalVar('identity',$identity); +sqgetGlobalVar('send_to',$send_to); +sqgetGlobalVar('send_to_cc',$send_to_cc); +sqgetGlobalVar('send_to_bcc',$send_to_bcc); +sqgetGlobalVar('subject',$subject); +sqgetGlobalVar('body',$body); +sqgetGlobalVar('mailprio',$mailprio); +sqgetGlobalVar('request_mdn',$request_mdn); +sqgetGlobalVar('request_dr',$request_dr); +sqgetGlobalVar('html_addr_search',$html_addr_search); +sqgetGlobalVar('mail_sent',$mail_sent); +sqgetGlobalVar('passed_id',$passed_id); +sqgetGlobalVar('passed_ent_id',$passed_ent_id); +sqgetGlobalVar('send',$send); if ( isset($_POST['sigappend']) ) { $sigappend = $_POST['sigappend']; @@ -75,7 +75,7 @@ if ( isset($_POST['send_to_search']) ) { } /* Attachments */ -sqextractGlobalVar('attach'); +sqgetGlobalVar('attach',$attach); if ( isset($_POST['do_delete']) ) { $do_delete = $_POST['do_delete']; } @@ -93,11 +93,11 @@ if ( isset($_GET['attachedmessages']) ) { } /* Drafts */ -sqextractGlobalVar('draft'); -sqextractGlobalVar('draft_id'); -sqextractGlobalVar('ent_num'); -sqextractGlobalVar('saved_draft'); -sqextractGlobalVar('delete_draft'); +sqgetGlobalVar('draft',$draft); +sqgetGlobalVar('draft_id',$draft_id); +sqgetGlobalVar('ent_num',$ent_num); +sqgetGlobalVar('saved_draft',$saved_draft); +sqgetGlobalVar('delete_draft',$delete_draft); $key = $_COOKIE['key']; -- 2.25.1