X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Faddrbook_search.php;h=45e1ed2ea133ba4389689191f53eef15735b3a46;hb=d725f88c364863bc4581884e99e768e7ce3c489f;hp=d5e027d58860bedbee16cdf4cef431c826a22dfb;hpb=15e6162eacc97158393bc75aed3afeb7b19c24a6;p=squirrelmail.git
diff --git a/src/addrbook_search.php b/src/addrbook_search.php
index d5e027d5..45e1ed2e 100644
--- a/src/addrbook_search.php
+++ b/src/addrbook_search.php
@@ -3,7 +3,7 @@
/**
* addrbook_search.php
*
- * Copyright (c) 1999-2002 The SquirrelMail Project Team
+ * Copyright (c) 1999-2004 The SquirrelMail Project Team
* Licensed under the GNU GPL. For full terms see the file COPYING.
*
* Handle addressbook searching in the popup window.
@@ -12,250 +12,292 @@
* addrbook_search_html.html -- If you change one,
* change the other one too!
*
- * $Id$
+ * $Id$
+ * @package squirrelmail
*/
-/*****************************************************************/
-/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!! ***/
-/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION. ***/
-/*** + Base level indent should begin at left margin, as ***/
-/*** the require_once below looks. ***/
-/*** + All identation should consist of four space blocks ***/
-/*** + Tab characters are evil. ***/
-/*** + all comments should use "slash-star ... star-slash" ***/
-/*** style -- no pound characters, no slash-slash style ***/
-/*** + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD ***/
-/*** ALWAYS USE { AND } CHARACTERS!!! ***/
-/*** + Please use ' instead of ", when possible. Note " ***/
-/*** should always be used in _( ) function calls. ***/
-/*** Thank you for your help making the SM code more readable. ***/
-/*****************************************************************/
-
-require_once('../src/validate.php');
-
- // Function to include JavaScript code
- function insert_javascript() {
-?>
-
+ function bcc_address($addr) {
+ var prefix = "";
+ var pwintype = typeof parent.opener.document.compose;
+
+ $addr = $addr.replace(/ {1,35}$/, "");
+
+ if (pwintype != "undefined") {
+ if (parent.opener.document.compose.send_to_bcc.value) {
+ prefix = ", ";
+ parent.opener.document.compose.send_to_bcc.value =
+ parent.opener.document.compose.send_to_bcc.value + ", " + $addr;
+ } else {
+ parent.opener.document.compose.send_to_bcc.value = $addr;
+ }
+ }
+ }
+// -->
';
- printf("