Przeglądaj źródła

Remove the unnecesary sqextractGlobalVar function, and replace with the new
sqgetGlobalVar. This should fix the compose error that Ken Brush was having.

jangliss 22 lat temu
rodzic
commit
3edffd0a36
3 zmienionych plików z 24 dodań i 37 usunięć
  1. 1 1
      functions/attachment_common.php
  2. 0 13
      functions/global.php
  3. 23 23
      src/compose.php

+ 1 - 1
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 */

+ 0 - 13
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() {
 
     /*

+ 23 - 23
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'];