From c529e4afbece1355bee882500faf2fd0c059048a Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Mon, 26 May 2008 17:12:55 +0000 Subject: - Patch #101543 by webchick: document all constants. --- includes/bootstrap.inc | 67 +++++++++++++++++++++++++++++++++++++++++++------- includes/common.inc | 4 ++- includes/file.inc | 50 ++++++++++++++++++++++++++++++++----- includes/install.inc | 67 ++++++++++++++++++++++++++++++++++++++++++++------ includes/locale.inc | 5 +++- includes/menu.inc | 58 ++++++++++++++++++++++++++++++++++++++++--- includes/password.inc | 6 ++++- includes/theme.inc | 17 +++++++++++-- 8 files changed, 244 insertions(+), 30 deletions(-) (limited to 'includes') diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc index 993b52602..dda784822 100644 --- a/includes/bootstrap.inc +++ b/includes/bootstrap.inc @@ -35,19 +35,68 @@ define('CACHE_NORMAL', 1); define('CACHE_AGGRESSIVE', 2); /** + * Log message severity -- Emergency: system is unusable. * - * Severity levels, as defined in RFC 3164 http://www.faqs.org/rfcs/rfc3164.html * @see watchdog() * @see watchdog_severity_levels() */ -define('WATCHDOG_EMERG', 0); // Emergency: system is unusable -define('WATCHDOG_ALERT', 1); // Alert: action must be taken immediately -define('WATCHDOG_CRITICAL', 2); // Critical: critical conditions -define('WATCHDOG_ERROR', 3); // Error: error conditions -define('WATCHDOG_WARNING', 4); // Warning: warning conditions -define('WATCHDOG_NOTICE', 5); // Notice: normal but significant condition -define('WATCHDOG_INFO', 6); // Informational: informational messages -define('WATCHDOG_DEBUG', 7); // Debug: debug-level messages +define('WATCHDOG_EMERG', 0); + +/** + * Log message severity -- Alert: action must be taken immediately. + * + * @see watchdog() + * @see watchdog_severity_levels() + */ +define('WATCHDOG_ALERT', 1); + +/** + * Log message severity -- Critical: critical conditions. + * + * @see watchdog() + * @see watchdog_severity_levels() + */ +define('WATCHDOG_CRITICAL', 2); + +/** + * Log message severity -- Error: error conditions. + * + * @see watchdog() + * @see watchdog_severity_levels() + */ +define('WATCHDOG_ERROR', 3); + +/** + * Log message severity -- Warning: warning conditions. + * + * @see watchdog() + * @see watchdog_severity_levels() + */ +define('WATCHDOG_WARNING', 4); + +/** + * Log message severity -- Notice: normal but significant condition. + * + * @see watchdog() + * @see watchdog_severity_levels() + */ +define('WATCHDOG_NOTICE', 5); + +/** + * Log message severity -- Informational: informational messages. + * + * @see watchdog() + * @see watchdog_severity_levels() + */ +define('WATCHDOG_INFO', 6); + +/** + * Log message severity -- Debug: debug-level messages. + * + * @see watchdog() + * @see watchdog_severity_levels() + */ +define('WATCHDOG_DEBUG', 7); /** * First bootstrap phase: initialize configuration. diff --git a/includes/common.inc b/includes/common.inc index 32b290b4e..598849907 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -3464,10 +3464,12 @@ function drupal_parse_info_file($filename) { } /** + * Severity levels, as defined in RFC 3164: http://www.ietf.org/rfc/rfc3164.txt. + * * @return * Array of the possible severity levels for log messages. * - * @see watchdog + * @see watchdog() */ function watchdog_severity_levels() { return array( diff --git a/includes/file.inc b/includes/file.inc index 0984190ce..a01fad778 100644 --- a/includes/file.inc +++ b/includes/file.inc @@ -12,24 +12,62 @@ * Common file handling functions. */ +/** + * Flag to indicate that the 'public' file download method is enabled. + * + * When using this method, files are available from a regular HTTP request, + * which provides no additional access restrictions. + */ define('FILE_DOWNLOADS_PUBLIC', 1); + +/** + * Flag to indicate that the 'private' file download method is enabled. + * + * When using this method, all file requests are served by Drupal, during which + * access-control checking can be performed. + */ define('FILE_DOWNLOADS_PRIVATE', 2); + +/** + * Flag used by file_create_directory() -- create directory if not present. + */ define('FILE_CREATE_DIRECTORY', 1); + +/** + * Flag used by file_create_directory() -- file permissions may be changed. + */ define('FILE_MODIFY_PERMISSIONS', 2); + +/** + * Flag for dealing with existing files: Append number until filename is unique. + */ define('FILE_EXISTS_RENAME', 0); + +/** + * Flag for dealing with existing files: Replace the existing file. + */ define('FILE_EXISTS_REPLACE', 1); + +/** + * Flag for dealing with existing files: Do nothing and return FALSE. + */ define('FILE_EXISTS_ERROR', 2); /** - * A files status can be one of two values: temporary or permanent. The status - * for each file Drupal manages is stored in the {files} tables. If the status - * is temporary Drupal's file garbage collection will delete the file and - * remove it from the files table after a set period of time. + * File status -- File has been temporarily saved to the {files} tables. * - * If you wish to add custom statuses for use by contrib modules please expand as - * binary flags and consider the first 8 bits reserved. (0,1,2,4,8,16,32,64,128) + * Drupal's file garbage collection will delete the file and remove it from the + * files table after a set period of time. */ define('FILE_STATUS_TEMPORARY', 0); + +/** + * File status -- File has been permanently saved to the {files} tables. + * + * If you wish to add custom statuses for use by contrib modules please expand + * as binary flags and consider the first 8 bits reserved. + * (0,1,2,4,8,16,32,64,128). + */ define('FILE_STATUS_PERMANENT', 1); /** diff --git a/includes/install.inc b/includes/install.inc index 54bfd4bc4..fd68ed9ab 100644 --- a/includes/install.inc +++ b/includes/install.inc @@ -1,21 +1,74 @@