Projet

Général

Profil

Révision 6ff32cea

Ajouté par Florent Torregrosa il y a environ 9 ans

Update core to 7.36

Voir les différences:

drupal7/CHANGELOG.txt
1 1

  
2
Drupal 7.36, 2015-04-01
3
-----------------------
4
- Added a 'file_public_schema' variable which allows modules that define
5
  publicly-accessible streams in hook_stream_wrappers() to bypass file download
6
  access checks when processing managed file upload fields.
7
- Fixed a bug that caused database query tags not to be added to search-related
8
  database queries under many circumstances, and which prevented the
9
  corresponding hook_query_TAG_alter() implementations from being called.
10
- Fixed the "for" attribute on managed file upload field labels to improve
11
  accessibility (minor markup change).
12
- Added a 'javascript_always_use_jquery' variable which can be set to FALSE by
13
  sites that may not need jQuery loaded on all pages, and a 'requires_jquery'
14
  option to drupal_add_js() which modules can set to FALSE when adding
15
  JavaScript files that have no dependency on jQuery (API addition:
16
  https://www.drupal.org/node/2462717).
17
- Fixed incorrect foreign keys in the User module's role_permission and
18
  users_roles database tables.
19
- Changed permission descriptions throughout Drupal core to consistently link
20
  to relevant administrative pages, regardless of whether the user viewing the
21
  Permissions page can view the page being linked to (minor UI change).
22
- Fixed the drupal_add_region_content() function so that it actually adds
23
  content to the page.
24
- Added an 'image_suppress_itok_output' variable to allow sites already using
25
  the existing 'image_allow_insecure_derivatives' variable to also prevent
26
  security tokens from appearing in image derivative URLs.
27
- Fixed double-escaping of theme names in the Block module administrative
28
  interface (minor string change).
29
- Added basic support for Xdebug when running automated tests.
30
- Fixed a bug which caused previewing a node to remove elements from the node
31
  being edited. With this fix, calling node_preview() will no longer modify the
32
  passed-in node object (minor API change).
33
- Added a user_has_role() function to check whether a user has a particular
34
  role (API addition: https://www.drupal.org/node/2462411).
35
- Fixed installation failures when an opcode cache is enabled.
36
- Fixed a bug in the Drupal 6 to Drupal 7 upgrade path which caused private
37
  files to be inaccessible.
38
- Fixed a bug in the Drupal 6 to Drupal 7 upgrade path which caused user
39
  pictures to be lost.
40
- Fixed missing language code in hook_field_attach_view_alter() when it is
41
  invoked from field_view_field().
42
- Stopped sending ETag and Last-Modified headers for uncached page requests,
43
  since they break caching for certain Varnish and Nginx configurations.
44
- Changed the Simpletest module to allow PSR-4 test classes to be used in
45
  Drupal 7.
46
- Fixed a fatal error that occurred when using the Comment module's "Unpublish
47
  comment containing keyword(s)" action.
48
- Changed the "lang" attribute on language links to "xml:lang" so it validates
49
  as XHTML (minor markup change).
50
- Prevented the form API from allowing arrays to be submitted for various form
51
  elements, such as textfields, textareas, and password fields (API change:
52
  https://www.drupal.org/node/2462723).
53
- Fixed a bug in the Contact module which caused the global user object to have
54
  the incorrect name and e-mail address during the remainder of the page
55
  request after the contact form is submitted.
56
- Numerous small bug fixes.
57
- Numerous API documentation improvements.
58
- Additional automated test coverage.
59

  
2 60
Drupal 7.35, 2015-03-18
3 61
----------------------
4 62
- Fixed security issues (multiple vulnerabilities). See SA-CORE-2015-001.
drupal7/MAINTAINERS.txt
27 27
- Earl Miles 'merlinofchaos' http://drupal.org/user/26979
28 28

  
29 29
Base system
30
- Károly Négyesi 'chx' http://drupal.org/user/9446
31 30
- Damien Tournoud 'DamZ' http://drupal.org/user/22211
32 31
- Moshe Weitzman 'moshe weitzman' http://drupal.org/user/23
33 32

  
......
39 38
- Nathaniel Catchpole 'catch' http://drupal.org/user/35733
40 39

  
41 40
Cron system
42
- Károly Négyesi 'chx' http://drupal.org/user/9446
43 41
- Derek Wright 'dww' http://drupal.org/user/46549
44 42

  
45 43
Database system
......
55 53

  
56 54
  - Sqlite driver
57 55
    - Damien Tournoud 'DamZ' http://drupal.org/user/22211
58
    - Károly Négyesi 'chx' http://drupal.org/user/9446
59 56

  
60 57
Database update system
61
- Károly Négyesi 'chx' http://drupal.org/user/9446
62 58
- Ashok Modi 'BTMash' http://drupal.org/user/60422
63 59

  
64 60
Entity system
......
71 67
- Aaron Winborn 'aaron' http://drupal.org/user/33420
72 68

  
73 69
Form system
74
- Károly Négyesi 'chx' http://drupal.org/user/9446
75 70
- Alex Bronstein 'effulgentsia' http://drupal.org/user/78040
76 71
- Wolfgang Ziegler 'fago' http://drupal.org/user/16747
77 72
- Daniel F. Kudwien 'sun' http://drupal.org/user/54136
......
105 100

  
106 101
Menu system
107 102
- Peter Wolanin 'pwolanin' http://drupal.org/user/49851
108
- Károly Négyesi 'chx' http://drupal.org/user/9446
109 103

  
110 104
Path system
111 105
- Dave Reid 'davereid' http://drupal.org/user/53892
......
261 255

  
262 256
Simpletest module
263 257
- Jimmy Berry 'boombatower' http://drupal.org/user/214218
264
- Károly Négyesi 'chx' http://drupal.org/user/9446
265 258

  
266 259
Statistics module
267 260
- Tim Millwood 'timmillwood' http://drupal.org/user/227849
drupal7/includes/ajax.inc
211 211
 *
212 212
 * When returning an Ajax command array, it is often useful to have
213 213
 * status messages rendered along with other tasks in the command array.
214
 * In that case the the Ajax commands array may be constructed like this:
214
 * In that case the Ajax commands array may be constructed like this:
215 215
 * @code
216 216
 *   $commands = array();
217 217
 *   $commands[] = ajax_command_replace(NULL, $output);
drupal7/includes/bootstrap.inc
8 8
/**
9 9
 * The current system version.
10 10
 */
11
define('VERSION', '7.35');
11
define('VERSION', '7.36');
12 12

  
13 13
/**
14 14
 * Core API compatibility.
......
529 529
 * Returns the appropriate configuration directory.
530 530
 *
531 531
 * Returns the configuration path based on the site's hostname, port, and
532
 * pathname. Uses find_conf_path() to find the current configuration directory.
533
 * See default.settings.php for examples on how the URL is converted to a
534
 * directory.
532
 * pathname. See default.settings.php for examples on how the URL is converted
533
 * to a directory.
535 534
 *
536 535
 * @param bool $require_settings
537 536
 *   Only configuration directories with an existing settings.php file
......
1246 1245
 * fresh page on every request. This prevents authenticated users from seeing
1247 1246
 * locally cached pages.
1248 1247
 *
1249
 * Also give each page a unique ETag. This will force clients to include both
1250
 * an If-Modified-Since header and an If-None-Match header when doing
1251
 * conditional requests for the page (required by RFC 2616, section 13.3.4),
1252
 * making the validation more robust. This is a workaround for a bug in Mozilla
1253
 * Firefox that is triggered when Drupal's caching is enabled and the user
1254
 * accesses Drupal via an HTTP proxy (see
1255
 * https://bugzilla.mozilla.org/show_bug.cgi?id=269303): When an authenticated
1256
 * user requests a page, and then logs out and requests the same page again,
1257
 * Firefox may send a conditional request based on the page that was cached
1258
 * locally when the user was logged in. If this page did not have an ETag
1259
 * header, the request only contains an If-Modified-Since header. The date will
1260
 * be recent, because with authenticated users the Last-Modified header always
1261
 * refers to the time of the request. If the user accesses Drupal via a proxy
1262
 * server, and the proxy already has a cached copy of the anonymous page with an
1263
 * older Last-Modified date, the proxy may respond with 304 Not Modified, making
1264
 * the client think that the anonymous and authenticated pageviews are
1265
 * identical.
1248
 * ETag and Last-Modified headers are not set per default for authenticated
1249
 * users so that browsers do not send If-Modified-Since headers from
1250
 * authenticated user pages. drupal_serve_page_from_cache() will set appropriate
1251
 * ETag and Last-Modified headers for cached pages.
1266 1252
 *
1267 1253
 * @see drupal_page_set_cache()
1268 1254
 */
......
1275 1261

  
1276 1262
  $default_headers = array(
1277 1263
    'Expires' => 'Sun, 19 Nov 1978 05:00:00 GMT',
1278
    'Last-Modified' => gmdate(DATE_RFC7231, REQUEST_TIME),
1279 1264
    'Cache-Control' => 'no-cache, must-revalidate, post-check=0, pre-check=0',
1280
    'ETag' => '"' . REQUEST_TIME . '"',
1281 1265
  );
1282 1266
  drupal_send_headers($default_headers);
1283 1267
}
......
1659 1643
 *   information about the passed-in exception is used.
1660 1644
 * @param $variables
1661 1645
 *   Array of variables to replace in the message on display. Defaults to the
1662
 *   return value of drupal_decode_exception().
1646
 *   return value of _drupal_decode_exception().
1663 1647
 * @param $severity
1664 1648
 *   The severity of the message, as per RFC 3164.
1665 1649
 * @param $link
1666 1650
 *   A link to associate with the message.
1667 1651
 *
1668 1652
 * @see watchdog()
1669
 * @see drupal_decode_exception()
1653
 * @see _drupal_decode_exception()
1670 1654
 */
1671 1655
function watchdog_exception($type, Exception $exception, $message = NULL, $variables = array(), $severity = WATCHDOG_ERROR, $link = NULL) {
1672 1656

  
......
2653 2637
 *
2654 2638
 * This would include implementations of hook_install(), which could run
2655 2639
 * during the Drupal installation phase, and might also be run during
2656
 * non-installation time, such as while installing the module from the the
2640
 * non-installation time, such as while installing the module from the
2657 2641
 * module administration page.
2658 2642
 *
2659 2643
 * Example usage:
......
3182 3166
  // This function may get called when the default database is not active, but
3183 3167
  // there is no reason we'd ever want to not use the default database for
3184 3168
  // this query.
3185
  $file = Database::getConnection('default', 'default')->query("SELECT filename FROM {registry} WHERE name = :name AND type = :type", array(
3186
      ':name' => $name,
3187
      ':type' => $type,
3188
    ))
3169
  $file = Database::getConnection('default', 'default')
3170
    ->select('registry', 'r', array('target' => 'default'))
3171
    ->fields('r', array('filename'))
3172
    // Use LIKE here to make the query case-insensitive.
3173
    ->condition('r.name', db_like($name), 'LIKE')
3174
    ->condition('r.type', $type)
3175
    ->execute()
3189 3176
    ->fetchField();
3190 3177

  
3191 3178
  // Flag that we've run a lookup query and need to update the cache.
......
3523 3510
  // - The memory limit is greater than the memory required for the operation.
3524 3511
  return ((!$memory_limit) || ($memory_limit == -1) || (parse_size($memory_limit) >= parse_size($required)));
3525 3512
}
3513

  
3514
/**
3515
 * Invalidates a PHP file from any active opcode caches.
3516
 *
3517
 * If the opcode cache does not support the invalidation of individual files,
3518
 * the entire cache will be flushed.
3519
 *
3520
 * @param string $filepath
3521
 *   The absolute path of the PHP file to invalidate.
3522
 */
3523
function drupal_clear_opcode_cache($filepath) {
3524
  if (!defined('PHP_VERSION_ID') || PHP_VERSION_ID < 50300) {
3525
    // Below PHP 5.3, clearstatcache does not accept any function parameters.
3526
    clearstatcache();
3527
  }
3528
  else {
3529
    clearstatcache(TRUE, $filepath);
3530
  }
3531

  
3532
  // Zend OPcache.
3533
  if (function_exists('opcache_invalidate')) {
3534
    opcache_invalidate($filepath, TRUE);
3535
  }
3536
  // APC.
3537
  if (function_exists('apc_delete_file')) {
3538
    // apc_delete_file() throws a PHP warning in case the specified file was
3539
    // not compiled yet.
3540
    // @see http://php.net/apc-delete-file
3541
    @apc_delete_file($filepath);
3542
  }
3543
}
drupal7/includes/common.inc
4162 4162
 *       else being the same, JavaScript added by a call to drupal_add_js() that
4163 4163
 *       happened later in the page request gets added to the page after one for
4164 4164
 *       which drupal_add_js() happened earlier in the page request.
4165
 *   - requires_jquery: Set this to FALSE if the JavaScript you are adding does
4166
 *     not have a dependency on jQuery. Defaults to TRUE, except for JavaScript
4167
 *     settings where it defaults to FALSE. This is used on sites that have the
4168
 *     'javascript_always_use_jquery' variable set to FALSE; on those sites, if
4169
 *     all the JavaScript added to the page by drupal_add_js() does not have a
4170
 *     dependency on jQuery, then for improved front-end performance Drupal
4171
 *     will not add jQuery and related libraries and settings to the page.
4165 4172
 *   - defer: If set to TRUE, the defer attribute is set on the <script>
4166 4173
 *     tag. Defaults to FALSE.
4167 4174
 *   - cache: If set to FALSE, the JavaScript file is loaded anew on every page
......
4179 4186
 */
4180 4187
function drupal_add_js($data = NULL, $options = NULL) {
4181 4188
  $javascript = &drupal_static(__FUNCTION__, array());
4189
  $jquery_added = &drupal_static(__FUNCTION__ . ':jquery_added', FALSE);
4190

  
4191
  // If the $javascript variable has been reset with drupal_static_reset(),
4192
  // jQuery and related files will have been removed from the list, so set the
4193
  // variable back to FALSE to indicate they have not yet been added.
4194
  if (empty($javascript)) {
4195
    $jquery_added = FALSE;
4196
  }
4182 4197

  
4183 4198
  // Construct the options, taking the defaults into consideration.
4184 4199
  if (isset($options)) {
......
4189 4204
  else {
4190 4205
    $options = array();
4191 4206
  }
4207
  if (isset($options['type']) && $options['type'] == 'setting') {
4208
    $options += array('requires_jquery' => FALSE);
4209
  }
4192 4210
  $options += drupal_js_defaults($data);
4193 4211

  
4194 4212
  // Preprocess can only be set if caching is enabled.
......
4199 4217
  $options['weight'] += count($javascript) / 1000;
4200 4218

  
4201 4219
  if (isset($data)) {
4202
    // Add jquery.js and drupal.js, as well as the basePath setting, the
4203
    // first time a JavaScript file is added.
4204
    if (empty($javascript)) {
4220
    // Add jquery.js, drupal.js, and related files and settings if they have
4221
    // not been added yet. However, if the 'javascript_always_use_jquery'
4222
    // variable is set to FALSE (indicating that the site does not want jQuery
4223
    // automatically added on all pages) then only add it if a file or setting
4224
    // that requires jQuery is being added also.
4225
    if (!$jquery_added && (variable_get('javascript_always_use_jquery', TRUE) || $options['requires_jquery'])) {
4226
      $jquery_added = TRUE;
4205 4227
      // url() generates the prefix using hook_url_outbound_alter(). Instead of
4206 4228
      // running the hook_url_outbound_alter() again here, extract the prefix
4207 4229
      // from url().
4208 4230
      url('', array('prefix' => &$prefix));
4209
      $javascript = array(
4231
      $default_javascript = array(
4210 4232
        'settings' => array(
4211 4233
          'data' => array(
4212 4234
            array('basePath' => base_path()),
......
4225 4247
          'group' => JS_LIBRARY,
4226 4248
          'every_page' => TRUE,
4227 4249
          'weight' => -1,
4250
          'requires_jquery' => TRUE,
4228 4251
          'preprocess' => TRUE,
4229 4252
          'cache' => TRUE,
4230 4253
          'defer' => FALSE,
4231 4254
        ),
4232 4255
      );
4256
      $javascript = drupal_array_merge_deep($javascript, $default_javascript);
4233 4257
      // Register all required libraries.
4234 4258
      drupal_add_library('system', 'jquery', TRUE);
4235 4259
      drupal_add_library('system', 'jquery.once', TRUE);
......
4270 4294
    'group' => JS_DEFAULT,
4271 4295
    'every_page' => FALSE,
4272 4296
    'weight' => 0,
4297
    'requires_jquery' => TRUE,
4273 4298
    'scope' => 'header',
4274 4299
    'cache' => TRUE,
4275 4300
    'defer' => FALSE,
......
4316 4341
  if (!isset($javascript)) {
4317 4342
    $javascript = drupal_add_js();
4318 4343
  }
4319
  if (empty($javascript)) {
4344

  
4345
  // If no JavaScript items have been added, or if the only JavaScript items
4346
  // that have been added are JavaScript settings (which don't do anything
4347
  // without any JavaScript code to use them), then no JavaScript code should
4348
  // be added to the page.
4349
  if (empty($javascript) || (isset($javascript['settings']) && count($javascript) == 1)) {
4320 4350
    return '';
4321 4351
  }
4322 4352

  
......
4470 4500
 *
4471 4501
 * Libraries, JavaScript, CSS and other types of custom structures are attached
4472 4502
 * to elements using the #attached property. The #attached property is an
4473
 * associative array, where the keys are the the attachment types and the values
4474
 * are the attached data. For example:
4503
 * associative array, where the keys are the attachment types and the values are
4504
 * the attached data. For example:
4475 4505
 * @code
4476 4506
 * $build['#attached'] = array(
4477 4507
 *   'js' => array(drupal_get_path('module', 'taxonomy') . '/taxonomy.js'),
drupal7/includes/database/mysql/database.inc
36 36
      // Default to TCP connection on port 3306.
37 37
      $dsn = 'mysql:host=' . $connection_options['host'] . ';port=' . (empty($connection_options['port']) ? 3306 : $connection_options['port']);
38 38
    }
39
    // Character set is added to dsn to ensure PDO uses the proper character
40
    // set when escaping. This has security implications. See
41
    // https://www.drupal.org/node/1201452 for further discussion.
42
    $dsn .= ';charset=utf8';
39 43
    $dsn .= ';dbname=' . $connection_options['database'];
40 44
    // Allow PDO options to be overridden.
41 45
    $connection_options += array(
drupal7/includes/database/query.inc
1694 1694
   * Implements Countable::count().
1695 1695
   *
1696 1696
   * Returns the size of this conditional. The size of the conditional is the
1697
   * size of its conditional array minus one, because one element is the the
1697
   * size of its conditional array minus one, because one element is the
1698 1698
   * conjunction.
1699 1699
   */
1700 1700
  public function count() {
drupal7/includes/entity.inc
28 28
   * @param $ids
29 29
   *   An array of entity IDs, or FALSE to load all entities.
30 30
   * @param $conditions
31
   *   An array of conditions in the form 'field' => $value.
31
   *   An array of conditions. Keys are field names on the entity's base table.
32
   *   Values will be compared for equality. All the comparisons will be ANDed
33
   *   together. This parameter is deprecated; use an EntityFieldQuery instead.
32 34
   *
33 35
   * @return
34 36
   *   An array of entity objects indexed by their ids. When no results are
......
236 238
   * @param $ids
237 239
   *   An array of entity IDs, or FALSE to load all entities.
238 240
   * @param $conditions
239
   *   An array of conditions in the form 'field' => $value.
241
   *   An array of conditions. Keys are field names on the entity's base table.
242
   *   Values will be compared for equality. All the comparisons will be ANDed
243
   *   together. This parameter is deprecated; use an EntityFieldQuery instead.
240 244
   * @param $revision_id
241 245
   *   The ID of the revision to load, or FALSE if this query is asking for the
242 246
   *   most current revision(s).
drupal7/includes/file.inc
1559 1559
    return FALSE;
1560 1560
  }
1561 1561

  
1562
  // Add in our check of the the file name length.
1562
  // Add in our check of the file name length.
1563 1563
  $validators['file_validate_name_length'] = array();
1564 1564

  
1565 1565
  // Call the validation functions specified by this function's caller.
drupal7/includes/form.inc
938 938
        // after the batch is processed.
939 939
      }
940 940

  
941
      // Set a flag to indicate the the form has been processed and executed.
941
      // Set a flag to indicate that the form has been processed and executed.
942 942
      $form_state['executed'] = TRUE;
943 943

  
944 944
      // Redirect the form based on values in $form_state.
......
2451 2451
    $element += array('#default_value' => array());
2452 2452
    return $element['#default_value'] + array('pass1' => '', 'pass2' => '');
2453 2453
  }
2454
  $value = array('pass1' => '', 'pass2' => '');
2455
  // Throw out all invalid array keys; we only allow pass1 and pass2.
2456
  foreach ($value as $allowed_key => $default) {
2457
    // These should be strings, but allow other scalars since they might be
2458
    // valid input in programmatic form submissions. Any nested array values
2459
    // are ignored.
2460
    if (isset($input[$allowed_key]) && is_scalar($input[$allowed_key])) {
2461
      $value[$allowed_key] = (string) $input[$allowed_key];
2462
    }
2463
  }
2464
  return $value;
2454 2465
}
2455 2466

  
2456 2467
/**
......
2494 2505
  }
2495 2506
}
2496 2507

  
2508
/**
2509
 * Determines the value for a textarea form element.
2510
 *
2511
 * @param array $element
2512
 *   The form element whose value is being populated.
2513
 * @param mixed $input
2514
 *   The incoming input to populate the form element. If this is FALSE,
2515
 *   the element's default value should be returned.
2516
 *
2517
 * @return string
2518
 *   The data that will appear in the $element_state['values'] collection
2519
 *   for this element. Return nothing to use the default.
2520
 */
2521
function form_type_textarea_value($element, $input = FALSE) {
2522
  if ($input !== FALSE) {
2523
    // This should be a string, but allow other scalars since they might be
2524
    // valid input in programmatic form submissions.
2525
    return is_scalar($input) ? (string) $input : '';
2526
  }
2527
}
2528

  
2497 2529
/**
2498 2530
 * Determines the value for a textfield form element.
2499 2531
 *
......
2509 2541
 */
2510 2542
function form_type_textfield_value($element, $input = FALSE) {
2511 2543
  if ($input !== FALSE && $input !== NULL) {
2512
    // Equate $input to the form value to ensure it's marked for
2513
    // validation.
2514
    return str_replace(array("\r", "\n"), '', $input);
2544
    // This should be a string, but allow other scalars since they might be
2545
    // valid input in programmatic form submissions.
2546
    if (!is_scalar($input)) {
2547
      $input = '';
2548
    }
2549
    return str_replace(array("\r", "\n"), '', (string) $input);
2515 2550
  }
2516 2551
}
2517 2552

  
drupal7/includes/install.inc
653 653
    if ($fp && fwrite($fp, $buffer) === FALSE) {
654 654
      throw new Exception(st('Failed to modify %settings. Verify the file permissions.', array('%settings' => $settings_file)));
655 655
    }
656
    else {
657
      // The existing settings.php file might have been included already. In
658
      // case an opcode cache is enabled, the rewritten contents of the file
659
      // will not be reflected in this process. Ensure to invalidate the file
660
      // in case an opcode cache is enabled.
661
      drupal_clear_opcode_cache(DRUPAL_ROOT . '/' . $settings_file);
662
    }
656 663
  }
657 664
  else {
658 665
    throw new Exception(st('Failed to open %settings. Verify the file permissions.', array('%settings' => $default_settings)));
drupal7/includes/language.inc
297 297
      // Add support for WCAG 2.0's Language of Parts to add language identifiers.
298 298
      // http://www.w3.org/TR/UNDERSTANDING-WCAG20/meaning-other-lang-id.html
299 299
      foreach ($result as $langcode => $link) {
300
        $result[$langcode]['attributes']['lang'] = $langcode;
300
        $result[$langcode]['attributes']['xml:lang'] = $langcode;
301 301
      }
302 302

  
303 303
      if (!empty($result)) {
drupal7/includes/locale.inc
1931 1931
      $groups[$string['group']],
1932 1932
      array('data' => check_plain(truncate_utf8($string['source'], 150, FALSE, TRUE)) . '<br /><small>' . $string['location'] . '</small>'),
1933 1933
      $string['context'],
1934
      array('data' => _locale_translate_language_list($string['languages'], $limit_language), 'align' => 'center'),
1934
      array('data' => _locale_translate_language_list($string, $limit_language), 'align' => 'center'),
1935 1935
      array('data' => l(t('edit'), "admin/config/regional/translate/edit/$lid", array('query' => drupal_get_destination())), 'class' => array('nowrap')),
1936 1936
      array('data' => l(t('delete'), "admin/config/regional/translate/delete/$lid", array('query' => drupal_get_destination())), 'class' => array('nowrap')),
1937 1937
    );
......
2126 2126
/**
2127 2127
 * List languages in search result table
2128 2128
 */
2129
function _locale_translate_language_list($translation, $limit_language) {
2129
function _locale_translate_language_list($string, $limit_language) {
2130 2130
  // Add CSS.
2131 2131
  drupal_add_css(drupal_get_path('module', 'locale') . '/locale.css');
2132 2132

  
2133
  // Include both translated and not yet translated target languages in the
2134
  // list. The source language is English for built-in strings and the default
2135
  // language for other strings.
2133 2136
  $languages = language_list();
2134
  unset($languages['en']);
2137
  $default = language_default();
2138
  $omit = $string['group'] == 'default' ? 'en' : $default->language;
2139
  unset($languages[$omit]);
2135 2140
  $output = '';
2136 2141
  foreach ($languages as $langcode => $language) {
2137 2142
    if (!$limit_language || $limit_language == $langcode) {
2138
      $output .= (!empty($translation[$langcode])) ? $langcode . ' ' : "<em class=\"locale-untranslated\">$langcode</em> ";
2143
      $output .= (!empty($string['languages'][$langcode])) ? $langcode . ' ' : "<em class=\"locale-untranslated\">$langcode</em> ";
2139 2144
    }
2140 2145
  }
2141 2146

  
drupal7/includes/menu.inc
456 456
    // Rebuild if we know it's needed, or if the menu masks are missing which
457 457
    // occurs rarely, likely due to a race condition of multiple rebuilds.
458 458
    if (variable_get('menu_rebuild_needed', FALSE) || !variable_get('menu_masks', array())) {
459
      menu_rebuild();
459
      if (_menu_check_rebuild()) {
460
        menu_rebuild();
461
      }
460 462
    }
461 463
    $original_map = arg(NULL, $path);
462 464

  
......
2693 2695
  drupal_static_reset('menu_link_get_preferred');
2694 2696
}
2695 2697

  
2698
/**
2699
 * Checks whether a menu_rebuild() is necessary.
2700
 */
2701
function _menu_check_rebuild() {
2702
  // To absolutely ensure that the menu rebuild is required, re-load the
2703
  // variables in case they were set by another process.
2704
  $variables = variable_initialize();
2705
  if (empty($variables['menu_rebuild_needed']) && !empty($variables['menu_masks'])) {
2706
    unset($GLOBALS['conf']['menu_rebuild_needed']);
2707
    $GLOBALS['conf']['menu_masks'] = $variables['menu_masks'];
2708
    return FALSE;
2709
  }
2710
  return TRUE;
2711
}
2712

  
2696 2713
/**
2697 2714
 * Populates the database tables used by various menu functions.
2698 2715
 *
......
2713 2730
    // We choose to block here since otherwise the router item may not
2714 2731
    // be available in menu_execute_active_handler() resulting in a 404.
2715 2732
    lock_wait('menu_rebuild');
2733

  
2734
    if (_menu_check_rebuild()) {
2735
      // If we get here and menu_masks was not set, then it is possible a menu
2736
      // is being reloaded, or that the process rebuilding the menu was unable
2737
      // to complete successfully. A missing menu_masks variable could result
2738
      // in a 404, so re-run the function.
2739
      return menu_rebuild();
2740
    }
2716 2741
    return FALSE;
2717 2742
  }
2718 2743

  
......
2737 2762
    $transaction->rollback();
2738 2763
    watchdog_exception('menu', $e);
2739 2764
  }
2765
  // Explicitly commit the transaction now; this ensures that the database
2766
  // operations during the menu rebuild are committed before the lock is made
2767
  // available again, since locks may not always reside in the same database
2768
  // connection. The lock is acquired outside of the transaction so should also
2769
  // be released outside of it.
2770
  unset($transaction);
2740 2771

  
2741 2772
  lock_release('menu_rebuild');
2742 2773
  return TRUE;
drupal7/includes/module.inc
265 265
/**
266 266
 * Determines whether a given module exists.
267 267
 *
268
 * @param $module
268
 * @param string $module
269 269
 *   The name of the module (without the .module extension).
270 270
 *
271
 * @return
272
 *   TRUE if the module is both installed and enabled.
271
 * @return bool
272
 *   TRUE if the module is both installed and enabled, FALSE otherwise.
273 273
 */
274 274
function module_exists($module) {
275 275
  $list = module_list();
drupal7/includes/theme.inc
1691 1691
      $output .= " </ul>\n";
1692 1692
    }
1693 1693
    else {
1694
      $output .= $messages[0];
1694
      $output .= reset($messages);
1695 1695
    }
1696 1696
    $output .= "</div>\n";
1697 1697
  }
......
2622 2622
    if (!isset($variables['page'][$region_key])) {
2623 2623
      $variables['page'][$region_key] = array();
2624 2624
    }
2625
    if ($region_content = drupal_get_region_content($region_key)) {
2626
      $variables['page'][$region_key][]['#markup'] = $region_content;
2627
    }
2625 2628
  }
2626 2629

  
2627 2630
  // Set up layout variable.
drupal7/misc/autocomplete.js
114 114
 */
115 115
Drupal.jsAC.prototype.select = function (node) {
116 116
  this.input.value = $(node).data('autocompleteValue');
117
  $(this.input).trigger('autocompleteSelect', [node]);
117 118
};
118 119

  
119 120
/**
......
167 168
Drupal.jsAC.prototype.hidePopup = function (keycode) {
168 169
  // Select item if the right key or mousebutton was pressed.
169 170
  if (this.selected && ((keycode && keycode != 46 && keycode != 8 && keycode != 27) || !keycode)) {
170
    this.input.value = $(this.selected).data('autocompleteValue');
171
    this.select(this.selected);
171 172
  }
172 173
  // Hide popup.
173 174
  var popup = this.popup;
......
220 221
  for (key in matches) {
221 222
    $('<li></li>')
222 223
      .html($('<div></div>').html(matches[key]))
223
      .mousedown(function () { ac.select(this); })
224
      .mousedown(function () { ac.hidePopup(this); })
224 225
      .mouseover(function () { ac.highlight(this); })
225 226
      .mouseout(function () { ac.unhighlight(this); })
226 227
      .data('autocompleteValue', key)
drupal7/misc/tabledrag.js
500 500
    if (self.indentEnabled) {
501 501
      var xDiff = self.currentMouseCoords.x - self.dragObject.indentMousePos.x;
502 502
      // Set the number of indentations the mouse has been moved left or right.
503
      var indentDiff = Math.round(xDiff / self.indentAmount * self.rtl);
503
      var indentDiff = Math.round(xDiff / self.indentAmount);
504 504
      // Indent the row with our estimated diff, which may be further
505 505
      // restricted according to the rows around this row.
506 506
      var indentChange = self.rowObject.indent(indentDiff);
drupal7/misc/tableselect.js
57 57
    // Keep track of the last checked checkbox.
58 58
    lastChecked = e.target;
59 59
  });
60

  
61
  // If all checkboxes are checked on page load, make sure the select-all one
62
  // is checked too, otherwise keep unchecked.
63
  updateSelectAll((checkboxes.length == $(checkboxes).filter(':checked').length));
60 64
};
61 65

  
62 66
Drupal.tableSelectRange = function (from, to, state) {
63
  // We determine the looping mode based on the the order of from and to.
67
  // We determine the looping mode based on the order of from and to.
64 68
  var mode = from.rowIndex > to.rowIndex ? 'previousSibling' : 'nextSibling';
65 69

  
66 70
  // Traverse through the sibling nodes.
drupal7/misc/vertical-tabs.js
134 134
  tabShow: function () {
135 135
    // Display the tab.
136 136
    this.item.show();
137
    // Show the vertical tabs.
138
    this.item.closest('.vertical-tabs').show();
137 139
    // Update .first marker for items. We need recurse from parent to retain the
138 140
    // actual DOM element order as jQuery implements sortOrder, but not as public
139 141
    // method.
......
164 166
    if ($firstTab.length) {
165 167
      $firstTab.data('verticalTab').focus();
166 168
    }
169
    // Hide the vertical tabs (if no tabs remain).
170
    else {
171
      this.item.closest('.vertical-tabs').hide();
172
    }
167 173
    return this;
168 174
  }
169 175
};
drupal7/modules/aggregator/aggregator.info
7 7
configure = admin/config/services/aggregator/settings
8 8
stylesheets[all][] = aggregator.css
9 9

  
10
; Information added by Drupal.org packaging script on 2015-03-18
11
version = "7.35"
10
; Information added by Drupal.org packaging script on 2015-04-02
11
version = "7.36"
12 12
project = "drupal"
13
datestamp = "1426707463"
13
datestamp = "1427943826"
14 14

  
drupal7/modules/aggregator/tests/aggregator_test.info
5 5
core = 7.x
6 6
hidden = TRUE
7 7

  
8
; Information added by Drupal.org packaging script on 2015-03-18
9
version = "7.35"
8
; Information added by Drupal.org packaging script on 2015-04-02
9
version = "7.36"
10 10
project = "drupal"
11
datestamp = "1426707463"
11
datestamp = "1427943826"
12 12

  
drupal7/modules/block/block.info
6 6
files[] = block.test
7 7
configure = admin/structure/block
8 8

  
9
; Information added by Drupal.org packaging script on 2015-03-18
10
version = "7.35"
9
; Information added by Drupal.org packaging script on 2015-04-02
10
version = "7.36"
11 11
project = "drupal"
12
datestamp = "1426707463"
12
datestamp = "1427943826"
13 13

  
drupal7/modules/block/block.module
66 66
    $demo_theme = !empty($arg[4]) ? $arg[4] : variable_get('theme_default', 'bartik');
67 67
    $themes = list_themes();
68 68
    $output = '<p>' . t('This page provides a drag-and-drop interface for assigning a block to a region, and for controlling the order of blocks within regions. Since not all themes implement the same regions, or display regions in the same way, blocks are positioned on a per-theme basis. Remember that your changes will not be saved until you click the <em>Save blocks</em> button at the bottom of the page. Click the <em>configure</em> link next to each block to configure its specific title and visibility settings.') . '</p>';
69
    $output .= '<p>' . l(t('Demonstrate block regions (@theme)', array('@theme' => $themes[$demo_theme]->info['name'])), 'admin/structure/block/demo/' . $demo_theme) . '</p>';
69
    $output .= '<p>' . l(t('Demonstrate block regions (!theme)', array('!theme' => $themes[$demo_theme]->info['name'])), 'admin/structure/block/demo/' . $demo_theme) . '</p>';
70 70
    return $output;
71 71
  }
72 72
}
......
143 143
  );
144 144
  foreach (list_themes() as $key => $theme) {
145 145
    $items['admin/structure/block/list/' . $key] = array(
146
      'title' => check_plain($theme->info['name']),
146
      'title' => $theme->info['name'],
147 147
      'page arguments' => array($key),
148 148
      'type' => $key == $default_theme ? MENU_DEFAULT_LOCAL_TASK : MENU_LOCAL_TASK,
149 149
      'weight' => $key == $default_theme ? -10 : 0,
......
162 162
      );
163 163
    }
164 164
    $items['admin/structure/block/demo/' . $key] = array(
165
      'title' => check_plain($theme->info['name']),
165
      'title' => $theme->info['name'],
166 166
      'page callback' => 'block_admin_demo',
167 167
      'page arguments' => array($key),
168 168
      'type' => MENU_CALLBACK,
......
692 692
/**
693 693
 * Loads a block object from the database.
694 694
 *
695
 * This function returns the first block matching the module and delta
696
 * parameters, so it should not be used for theme-specific functionality.
697
 *
695 698
 * @param $module
696 699
 *   Name of the module that implements the block to load.
697 700
 * @param $delta
drupal7/modules/block/block.test
75 75
    $bid = db_query("SELECT bid FROM {block_custom} WHERE info = :info", array(':info' => $custom_block['info']))->fetchField();
76 76

  
77 77
    // Check to see if the custom block was created by checking that it's in the database.
78
    $this->assertNotNull($bid, 'Custom block found in database');
78
    $this->assertTrue($bid, 'Custom block found in database');
79 79

  
80 80
    // Check that block_block_view() returns the correct title and content.
81 81
    $data = block_block_view($bid);
......
305 305
    ))->fetchField();
306 306

  
307 307
    // Check to see if the block was created by checking that it's in the database.
308
    $this->assertNotNull($bid, 'Block found in database');
308
    $this->assertTrue($bid, 'Block found in database');
309 309

  
310 310
    // Check whether the block can be moved to all available regions.
311 311
    foreach ($this->regions as $region) {
drupal7/modules/block/tests/block_test.info
5 5
core = 7.x
6 6
hidden = TRUE
7 7

  
8
; Information added by Drupal.org packaging script on 2015-03-18
9
version = "7.35"
8
; Information added by Drupal.org packaging script on 2015-04-02
9
version = "7.36"
10 10
project = "drupal"
11
datestamp = "1426707463"
11
datestamp = "1427943826"
12 12

  
drupal7/modules/block/tests/themes/block_test_theme/block_test_theme.info
13 13
regions[highlighted] = Highlighted
14 14
regions[help] = Help
15 15

  
16
; Information added by Drupal.org packaging script on 2015-03-18
17
version = "7.35"
16
; Information added by Drupal.org packaging script on 2015-04-02
17
version = "7.36"
18 18
project = "drupal"
19
datestamp = "1426707463"
19
datestamp = "1427943826"
20 20

  
drupal7/modules/blog/blog.info
5 5
core = 7.x
6 6
files[] = blog.test
7 7

  
8
; Information added by Drupal.org packaging script on 2015-03-18
9
version = "7.35"
8
; Information added by Drupal.org packaging script on 2015-04-02
9
version = "7.36"
10 10
project = "drupal"
11
datestamp = "1426707463"
11
datestamp = "1427943826"
12 12

  
drupal7/modules/book/book.info
7 7
configure = admin/content/book/settings
8 8
stylesheets[all][] = book.css
9 9

  
10
; Information added by Drupal.org packaging script on 2015-03-18
11
version = "7.35"
10
; Information added by Drupal.org packaging script on 2015-04-02
11
version = "7.36"
12 12
project = "drupal"
13
datestamp = "1426707463"
13
datestamp = "1427943826"
14 14

  
drupal7/modules/color/color.info
5 5
core = 7.x
6 6
files[] = color.test
7 7

  
8
; Information added by Drupal.org packaging script on 2015-03-18
9
version = "7.35"
8
; Information added by Drupal.org packaging script on 2015-04-02
9
version = "7.36"
10 10
project = "drupal"
11
datestamp = "1426707463"
11
datestamp = "1427943826"
12 12

  
drupal7/modules/comment/comment.info
9 9
configure = admin/content/comment
10 10
stylesheets[all][] = comment.css
11 11

  
12
; Information added by Drupal.org packaging script on 2015-03-18
13
version = "7.35"
12
; Information added by Drupal.org packaging script on 2015-04-02
13
version = "7.36"
14 14
project = "drupal"
15
datestamp = "1426707463"
15
datestamp = "1427943826"
16 16

  
drupal7/modules/comment/comment.module
2607 2607
/**
2608 2608
 * Unpublishes a comment if it contains certain keywords.
2609 2609
 *
2610
 * @param $comment
2610
 * @param object $comment
2611 2611
 *   Comment object to modify.
2612 2612
 * @param array $context
2613 2613
 *   Array with components:
......
2619 2619
 * @see comment_unpublish_by_keyword_action_submit()
2620 2620
 */
2621 2621
function comment_unpublish_by_keyword_action($comment, $context) {
2622
  $node = node_load($comment->nid);
2623
  $build = comment_view($comment, $node);
2624
  $text = drupal_render($build);
2622 2625
  foreach ($context['keywords'] as $keyword) {
2623
    $text = drupal_render($comment);
2624 2626
    if (strpos($text, $keyword) !== FALSE) {
2625 2627
      $comment->status = COMMENT_NOT_PUBLISHED;
2628
      comment_save($comment);
2626 2629
      watchdog('action', 'Unpublished comment %subject.', array('%subject' => $comment->subject));
2627 2630
      break;
2628 2631
    }
drupal7/modules/comment/comment.test
13 13
  function setUp() {
14 14
    parent::setUp('comment', 'search');
15 15
    // Create users and test node.
16
    $this->admin_user = $this->drupalCreateUser(array('administer content types', 'administer comments', 'administer blocks'));
16
    $this->admin_user = $this->drupalCreateUser(array('administer content types', 'administer comments', 'administer blocks', 'administer actions'));
17 17
    $this->web_user = $this->drupalCreateUser(array('access comments', 'post comments', 'create article content', 'edit own comments'));
18 18
    $this->node = $this->drupalCreateNode(array('type' => 'article', 'promote' => 1, 'uid' => $this->web_user->uid));
19 19
  }
......
1973 1973
    $this->clearWatchdog();
1974 1974
  }
1975 1975

  
1976
  /**
1977
   * Tests the unpublish comment by keyword action.
1978
   */
1979
  public function testCommentUnpublishByKeyword() {
1980
    $this->drupalLogin($this->admin_user);
1981
    $callback = 'comment_unpublish_by_keyword_action';
1982
    $hash = drupal_hash_base64($callback);
1983
    $comment_text = $keywords = $this->randomName();
1984
    $edit = array(
1985
      'actions_label' => $callback,
1986
      'keywords' => $keywords,
1987
    );
1988

  
1989
    $this->drupalPost("admin/config/system/actions/configure/$hash", $edit, t('Save'));
1990

  
1991
    $action = db_query("SELECT aid, type, callback, parameters, label FROM {actions} WHERE callback = :callback", array(':callback' => $callback))->fetchObject();
1992

  
1993
    $this->assertTrue($action, 'The action could be loaded.');
1994

  
1995
    $comment = $this->postComment($this->node, $comment_text, $this->randomName());
1996

  
1997
    // Load the full comment so that status is available.
1998
    $comment = comment_load($comment->id);
1999

  
2000
    $this->assertTrue($comment->status == COMMENT_PUBLISHED, 'The comment status was set to published.');
2001

  
2002
    comment_unpublish_by_keyword_action($comment, array('keywords' => array($keywords)));
2003

  
2004
    // We need to make sure that the comment has been saved with status
2005
    // unpublished.
2006
    $this->assertEqual(comment_load($comment->cid)->status, COMMENT_NOT_PUBLISHED, 'Comment was unpublished.');
2007
    $this->assertWatchdogMessage('Unpublished comment %subject.', array('%subject' => $comment->subject), 'Found watchdog message.');
2008
    $this->clearWatchdog();
2009
  }
2010

  
1976 2011
  /**
1977 2012
   * Verify that a watchdog message has been entered.
1978 2013
   *
drupal7/modules/contact/contact.info
6 6
files[] = contact.test
7 7
configure = admin/structure/contact
8 8

  
9
; Information added by Drupal.org packaging script on 2015-03-18
10
version = "7.35"
9
; Information added by Drupal.org packaging script on 2015-04-02
10
version = "7.36"
11 11
project = "drupal"
12
datestamp = "1426707463"
12
datestamp = "1427943826"
13 13

  
drupal7/modules/contact/contact.pages.inc
134 134
  global $user, $language;
135 135

  
136 136
  $values = $form_state['values'];
137
  $values['sender'] = $user;
137
  $values['sender'] = clone $user;
138 138
  $values['sender']->name = $values['name'];
139 139
  $values['sender']->mail = $values['mail'];
140 140
  $values['category'] = contact_load($values['cid']);
......
270 270
  global $user, $language;
271 271

  
272 272
  $values = $form_state['values'];
273
  $values['sender'] = $user;
273
  $values['sender'] = clone $user;
274 274
  $values['sender']->name = $values['name'];
275 275
  $values['sender']->mail = $values['mail'];
276 276

  
drupal7/modules/contextual/contextual.info
5 5
core = 7.x
6 6
files[] = contextual.test
7 7

  
8
; Information added by Drupal.org packaging script on 2015-03-18
9
version = "7.35"
8
; Information added by Drupal.org packaging script on 2015-04-02
9
version = "7.36"
10 10
project = "drupal"
11
datestamp = "1426707463"
11
datestamp = "1427943826"
12 12

  
drupal7/modules/dashboard/dashboard.info
7 7
dependencies[] = block
8 8
configure = admin/dashboard/customize
9 9

  
10
; Information added by Drupal.org packaging script on 2015-03-18
11
version = "7.35"
10
; Information added by Drupal.org packaging script on 2015-04-02
11
version = "7.36"
12 12
project = "drupal"
13
datestamp = "1426707463"
13
datestamp = "1427943826"
14 14

  
drupal7/modules/dblog/dblog.info
5 5
core = 7.x
6 6
files[] = dblog.test
7 7

  
8
; Information added by Drupal.org packaging script on 2015-03-18
9
version = "7.35"
8
; Information added by Drupal.org packaging script on 2015-04-02
9
version = "7.36"
10 10
project = "drupal"
11
datestamp = "1426707463"
11
datestamp = "1427943826"
12 12

  
drupal7/modules/field/field.api.php
1897 1897
      $items = (array) $entity->{$field_name}[$langcode];
1898 1898
      $delta_count = 0;
1899 1899
      foreach ($items as $delta => $item) {
1900
        // We now know we have someting to insert.
1900
        // We now know we have something to insert.
1901 1901
        $do_insert = TRUE;
1902 1902
        $record = array(
1903 1903
          'entity_type' => $entity_type,
drupal7/modules/field/field.info
11 11
required = TRUE
12 12
stylesheets[all][] = theme/field.css
13 13

  
14
; Information added by Drupal.org packaging script on 2015-03-18
15
version = "7.35"
14
; Information added by Drupal.org packaging script on 2015-04-02
15
version = "7.36"
16 16
project = "drupal"
17
datestamp = "1426707463"
17
datestamp = "1427943826"
18 18

  
drupal7/modules/field/field.module
894 894
      'entity' => $entity,
895 895
      'view_mode' => '_custom',
896 896
      'display' => $display,
897
      'language' => $langcode,
897 898
    );
898 899
    drupal_alter('field_attach_view', $result, $context);
899 900

  
drupal7/modules/field/modules/field_sql_storage/field_sql_storage.info
7 7
files[] = field_sql_storage.test
8 8
required = TRUE
9 9

  
10
; Information added by Drupal.org packaging script on 2015-03-18
11
version = "7.35"
10
; Information added by Drupal.org packaging script on 2015-04-02
11
version = "7.36"
12 12
project = "drupal"
13
datestamp = "1426707463"
13
datestamp = "1427943826"
14 14

  
drupal7/modules/field/modules/field_sql_storage/field_sql_storage.module
465 465
      $items = (array) $entity->{$field_name}[$langcode];
466 466
      $delta_count = 0;
467 467
      foreach ($items as $delta => $item) {
468
        // We now know we have someting to insert.
468
        // We now know we have something to insert.
469 469
        $do_insert = TRUE;
470 470
        $record = array(
471 471
          'entity_type' => $entity_type,
drupal7/modules/field/modules/list/list.info
7 7
dependencies[] = options
8 8
files[] = tests/list.test
9 9

  
10
; Information added by Drupal.org packaging script on 2015-03-18
11
version = "7.35"
10
; Information added by Drupal.org packaging script on 2015-04-02
11
version = "7.36"
12 12
project = "drupal"
13
datestamp = "1426707463"
13
datestamp = "1427943826"
14 14

  
drupal7/modules/field/modules/list/tests/list_test.info
5 5
version = VERSION
6 6
hidden = TRUE
7 7

  
8
; Information added by Drupal.org packaging script on 2015-03-18
9
version = "7.35"
8
; Information added by Drupal.org packaging script on 2015-04-02
9
version = "7.36"
10 10
project = "drupal"
11
datestamp = "1426707463"
11
datestamp = "1427943826"
12 12

  
drupal7/modules/field/modules/number/number.info
6 6
dependencies[] = field
7 7
files[] = number.test
8 8

  
9
; Information added by Drupal.org packaging script on 2015-03-18
10
version = "7.35"
9
; Information added by Drupal.org packaging script on 2015-04-02
10
version = "7.36"
11 11
project = "drupal"
12
datestamp = "1426707463"
12
datestamp = "1427943826"
13 13

  
drupal7/modules/field/modules/options/options.info
6 6
dependencies[] = field
7 7
files[] = options.test
8 8

  
9
; Information added by Drupal.org packaging script on 2015-03-18
10
version = "7.35"
9
; Information added by Drupal.org packaging script on 2015-04-02
10
version = "7.36"
11 11
project = "drupal"
12
datestamp = "1426707463"
12
datestamp = "1427943826"
13 13

  
drupal7/modules/field/modules/text/text.info
7 7
files[] = text.test
8 8
required = TRUE
9 9

  
10
; Information added by Drupal.org packaging script on 2015-03-18
11
version = "7.35"
10
; Information added by Drupal.org packaging script on 2015-04-02
11
version = "7.36"
12 12
project = "drupal"
13
datestamp = "1426707463"
13
datestamp = "1427943826"
14 14

  
drupal7/modules/field/tests/field.test
2206 2206
        'alter' => TRUE,
2207 2207
      ),
2208 2208
    );
2209
    $output = field_view_field('test_entity', $this->entity, $this->field_name, $display);
2209
    $output = field_view_field('test_entity', $this->entity, $this->field_name, $display, LANGUAGE_NONE);
2210 2210
    $this->drupalSetContent(drupal_render($output));
2211 2211
    $setting = $display['settings']['test_formatter_setting_multiple'];
2212 2212
    $this->assertNoText($this->label, 'Label was not displayed.');
2213 2213
    $this->assertText('field_test_field_attach_view_alter', 'Alter fired, display passed.');
2214
    $this->assertText('field language is ' . LANGUAGE_NONE, 'Language is placed onto the context.');
2214 2215
    $array = array();
2215 2216
    foreach ($this->values as $delta => $value) {
2216 2217
      $array[] = $delta . ':' . $value['value'];
drupal7/modules/field/tests/field_test.info
6 6
version = VERSION
7 7
hidden = TRUE
8 8

  
9
; Information added by Drupal.org packaging script on 2015-03-18
10
version = "7.35"
9
; Information added by Drupal.org packaging script on 2015-04-02
10
version = "7.36"
11 11
project = "drupal"
12
datestamp = "1426707463"
12
datestamp = "1427943826"
13 13

  
drupal7/modules/field/tests/field_test.module
220 220
  if (!empty($context['display']['settings']['alter'])) {
221 221
    $output['test_field'][] = array('#markup' => 'field_test_field_attach_view_alter');
222 222
  }
223

  
224
  if (isset($output['test_field'])) {
225
    $output['test_field'][] = array('#markup' => 'field language is ' . $context['language']);
226
  }
223 227
}
224 228

  
225 229
/**
drupal7/modules/field_ui/field_ui.info
6 6
dependencies[] = field
7 7
files[] = field_ui.test
8 8

  
9
; Information added by Drupal.org packaging script on 2015-03-18
10
version = "7.35"
9
; Information added by Drupal.org packaging script on 2015-04-02
10
version = "7.36"
11 11
project = "drupal"
12
datestamp = "1426707463"
12
datestamp = "1427943826"
13 13

  
drupal7/modules/field_ui/field_ui.js
168 168
    var dragObject = this;
169 169
    var row = dragObject.rowObject.element;
170 170
    var rowHandler = $(row).data('fieldUIRowHandler');
171
    if (rowHandler !== undefined) {
171
    if (typeof rowHandler !== 'undefined') {
172 172
      var regionRow = $(row).prevAll('tr.region-message').get(0);
173 173
      var region = regionRow.className.replace(/([^ ]+[ ]+)*region-([^ ]+)-message([ ]+[^ ]+)*/, '$2');
174 174

  
......
319 319
        if (currentValue == 'hidden') {
320 320
          // Restore the formatter back to the default formatter. Pseudo-fields do
321 321
          // not have default formatters, we just return to 'visible' for those.
322
          var value = (this.defaultFormatter != undefined) ? this.defaultFormatter : 'visible';
322
          var value = (typeof this.defaultFormatter !== 'undefined') ? this.defaultFormatter : this.$formatSelect.find('option').val();
323 323
        }
324 324
        break;
325 325

  
drupal7/modules/file/file.field.inc
252 252
 * Checks for files that have been removed from the object.
253 253
 */
254 254
function file_field_update($entity_type, $entity, $field, $instance, $langcode, &$items) {
255
  // Check whether the field is defined on the object.
256
  if (!isset($entity->{$field['field_name']})) {
257
    // We cannot check for removed files if the field is not defined.
258
    return;
259
  }
260

  
255 261
  list($id, $vid, $bundle) = entity_extract_ids($entity_type, $entity);
256 262

  
257 263
  // On new revisions, all files are considered to be a new usage and no
drupal7/modules/file/file.info
6 6
dependencies[] = field
7 7
files[] = tests/file.test
8 8

  
9
; Information added by Drupal.org packaging script on 2015-03-18
10
version = "7.35"
9
; Information added by Drupal.org packaging script on 2015-04-02
10
version = "7.36"
11 11
project = "drupal"
12
datestamp = "1426707463"
12
datestamp = "1427943826"
13 13

  
drupal7/modules/file/file.module
357 357
 * support for a default value.
358 358
 */
359 359
function file_managed_file_process($element, &$form_state, $form) {
360
  // Append the '-upload' to the #id so the field label's 'for' attribute
361
  // corresponds with the file element.
362
  $original_id = $element['#id'];
363
  $element['#id'] .= '-upload';
360 364
  $fid = isset($element['#value']['fid']) ? $element['#value']['fid'] : 0;
361 365

  
362 366
  // Set some default element properties.
......
366 370

  
367 371
  $ajax_settings = array(
368 372
    'path' => 'file/ajax/' . implode('/', $element['#array_parents']) . '/' . $form['form_build_id']['#value'],
369
    'wrapper' => $element['#id'] . '-ajax-wrapper',
373
    'wrapper' => $original_id . '-ajax-wrapper',
370 374
    'effect' => 'fade',
371 375
    'progress' => array(
372 376
      'type' => $element['#progress_indicator'],
......
461 465
    $element['upload']['#attached']['js'] = array(
462 466
      array(
463 467
        'type' => 'setting',
464
        'data' => array('file' => array('elements' => array('#' . $element['#id'] . '-upload' => $extension_list)))
468
        'data' => array('file' => array('elements' => array('#' . $element['#id'] => $extension_list)))
465 469
      )
466 470
    );
467 471
  }
468 472

  
469 473
  // Prefix and suffix used for Ajax replacement.
470
  $element['#prefix'] = '<div id="' . $element['#id'] . '-ajax-wrapper">';
474
  $element['#prefix'] = '<div id="' . $original_id . '-ajax-wrapper">';
471 475
  $element['#suffix'] = '</div>';
472 476

  
473 477
  return $element;
......
515 519
      // public file) to confirm it exists and that the current user has access
516 520
      // to it.
517 521
      if (isset($input['fid']) && ($file = file_load($input['fid']))) {
518
        if (file_uri_scheme($file->uri) == 'public' || file_download_access($file->uri)) {
522
        // By default the public:// file scheme provided by Drupal core is the
523
        // only one that allows files to be publicly accessible to everyone, so
524
        // it is the only one for which the file access checks are bypassed.
525
        // Other modules which provide publicly accessible streams of their own
526
        // in hook_stream_wrappers() can add the corresponding scheme to the
527
        // 'file_public_schema' variable to bypass file access checks for those
... Ce différentiel a été tronqué car il excède la taille maximale pouvant être affichée.

Formats disponibles : Unified diff