X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=plugins%2Fabook_take%2Ffunctions.php;h=ee3414e26fcd8a28b470f89e5590920716a97fd1;hb=2229a3ae504ba005fca71bef2c3111e28050e1b6;hp=59c64a4cfd2669860bdf520f7db845b4e80bb865;hpb=06a407b94d60ecf48268f85d9119cbb6036f6fab;p=squirrelmail.git
diff --git a/plugins/abook_take/functions.php b/plugins/abook_take/functions.php
index 59c64a4c..ee3414e2 100644
--- a/plugins/abook_take/functions.php
+++ b/plugins/abook_take/functions.php
@@ -3,42 +3,36 @@
/**
* functions.php
*
- * Copyright (c) 1999-2004 The SquirrelMail Project Team
- * Licensed under the GNU GPL. For full terms see the file COPYING.
- *
* Functions for the Address Take plugin
*
- * $Id$
+ * @copyright © 1999-2007 The SquirrelMail Project Team
+ * @license http://opensource.org/licenses/gpl-license.php GNU Public License
+ * @version $Id$
* @package plugins
* @subpackage abook_take
*/
-/** SquirrelMail required files. */
-require_once(SM_PATH . 'functions/url_parser.php');
-require_once(SM_PATH . 'functions/forms.php');
-
-function valid_email ($email, $verify)
-{
+/** */
+function valid_email ($email, $verify) {
global $Email_RegExp_Match;
- if (! eregi('^' . $Email_RegExp_Match . '$', $email))
+ if (! eregi('^' . $Email_RegExp_Match . '$', $email)) {
return false;
+ }
- if (! $verify)
+ if (! $verify) {
return true;
+ }
return checkdnsrr(substr(strstr($email, '@'), 1), 'ANY') ;
}
-function abook_take_read_string($str)
-{
+function abook_take_read_string($str) {
global $abook_found_email, $Email_RegExp_Match;
- while (eregi('(' . $Email_RegExp_Match . ')', $str, $hits))
- {
+ while (eregi('(' . $Email_RegExp_Match . ')', $str, $hits)) {
$str = substr(strstr($str, $hits[0]), strlen($hits[0]));
- if (! isset($abook_found_email[$hits[0]]))
- {
+ if (! isset($abook_found_email[$hits[0]])) {
echo addHidden('email[]', $hits[0]);
$abook_found_email[$hits[0]] = 1;
}
@@ -47,18 +41,16 @@ function abook_take_read_string($str)
return;
}
-function abook_take_read_array($array)
-{
+function abook_take_read_array($array) {
foreach ($array as $item)
abook_take_read_string($item->getAddress());
}
-function abook_take_read()
-{
+function abook_take_read() {
global $message;
echo '
' . addForm(SM_PATH . 'plugins/abook_take/take.php') .
- '