Remove abook_take; see the Add Address plugin (third party)
authorpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sat, 12 Jul 2008 18:01:16 +0000 (18:01 +0000)
committerpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sat, 12 Jul 2008 18:01:16 +0000 (18:01 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@13234 7612ce4b-ef26-0410-bec9-ea0150e637f0

plugins/abook_take/README [deleted file]
plugins/abook_take/functions.php [deleted file]
plugins/abook_take/index.php [deleted file]
plugins/abook_take/setup.php [deleted file]
plugins/abook_take/take.php [deleted file]

diff --git a/plugins/abook_take/README b/plugins/abook_take/README
deleted file mode 100755 (executable)
index f5eee37..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-Address Book Take
-
-If you would like to add the sender of a message you're reading to your
-address book quickly and easily without cutting and pasting, then this
-plugin simplifies the process.  It scans the mail message you're reading
-for any email address and lets you add it with a quick form.
-
-
-Features
-========
-
-* Saves you the need to Cut & Paste
-* Steals from the To, From, Reply-To, and CC fields
-* Steals from the body of the message
-* Address verification (pretty good)
-
-
-Description
-===========
-
-By pulling down a list and selecting the address you want to add, you
-are then presented with a familiar Add to Personal Address Book screen.
-By filling out this form, you will then add the email address to your
-personal address book.
-
-The user can decide if the box is shown, where it is shown on the bottom
-of the Read screen, and whether or not to attempt to verify that the
-address works.
-
-When trying to verify if the address works, it checks to see if the host
-has any DNS record available.  Usually this will work.
-
-
-Future Work
-===========
-
-* Maybe grab the name, if available
-* Search more headers (when they become available)
-* Steal from the body of the message directly (when possible)
-* When new domains are added, update the email verification function
-
-
-Installation
-============
-
-Go back to the main directory, run configure and add the plugin.
-
-
-Credits
-=======
-
-This plugin has been originally developed by Tyler Akins and is now
-maintained by the SquirrelMail Project Team.
diff --git a/plugins/abook_take/functions.php b/plugins/abook_take/functions.php
deleted file mode 100644 (file)
index ee3414e..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-<?php
-
-/**
- * functions.php
- *
- * Functions for the Address Take plugin
- *
- * @copyright &copy; 1999-2007 The SquirrelMail Project Team
- * @license http://opensource.org/licenses/gpl-license.php GNU Public License
- * @version $Id$
- * @package plugins
- * @subpackage abook_take
- */
-
-/** */
-function valid_email ($email, $verify) {
-    global $Email_RegExp_Match;
-
-    if (! eregi('^' . $Email_RegExp_Match . '$', $email)) {
-        return false;
-    }
-
-    if (! $verify) {
-        return true;
-    }
-
-    return checkdnsrr(substr(strstr($email, '@'), 1), 'ANY') ;
-}
-
-function abook_take_read_string($str) {
-    global $abook_found_email, $Email_RegExp_Match;
-
-    while (eregi('(' . $Email_RegExp_Match . ')', $str, $hits)) {
-        $str = substr(strstr($str, $hits[0]), strlen($hits[0]));
-        if (! isset($abook_found_email[$hits[0]])) {
-            echo addHidden('email[]', $hits[0]);
-            $abook_found_email[$hits[0]] = 1;
-        }
-    }
-
-    return;
-}
-
-function abook_take_read_array($array) {
-    foreach ($array as $item)
-        abook_take_read_string($item->getAddress());
-}
-
-function abook_take_read() {
-    global $message;
-
-    echo '<br />' . addForm(SM_PATH . 'plugins/abook_take/take.php') .
-         '<div style="text-align: center;">' . "\n";
-
-    if (isset($message->rfc822_header->reply_to))
-        abook_take_read_array($message->rfc822_header->reply_to);
-    if (isset($message->rfc822_header->from))
-        abook_take_read_array($message->rfc822_header->from);
-    if (isset($message->rfc822_header->cc))
-        abook_take_read_array($message->rfc822_header->cc);
-    if (isset($message->rfc822_header->to))
-        abook_take_read_array($message->rfc822_header->to);
-
-    echo addSubmit(_("Take Address")) .
-         '</div></form>';
-}
-
-function abook_take_pref() {
-    global $username, $data_dir, $abook_take_verify;
-
-    $abook_take_verify = getPref($data_dir, $username, 'abook_take_verify', false);
-}
-
-function abook_take_options() {
-    global $optpage_data;
-
-    $optpage_data['grps']['abook_take'] = _("Address Book Take");
-    $optionValues = array();
-    $optionValues[] = array(
-        'name'    => 'abook_take_verify',
-        'caption' => _("Try to verify addresses"),
-        'type'    => SMOPT_TYPE_BOOLEAN,
-        'refresh' => SMOPT_REFRESH_NONE
-    );
-    $optpage_data['vals']['abook_take'] = $optionValues;
-}
diff --git a/plugins/abook_take/index.php b/plugins/abook_take/index.php
deleted file mode 100644 (file)
index bd0a97f..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-<?php
-
-/**
- * index.php
- *
- * This file simply takes any attempt to view source files and sends those
- * people to the login screen. At this point no attempt is made to see if the
- * person is logged in or not.
- *
- * @copyright &copy; 1999-2007 The SquirrelMail Project Team
- * @license http://opensource.org/licenses/gpl-license.php GNU Public License
- * @version $Id$
- * @package plugins
- * @subpackage abook_take
- */
-
-header('Location: ../index.php');
-
-?>
\ No newline at end of file
diff --git a/plugins/abook_take/setup.php b/plugins/abook_take/setup.php
deleted file mode 100755 (executable)
index 2751f76..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-<?php
-
-/**
- * setup.php
- *
- * Address Take -- steals addresses from incoming email messages. Searches
- * the To, Cc, From and Reply-To headers, also searches the body of the
- * message.
- *
- * @copyright &copy; 1999-2007 The SquirrelMail Project Team
- * @license http://opensource.org/licenses/gpl-license.php GNU Public License
- * @version $Id$
- * @package plugins
- * @subpackage abook_take
- */
-
-
-/**
- * Initialize the plugin
- */
-function squirrelmail_plugin_init_abook_take()
-{
-    global $squirrelmail_plugin_hooks;
-
-    $squirrelmail_plugin_hooks['read_body_bottom']['abook_take'] = 'abook_take_read_body_bottom';
-    $squirrelmail_plugin_hooks['loading_prefs']['abook_take']    = 'abook_take_loading_prefs';
-    $squirrelmail_plugin_hooks['optpage_loadhook_display']['abook_take'] = 'abook_take_optpage_loadhook_display';
-}
-
-function abook_take_read_body_bottom() {
-    include_once(SM_PATH . 'plugins/abook_take/functions.php');
-
-    abook_take_read();
-}
-
-function abook_take_loading_prefs() {
-    include_once(SM_PATH . 'plugins/abook_take/functions.php');
-
-    abook_take_pref();
-}
-
-function abook_take_optpage_loadhook_display() {
-    include_once(SM_PATH . 'plugins/abook_take/functions.php');
-
-    abook_take_options();
-}
diff --git a/plugins/abook_take/take.php b/plugins/abook_take/take.php
deleted file mode 100644 (file)
index 3ac2c50..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-<?php
-
-/**
- * take.php
- *
- * Address Take -- steals addresses from incoming email messages. Searches
- * the To, Cc, From and Reply-To headers.
- *
- * @copyright &copy; 1999-2007 The SquirrelMail Project Team
- * @license http://opensource.org/licenses/gpl-license.php GNU Public License
- * @version $Id$
- * @package plugins
- * @subpackage abook_take
- */
-
-/**
- * Include the SquirrelMail initialization file.
- */
-require('../../include/init.php');
-
-/* SquirrelMail required files. */
-require(SM_PATH . 'functions/forms.php');
-require(SM_PATH . 'functions/addressbook.php');
-
-displayPageHeader($color);
-
-/* input form data */
-sqgetGlobalVar('email', $email, SQ_POST);
-
-$abook_take_verify = getPref($data_dir, $username, 'abook_take_verify');
-
-$abook = addressbook_init(false, true);
-
-$addrs = array();
-foreach ($email as $Val) {
-    if (valid_email($Val, $abook_take_verify)) {
-        $addrs[$Val] = $Val;
-    } else {
-        $addrs[$Val] = 'FAIL - ' . $Val;
-    }
-}
-
-$formdata=array('email'=>$addrs);
-
-abook_create_form(SM_PATH . 'src/addressbook.php','addaddr',_("Add to address book"),_("Add address"),$formdata);
-echo '</form>';
-?>
-</body></html>