diff --git a/core/includes/password.inc b/core/includes/password.inc index b052a4a..e8d277f 100644 --- a/core/includes/password.inc +++ b/core/includes/password.inc @@ -5,6 +5,7 @@ * Secure password hashing functions for user authentication. * * Based on the Portable PHP password hashing framework. + * * @see http://www.openwall.com/phpass/ * * An alternative or custom version of this password hashing API may be @@ -43,7 +44,7 @@ function _password_itoa64() { } /** - * Encode bytes into printable base 64 using the *nix standard from crypt(). + * Encodes bytes into printable base 64 using the *nix standard from crypt(). * * @param $input * The string containing bytes to encode. diff --git a/core/includes/path.inc b/core/includes/path.inc index 36556a0..45b83df 100644 --- a/core/includes/path.inc +++ b/core/includes/path.inc @@ -43,9 +43,9 @@ function drupal_path_initialize() { * @param $path * The path to investigate for corresponding aliases or system URLs. * @param $langcode - * Optional language code to search the path with. Defaults to the page language. - * If there's no path defined for that language it will search paths without - * language. + * Optional language code to search the path with. Defaults to the page + * language. If there's no path defined for that language it will search + * paths without language. * * @return * Either a Drupal system path, an aliased path, or FALSE if no path was @@ -409,7 +409,7 @@ function drupal_path_alias_whitelist_rebuild($source = NULL) { } /** - * Fetch a specific URL alias from the database. + * Fetches a specific URL alias from the database. * * @param $conditions * A string representing the source, a number representing the pid, or an @@ -444,7 +444,7 @@ function path_load($conditions) { } /** - * Save a path alias to the database. + * Saves a path alias to the database. * * @param $path * An associative array containing the following keys: @@ -478,7 +478,7 @@ function path_save(&$path) { } /** - * Delete a URL alias. + * Deletes a URL alias. * * @param $criteria * A number representing the pid or an array of criteria. @@ -498,11 +498,11 @@ function path_delete($criteria) { } /** - * Determine whether a path is in the administrative section of the site. + * Determines whether a path is in the administrative section of the site. * - * By default, paths are considered to be non-administrative. If a path does not - * match any of the patterns in path_get_admin_paths(), or if it matches both - * administrative and non-administrative patterns, it is considered + * By default, paths are considered to be non-administrative. If a path does + * not match any of the patterns in path_get_admin_paths(), or if it matches + * both administrative and non-administrative patterns, it is considered * non-administrative. * * @param $path @@ -526,7 +526,7 @@ function path_is_admin($path) { } /** - * Get a list of administrative and non-administrative paths. + * Gets a list of administrative and non-administrative paths. * * @return array * An associative array containing the following keys: @@ -598,7 +598,7 @@ function drupal_valid_path($path, $dynamic_allowed = FALSE) { } /** - * Clear the path cache. + * Clears the path cache. * * @param $source * An optional system path for which an alias is being changed. diff --git a/core/includes/registry.inc b/core/includes/registry.inc index 0fc2c57..acf0031 100644 --- a/core/includes/registry.inc +++ b/core/includes/registry.inc @@ -4,7 +4,7 @@ use Drupal\Core\Database\Database; /** * @file - * This file contains the code registry parser engine. + * Contains the code registry parser engine. */ /** @@ -129,7 +129,8 @@ function registry_get_parsed_files() { } /** - * Parse all files that have changed since the registry was last built, and save their function and class listings. + * Parses all files that have changed since the registry was last built, and + * save their function and class listings. * * @param $files * The list of files to check and parse. @@ -158,7 +159,7 @@ function _registry_parse_files($files) { } /** - * Parse a file and save its function and class listings. + * Parses a file and save its function and class listings. * * @param $filename * Name of the file we are going to parse. diff --git a/core/includes/schema.inc b/core/includes/schema.inc index 7b0c690..497778b 100644 --- a/core/includes/schema.inc +++ b/core/includes/schema.inc @@ -112,7 +112,8 @@ function drupal_get_complete_schema($rebuild = FALSE) { * A module name. * * @return array|bool - * If the module has updates, an array of available updates sorted by version. + * If the module has updates, an array of available updates sorted by + * version. * Otherwise, FALSE. */ function drupal_get_schema_versions($module) { @@ -361,9 +362,9 @@ function drupal_schema_fields_sql($table, $prefix = NULL) { * An object or array representing the record to write, passed in by * reference. If inserting a new record, values not provided in $record will * be populated in $record and in the database with the default values from - * the schema, as well as a single serial (auto-increment) field (if present). - * If updating an existing record, only provided values are updated in the - * database, and $record is not modified. + * the schema, as well as a single serial (auto-increment) field + * (if present). If updating an existing record, only provided values are + * updated in the database, and $record is not modified. * @param array $primary_keys * To indicate that this is a new record to be inserted, omit this argument. * If this is an update, this argument specifies the primary keys' field diff --git a/core/includes/session.inc b/core/includes/session.inc index 5761dc9..3725bc0 100644 --- a/core/includes/session.inc +++ b/core/includes/session.inc @@ -2,7 +2,7 @@ /** * @file - * User session handling functions. + * Handles the users session functions. * * The user-level session storage handlers: * - _drupal_session_open() @@ -273,7 +273,7 @@ function drupal_session_initialize() { } /** - * Forcefully starts a session, preserving already set session data. + * Starts a session, preserving already set session data. * * @ingroup php_wrappers */ diff --git a/core/includes/standard.inc b/core/includes/standard.inc index 808073f..6bff07b 100644 --- a/core/includes/standard.inc +++ b/core/includes/standard.inc @@ -285,7 +285,8 @@ function standard_country_list() { * Language codes are defined by the W3C language tags document for * interoperability. Language codes typically have a language and optionally, * a script or regional variant name. See - * http://www.w3.org/International/articles/language-tags/ for more information. + * http://www.w3.org/International/articles/language-tags/ for more + * information. * * This list is based on languages available from localize.drupal.org. See * http://localize.drupal.org/issues for information on how to add languages diff --git a/core/includes/tablesort.inc b/core/includes/tablesort.inc index 818b61d..c42b1f4 100644 --- a/core/includes/tablesort.inc +++ b/core/includes/tablesort.inc @@ -13,7 +13,7 @@ use Drupal\Core\Database\Query\SelectInterface; */ /** - * Initialize the table sort context. + * Initializes the table sort context. */ function tablesort_init($header) { $ts = tablesort_get_order($header); @@ -23,7 +23,7 @@ function tablesort_init($header) { } /** - * Format a column header. + * Formats a column header. * * If the cell in question is the column header for the current sort criterion, * it gets special formatting. All possible sort criteria become links. @@ -34,6 +34,7 @@ function tablesort_init($header) { * An array of column headers in the format described in theme_table(). * @param $ts * The current table sort context as returned from tablesort_init(). + * * @return * A properly formatted cell, ready for _theme_table_cell(). */ @@ -63,7 +64,7 @@ function tablesort_header($cell, $header, $ts) { } /** - * Format a table cell. + * Formats a table cell. * * Adds a class attribute to all cells in the currently active column. * @@ -75,6 +76,7 @@ function tablesort_header($cell, $header, $ts) { * The current table sort context as returned from tablesort_init(). * @param $i * The index of the cell's table column. + * * @return * A properly formatted cell, ready for _theme_table_cell(). */ @@ -91,7 +93,7 @@ function tablesort_cell($cell, $header, $ts, $i) { } /** - * Compose a URL query parameter array for table sorting links. + * Composes a URL query parameter array for table sorting links. * * @return * A URL query parameter array that consists of all components of the current @@ -102,10 +104,11 @@ function tablesort_get_query_parameters() { } /** - * Determine the current sort criterion. + * Determines the current sort criterion. * * @param $headers * An array of column headers in the format described in theme_table(). + * * @return * An associative array describing the criterion, containing the keys: * - "name": The localized title of the table column. @@ -138,10 +141,11 @@ function tablesort_get_order($headers) { } /** - * Determine the current sort direction. + * Determines the current sort direction. * * @param $headers * An array of column headers in the format described in theme_table(). + * * @return * The current sort direction ("asc" or "desc"). */ diff --git a/core/includes/theme.inc b/core/includes/theme.inc index 2c17020..d604a77 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -67,7 +67,7 @@ function _drupal_theme_access($theme) { } /** - * Initialize the theme system by loading the theme. + * Initializes the theme system by loading the theme. */ function drupal_theme_initialize() { global $theme, $user, $theme_key; @@ -115,7 +115,7 @@ function drupal_theme_initialize() { } /** - * Initialize the theme system given already loaded information. This + * Initializes the theme system given already loaded information. This * function is useful to initialize a theme when no database is present. * * @param $theme @@ -237,7 +237,7 @@ function _drupal_theme_initialize($theme, $base_theme = array(), $registry_callb } /** - * Get the theme registry. + * Gets the theme registry. * * @param bool $complete * Optional boolean to indicate whether to return the complete theme registry @@ -282,7 +282,8 @@ function theme_get_registry($complete = TRUE) { } /** - * Set the callback that will be used by theme_get_registry() to fetch the registry. + * Sets the callback that will be used by theme_get_registry() to fetch the + * registry. * * @param $callback * The name of the callback function. @@ -298,7 +299,7 @@ function _theme_registry_callback($callback = NULL, array $arguments = array()) } /** - * Get the theme_registry cache; if it doesn't exist, build it. + * Gets the theme_registry cache; if it doesn't exist, build it. * * @param $theme * The loaded $theme object as returned by list_themes(). @@ -339,14 +340,14 @@ function _theme_load_registry($theme, $base_theme = NULL, $theme_engine = NULL, } /** - * Write the theme_registry cache into the database. + * Writes the theme_registry cache into the database. */ function _theme_save_registry($theme, $registry) { cache()->set("theme_registry:$theme->name", $registry); } /** - * Force the system to rebuild the theme registry; this should be called + * Forces the system to rebuild the theme registry; this should be called * when modules are added to the system, or when a dynamic system needs * to add more theme hooks. */ @@ -365,17 +366,17 @@ function drupal_theme_rebuild() { * - 'type': The passed-in $type. * - 'theme path': The passed-in $path. * - 'function': The name of the function generating output for this theme - * hook. Either defined explicitly in hook_theme() or, if neither 'function' - * nor 'template' is defined, then the default theme function name is used. - * The default theme function name is the theme hook prefixed by either - * 'theme_' for modules or '$name_' for everything else. If 'function' is - * defined, 'template' is not used. + * hook. Either defined explicitly in hook_theme() or, if neither + * 'function' nor 'template' is defined, then the default theme function + * name is used. The default theme function name is the theme hook prefixed + * by either 'theme_' for modules or '$name_' for everything else. If + * 'function' is defined, 'template' is not used. * - 'template': The filename of the template generating output for this - * theme hook. The template is in the directory defined by the 'path' key of - * hook_theme() or defaults to $path. + * theme hook. The template is in the directory defined by the 'path' key + * of hook_theme() or defaults to $path. * - 'variables': The variables for this theme hook as defined in - * hook_theme(). If there is more than one implementation and 'variables' is - * not specified in a later one, then the previous definition is kept. + * hook_theme(). If there is more than one implementation and 'variables' + * is not specified in a later one, then the previous definition is kept. * - 'render element': The renderable element for this theme hook as defined * in hook_theme(). If there is more than one implementation and * 'render element' is not specified in a later one, then the previous @@ -555,7 +556,7 @@ function _theme_process_registry(&$cache, $name, $type, $theme, $path) { } /** - * Build the theme registry cache. + * Builds the theme registry cache. * * @param $theme * The loaded $theme object as returned by list_themes(). @@ -617,7 +618,7 @@ function _theme_build_registry($theme, $base_theme, $theme_engine) { } /** - * Return a list of all currently available themes. + * Returns a list of all currently available themes. * * Retrieved from the database, if available and the site is not in maintenance * mode; otherwise compiled freshly from the filesystem. @@ -716,9 +717,10 @@ function list_themes($refresh = FALSE) { } /** - * Find all the base themes for the specified theme. + * Finds all the base themes for the specified theme. * - * Themes can inherit templates and function implementations from earlier themes. + * Themes can inherit templates and function implementations from earlier + * themes. * * @param $themes * An array of available themes. @@ -726,6 +728,7 @@ function list_themes($refresh = FALSE) { * The name of the theme whose base we are looking for. * @param $used_keys * A recursion parameter preventing endless loops. + * * @return * Returns an array of all of the theme's ancestors; the first element's value * will be NULL if an error occurred. @@ -793,15 +796,15 @@ function drupal_find_base_themes($themes, $key, $used_keys = array()) { * executed (if they exist), in the following order (note that in the following * list, HOOK indicates the theme hook name, MODULE indicates a module name, * THEME indicates a theme name, and ENGINE indicates a theme engine name): - * - template_preprocess(&$variables, $hook): Creates a default set of variables - * for all theme hooks with template implementations. + * - template_preprocess(&$variables, $hook): Creates a default set of + * variables for all theme hooks with template implementations. * - template_preprocess_HOOK(&$variables): Should be implemented by the module * that registers the theme hook, to set up default variables. * - MODULE_preprocess(&$variables, $hook): hook_preprocess() is invoked on all * implementing modules. * - MODULE_preprocess_HOOK(&$variables): hook_preprocess_HOOK() is invoked on - * all implementing modules, so that modules that didn't define the theme hook - * can alter the variables. + * all implementing modules, so that modules that didn't define the theme + * hook can alter the variables. * - ENGINE_engine_preprocess(&$variables, $hook): Allows the theme engine to * set necessary variables for all theme hooks with template implementations. * - ENGINE_engine_preprocess_HOOK(&$variables): Allows the theme engine to set @@ -856,10 +859,10 @@ function drupal_find_base_themes($themes, $key, $used_keys = array()) { * @param $hook * The name of the theme hook to call. If the name contains a * double-underscore ('__') and there isn't an implementation for the full - * name, the part before the '__' is checked. This allows a fallback to a more - * generic implementation. For example, if theme('links__node', ...) is - * called, but there is no implementation of that theme hook, then the 'links' - * implementation is used. This process is iterative, so if + * name, the part before the '__' is checked. This allows a fallback to a + * more generic implementation. For example, if theme('links__node', ...) is + * called, but there is no implementation of that theme hook, then the + * 'links' implementation is used. This process is iterative, so if * theme('links__contextual__node', ...) is called, theme() checks for the * following implementations, and uses the first one that exists: * - links__contextual__node @@ -1084,14 +1087,14 @@ function theme($hook, $variables = array()) { } /** - * Return the path to the current themed element. - * - * It can point to the active theme or the module handling a themed implementation. - * For example, when invoked within the scope of a theming call it will depend - * on where the theming function is handled. If implemented from a module, it - * will point to the module. If implemented from the active theme, it will point - * to the active theme. When called outside the scope of a theming call, it will - * always point to the active theme. + * Returns the path to the current themed element. + * + * It can point to the active theme or the module handling a themed + * implementation. For example, when invoked within the scope of a theming call + * it will depend on where the theming function is handled. If implemented from + * a module, it will point to the module. If implemented from the active theme, + * it will point to the active theme. When called outside the scope of a + * theming call, it will always point to the active theme. */ function path_to_theme() { global $theme_path; @@ -1104,7 +1107,8 @@ function path_to_theme() { } /** - * Allow themes and/or theme engines to easily discover overridden theme functions. + * Allows themes and/or theme engines to easily discover overridden theme + * functions. * * @param $cache * The existing cache of theme hooks to test against. @@ -1161,7 +1165,7 @@ function drupal_find_theme_functions($cache, $prefixes) { } /** - * Allow themes and/or theme engines to easily discover overridden templates. + * Allows themes and/or theme engines to easily discover overridden templates. * * @param $cache * The existing cache of theme hooks to test against. @@ -1267,7 +1271,7 @@ function drupal_find_theme_templates($cache, $extension, $path) { } /** - * Retrieve a setting for the current theme or for a given theme. + * Retrieves a setting for the current theme or for a given theme. * * The final setting is obtained from the last value found in the following * sources: @@ -1385,7 +1389,7 @@ function theme_get_setting($setting_name, $theme = NULL) { } /** - * Render a system default template, which is essentially a PHP template. + * Renders a system default template, which is essentially a PHP template. * * @param $template_file * The filename of the template to render. @@ -1403,7 +1407,7 @@ function theme_render_template($template_file, $variables) { } /** - * Enable a given list of themes. + * Enables a given list of themes. * * @param $theme_list * An array of theme names. @@ -1431,7 +1435,7 @@ function theme_enable($theme_list) { } /** - * Disable a given list of themes. + * Disables a given list of themes. * * @param $theme_list * An array of theme names. @@ -1498,20 +1502,21 @@ function template_preprocess_datetime(&$variables) { * * @param $variables * An associative array containing: - * - timestamp: (optional) A UNIX timestamp for the datetime attribute. If the - * datetime cannot be represented as a UNIX timestamp, use a valid datetime - * attribute value in $variables['attributes']['datetime']. + * - timestamp: (optional) A UNIX timestamp for the datetime attribute. If + * the datetime cannot be represented as a UNIX timestamp, use a valid + * datetime attribute value in $variables['attributes']['datetime']. * - text: (optional) The content to display within the