Interfaces with a mailinglist. More...
Go to the source code of this file.
Functions | |
mailinglist_permission () | |
Implements hook_permission(). More... | |
mailinglist_help ($path, $arg) | |
Implements hook_help(). More... | |
mailinglist_menu () | |
Implements hook_menu(). More... | |
mailinglist_cron_queue_info () | |
Implements hook_cron_queue_info(). More... | |
mailinglist_cron () | |
Implements hook_cron(). More... | |
_mailinglist_file_path () | |
_mailinglist_file_path() gets the file path that we will use to place files in More... | |
_mailinglist_base_filename ($path) | |
_mailinglist_base_filename(). More... | |
_mailinglist_mailbox_scan () | |
Process the configured mailing boxes. More... | |
_mailinglist_maildir_scan () | |
_mailinglist_mailbox_scan() More... | |
_mailinglist_mailbox_process ($list, $file, $offset) | |
_mailinglist_mailbox_process(). More... | |
mailinglist_message_callback ($msg) | |
Message Queue Callback function. More... | |
_mailinglist_encode_password ($pass) | |
_mailinglist_encode_password More... | |
_mailinglist_decode_password ($code) | |
_mailinglist_decode_password More... | |
mailinglist_array_merge_recursive_distinct (array &$array1, array &$array2) | |
array_merge_recursive does indeed merge arrays, but it converts values with duplicate keys to arrays rather than overwriting the value in the first array with the duplicate value in the second array, as array_merge does. More... | |
_mailinglist_datetime_schema ($desc) | |
Return the schema for a 'datetime' field. More... | |
_mailinglist_datetime_format ($ts) | |
Convert a 'timestamp to a 'datetime'. More... | |
_mailinglist_datetime_ts ($time) | |
Convert a 'datetime' field into a timestamp. More... | |
mailinglist_email_name ($email, $name, $count=0) | |
Lookup Email <-> Name combination. More... | |
mailinglist_init () | |
CTOOLS Hooks More... | |
mailinglist_ctools_plugin_directory ($owner, $plugin_type) | |
Implements hook_ctools_plugin_directory(). More... | |
mailinglist_ctools_plugin_type () | |
Implements hook_ctools_plugin_type(). More... | |
mailinglist_plugin_load_class ($module, $type, $plugin, $class_name='handler', $args=NULL) | |
Wrapper to load any class type. More... | |
mailinglist_get_plugins ($module, $type) | |
Wrapper to load plugins. More... | |
_mailinglist_build_options ($source, $key_name= 'name') | |
Builds a Select control array from a menu form an array from a ctools_get_plugin. More... | |
_mailinglist_object_factory ($schema, $data) | |
Builds an type variable object from a database table entry. More... | |
mailinglist_mailbox_load ($mbox) | |
CTools Export UI More... | |
mailinglist_mailbox_load_all ($show_disabled=TRUE) | |
Load all mailinglists. More... | |
_mailinglist_mailbox_test ($form, &$form_state) | |
_mailinglist_mailbox_test More... | |
_mailinglist_mailbox_test_output ($mailbox) | |
_mailinglist_mailbox_test_output() More... | |
mailinglist_list_load ($list) | |
Load a list definition. More... | |
mailinglist_list_load_all ($show_disabled=TRUE) | |
Load all mailinglists. More... | |
mailinglist_operation_load ($oper) | |
@ name CTools Operation/******** operation More... | |
mailinglist_operation_load_all () | |
mailinglist_operation_load_all() More... | |
Interfaces with a mailinglist.
Definition in file mailinglist.module.
_mailinglist_base_filename | ( | $path | ) |
Converts an absolute file path to a relative path to our directory, primarily for logging.
Definition at line 239 of file mailinglist.module.
References _mailinglist_file_path().
Referenced by _mailinglist_mailbox_process(), _mailinglist_maildir_scan(), and MailinglistArchiveOperation\form().
_mailinglist_build_options | ( | $source, | |
$key_name = 'name' |
|||
) |
Builds a Select control array from a menu form an array from a ctools_get_plugin.
$source | Array - The array defining the options to select from. Key of array will be the value returned for the selected item, text taken from field selected by $key_name. A plugin list obtained from ctools_get_plugins is compatable with this function. |
$key_name | String - The key used to access the field that give the Text to use for the option. |
Definition at line 701 of file mailinglist.module.
Referenced by MailinglistListUI\edit_form(), and MailinglistRetrieveUI\edit_form().
_mailinglist_datetime_format | ( | $ts | ) |
Convert a 'timestamp to a 'datetime'.
Definition at line 561 of file mailinglist.module.
Referenced by mailinglist_archive_message_add(), mailinglist_members_scan(), mailinglist_members_seen(), mailinglist_members_subscribe(), mailinglist_members_unseen(), mailinglist_members_unsubscribe(), mailinglist_members_update(), and mailinglist_members_update_ind().
_mailinglist_datetime_schema | ( | $desc | ) |
Return the schema for a 'datetime' field.
Note that because drupal does not directly support a DateTime field standardly, we use these 3 functions to abstract out our decision.
Definition at line 548 of file mailinglist.module.
Referenced by _mailinglist_archives_list_schema(), _mailinglist_members_list_schema(), and mailinglist_archive_schema().
_mailinglist_datetime_ts | ( | $time | ) |
Convert a 'datetime' field into a timestamp.
Definition at line 570 of file mailinglist.module.
Referenced by MailinglistMembersOperation\form(), MailinglistArchiveOperation\form(), and mailinglist_archive_summary_list().
_mailinglist_decode_password | ( | $code | ) |
_mailinglist_decode_password
Simple decryption routine to make passwords harder to read in debug messages
Definition at line 481 of file mailinglist.module.
Referenced by MailinglistPop3Retrieve\connect(), MailinglistPhpImapRetrieve\edit_form(), MailinglistPop3Retrieve\edit_form(), Mailman21List\edit_form(), MailinglistMailboxRetrieve\edit_form(), and Mailman21List\getWebPage().
_mailinglist_encode_password | ( | $pass | ) |
_mailinglist_encode_password
Simple encryption routine to make passwords harder to read in debug messages
Definition at line 465 of file mailinglist.module.
Referenced by Mailman21List\edit_form_submit().
_mailinglist_file_path | ( | ) |
_mailinglist_file_path() gets the file path that we will use to place files in
Definition at line 222 of file mailinglist.module.
Referenced by _mailinglist_base_filename(), and _mailinglist_maildir_scan().
_mailinglist_mailbox_process | ( | $list, | |
$file, | |||
$offset | |||
) |
_mailinglist_mailbox_process().
Process the specified number of messages from a mailbox.
$list | The list whose archives to add the messages to. |
$file | string: The name of the file to process. |
$offset | int: The number of messages to skip at the begining of the file. |
Definition at line 352 of file mailinglist.module.
References _mailinglist_base_filename().
Referenced by _mailinglist_maildir_scan().
_mailinglist_mailbox_scan | ( | ) |
Process the configured mailing boxes.
Definition at line 247 of file mailinglist.module.
References _mailinglist_maildir_scan(), and mailinglist_mailbox_load_all().
Referenced by MailinglistArchiveOperation\form(), and mailinglist_cron().
_mailinglist_mailbox_test | ( | $form, | |
& | $form_state | ||
) |
_mailinglist_mailbox_test
Definition at line 797 of file mailinglist.module.
References _mailinglist_mailbox_test_output().
_mailinglist_mailbox_test_output | ( | $mailbox | ) |
_mailinglist_mailbox_test_output()
Definition at line 805 of file mailinglist.module.
References mailinglist_plugin_load_class().
Referenced by _mailinglist_mailbox_test(), MailinglistListUI\test_page(), and MailinglistRetrieveUI\test_page().
_mailinglist_maildir_scan | ( | ) |
Scan our data directory for mailbox files, proecess the messages in them and them delete them. Mailboxes in sub directories are given specifically to the list by the same name, mailboxes in the base directory will be put through the list detection method.
Definition at line 265 of file mailinglist.module.
References _mailinglist_base_filename(), _mailinglist_file_path(), _mailinglist_mailbox_process(), mailinglist_list_load(), and mailinglist_list_load_all().
Referenced by _mailinglist_mailbox_scan().
_mailinglist_object_factory | ( | $schema, | |
$data | |||
) |
Builds an type variable object from a database table entry.
$schema | Array - The schema for the table being read |
$data | Object(StdClass) - The data read from the table for this item |
Note, the schema must have an field called 'type' which will be filled in with the type of object to be made. The plugin in its description needs to include the line 'object factory' => '_mailinglist_object_factory',
Called from the following code snippet in ctools_export_load_object if (isset($schema['export']['object factory']) && function_exists($schema['export']['object factory'])) { $object = $schema['export']['object factory']($schema, $data); } else { $object = _ctools_export_unpack_object($schema, $data, $export['object']); }
Where we will continue to the call to _ctools_export_unpack_object after determining the class that should be returned.
Definition at line 736 of file mailinglist.module.
Referenced by MailinglistExportUI\edit_form().
mailinglist_array_merge_recursive_distinct | ( | array & | $array1, |
array & | $array2 | ||
) |
array_merge_recursive does indeed merge arrays, but it converts values with duplicate keys to arrays rather than overwriting the value in the first array with the duplicate value in the second array, as array_merge does.
I.e., with array_merge_recursive, this happens (documented behavior):
array_merge_recursive(array('key' => 'org value'), array('key' => 'new value')); => array('key' => array('org value', 'new value'));
mailinglist_array_merge_recursive_distinct does not change the datatypes of the values in the arrays. Matching keys' values in the second array overwrite those in the first array, as is the case with array_merge, i.e.:
mailinglist_array_merge_recursive_distinct(array('key' => 'org value'), array('key' => 'new value')); => array('key' => array('new value'));
Parameters are passed by reference, though only for performance reasons. They're not altered by this function.
$array1 | [array] |
$array2 | [array] |
Based on design:
Definition at line 523 of file mailinglist.module.
Referenced by MailinglistExportUI\edit_form().
mailinglist_cron | ( | ) |
Implements hook_cron().
Definition at line 156 of file mailinglist.module.
References _mailinglist_mailbox_scan(), and mailinglist_mailbox_load_all().
mailinglist_cron_queue_info | ( | ) |
Implements hook_cron_queue_info().
Definition at line 142 of file mailinglist.module.
mailinglist_ctools_plugin_directory | ( | $owner, | |
$plugin_type | |||
) |
Implements hook_ctools_plugin_directory().
divides the plugins by owner module
ctools/export_ui mailinglist/list mailinglist/operation mailinglist/retrieve
Definition at line 620 of file mailinglist.module.
mailinglist_ctools_plugin_type | ( | ) |
Implements hook_ctools_plugin_type().
Definition at line 627 of file mailinglist.module.
mailinglist_email_name | ( | $email, | |
$name, | |||
$count = 0 |
|||
) |
Lookup Email <-> Name combination.
Definition at line 576 of file mailinglist.module.
Referenced by _mailinglist_members_lookup(), mailinglist_archive_message_add(), and mailinglist_members_process_memberpage().
mailinglist_get_plugins | ( | $module, | |
$type | |||
) |
Wrapper to load plugins.
$module | String - name of module owning the plugin type. |
$type | String - type of plugins to retrieve. |
Definition at line 669 of file mailinglist.module.
Referenced by MailinglistListUI\edit_form(), MailinglistRetrieveUI\edit_form(), and mailinglist_operation_load_all().
mailinglist_help | ( | $path, | |
$arg | |||
) |
Implements hook_help().
Help text added to pages specified (in "Help" region)
Definition at line 68 of file mailinglist.module.
mailinglist_init | ( | ) |
mailinglist_list_load | ( | $list | ) |
Load a list definition.
Implements hook_load().
$list | This mailbox's name value. |
Definition at line 832 of file mailinglist.module.
Referenced by _mailinglist_maildir_scan(), mailinglist_members_callback(), and mailinglist_message_callback().
mailinglist_list_load_all | ( | $show_disabled = TRUE | ) |
Load all mailinglists.
Implements hook_load_all().
$show_disabled | If TRUE, will return disabled mailinglists. |
Definition at line 848 of file mailinglist.module.
Referenced by _mailinglist_maildir_scan(), _mailinglist_pagecallback(), mailinglist_archive_cron(), mailinglist_archive_schema(), mailinglist_members_cron(), mailinglist_members_modules_enabled(), mailinglist_members_permission(), mailinglist_members_schema(), mailinglist_message_callback(), mailinglist_permission(), and MailinglistRetrieveUI\process_page().
mailinglist_mailbox_load | ( | $mbox | ) |
CTools Export UI
Load a mailbox definition.
$mbox | This mailbox's name value. |
Definition at line 769 of file mailinglist.module.
mailinglist_mailbox_load_all | ( | $show_disabled = TRUE | ) |
Load all mailinglists.
$show_disabled | If TRUE, will return disabled mailinglists. |
Definition at line 783 of file mailinglist.module.
Referenced by _mailinglist_mailbox_scan(), and mailinglist_cron().
mailinglist_menu | ( | ) |
Implements hook_menu().
Define urls we will respond to
Definition at line 85 of file mailinglist.module.
mailinglist_message_callback | ( | $msg | ) |
Message Queue Callback function.
Called by Queue processing
Definition at line 436 of file mailinglist.module.
References mailinglist_list_load(), and mailinglist_list_load_all().
mailinglist_operation_load | ( | $oper | ) |
@ name CTools Operation/******** operation
Implements hook_load().
Definition at line 869 of file mailinglist.module.
References $plugin.
Referenced by _mailinglist_list_pagecallback(), and mailinglist_operation_load_all().
mailinglist_operation_load_all | ( | ) |
mailinglist_operation_load_all()
Implements hook_load_all*().
Definition at line 890 of file mailinglist.module.
References $plugin, mailinglist_get_plugins(), and mailinglist_operation_load().
Referenced by MailinglistList\edit_form(), and mailinglist_permission().
mailinglist_permission | ( | ) |
Implements hook_permission().
Definition at line 41 of file mailinglist.module.
References mailinglist_list_load_all(), and mailinglist_operation_load_all().
mailinglist_plugin_load_class | ( | $module, | |
$type, | |||
$plugin, | |||
$class_name = 'handler' , |
|||
$args = NULL |
|||
) |
Wrapper to load any class type.
$module | String - The module that owns the plugin type. |
$type | String - The type of plugin. |
$plugin | String - The id of the specific plugin to load. |
$class_name | String - The identifier of the class. For example, 'handler'. |
$args | Parameter passed to the constructor of the plugin |
Definition at line 652 of file mailinglist.module.
References $plugin.
Referenced by _mailinglist_mailbox_test_output().