diff --git a/core/includes/errors.inc b/core/includes/errors.inc index 4aa43c9..bd7b0e1 100644 --- a/core/includes/errors.inc +++ b/core/includes/errors.inc @@ -108,8 +108,8 @@ function _drupal_decode_exception($exception) { // For PDOException errors, we try to return the initial caller, // skipping internal functions of the database layer. if ($exception instanceof PDOException) { - // The first element in the stack is the call, - // the second element gives us the caller. + // The first element in the stack is the call, the second element gives us + // the caller. // We skip calls that occurred in one of the classes of the database layer // or in one of its global functions. $db_functions = array('db_query', 'db_query_range'); @@ -185,8 +185,8 @@ function error_displayable($error = NULL) { */ function _drupal_log_error($error, $fatal = FALSE) { // Initialize a maintenance theme if the boostrap was not complete. - // Do it early because drupal_set_message() - // triggers a drupal_theme_initialize(). + // Do it early because drupal_set_message() triggers a + // drupal_theme_initialize(). if ($fatal && (drupal_get_bootstrap_phase() != DRUPAL_BOOTSTRAP_FULL)) { unset($GLOBALS['theme']); if (!defined('MAINTENANCE_MODE')) { @@ -254,8 +254,8 @@ function _drupal_log_error($error, $fatal = FALSE) { if ($fatal) { drupal_set_title(t('Error')); - // We fallback to a maintenance page at this point, - // because the page generation itself can generate errors. + // We fallback to a maintenance page at this point, because the page + // generation itself can generate errors. print theme('maintenance_page', array('content' => t('The website encountered an unexpected error. Please try again later.'))); exit; } diff --git a/core/includes/file.inc b/core/includes/file.inc index 3ef06af..538bcca 100644 --- a/core/includes/file.inc +++ b/core/includes/file.inc @@ -827,11 +827,15 @@ function file_usage_delete(stdClass $file, $module, $type = NULL, $id = NULL, $c function file_copy(stdClass $source, $destination = NULL, $replace = FILE_EXISTS_RENAME) { if (!file_valid_uri($destination)) { if (($realpath = drupal_realpath($source->uri)) !== FALSE) { - watchdog('file', 'File %file (%realpath) could not be copied because the destination %destination is invalid. This is often caused by improper use of file_copy() or a missing stream wrapper.', array( - '%file' => $source->uri, - '%realpath' => $realpath, - '%destination' => $destination, - )); + watchdog( + 'file', + 'File %file (%realpath) could not be copied because the destination %destination is invalid. This is often caused by improper use of file_copy() or a missing stream wrapper.', + array( + '%file' => $source->uri, + '%realpath' => $realpath, + '%destination' => $destination, + ) + ); } else { watchdog('file', 'File %file could not be copied because the destination %destination is invalid. This is often caused by improper use of file_copy() or a missing stream wrapper.', array('%file' => $source->uri, '%destination' => $destination)); @@ -1080,11 +1084,15 @@ function file_destination($destination, $replace) { function file_move(stdClass $source, $destination = NULL, $replace = FILE_EXISTS_RENAME) { if (!file_valid_uri($destination)) { if (($realpath = drupal_realpath($source->uri)) !== FALSE) { - watchdog('file', 'File %file (%realpath) could not be moved because the destination %destination is invalid. This may be caused by improper use of file_move() or a missing stream wrapper.', array( - '%file' => $source->uri, - '%realpath' => $realpath, - '%destination' => $destination, - )); + watchdog( + 'file', + 'File %file (%realpath) could not be moved because the destination %destination is invalid. This may be caused by improper use of file_move() or a missing stream wrapper.', + array( + '%file' => $source->uri, + '%realpath' => $realpath, + '%destination' => $destination, + ) + ); } else { watchdog('file', 'File %file could not be moved because the destination %destination is invalid. This may be caused by improper use of file_move() or a missing stream wrapper.', array('%file' => $source->uri, '%destination' => $destination)); @@ -2123,8 +2131,8 @@ function file_scan_directory($dir, $mask, $options = array(), $depth = 0) { $uri = "$dir/$filename"; $uri = file_stream_wrapper_uri_normalize($uri); if (is_dir($uri) && $options['recurse']) { - // Give priority to files in this folder by - // merging them in after any subdirectory files. + // Give priority to files in this folder by merging them in after any + // subdirectory files. $files = array_merge(file_scan_directory($uri, $mask, $options, $depth + 1), $files); } elseif ($depth >= $options['min_depth'] && preg_match($mask, $filename)) { @@ -2555,11 +2563,14 @@ function file_get_content_headers($file) { $name = mime_header_encode($file->filename); $type = mime_header_encode($file->filemime); // Serve images, text, and flash content for display rather than download. - $inline_types = variable_get('file_inline_types', array( - '^text/', - '^image/', - 'flash$', - )); + $inline_types = variable_get( + 'file_inline_types', + array( + '^text/', + '^image/', + 'flash$', + ) + ); $disposition = 'attachment'; foreach ($inline_types as $inline_type) { // Exclamation marks are used as delimiters to avoid escaping slashes. diff --git a/core/includes/form.inc b/core/includes/form.inc index 9f66ba5..28914a0 100644 --- a/core/includes/form.inc +++ b/core/includes/form.inc @@ -4056,7 +4056,18 @@ function theme_number($variables) { $element = $variables['element']; $element['#attributes']['type'] = 'number'; - element_set_attributes($element, array('id', 'name', 'value', 'step', 'min', 'max', 'placeholder')); + element_set_attributes( + $element, + array( + 'id', + 'name', + 'value', + 'step', + 'min', + 'max', + 'placeholder', + ) + ); _form_set_class($element, array('form-number')); $output = ''; @@ -4902,8 +4913,8 @@ function batch_process($redirect = NULL, $url = 'batch', $redirect_callback = 'd )) ->execute(); - // Set the batch number in the session - // to guarantee that it will stay alive. + // Set the batch number in the session to guarantee that it will stay + // alive. $_SESSION['batches'][$batch['id']] = TRUE; // Redirect for processing. diff --git a/core/includes/gettext.inc b/core/includes/gettext.inc index 528f972..cd7f9cc 100644 --- a/core/includes/gettext.inc +++ b/core/includes/gettext.inc @@ -64,18 +64,26 @@ function _locale_import_po($file, $langcode, $overwrite_options, $customized = L // Rebuild the menu, strings may have changed. menu_router_rebuild(); - drupal_set_message(t('The translation was successfully imported. There are %number newly created translated strings, %update strings were updated and %delete strings were removed.', array( - '%number' => $additions, - '%update' => $updates, - '%delete' => $deletes, - ))); - watchdog('locale', 'Imported %file into %locale: %number new strings added, %update updated and %delete removed.', array( - '%file' => $file->filename, - '%locale' => $langcode, - '%number' => $additions, - '%update' => $updates, - '%delete' => $deletes, - )); + drupal_set_message( + t('The translation was successfully imported. There are %number newly created translated strings, %update strings were updated and %delete strings were removed.', + array( + '%number' => $additions, + '%update' => $updates, + '%delete' => $deletes, + ) + ) + ); + watchdog( + 'locale', + 'Imported %file into %locale: %number new strings added, %update updated and %delete removed.', + array( + '%file' => $file->filename, + '%locale' => $langcode, + '%number' => $additions, + '%update' => $updates, + '%delete' => $deletes, + ) + ); if ($skips) { if (module_exists('dblog')) { $skip_message = format_plural($skips, 'A translation string was skipped because of disallowed or malformed HTML. See the log for details.', '@count translation strings were skipped because of disallowed or malformed HTML. See the log for details.', array('@url' => url('admin/reports/dblog'))); @@ -386,12 +394,15 @@ function _locale_import_message($message, $file, $lineno = NULL) { * Use LOCALE_CUSTOMIZED or LOCALE_NOT_CUSTOMIZED. */ function _locale_import_one_string($op, $value = NULL, $overwrite_options = NULL, $lang = NULL, $file = NULL, $customized = LOCALE_NOT_CUSTOMIZED) { - $report = &drupal_static(__FUNCTION__, array( - 'additions' => 0, - 'updates' => 0, - 'deletes' => 0, - 'skips' => 0, - )); + $report = &drupal_static( + __FUNCTION__, + array( + 'additions' => 0, + 'updates' => 0, + 'deletes' => 0, + 'skips' => 0, + ) + ); $header_done = &drupal_static(__FUNCTION__ . ':header_done', FALSE); $strings = &drupal_static(__FUNCTION__ . ':strings', array()); @@ -701,8 +712,8 @@ function _locale_import_parse_arithmetic($string) { } elseif (!empty($precedence[$current_token])) { // If it's an operator, then pop from $operator_stack into $element_stack - // until the precedence in $operator_stack is less than current, - // then push into $operator_stack. + // until the precedence in $operator_stack is less than current, then push + // into $operator_stack. $topop = array_pop($operator_stack); while (isset($topop) && ($precedence[$topop] >= $precedence[$current_token]) && !(($precedence[$topop] == $precedence[$current_token]) && !empty($right_associativity[$topop]) && !empty($right_associativity[$current_token]))) { $element_stack[] = $topop;