Projet

Général

Profil

Révision c2ada511

Ajouté par Assos Assos il y a environ 10 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/email/email.diff.inc
1
<?php
2

  
3
/**
4
 * @file
5
 * Provide diff field functions for the Email module.
6
 */
7

  
8
/**
9
 * Diff field callback for parsing email fields comparative values.
10
 */
11
function email_field_diff_view($items, $context) {
12
  $diff_items = array();
13
  foreach ($items as $delta => $item) {
14
    $diff_items[$delta] = $item['email'];
15
  }
16
  return $diff_items;
17
}
drupal7/sites/all/modules/email/email.info
5 5

  
6 6
files[] = email.migrate.inc
7 7

  
8
; Information added by drupal.org packaging script on 2012-08-29
9
version = "7.x-1.2"
8
; Information added by Drupal.org packaging script on 2014-04-10
9
version = "7.x-1.3"
10 10
core = "7.x"
11 11
project = "email"
12
datestamp = "1346254131"
12
datestamp = "1397134155"
13 13

  
drupal7/sites/all/modules/email/email.migrate.inc
10 10
    $this->registerTypes(array('email'));
11 11
  }
12 12

  
13
  public function prepare(stdClass $entity, array $field_info, array $instance, array $values) {
13
  public function prepare($entity, array $field_info, array $instance, array $values) {
14 14
    // Setup the Field API array for saving.
15 15
    $arguments = (isset($values['arguments'])) ? $values['arguments']: array();
16 16
    $language = $this->getFieldLanguage($entity, $field_info, $arguments);
drupal7/sites/all/modules/email/email.module
1 1
<?php
2 2

  
3
/**
4
 * @file
5
 * Module file for the email module, which creates a email address field.
6
 */
3 7

  
4 8
/**
5 9
 * Implements hook_field_info().
......
20 24
 * Implements hook_migrate_api().
21 25
 */
22 26
function email_migrate_api() {
23
  return array('api' => 2);
27
  return array(
28
    'api' => 2,
29
    'field handlers' => array('MigrateEmailFieldHandler'),
30
  );
24 31
}
25 32

  
26 33
/**
......
198 205
    'page callback' => 'drupal_get_form',
199 206
    'page arguments' => array('email_admin_settings'),
200 207
    'access arguments' => array('administer site configuration'),
201
    'type' => MENU_CALLBACK,
208
    'type' => MENU_NORMAL_ITEM,
202 209
  );
203 210
  return $items;
204 211
}
......
433 440

  
434 441
  // Log the operation:
435 442
  flood_register_event('email');
436
  watchdog('mail', t('%name-from sent an e-mail at %form.', array('%name-from' => $form_state['values']['name'], '%form' => url($_GET['q'], array('absolute' => TRUE)))));
443
  watchdog('mail', '%name-from sent an e-mail at %form.', array('%name-from' => $form_state['values']['name'], '%form' => url($_GET['q'], array('absolute' => TRUE))));
437 444

  
438 445
  drupal_set_message(t('Your message has been sent.'));
439 446
  $form_state['redirect'] = $path;
......
447 454
  switch ($key) {
448 455
    case 'contact':
449 456
      // Compose the body:
450
      $message['body'][] = t('@name sent a message using the contact form at @url.', array('@name' => $params['name'], '@url' => $params['url']), array('langcode' =>$language->language));
457
      $message['body'][] = t('@name sent a message using the contact form at @url.', array('@name' => $params['name'], '@url' => $params['url']), array('langcode' => $language->language));
451 458
      $message['body'][] = $params['message'];
452 459
      $message['subject'] = "";
453 460

  

Formats disponibles : Unified diff