Skip to content

Commit

Permalink
Merge Drupal 6.22
Browse files Browse the repository at this point in the history
  • Loading branch information
davidstrauss committed May 26, 2011
2 parents 8236d65 + 51b5835 commit 12f28bf
Show file tree
Hide file tree
Showing 339 changed files with 254 additions and 493 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.txt
Original file line number Original file line Diff line number Diff line change
@@ -1,4 +1,11 @@


Drupal 6.22, 2011-05-25
----------------------
- Made Drupal 6 work better with IIS and Internet Explorer.
- Fixed .po file imports to work better with custom textgroups.
- Improved code documentation at various places.
- Fixed a variety of other bugs.

Drupal 6.21, 2011-05-25 Drupal 6.21, 2011-05-25
---------------------- ----------------------
- Fixed security issues (Cross site scripting), see SA-CORE-2011-001. - Fixed security issues (Cross site scripting), see SA-CORE-2011-001.
Expand Down
1 change: 0 additions & 1 deletion COPYRIGHT.txt
Original file line number Original file line Diff line number Diff line change
@@ -1,4 +1,3 @@
// $Id$


All Drupal code is Copyright 2001 - 2010 by the original authors. All Drupal code is Copyright 2001 - 2010 by the original authors.


Expand Down
1 change: 0 additions & 1 deletion INSTALL.mysql.txt
Original file line number Original file line Diff line number Diff line change
@@ -1,4 +1,3 @@
// $Id$


CREATE THE MySQL DATABASE CREATE THE MySQL DATABASE
-------------------------- --------------------------
Expand Down
1 change: 0 additions & 1 deletion INSTALL.pgsql.txt
Original file line number Original file line Diff line number Diff line change
@@ -1,4 +1,3 @@
// $Id$


CREATE THE PostgreSQL DATABASE CREATE THE PostgreSQL DATABASE
------------------------------ ------------------------------
Expand Down
1 change: 0 additions & 1 deletion INSTALL.txt
Original file line number Original file line Diff line number Diff line change
@@ -1,4 +1,3 @@
// $Id$


CONTENTS OF THIS FILE CONTENTS OF THIS FILE
--------------------- ---------------------
Expand Down
1 change: 0 additions & 1 deletion MAINTAINERS.txt
Original file line number Original file line Diff line number Diff line change
@@ -1,4 +1,3 @@
// $Id$


List of maintainers List of maintainers
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion UPGRADE.txt
Original file line number Original file line Diff line number Diff line change
@@ -1,4 +1,3 @@
// $Id$


UPGRADING UPGRADING
--------- ---------
Expand Down
1 change: 0 additions & 1 deletion cron.php
Original file line number Original file line Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php <?php
// $Id$


/** /**
* @file * @file
Expand Down
1 change: 0 additions & 1 deletion includes/actions.inc
Original file line number Original file line Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php <?php
// $Id$


/** /**
* @file * @file
Expand Down
3 changes: 1 addition & 2 deletions includes/batch.inc
Original file line number Original file line Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php <?php
// $Id$


/** /**
* @file Batch processing API for processes to run in multiple HTTP requests. * @file Batch processing API for processes to run in multiple HTTP requests.
Expand Down Expand Up @@ -245,7 +244,7 @@ function _batch_process() {
'@percentage' => $percentage, '@percentage' => $percentage,
); );
$message = strtr($progress_message, $values) .'<br/>'; $message = strtr($progress_message, $values) .'<br/>';
$message .= $task_message ? $task_message : '&nbsp'; $message .= $task_message ? $task_message : '&nbsp;';


return array($percentage, $message); return array($percentage, $message);
} }
Expand Down
1 change: 0 additions & 1 deletion includes/bootstrap.inc
Original file line number Original file line Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php <?php
// $Id$


/** /**
* @file * @file
Expand Down
1 change: 0 additions & 1 deletion includes/cache-install.inc
Original file line number Original file line Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php <?php
// $Id$


/** /**
* A stub cache implementation to be used during the installation * A stub cache implementation to be used during the installation
Expand Down
1 change: 0 additions & 1 deletion includes/cache.inc
Original file line number Original file line Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php <?php
// $Id$


/** /**
* Return data from the persistent cache. Data may be stored as either plain text or as serialized data. * Return data from the persistent cache. Data may be stored as either plain text or as serialized data.
Expand Down
6 changes: 3 additions & 3 deletions includes/common.inc
Original file line number Original file line Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php <?php
// $Id$


/** /**
* @file * @file
Expand Down Expand Up @@ -194,7 +193,7 @@ function drupal_get_feeds($delimiter = "\n") {
} }


/** /**
* @name HTTP handling * @defgroup http_handling HTTP handling
* @{ * @{
* Functions to properly handle HTTP responses. * Functions to properly handle HTTP responses.
*/ */
Expand Down Expand Up @@ -1642,7 +1641,8 @@ function drupal_page_footer() {
* A linear array. * A linear array.
* @param $function * @param $function
* A name of a function to apply to all values before output. * A name of a function to apply to all values before output.
* @result *
* @return
* An associative array. * An associative array.
*/ */
function drupal_map_assoc($array, $function = NULL) { function drupal_map_assoc($array, $function = NULL) {
Expand Down
1 change: 0 additions & 1 deletion includes/database.inc
Original file line number Original file line Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php <?php
// $Id$


/** /**
* @file * @file
Expand Down
3 changes: 1 addition & 2 deletions includes/database.mysql-common.inc
Original file line number Original file line Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php <?php
// $Id$


/** /**
* @file * @file
Expand Down Expand Up @@ -290,7 +289,7 @@ function db_drop_table(&$ret, $table) {
* table along with adding the field. The format is the same as a * table along with adding the field. The format is the same as a
* table specification but without the 'fields' element. If you are * table specification but without the 'fields' element. If you are
* adding a type 'serial' field, you MUST specify at least one key * adding a type 'serial' field, you MUST specify at least one key
* or index including it in this array. @see db_change_field for more * or index including it in this array. See db_change_field() for more
* explanation why. * explanation why.
*/ */
function db_add_field(&$ret, $table, $field, $spec, $keys_new = array()) { function db_add_field(&$ret, $table, $field, $spec, $keys_new = array()) {
Expand Down
1 change: 0 additions & 1 deletion includes/database.mysql.inc
Original file line number Original file line Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php <?php
// $Id$


/** /**
* @file * @file
Expand Down
1 change: 0 additions & 1 deletion includes/database.mysqli.inc
Original file line number Original file line Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php <?php
// $Id$


/** /**
* @file * @file
Expand Down
3 changes: 1 addition & 2 deletions includes/database.pgsql.inc
Original file line number Original file line Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php <?php
// $Id$


/** /**
* @file * @file
Expand Down Expand Up @@ -720,7 +719,7 @@ function db_drop_table(&$ret, $table) {
* table along with adding the field. The format is the same as a * table along with adding the field. The format is the same as a
* table specification but without the 'fields' element. If you are * table specification but without the 'fields' element. If you are
* adding a type 'serial' field, you MUST specify at least one key * adding a type 'serial' field, you MUST specify at least one key
* or index including it in this array. @see db_change_field for more * or index including it in this array. See db_change_field() for more
* explanation why. * explanation why.
*/ */
function db_add_field(&$ret, $table, $field, $spec, $new_keys = array()) { function db_add_field(&$ret, $table, $field, $spec, $new_keys = array()) {
Expand Down
47 changes: 34 additions & 13 deletions includes/file.inc
Original file line number Original file line Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php <?php
// $Id$


/** /**
* @file * @file
Expand Down Expand Up @@ -121,17 +120,28 @@ function file_create_path($dest = 0) {
} }


/** /**
* Check that the directory exists and is writable. Directories need to * Checks whether a directory exists and is writable.
* have execute permissions to be considered a directory by FTP servers, etc.
* *
* @param $directory A string containing the name of a directory path. * Furthermore, the directory can optionally be created if it does not exist,
* @param $mode A Boolean value to indicate if the directory should be created * and/or be set to writable if it is currently not. Directories need to have
* if it does not exist or made writable if it is read-only. * execute permission to be considered a directory by FTP servers.
* @param $form_item An optional string containing the name of a form item that *
* any errors will be attached to. This is useful for settings forms that * @param $directory
* require the user to specify a writable directory. If it can't be made to * A string representing the directory path.
* work, a form error will be set preventing them from saving the settings. * @param $mode
* @return FALSE when directory not found, or TRUE when directory exists. * An optional bitmask containing the actions, if any, to be carried out on
* the directory. Any combination of the actions FILE_CREATE_DIRECTORY and
* FILE_MODIFY_PERMISSIONS is allowed.
* @param $form_item
* An optional string containing the name of a form item that any errors
* will be attached to. Useful when the function validates a directory path
* entered as a form value. An error will consequently prevent form submit
* handlers from running, and instead display the form along with the
* error messages.
*
* @return
* FALSE if the directory does not exist or is not writable, even after
* any optional actions have been carried out. Otherwise, TRUE is returned.
*/ */
function file_check_directory(&$directory, $mode = 0, $form_item = NULL) { function file_check_directory(&$directory, $mode = 0, $form_item = NULL) {
$directory = rtrim($directory, '/\\'); $directory = rtrim($directory, '/\\');
Expand Down Expand Up @@ -696,9 +706,12 @@ function file_validate_name_length($file) {
* @param $file * @param $file
* A Drupal file object. * A Drupal file object.
* @param $extensions * @param $extensions
* A string with a space separated * A string with a space separated list of allowed file extensions, not
* including the period. For example, 'bmp jpg gif png'.
*
* @return * @return
* An array. If the file extension is not allowed, it will contain an error message. * An array. If the file extension is not allowed, it will contain an error
* message.
*/ */
function file_validate_extensions($file, $extensions) { function file_validate_extensions($file, $extensions) {
global $user; global $user;
Expand Down Expand Up @@ -879,6 +892,14 @@ function file_transfer($source, $headers) {
if (ob_get_level()) { if (ob_get_level()) {
ob_end_clean(); ob_end_clean();
} }

// IE cannot download private files because it cannot store files downloaded
// over https in the browser cache. The problem can be solved by sending
// custom headers to IE. See http://support.microsoft.com/kb/323308/en-us
if (isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] == 'on')) {
drupal_set_header('Cache-Control: private');
drupal_set_header('Pragma: private');
}


foreach ($headers as $header) { foreach ($headers as $header) {
// To prevent HTTP header injection, we delete new lines that are // To prevent HTTP header injection, we delete new lines that are
Expand Down
1 change: 0 additions & 1 deletion includes/form.inc
Original file line number Original file line Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php <?php
// $Id$


/** /**
* @defgroup forms Form builder functions * @defgroup forms Form builder functions
Expand Down
1 change: 0 additions & 1 deletion includes/image.gd.inc
Original file line number Original file line Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php <?php
// $Id$


/** /**
* @file * @file
Expand Down
5 changes: 3 additions & 2 deletions includes/image.inc
Original file line number Original file line Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php <?php
// $Id$


/** /**
* @file * @file
Expand Down Expand Up @@ -114,7 +113,9 @@ function image_toolkit_invoke($method, $params = array()) {
* 'file_size' - File size in bytes. * 'file_size' - File size in bytes.
*/ */
function image_get_info($file) { function image_get_info($file) {
if (!is_file($file) && !is_uploaded_file($filepath)) { // Proceed no further if this file doesn't exist. Some web servers (IIS) may
// not pass is_file() for newly uploaded files, so we need two checks here.
if (!is_file($file) && !is_uploaded_file($file)) {
return FALSE; return FALSE;
} }


Expand Down
1 change: 0 additions & 1 deletion includes/install.inc
Original file line number Original file line Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php <?php
// $Id$


define('SCHEMA_UNINSTALLED', -1); define('SCHEMA_UNINSTALLED', -1);
define('SCHEMA_INSTALLED', 0); define('SCHEMA_INSTALLED', 0);
Expand Down
1 change: 0 additions & 1 deletion includes/install.mysql.inc
Original file line number Original file line Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php <?php
// $Id$


// MySQL specific install functions // MySQL specific install functions


Expand Down
1 change: 0 additions & 1 deletion includes/install.mysqli.inc
Original file line number Original file line Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php <?php
// $Id$


// MySQLi specific install functions // MySQLi specific install functions


Expand Down
1 change: 0 additions & 1 deletion includes/install.pgsql.inc
Original file line number Original file line Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php <?php
// $Id$


// PostgreSQL specific install functions // PostgreSQL specific install functions


Expand Down
1 change: 0 additions & 1 deletion includes/language.inc
Original file line number Original file line Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php <?php
// $Id$


/** /**
* @file * @file
Expand Down
3 changes: 1 addition & 2 deletions includes/locale.inc
Original file line number Original file line Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php <?php
// $Id$


/** /**
* @file * @file
Expand Down Expand Up @@ -1672,7 +1671,7 @@ function _locale_import_shorten_comments($comment) {
break; break;
} }
} }
return substr($comm, 0, -2); return trim(substr($comm, 0, -2));
} }


/** /**
Expand Down
1 change: 0 additions & 1 deletion includes/lock.inc
Original file line number Original file line Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php <?php
// $Id$


/** /**
* @file * @file
Expand Down
1 change: 0 additions & 1 deletion includes/mail.inc
Original file line number Original file line Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php <?php
// $Id$


/** /**
* Compose and optionally send an e-mail message. * Compose and optionally send an e-mail message.
Expand Down
13 changes: 7 additions & 6 deletions includes/menu.inc
Original file line number Original file line Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php <?php
// $Id$


/** /**
* @file * @file
Expand Down Expand Up @@ -72,7 +71,7 @@
*/ */


/** /**
* @name Menu flags * @defgroup menu_flags Menu flags
* @{ * @{
* Flags for use in the "type" attribute of menu items. * Flags for use in the "type" attribute of menu items.
*/ */
Expand All @@ -90,8 +89,10 @@ define('MENU_IS_LOCAL_TASK', 0x0080);
*/ */


/** /**
* @name Menu item types * @defgroup menu_item_types Menu item types
* @{ * @{
* Definitions for various menu item types.
*
* Menu item definitions provide one of these constants, which are shortcuts for * Menu item definitions provide one of these constants, which are shortcuts for
* combinations of the above flags. * combinations of the above flags.
*/ */
Expand Down Expand Up @@ -135,7 +136,7 @@ define('MENU_DEFAULT_LOCAL_TASK', MENU_IS_LOCAL_TASK | MENU_LINKS_TO_PARENT);
*/ */


/** /**
* @name Menu status codes * @defgroup menu_status_codes Menu status codes
* @{ * @{
* Status codes for menu callbacks. * Status codes for menu callbacks.
*/ */
Expand All @@ -150,9 +151,9 @@ define('MENU_SITE_OFFLINE', 4);
*/ */


/** /**
* @Name Menu tree parameters * @defgroup menu_tree_parameters Menu tree parameters
* @{ * @{
* Menu tree * Parameters for a menu tree.
*/ */


/** /**
Expand Down
1 change: 0 additions & 1 deletion includes/module.inc
Original file line number Original file line Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php <?php
// $Id$


/** /**
* @file * @file
Expand Down
8 changes: 4 additions & 4 deletions includes/pager.inc
Original file line number Original file line Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php <?php
// $Id$


/** /**
* @file * @file
Expand Down Expand Up @@ -227,10 +226,11 @@ function theme_pager($tags = array(), $limit = 10, $element = 0, $parameters = a




/** /**
* @name Pager pieces * @defgroup pagerpieces Pager pieces
* @{ * @{
* Use these pieces to construct your own custom pagers in your theme. Note that * Theme functions for customizing pager elements.
* you should NOT modify this file to customize your pager. *
* Note that you should NOT modify this file to customize your pager.
*/ */


/** /**
Expand Down
Loading

0 comments on commit 12f28bf

Please sign in to comment.