diff --git a/modules/image/image.module b/modules/image/image.module index 782b71c..0e0e457 100644 --- a/modules/image/image.module +++ b/modules/image/image.module @@ -249,7 +249,7 @@ function image_form_system_file_system_settings_alter(&$form, &$form_state) { } /** - * Submit handler for the file system settings form. + * Form submission handler for system_file_system_settings(). * * Adds a menu rebuild after the public file path has been changed, so that the * menu router item depending on that file path will be regenerated. @@ -307,9 +307,9 @@ function image_file_download($uri) { return -1; } - // Private file access for the original files. Note that we only - // check access for non-temporary images, since file.module will - // grant access for all temporary files. + // Private file access for the original files. Note that we only check access + // for non-temporary images, since file.module will grant access for all + // temporary files. $files = file_load_multiple(array(), array('uri' => $uri)); if (count($files)) { $file = reset($files); @@ -609,7 +609,9 @@ function image_styles() { } /** - * Loads a style by style name or ID. May be used as a loader for menu items. + * Loads a style by style name or ID. + * + * May be used as a loader for menu items. * * @param $name * The name of the style. @@ -618,6 +620,7 @@ function image_styles() { * @param $include * If set, this loader will restrict to a specific type of image style, may be * one of the defined Image style storage constants. + * * @return * An image style array containing the following keys: * - "isid": The unique image style ID. @@ -702,6 +705,7 @@ function image_style_save($style) { * @param $replacement_style_name * (optional) When deleting a style, specify a replacement style name so * that existing settings (if any) may be converted to a new style. + * * @return * TRUE on success. */ @@ -749,6 +753,7 @@ function image_style_effects($style) { * * @param $include_empty * If TRUE a option will be inserted in the options array. + * * @return * Array of image styles both key and value are set to style name. */ @@ -769,7 +774,7 @@ function image_style_options($include_empty = TRUE) { } /** - * Menu callback: Given a style and image path, generate a derivative. + * Page callback: Generates a derivative, given a style and image path. * * After generating an image, transfer it to the requesting agent. * @@ -964,6 +969,7 @@ function image_style_flush($style) { * The name of the style to be used with this image. * @param $path * The path to the image. + * * @return * The absolute URL where a style image can be downloaded, suitable for use * in an tag. Requesting the URL will cause the image to be created. @@ -994,6 +1000,7 @@ function image_style_url($style_name, $path) { * The name of the style to be used with this image. * @param $uri * The URI or path to the image. + * * @return * The URI to an image style image. * @see image_style_url() @@ -1015,6 +1022,7 @@ function image_style_path($style_name, $uri) { * * @param style * An image style array provided by a module. + * * @return * An image style array. The returned style array will include the new 'isid' * assigned to the style. @@ -1106,6 +1114,7 @@ function image_effect_definitions() { * The name of the effect definition to load. * @param $style * An image style array to which this effect will be added. + * * @return * An array containing the image effect definition with the following keys: * - "effect": The unique name for the effect being performed. Usually prefixed @@ -1174,6 +1183,7 @@ function image_effects() { * @param $include * If set, this loader will restrict to a specific type of image style, may be * one of the defined Image style storage constants. + * * @return * An image effect array, consisting of the following keys: * - "ieid": The unique image effect ID. @@ -1199,6 +1209,7 @@ function image_effect_load($ieid, $style_name, $include = NULL) { * * @param $effect * An image effect array. + * * @return * An image effect array. In the case of a new effect, 'ieid' will be set. */ @@ -1233,6 +1244,7 @@ function image_effect_delete($effect) { * An image object returned by image_load(). * @param $effect * An image effect array. + * * @return * TRUE on success. FALSE if unable to perform the image effect on the image. */ diff --git a/modules/node/node.module b/modules/node/node.module index 9aa58e6..abcd4e0 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -200,8 +200,8 @@ function node_entity_info() { ), ); - // Search integration is provided by node.module, so search-related - // view modes for nodes are defined here and not in search.module. + // Search integration is provided by node.module, so search-related view modes + // for nodes are defined here and not in search.module. if (module_exists('search')) { $return['node']['view modes'] += array( 'search_index' => array( @@ -342,12 +342,13 @@ function node_last_viewed($nid) { } /** - * Determins the type of marker to be displayed for a given node. + * Determines the type of marker to be displayed for a given node. * * @param $nid * Node ID whose history supplies the "last viewed" timestamp. * @param $timestamp * Time which is compared against node's "last viewed" timestamp. + * * @return * One of the MARK constants. */ @@ -692,6 +693,7 @@ function node_type_update_nodes($old_type, $type) { * * @param $rebuild * TRUE to rebuild node types. Equivalent to calling node_types_rebuild(). + * * @return * An object with two properties: * - names: Associative array of the names of node types, keyed by the type. @@ -1006,6 +1008,8 @@ function node_object_prepare($node) { } /** + * Implements hook_validate(). + * * Performs validation checks on the given node. */ function node_validate($node, $form, &$form_state) { @@ -1044,6 +1048,12 @@ function node_validate($node, $form, &$form_state) { /** * Prepares node for saving by populating author and creation date. + * + * @param $node + * A node object. + * + * @return + * An updated node object. */ function node_submit($node) { // A user might assign the node author by entering a user name in the node @@ -1417,8 +1427,8 @@ function node_build_content($node, $view_mode = 'full', $langcode = NULL) { entity_prepare_view('node', array($node->nid => $node), $langcode); $node->content += field_attach_view('node', $node, $view_mode, $langcode); - // Always display a read more link on teasers because we have no way - // to know when a teaser view is different than a full view. + // Always display a read more link on teasers because we have no way to know + // when a teaser view is different than a full view. $links = array(); $node->content['links'] = array( '#theme' => 'links__node', @@ -1858,6 +1868,7 @@ function node_user_delete($account) { * An associative array containing: * - form: A render element representing the form. * + * @see node_search_admin() * @ingroup themeable */ function theme_node_search_admin($variables) { @@ -1926,11 +1937,11 @@ function _node_revision_access($node, $op = 'view', $account = NULL) { $node_current_revision = node_load($node->nid); $is_current_revision = $node_current_revision->vid == $node->vid; - // There should be at least two revisions. If the vid of the given node - // and the vid of the current revision differ, then we already have two + // There should be at least two revisions. If the vid of the given node and + // the vid of the current revision differ, then we already have two // different revisions so there is no need for a separate database check. - // Also, if you try to revert to or delete the current revision, that's - // not good. + // Also, if you try to revert to or delete the current revision, that's not + // good. if ($is_current_revision && (db_query('SELECT COUNT(vid) FROM {node_revision} WHERE nid = :nid', array(':nid' => $node->nid))->fetchField() == 1 || $op == 'update' || $op == 'delete')) { $access[$cid] = FALSE; } @@ -1938,8 +1949,8 @@ function _node_revision_access($node, $op = 'view', $account = NULL) { $access[$cid] = TRUE; } else { - // First check the access to the current revision and finally, if the - // node passed in is not the current revision then access to that, too. + // First check the access to the current revision and finally, if the node + // passed in is not the current revision then access to that, too. $access[$cid] = node_access($op, $node_current_revision, $account) && ($is_current_revision || node_access($op, $node, $account)); } } @@ -2314,9 +2325,9 @@ function node_get_recent($number = 10) { $query = db_select('node', 'n'); if (!user_access('bypass node access')) { - // If the user is able to view their own unpublished nodes, allow them - // to see these in addition to published nodes. Check that they actually - // have some unpublished nodes to view before adding the condition. + // If the user is able to view their own unpublished nodes, allow them to + // see these in addition to published nodes. Check that they actually have + // some unpublished nodes to view before adding the condition. if (user_access('view own unpublished content') && $own_unpublished = db_query('SELECT nid FROM {node} WHERE uid = :uid AND status = :status', array(':uid' => $GLOBALS['user']->uid, ':status' => NODE_NOT_PUBLISHED))->fetchCol()) { $query->condition(db_or() ->condition('n.status', NODE_PUBLISHED) @@ -2503,8 +2514,8 @@ function node_modules_uninstalled($modules) { /** * Implements hook_block_list_alter(). * - * Check the content type specific visibilty settings. - * Remove the block if the visibility conditions are not met. + * Check the content type specific visibilty settings. Remove the block if the + * visibility conditions are not met. */ function node_block_list_alter(&$blocks) { global $theme_key; @@ -3709,7 +3720,6 @@ function _node_access_rebuild_batch_finished($success, $results, $operations) { * @} End of "defgroup node_access". */ - /** * @defgroup node_content Hook implementations for user-created content types * @{