Skip to content

Commit

Permalink
Update core + modules
Browse files Browse the repository at this point in the history
  • Loading branch information
cableman committed Aug 13, 2011
1 parent a1fc6bb commit 3cf2717
Show file tree
Hide file tree
Showing 659 changed files with 36,539 additions and 13,854 deletions.
25 changes: 7 additions & 18 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@
*.esproj
*.kpf
*.tmproj
.cache
.project
.settings
*/_notes
nbproject
.DS_Store
._*
/sites/default/settings.php
/sites/default/files
/files
/backup
/backups
CVS
*.patch
*~
# Ignore configuration files that may contain sensitive information.
sites/*/settings*.php

# Ignore paths that contain user-generated content.
sites/*/files
sites/*/private
/nbproject/private/
43 changes: 43 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,44 @@

Drupal 7.7, 2011-07-27
----------------------
- Fixed VERSION string.

Drupal 7.6, 2011-07-27
----------------------
- Fixed support for remote streamwrappers.
- AJAX now binds to 'click' instead of 'mousedown'.
- 'Translatable' flag on fields created in UI now defaults to FALSE, to match those created via the API.
- Performance enhancement to permissions page on large numbers of permissions.
- More secure password generation.
- Fix for temporary directory on Windows servers.
- run-tests.sh now uses proc_open() instead of pcntl_fork() for better Windows support.
- Numerous upgrade path fixes.
- Numerous documentation fixes.
- Numerous notice fixes.
- Numerous fixes to improve PHP 5.4 support.
- Numerous RTL improvements.

Drupal 7.5, 2011-07-27
----------------------
- Fixed security issue (Access bypass), see SA-CORE-2011-003.

Drupal 7.4, 2011-06-29
----------------------
- Rolled back patch that caused fatal errors in CTools, Feeds, and other modules using the class registry.
- Fixed critical bug with saving default images.
- Fixed fatal errors when uninstalling some modules.
- Added workaround for MySQL transaction support breaking on DDL statments.
- Improved page caching with external caching systems.
- Fix to Batch API, which was terminating too early.
- Numerous upgrade path fixes.
- Performance fixes.
- Additional test coverage.
- Numerous documentation fixes.

Drupal 7.3, 2011-06-29
----------------------
- Fixed security issue (Access bypass), see SA-CORE-2011-002.

Drupal 7.2, 2011-05-25
----------------------
- Added a default .gitignore file.
Expand Down Expand Up @@ -236,6 +276,9 @@ Drupal 7.0, 2011-01-05
* Added a locking framework to coordinate long-running operations across
requests.

Drupal 6.23-dev, xxxx-xx-xx (development release)
-----------------------

Drupal 6.22, 2011-05-25
-----------------------
- Made Drupal 6 work better with IIS and Internet Explorer.
Expand Down
1 change: 1 addition & 0 deletions MAINTAINERS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ Node module
- David Strauss 'David Strauss' <http://drupal.org/user/93254>

OpenID module
- Vojtech Kusy 'wojtha' <http://drupal.org/user/56154>
- Heine Deelstra 'Heine' <http://drupal.org/user/17943>
- Christian Schmidt 'c960657' <http://drupal.org/user/216078>
- Damien Tournoud 'DamZ' <http://drupal.org/user/22211>
Expand Down
39 changes: 34 additions & 5 deletions includes/ajax.inc
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,21 @@
* - #ajax['event']: The JavaScript event to respond to. This is normally
* selected automatically for the type of form widget being used, and
* is only needed if you need to override the default behavior.
* - #ajax['prevent']: A JavaScript event to prevent when 'event' is triggered.
* Defaults to 'click' for #ajax on #type 'submit', 'button', and
* 'image_button'. Multiple events may be specified separated by spaces.
* For example, when binding #ajax behaviors to form buttons, pressing the
* ENTER key within a textfield triggers the 'click' event of the form's first
* submit button. Triggering Ajax in this situation leads to problems, like
* breaking autocomplete textfields. Because of that, Ajax behaviors are bound
* to the 'mousedown' event on form buttons by default. However, binding to
* 'mousedown' rather than 'click' means that it is possible to trigger a
* click by pressing the mouse, holding the mouse button down until the Ajax
* request is complete and the button is re-enabled, and then releasing the
* mouse button. For this case, 'prevent' can be set to 'click', so an
* additional event handler is bound to prevent such a click from triggering a
* non-Ajax form submission. This also prevents a textfield's ENTER press
* triggering a button's non-Ajax form submission behavior.
* - #ajax['method']: The jQuery method to use to place the new HTML.
* Defaults to 'replaceWith'. May be: 'replaceWith', 'append', 'prepend',
* 'before', 'after', or 'html'. See the
Expand Down Expand Up @@ -591,6 +606,7 @@ function ajax_process_form($element, &$form_state) {
* An associative array containing the properties of the element.
* Properties used:
* - #ajax['event']
* - #ajax['prevent']
* - #ajax['path']
* - #ajax['options']
* - #ajax['wrapper']
Expand Down Expand Up @@ -619,13 +635,26 @@ function ajax_pre_render_element($element) {
case 'submit':
case 'button':
case 'image_button':
// Use the mousedown instead of the click event because form
// submission via pressing the enter key triggers a click event on
// submit inputs, inappropriately triggering Ajax behaviors.
// Pressing the ENTER key within a textfield triggers the click event of
// the form's first submit button. Triggering Ajax in this situation
// leads to problems, like breaking autocomplete textfields, so we bind
// to mousedown instead of click.
// @see http://drupal.org/node/216059
$element['#ajax']['event'] = 'mousedown';
// Attach an additional event handler so that Ajax behaviors
// can be triggered still via keyboard input.
// Retain keyboard accessibility by setting 'keypress'. This causes
// ajax.js to trigger 'event' when SPACE or ENTER are pressed while the
// button has focus.
$element['#ajax']['keypress'] = TRUE;
// Binding to mousedown rather than click means that it is possible to
// trigger a click by pressing the mouse, holding the mouse button down
// until the Ajax request is complete and the button is re-enabled, and
// then releasing the mouse button. Set 'prevent' so that ajax.js binds
// an additional handler to prevent such a click from triggering a
// non-Ajax form submission. This also prevents a textfield's ENTER
// press triggering this button's non-Ajax form submission behavior.
if (!isset($element['#ajax']['prevent'])) {
$element['#ajax']['prevent'] = 'click';
}
break;

case 'password':
Expand Down
4 changes: 2 additions & 2 deletions includes/authorize.inc
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ function _authorize_filetransfer_connection_settings_set_defaults(&$element, $ke
function authorize_filetransfer_form_validate($form, &$form_state) {
// Only validate the form if we have collected all of the user input and are
// ready to proceed with updating or installing.
if ($form_state['clicked_button']['#name'] != 'process_updates') {
if ($form_state['triggering_element']['#name'] != 'process_updates') {
return;
}

Expand Down Expand Up @@ -224,7 +224,7 @@ function authorize_filetransfer_form_validate($form, &$form_state) {
*/
function authorize_filetransfer_form_submit($form, &$form_state) {
global $base_url;
switch ($form_state['clicked_button']['#name']) {
switch ($form_state['triggering_element']['#name']) {
case 'process_updates':

// Save the connection settings to the DB.
Expand Down
18 changes: 16 additions & 2 deletions includes/batch.inc
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,8 @@ function _batch_process() {
$progress_message = $old_set['progress_message'];
}

// Total progress is the number of operations that have fully run plus the
// completion level of the current operation.
$current = $total - $remaining + $finished;
$percentage = _batch_api_percentage($total, $current);
$elapsed = isset($current_set['elapsed']) ? $current_set['elapsed'] : 0;
Expand Down Expand Up @@ -373,7 +375,10 @@ function _batch_process() {
* @param $total
* The total number of operations.
* @param $current
* The number of the current operation.
* The number of the current operation. This may be a floating point number
* rather than an integer in the case of a multi-step operation that is not
* yet complete; in that case, the fractional part of $current represents the
* fraction of the operation that has been completed.
* @return
* The properly formatted percentage, as a string. We output percentages
* using the correct number of decimal places so that we never print "100%"
Expand All @@ -390,7 +395,16 @@ function _batch_api_percentage($total, $current) {
// We add a new digit at 200, 2000, etc. (since, for example, 199/200
// would round up to 100% if we didn't).
$decimal_places = max(0, floor(log10($total / 2.0)) - 1);
$percentage = sprintf('%01.' . $decimal_places . 'f', round($current / $total * 100, $decimal_places));
do {
// Calculate the percentage to the specified number of decimal places.
$percentage = sprintf('%01.' . $decimal_places . 'f', round($current / $total * 100, $decimal_places));
// When $current is an integer, the above calculation will always be
// correct. However, if $current is a floating point number (in the case
// of a multi-step batch operation that is not yet complete), $percentage
// may be erroneously rounded up to 100%. To prevent that, we add one
// more decimal place and try again.
$decimal_places++;
} while ($percentage == '100');
}
return $percentage;
}
Expand Down
Loading

0 comments on commit 3cf2717

Please sign in to comment.