diff --git a/includes/common.inc b/includes/common.inc index 842279a91f7..2f778b3000c 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -2,11 +2,11 @@ // $Id$ /** - @name drupal_title - - Functions to get and set the title of the current page. - @{ -**/ + * @name drupal_title + * + * Functions to get and set the title of the current page. + * @{ + */ function drupal_set_title($title = NULL) { static $stored_title; @@ -28,11 +28,11 @@ function drupal_get_title() { // @} /** - @name drupal_message - - Functions to get and set the message of the current page. - @{ -**/ + * @name drupal_message + * + * Functions to get and set the message of the current page. + * @{ + */ function drupal_set_message($message = NULL, $type = "status") { static $stored_message; @@ -50,14 +50,14 @@ function drupal_get_message() { // @} /** - @name drupal_breadcrumb - - Functions to get and set the breadcrumb trail of the current page. - - @param $breadcrumb array of links, starting with "home" and proceeding - up to but not including the current page. - @{ -**/ + * @name drupal_breadcrumb + * + * Functions to get and set the breadcrumb trail of the current page. + * + * @param $breadcrumb array of links, starting with "home" and proceeding up + * to but not including the current page. + * @{ + */ function drupal_set_breadcrumb($breadcrumb = NULL) { static $stored_breadcrumb; @@ -80,8 +80,8 @@ function drupal_get_breadcrumb() { // @} /** - Build the alias/path array -**/ + * Build the alias/path array + */ function drupal_get_path_map($action = "") { static $cache; @@ -238,10 +238,10 @@ function drupal_specialchars($input, $quotes = ENT_NOQUOTES) { } /** - * Verify the syntax of the given e-mail address. Empty e-mail addresses - * are allowed. See RFC 2822 for details. + * Verify the syntax of the given e-mail address. Empty e-mail addresses are + * allowed. See RFC 2822 for details. * - * @param $mail a email address + * @param $mail a email address */ function valid_email_address($mail) { $user = '[a-zA-Z0-9_\-\.\+\^!#\$%&*+\/\=\?\`\|\{\}~\']+'; @@ -260,7 +260,7 @@ function valid_email_address($mail) { /** * Verify the syntax of the given URL. * - * @param $url an URL + * @param $url an URL */ function valid_url($url) { @@ -275,10 +275,10 @@ function valid_url($url) { /** * Format a single result entry of a search query: * - * @param $item a single search result as returned by module_search of + * @param $item a single search result as returned by module_search of * type array("count" => ..., "link" => ..., "title" => ..., "user" => ..., - * "date" => ..., "keywords" => ...) - * @param $type module type of this item + * "date" => ..., "keywords" => ...) + * @param $type module type of this item */ function search_item($item, $type) { @@ -303,15 +303,14 @@ function search_item($item, $type) { * Render a generic search form. * * "Generic" means "universal usable" - that is, usable not only from - * 'site.com/search', but also as a simple seach box (without - * "Restrict search to", help text, etc) from theme's header etc. - * This means: provide options to only conditionally render certain - * parts of this form. + * 'site.com/search', but also as a simple seach box (without "Restrict search + * to", help text, etc) from theme's header etc. This means: provide options to + * only conditionally render certain parts of this form. * - * @param $action Form action. Defaults to 'site.com/search'. - * @param $keys string containing keywords for the search. - * @param $options != 0: Render additional form fields/text - * ("Restrict search to", help text, etc). + * @param $action Form action. Defaults to 'site.com/search'. + * @param $keys string containing keywords for the search. + * @param $options != 0: Render additional form fields/text ("Restrict search + * to", help text, etc). */ function search_form($action = NULL, $keys = NULL, $options = NULL) { @@ -367,12 +366,12 @@ function search_data($keys = NULL) { /** * Display the search form and the resulting data. * - * @param $type If set, search only nodes of this type. - * Otherwise, search all types. - * @param $action Form action. Defaults to 'site.com/search'. - * @param $keys Query string. Defaults to global $keys. - * @param $options != 0: Render additional form fields/text - * ("Restrict search to", help text, etc). + * @param $type If set, search only nodes of this type. Otherwise, search all + * types. + * @param $action Form action. Defaults to 'site.com/search'. + * @param $keys Query string. Defaults to global $keys. + * @param $options != 0: Render additional form fields/text ("Restrict search + * to", help text, etc). */ function search_type($type, $action = NULL, $keys = NULL, $options = NULL) { @@ -607,17 +606,16 @@ function format_rss_item($title, $link, $description, $args = array()) { /** * Formats a string with a count of items so that the string is pluralized - * correctly. - * format_plural calls t() by itself, make sure not to pass already localized - * strings to it. + * correctly. format_plural calls t() by itself, make sure not to pass already + * localized strings to it. * - * @param $count The item count to display. - * @param $singular The string for the singular case. Please make sure it's clear - * this is singular, to ease translation. ("1 new comment" instead of - * "1 new"). - * @param $plural The string for the plrual case. Please make sure it's clear - * this is plural, to ease translation. Use %count in places of the - * item count, as in "%count new comments". + * @param $count The item count to display. + * @param $singular The string for the singular case. Please make sure it's + * clear this is singular, to ease translation. ("1 new comment" instead of "1 + * new"). + * @param $plural The string for the plrual case. Please make sure it's clear + * this is plural, to ease translation. Use %count in places of the item + * count, as in "%count new comments". */ function format_plural($count, $singular, $plural) { return t($count == 1 ? $singular : $plural, array("%count" => $count)); diff --git a/includes/database.mysql.inc b/includes/database.mysql.inc index 2f27a7a5e24..73e3316154a 100644 --- a/includes/database.mysql.inc +++ b/includes/database.mysql.inc @@ -24,8 +24,9 @@ function db_connect($url) { /** * Runs a query in the database. * - * @param $query SQL query, followed by a variable number of arguments which are substituted into query by sprintf. - * @return a MySQL result or FALSE if the query was not executed correctly. + * @param $query SQL query, followed by a variable number of arguments which + * are substituted into query by sprintf. + * @return a MySQL result or FALSE if the query was not executed correctly. */ function db_query($query) { $args = func_get_args(); @@ -148,8 +149,11 @@ function db_affected_rows() { /** * Runs a LIMIT query in the database. * - * @param $query SQL query, followed by a variable number of arguments which are substituted into query by sprintf, followed by 'from' and 'count' parameters. 'from' is the row to start fetching, 'count' the numbers of rows to fetch. - * @return a MySQL result or FALSE if the query was not executed correctly. + * @param $query SQL query, followed by a variable number of arguments which + * are substituted into query by sprintf, followed by 'from' and 'count' + * parameters. 'from' is the row to start fetching, 'count' the numbers of + * rows to fetch. + * @return a MySQL result or FALSE if the query was not executed correctly. */ function db_query_range($query) { $args = func_get_args(); diff --git a/includes/database.pear.inc b/includes/database.pear.inc index ded3bcf96b2..c335f65669f 100644 --- a/includes/database.pear.inc +++ b/includes/database.pear.inc @@ -18,8 +18,9 @@ function db_connect($url) { /** * Runs a query in the database. * - * @param $query SQL query, followed by a variable number of arguments which are substituted into query by sprintf. - * @return a DB_Result object or a DB_Error + * @param $query SQL query, followed by a variable number of arguments which + * are substituted into query by sprintf. + * @return a DB_Result object or a DB_Error */ function db_query($query) { @@ -145,8 +146,11 @@ function db_affected_rows() { /** * Runs a LIMIT query in the database. * - * @param $query SQL query followed by a variable number of arguments which are substituted into query by sprintf, followed by 'from' and 'count' parameters. 'from' is the row to start fetching, 'count' the numbers of rows to fetch. - * @return a DB_Result object or a DB_Error + * @param $query SQL query followed by a variable number of arguments which + * are substituted into query by sprintf, followed by 'from' and 'count' + * parameters. 'from' is the row to start fetching, 'count' the numbers of + * rows to fetch. + * @return a DB_Result object or a DB_Error */ function db_query_range($query) { global $db_handle, $queries; diff --git a/includes/menu.inc b/includes/menu.inc index 55bece1f324..3274fdea424 100644 --- a/includes/menu.inc +++ b/includes/menu.inc @@ -49,8 +49,8 @@ function menu_get_active_item() { } /** -* Returns the title of the active menu item. -*/ + * Returns the title of the active menu item. + */ function menu_get_active_title() { global $_list; @@ -60,8 +60,8 @@ function menu_get_active_title() { } /** -* Returns the help associated with the active menu item. -*/ + * Returns the help associated with the active menu item. + */ function menu_get_active_help() { $path = $_GET["q"]; $output = ""; diff --git a/includes/pager.inc b/includes/pager.inc index 9f371e9bf02..c48e11d0425 100644 --- a/includes/pager.inc +++ b/includes/pager.inc @@ -2,41 +2,41 @@ // $Id$ /** - @defgroup pager_api Pager API - @{ - - Pager external functions (API). - **/ + * @defgroup pager_api Pager API + * @{ + * + * Pager external functions (API). + */ /** - * Use this function when doing select queries you wish to be able to page. - * The pager uses LIMIT-based queries to fetch only the records required - * to render a certain page. However, it has to learn the total number - * of records returned by the query to (among others) compute the number - * of pages (= number of all records / number of records per page). This - * is done by inserting "COUNT(*)" in the original query, ie. by rewriting - * the original query, say "SELECT nid, type FROM node WHERE status = '1' - * ORDER BY static DESC, created DESC" to read "SELECT COUNT(*) FROM node - * WHERE status = '1' ORDER BY static DESC, created DESC". Rewriting the - * query is accomplished using a regular expression. + * Use this function when doing select queries you wish to be able to page. The + * pager uses LIMIT-based queries to fetch only the records required to render a + * certain page. However, it has to learn the total number of records returned + * by the query to (among others) compute the number of pages (= number of all + * records / number of records per page). This is done by inserting "COUNT(*)" + * in the original query, ie. by rewriting the original query, say "SELECT nid, + * type FROM node WHERE status = '1' ORDER BY static DESC, created DESC" to read + * "SELECT COUNT(*) FROM node WHERE status = '1' ORDER BY static DESC, created + * DESC". Rewriting the query is accomplished using a regular expression. * - * Unfortunately, the rewrite rule does not always work as intended for - * queries that (already) have a "COUNT(*)" or a "GROUP BY" clause, and - * possibly for other complex queries. In those cases, you can optionally - * pass a query that will be used to count the records. + * Unfortunately, the rewrite rule does not always work as intended for queries + * that (already) have a "COUNT(*)" or a "GROUP BY" clause, and possibly for + * other complex queries. In those cases, you can optionally pass a query that + * will be used to count the records. * - * For example, if you want to page this query: "SELECT COUNT(*), TYPE FROM - * node GROUP BY TYPE", pager_query() would invoke the wrong query, being: - * "SELECT COUNT(*) FROM node GROUP BY TYPE". So instead, you should pass - * "SELECT COUNT(DISTINCT(TYPE)) FROM node" as the optional $count_query - * parameter. + * For example, if you want to page this query: "SELECT COUNT(*), TYPE FROM node + * GROUP BY TYPE", pager_query() would invoke the wrong query, being: "SELECT + * COUNT(*) FROM node GROUP BY TYPE". So instead, you should pass "SELECT + * COUNT(DISTINCT(TYPE)) FROM node" as the optional $count_query parameter. * - * @param $query the SQL query that needs paging - * @param $limit the number of rows per page - * @param $element optional attribute to distringuish between multiple pagers on one page - * @param $count_query an optional SQL query used to count records when rewriting the query would fail + * @param $query the SQL query that needs paging + * @param $limit the number of rows per page + * @param $element optional attribute to distringuish between multiple pagers + * on one page + * @param $count_query an optional SQL query used to count records when + * rewriting the query would fail * - * @return SQL query result + * @return SQL query result */ function pager_query($query, $limit = 10, $element = 0, $count_query = "") { global $pager_from_array, $pager_total; @@ -61,19 +61,21 @@ function pager_query($query, $limit = 10, $element = 0, $count_query = "") { /** * Use this function in your module or theme to display a pager. * - * @param $tags defines your buttons; text or img. - * @param $limit how many nodes are displayed per page - * @param $element support for multiple pagers per page (specify which this is) - * @param $type allows for distinction between pagers on main page and admin page, etc. - * Supported types are "default", "admin" and "simple". - * @param $attributes extra html attributes for \ (eg. title, onMouseOver, etc.) + * @param $tags defines your buttons; text or img. + * @param $limit how many nodes are displayed per page + * @param $element support for multiple pagers per page (specify which this + * is) + * @param $type allows for distinction between pagers on main page and admin + * page, etc. Supported types are "default", "admin" and "simple". + * @param $attributes extra html attributes for \ (eg. title, + * onMouseOver, etc.) * - * @return string html of pager + * @return string html of pager */ function pager_display($tags = "", $limit = 10, $element = 0, $type = "default", $attributes = array()) { return theme("pager_display_". $type, $tags, $limit, $element, $attributes); } -/** @} End of defgroup pager_api **/ +/** @} End of defgroup pager_api */ /** * @addtogroup themeable @@ -81,10 +83,9 @@ function pager_display($tags = "", $limit = 10, $element = 0, $type = "default", */ /** - * DEFAULT PAGER: - * When writing themes, you can rewrite this pager function in your - * theme. This is the most common pager type, and thus the main one - * to re-write in your theme. + * DEFAULT PAGER: When writing themes, you can rewrite this pager function in + * your theme. This is the most common pager type, and thus the main one to + * re-write in your theme. * * @see pager_display */ @@ -104,10 +105,9 @@ function theme_pager_display_default($tags = "", $limit = 10, $element = 0, $att } /** - * SIMPLE PAGER: - * When writing themes, you can rewrite this pager function in your - * theme. Keep in mind that the pager it defines is intended to have - * a "simple" look, possibly located in a table or block. + * SIMPLE PAGER: When writing themes, you can rewrite this pager function in + * your theme. Keep in mind that the pager it defines is intended to have a + * "simple" look, possibly located in a table or block. * * @see pager_display */ @@ -121,10 +121,9 @@ function theme_pager_display_simple($tags = "", $limit = 10, $element = 0, $attr } /** - * ADMIN PAGER: - * When writing themes, you can rewrite this pager function in your - * theme. Most themes will probably NOT re-write this function, as - * admin pages are not normally themed. + * ADMIN PAGER: When writing themes, you can rewrite this pager function in your + * theme. Most themes will probably NOT re-write this function, as admin pages + * are not normally themed. * * @see pager_display */ @@ -136,24 +135,25 @@ function theme_pager_display_admin($tags = "", $limit = 10, $element = 0, $attri */ return theme_pager_display_default($tags, $limit, $element, $attributes); } -/** @} End of addtogroup themeable **/ +/** @} End of addtogroup themeable */ /** - * @name pager pieces - * Use these pieces to construct your own custom pagers in your theme. Note - * that you should NOT modify this file to customize your pager. + * @name pager pieces Use these pieces to construct your own custom pagers in + * your theme. Note that you should NOT modify this file to customize your + * pager. * @{ */ /** * displays a "first-page" link * - * @param $text defines the name (or image) of the link - * @param $limit how many nodes are displayed per page - * @param $element distinguish between multiple pagers on one page - * @param $attributes extra html attributes for \ (eg. title, onMouseOver, etc.) + * @param $text defines the name (or image) of the link + * @param $limit how many nodes are displayed per page + * @param $element distinguish between multiple pagers on one page + * @param $attributes extra html attributes for \ (eg. title, + * onMouseOver, etc.) * - * @return string html of this pager piece + * @return string html of this pager piece */ function pager_first($text, $limit, $element = 0, $attributes = array()) { global $pager_from_array; @@ -170,13 +170,14 @@ function pager_first($text, $limit, $element = 0, $attributes = array()) { /** * displays a "previous-page" link * - * @param $text defines the name (or image) of the link - * @param $limit how many nodes are displayed per page - * @param $element distinguish between multiple pagers on one page - * @param $n how many pages we move back (defaults to 1) - * @param $attributes extra html attributes for \ (eg. title, onMouseOver, etc.) + * @param $text defines the name (or image) of the link + * @param $limit how many nodes are displayed per page + * @param $element distinguish between multiple pagers on one page + * @param $n how many pages we move back (defaults to 1) + * @param $attributes extra html attributes for \ (eg. title, + * onMouseOver, etc.) * - * @return string html of this pager piece + * @return string html of this pager piece */ function pager_previous($text, $limit, $element = 0, $n = 1, $attributes = array()) { global $pager_from_array; @@ -190,13 +191,14 @@ function pager_previous($text, $limit, $element = 0, $n = 1, $attributes = array /** * displays a "next-page" link * - * @param $text defines the name (or image) of the link - * @param $limit how many nodes are displayed per page - * @param $element distinguish between multiple pagers on one page - * @param $n how many pages we move back (defaults to 1) - * @param $attributes extra html attributes for \ (eg. title, onMouseOver, etc.) + * @param $text defines the name (or image) of the link + * @param $limit how many nodes are displayed per page + * @param $element distinguish between multiple pagers on one page + * @param $n how many pages we move back (defaults to 1) + * @param $attributes extra html attributes for \ (eg. title, + * onMouseOver, etc.) * - * @return string html of this pager piece + * @return string html of this pager piece */ function pager_next($text, $limit, $element = 0, $n = 1, $attributes = array()) { global $pager_from_array, $pager_total; @@ -210,12 +212,13 @@ function pager_next($text, $limit, $element = 0, $n = 1, $attributes = array()) /** * displays a "last-page" link * - * @param $text defines the name (or image) of the link - * @param $limit how many nodes are displayed per page - * @param $element distinguish between multiple pagers on one page - * @param $attributes extra html attributes for \ (eg. title, onMouseOver, etc.) + * @param $text defines the name (or image) of the link + * @param $limit how many nodes are displayed per page + * @param $element distinguish between multiple pagers on one page + * @param $attributes extra html attributes for \ (eg. title, + * onMouseOver, etc.) * - * @return string html of this pager piece + * @return string html of this pager piece */ function pager_last($text, $limit, $element = 0, $attributes = array()) { global $pager_from_array, $pager_total; @@ -233,11 +236,11 @@ function pager_last($text, $limit, $element = 0, $attributes = array()) { /** * displays "%d through %d of $d" type detail about the cur page * - * @param $limit how many nodes are displayed per page - * @param $element distinguish between multiple pagers on one page - * @param $format allows you to reword the format string + * @param $limit how many nodes are displayed per page + * @param $element distinguish between multiple pagers on one page + * @param $format allows you to reword the format string * - * @return string html of this pager piece + * @return string html of this pager piece */ function pager_detail($limit, $element = 0, $format = "%d through %d of %d.") { global $pager_from_array, $pager_total; @@ -252,13 +255,14 @@ function pager_detail($limit, $element = 0, $format = "%d through %d of %d.") { /** * displays a list of nearby pages with additional nodes * - * @param $limit how many nodes are displayed per page - * @param $element distinguish between multiple pagers on one page - * @param $quantity defines the length of the page list - * @param $text optional text to display before the page list - * @param $attributes extra html attributes for \ (eg. title, onMouseOver, etc.) + * @param $limit how many nodes are displayed per page + * @param $element distinguish between multiple pagers on one page + * @param $quantity defines the length of the page list + * @param $text optional text to display before the page list + * @param $attributes extra html attributes for \ (eg. title, + * onMouseOver, etc.) * - * @return string html of this pager piece + * @return string html of this pager piece */ function pager_list($limit, $element = 0, $quantity = 5, $text = "", $attributes = array()) { global $pager_from_array, $pager_total; diff --git a/includes/theme.inc b/includes/theme.inc index 0a9fb107424..fd2f6f51c90 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -2,24 +2,24 @@ /* $Id$ */ /** - @file - - Theme System - controls the output of Drupal. - - The theme system allows for nearly all output of the Drupal system to be - customized by user themes. - - @see Theme system - @see themeable -**/ + * @file + * + * Theme System - controls the output of Drupal. + * + * The theme system allows for nearly all output of the Drupal system to be + * customized by user themes. + * + * @see Theme system + * @see themeable + */ /** - Hook Help - returns theme specific help and information. - - @param section defines the \a section of the help to be returned. - - @return a string containing the help output. -**/ + * Hook Help - returns theme specific help and information. + * + * @param section defines the @a section of the help to be returned. + * + * @return a string containing the help output. + */ function theme_help($section) { $ouptout = ""; @@ -32,10 +32,10 @@ function theme_help($section) { } /** - Initialized the theme system. - - @return the name of the currently selected theme. -**/ + * Initialized the theme system. + * + * @return the name of the currently selected theme. + */ function init_theme() { global $user; @@ -55,12 +55,12 @@ function init_theme() { } /** - Provides a list of currently available themes. - - @param $refresh - - @return an array of the currently available themes. -**/ + * Provides a list of currently available themes. + * + * @param $refresh + * + * @return an array of the currently available themes. + */ function list_themes($refresh = 0) { static $list; @@ -82,16 +82,15 @@ function list_themes($refresh = 0) { } /** - External interface of the theme system to all other modules, and core files. - - All requests for themed functions must go through this function. It examines - the request and routes it to the appropriate theme function. If the current - theme does not implement the requested function, then the base theme function - is called. - Example: \verbatim $header_text = theme("header"); \endverbatim - - @return themed output. -**/ + * External interface of the theme system to all other modules, and core files. + * + * All requests for themed functions must go through this function. It examines + * the request and routes it to the appropriate theme function. If the current + * theme does not implement the requested function, then the base theme function + * is called. Example: @verbatim $header_text = theme("header"); @endverbatim + * + * @return themed output. + */ function theme() { global $theme; @@ -107,30 +106,30 @@ function theme() { } /** - Returns the path to the currently selected theme. - - @return the path to the the currently selected theme. -**/ + * Returns the path to the currently selected theme. + * + * @return the path to the the currently selected theme. + */ function path_to_theme() { global $theme; return $theme->path; } /** - @defgroup themeable Themeable functions - @{ - - Themeable functions - functions that can be styled differently in themes. - - @see theme - @see theme.inc -**/ + * @defgroup themeable Themeable functions + * @{ + * + * Themeable functions - functions that can be styled differently in themes. + * + * @see theme + * @see theme.inc + */ /** - Returns the theme header. - - @return a string containing the \a header output. -**/ + * Returns the theme header. + * + * @return a string containing the @a header output. + */ function theme_header() { global $base_url; @@ -163,14 +162,14 @@ function theme_header() { /** * Returns an entire Drupal page displaying the supplied content. * - * @param $content a string containing the content to display - * @param $title (optional) page title (\\) + * @param $content a string containing the content to display + * @param $title (optional) page title (\<head>\<title>) * @param $breadcrumb (optional) page breadcrumb * - * @see drupal_breadcrumb + * @see drupal_breadcrumb * - * @return a string containing the \a page output. -**/ + * @return a string containing the @a page output. + */ function theme_page($content, $title = NULL, $breadcrumb = NULL) { if (isset($title)) { drupal_set_title($title); @@ -187,59 +186,60 @@ function theme_page($content, $title = NULL, $breadcrumb = NULL) { } /** - Returns themed set of links. - - @param $links an array of \a links to be themed. - @param $delimiter (optional) \a delimiter used to separate the links. - - @return a string containing the \a links output. -**/ + * Returns themed set of links. + * + * @param $links an array of @a links to be themed. + * @param $delimiter (optional) @a delimiter used to separate the links. + * + * @return a string containing the @a links output. + */ function theme_links($links, $delimiter = " | ") { return implode($delimiter, $links); } /** - Returns themed image. - - @param $name the \a name of the image file. - - @return a string containing the \a image output. -**/ + * Returns themed image. + * + * @param $name the @a name of the image file. + * + * @return a string containing the @a image output. + */ function theme_image($name) { return "misc/$name"; } /** - Returns a themed breadcrumb menu. - - @param $breadcrumb an array containing the breadcrumb links. - - @return a string containing the \a breadcrumb output. -**/ + * Returns a themed breadcrumb menu. + * + * @param $breadcrumb an array containing the breadcrumb links. + * + * @return a string containing the @a breadcrumb output. + */ function theme_breadcrumb($breadcrumb) { return "<div class=\"breadcrumb\">". implode($breadcrumb, " » ") ."</div>"; } /** - Returns themed node. - - The passed $node object provides a all relevant information for displaying a node: - \li \c $node->nid - \li \c $node->type i.e. story, blog, forum. - \li \c $node->title - \li \c $node->created a unix timestamp. - \li \c $node->teaser - \li \c $node->body - \li \c $node->changed a unix timestamp. - \li \c $node->uid the id of the poster. - \li \c $node->username the username of the poster. - - @param $node the \a node to be themed. - @param $main Display teaser only, as on main page? - @param $page Display node as standalone page (no title)? - - @return a string containing the \a node output. -**/ + * Returns themed node. + * + * The passed $node object provides a all relevant information for displaying a + * node: + * @li @c $node->nid + * @li @c $node->type i.e. story, blog, forum. + * @li @c $node->title + * @li @c $node->created a unix timestamp. + * @li @c $node->teaser + * @li @c $node->body + * @li @c $node->changed a unix timestamp. + * @li @c $node->uid the id of the poster. + * @li @c $node->username the username of the poster. + * + * @param $node the @a node to be themed. + * @param $main Display teaser only, as on main page? + * @param $page Display node as standalone page (no title)? + * + * @return a string containing the @a node output. + */ function theme_node($node, $main = 0, $page = 0) { if (module_exist("taxonomy")) { $terms = taxonomy_link("taxonomy terms", $node); @@ -272,27 +272,27 @@ function theme_node($node, $main = 0, $page = 0) { } /** - Returns themed form element. - - @param $title the form element's title - @param $value the form element's data - @param $description the form element's description or explanation - - @return a string contraining the \a node output. -**/ + * Returns themed form element. + * + * @param $title the form element's title + * @param $value the form element's data + * @param $description the form element's description or explanation + * + * @return a string containing the @a node output. + */ function theme_form_element($title, $value, $description = 0) { return "<div class=\"form-item\">". ($title ? "<label>$title:</label><br />" : "") . $value . ($description ? "<div class=\"description\">$description</div>" : "") ."</div>\n"; } /** - Returns themed table. - - @param $header - @param $rows - - @return a string contraining the \a node output. -**/ + * Returns themed table. + * + * @param $header + * @param $rows + * + * @return a string containing the @a node output. + */ function theme_table($header, $rows) { @@ -339,32 +339,33 @@ function theme_table($header, $rows) { } /** - Returns themed box. - - @param $subject the \a subject of the box. - @param $content the \a content of the box. - @param $region the \a region of the box. - - @return a string containing the \a box output. -**/ + * Returns themed box. + * + * @param $subject the @a subject of the box. + * @param $content the @a content of the box. + * @param $region the @a region of the box. + * + * @return a string containing the @a box output. + */ function theme_box($subject, $content, $region = "main") { $output = "<h2>$subject</h2><p>$content</p>"; return $output; } /** - Returns a themed block. - - You can style your blocks by defining .block (all blocks), - .block-<i>module</i> (all blocks of module <i>module</i>), - and \#block-<i>module</i>-<i>delta</i> (specific block of - module <i>module</i> with delta <i>delta</i>) in your - theme's CSS. - - @param $block object "indexed with" fields from database table 'blocks' ($block->module, $block->delta, $block->region, ...) and fields returned by <i>module</i>_block("view") ($block->subject, $block->content, ...). - - @return a string containing the \a box output. -**/ + * Returns a themed block. + * + * You can style your blocks by defining .block (all blocks), + * .block-<i>module</i> (all blocks of module <i>module</i>), and + * \#block-<i>module</i>-<i>delta</i> (specific block of module <i>module</i> + * with delta <i>delta</i>) in your theme's CSS. + * + * @param $block object "indexed with" fields from database table 'blocks' + * ($block->module, $block->delta, $block->region, ...) and fields returned by + * <i>module</i>_block("view") ($block->subject, $block->content, ...). + * + * @return a string containing the @a box output. + */ function theme_block($block) { $output = "<div class=\"block block-$block->module\" id=\"block-$block->module-$block->delta\">"; $output .= " <h3>$block->subject</h3>"; @@ -374,10 +375,10 @@ function theme_block($block) { } /** - Returns themed page footer. - - @return a string containing the \a footer output. -**/ + * Returns themed page footer. + * + * @return a string containing the @a footer output. + */ function theme_footer() { $output = "</td></tr></table>"; $output .= theme_closure(); @@ -386,22 +387,23 @@ function theme_footer() { } /** - Returns themed marker, useful for marking new comments or required form elements. - - @return a string containing the \a mark output. -**/ + * Returns themed marker, useful for marking new comments or required form + * elements. + * + * @return a string containing the @a mark output. + */ function theme_mark() { return "<span class=\"marker\">*</span>"; } /** - Returns themed list of items. - - @param $items (optional) an array of the items to be displayed in a list. - @param $title (optional) the title of the list. - - @return a string containing the \a list output. -**/ + * Returns themed list of items. + * + * @param $items (optional) an array of the items to be displayed in a list. + * @param $title (optional) the title of the list. + * + * @return a string containing the @a list output. + */ function theme_item_list($items = array(), $title = NULL) { $output = "<div class=\"item-list\">"; if (isset($title)) { @@ -420,23 +422,24 @@ function theme_item_list($items = array(), $title = NULL) { } /** - Returns themed error message. - - @param $message the error message to be themed. - - @return a string containing the \a error output. -**/ + * Returns themed error message. + * + * @param $message the error message to be themed. + * + * @return a string containing the @a error output. + */ function theme_error($message) { return "<div class=\"error\">$message</div>"; } /** - Execute hook _head which is run at the start of the page, and output should be in the head tags. - - @param $main (optional) - - @return a string containing the \a error output. -**/ + * Execute hook _head which is run at the start of the page, and output should + * be in the head tags. + * + * @param $main (optional) + * + * @return a string containing the @a error output. + */ function theme_head($main = 0) { global $base_url; $output .= "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />"; @@ -450,26 +453,26 @@ function theme_head($main = 0) { } /** - Execute hook _footer() which is run at the end of the page right - before the \</body> tag. - - @param $main (optional) - - @return a string containing the \a closure output. -**/ + * Execute hook _footer() which is run at the end of the page right before the + * \</body> tag. + * + * @param $main (optional) + * + * @return a string containing the @a closure output. + */ function theme_closure($main = 0) { $footer = module_invoke_all("footer", $main); return implode($footer, "\n"); } /** - Call _onload hook in all modules to enable modules to insert javascript - that will get run once the page has been loaded by the browser. - - @param $theme_onloads (optional) addition onload directives. - - @return a string containing the \a onload output. -**/ + * Call _onload hook in all modules to enable modules to insert javascript that + * will get run once the page has been loaded by the browser. + * + * @param $theme_onloads (optional) addition onload directives. + * + * @return a string containing the @a onload output. + */ function theme_onload_attribute($theme_onloads = array()) { if (!is_array($theme_onloads)) { $theme_onloads = array($theme_onloads); @@ -486,9 +489,9 @@ function theme_onload_attribute($theme_onloads = array()) { /** * Returns themed blocks available for current $user at $region. * - * @param $region main|left|right + * @param $region main|left|right * - * @return a string containing the \a blocks output. + * @return a string containing the @a blocks output. */ function theme_blocks($region) { $output = ""; diff --git a/modules/block.module b/modules/block.module index 1746a61cc67..1fa5673ea4f 100644 --- a/modules/block.module +++ b/modules/block.module @@ -101,9 +101,11 @@ function block_admin_save($edit) { /** * update blocks db table with blocks currently exported by modules * - * @param $order_by php <a href="http://www.php.net/manual/en/function.array-multisort.php">array_multisort()</a> style sort ordering, eg. "weight", SORT_ASC, SORT_STRING. + * @param $order_by php <a + * href="http://www.php.net/manual/en/function.array-multisort.php">array_multisort()</a> + * style sort ordering, eg. "weight", SORT_ASC, SORT_STRING. * - * @return blocks currently exported by modules, sorted by $order_by + * @return blocks currently exported by modules, sorted by $order_by */ function _block_rehash($order_by = array("weight")) { $result = db_query("SELECT * FROM {blocks} "); @@ -355,13 +357,13 @@ function block_user($type, &$edit, &$user) { /** * Return blocks available for current $user at $region. * - * @param $region main|left|right + * @param $region main|left|right * - * @return array of block objects, indexed with <i>module</i>_<i>delta</i> + * @return array of block objects, indexed with <i>module</i>_<i>delta</i> * - * @see <a href="http://drupal.org/node/view/1042" target="_top">[feature] + * @see <a href="http://drupal.org/node/view/1042" target="_top">[feature] * Generic template design difficult w/o block region "look-ahead"</a> - * @todo add a proper primary key (bid) to the blocks table so we don't have + * @todo add a proper primary key (bid) to the blocks table so we don't have * to mess around with this <i>module</i>_<i>delta</i> construct. currently, * "blocks" has no primary key defined (bad)! */ diff --git a/modules/block/block.module b/modules/block/block.module index 1746a61cc67..1fa5673ea4f 100644 --- a/modules/block/block.module +++ b/modules/block/block.module @@ -101,9 +101,11 @@ function block_admin_save($edit) { /** * update blocks db table with blocks currently exported by modules * - * @param $order_by php <a href="http://www.php.net/manual/en/function.array-multisort.php">array_multisort()</a> style sort ordering, eg. "weight", SORT_ASC, SORT_STRING. + * @param $order_by php <a + * href="http://www.php.net/manual/en/function.array-multisort.php">array_multisort()</a> + * style sort ordering, eg. "weight", SORT_ASC, SORT_STRING. * - * @return blocks currently exported by modules, sorted by $order_by + * @return blocks currently exported by modules, sorted by $order_by */ function _block_rehash($order_by = array("weight")) { $result = db_query("SELECT * FROM {blocks} "); @@ -355,13 +357,13 @@ function block_user($type, &$edit, &$user) { /** * Return blocks available for current $user at $region. * - * @param $region main|left|right + * @param $region main|left|right * - * @return array of block objects, indexed with <i>module</i>_<i>delta</i> + * @return array of block objects, indexed with <i>module</i>_<i>delta</i> * - * @see <a href="http://drupal.org/node/view/1042" target="_top">[feature] + * @see <a href="http://drupal.org/node/view/1042" target="_top">[feature] * Generic template design difficult w/o block region "look-ahead"</a> - * @todo add a proper primary key (bid) to the blocks table so we don't have + * @todo add a proper primary key (bid) to the blocks table so we don't have * to mess around with this <i>module</i>_<i>delta</i> construct. currently, * "blocks" has no primary key defined (bad)! */ diff --git a/modules/comment.module b/modules/comment.module index 6e7ab5471b4..34e5f039a67 100644 --- a/modules/comment.module +++ b/modules/comment.module @@ -1531,8 +1531,9 @@ function comment_num_replies($pid) { /** * get number of new comments for current user and specified node * - * @param $nid node-id to count comments for - * @param $timestamp time to count from (defaults to time of last user access to node) + * @param $nid node-id to count comments for + * @param $timestamp time to count from (defaults to time of last user access + * to node) */ function comment_num_new($nid, $timestamp = 0) { global $user; diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 6e7ab5471b4..34e5f039a67 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -1531,8 +1531,9 @@ function comment_num_replies($pid) { /** * get number of new comments for current user and specified node * - * @param $nid node-id to count comments for - * @param $timestamp time to count from (defaults to time of last user access to node) + * @param $nid node-id to count comments for + * @param $timestamp time to count from (defaults to time of last user access + * to node) */ function comment_num_new($nid, $timestamp = 0) { global $user; diff --git a/modules/forum.module b/modules/forum.module index eaedf11e26f..23c545f8a14 100644 --- a/modules/forum.module +++ b/modules/forum.module @@ -459,23 +459,23 @@ function forum_page() { } /** - @addtogroup themeable - @{ -**/ + * @addtogroup themeable + * @{ + */ /** - Format the forum body. - - @param forums - @param topics - @param parents - @param tid - @param sortby - @param forum_per_page - @param offset - - @return the output for the forum body. -**/ + * Format the forum body. + * + * @param forums + * @param topics + * @param parents + * @param tid + * @param sortby + * @param forum_per_page + * @param offset + * + * @return the output for the forum body. + */ function theme_forum_display($forums, $topics, $parents, $tid, $sortby, $forum_per_page, $offset) { // forum list, topics list, topic browser and "add new topic" link @@ -519,14 +519,14 @@ function theme_forum_display($forums, $topics, $parents, $tid, $sortby, $forum_p } /** - Format the forum listing. - - @param forums - @param parents - @param tid - - @return output for the forum listing. -**/ + * Format the forum listing. + * + * @param forums + * @param parents + * @param tid + * + * @return output for the forum listing. + */ function theme_forum_list($forums, $parents, $tid) { global $user; @@ -582,16 +582,16 @@ function theme_forum_list($forums, $parents, $tid) { } /** - Format the topic listing. - - @param tid - @param topics - @param sortby - @param forum_per_page - @param offset - - @return output for the topic list. -**/ + * Format the topic listing. + * + * @param tid + * @param topics + * @param sortby + * @param forum_per_page + * @param offset + * + * @return output for the topic list. + */ function theme_forum_topic_list($tid, $topics, $sortby, $forum_per_page, $offset) { global $id, $status, $user, $pager_total, $forum_topic_list_header; @@ -632,7 +632,7 @@ function theme_forum_topic_list($tid, $topics, $sortby, $forum_per_page, $offset return $output; } -/** @} End of addtogroup themeable **/ +/** @} End of addtogroup themeable */ function _forum_icon($new_posts, $num_posts = 0, $comment_mode = 0) { diff --git a/modules/forum/forum.module b/modules/forum/forum.module index eaedf11e26f..23c545f8a14 100644 --- a/modules/forum/forum.module +++ b/modules/forum/forum.module @@ -459,23 +459,23 @@ function forum_page() { } /** - @addtogroup themeable - @{ -**/ + * @addtogroup themeable + * @{ + */ /** - Format the forum body. - - @param forums - @param topics - @param parents - @param tid - @param sortby - @param forum_per_page - @param offset - - @return the output for the forum body. -**/ + * Format the forum body. + * + * @param forums + * @param topics + * @param parents + * @param tid + * @param sortby + * @param forum_per_page + * @param offset + * + * @return the output for the forum body. + */ function theme_forum_display($forums, $topics, $parents, $tid, $sortby, $forum_per_page, $offset) { // forum list, topics list, topic browser and "add new topic" link @@ -519,14 +519,14 @@ function theme_forum_display($forums, $topics, $parents, $tid, $sortby, $forum_p } /** - Format the forum listing. - - @param forums - @param parents - @param tid - - @return output for the forum listing. -**/ + * Format the forum listing. + * + * @param forums + * @param parents + * @param tid + * + * @return output for the forum listing. + */ function theme_forum_list($forums, $parents, $tid) { global $user; @@ -582,16 +582,16 @@ function theme_forum_list($forums, $parents, $tid) { } /** - Format the topic listing. - - @param tid - @param topics - @param sortby - @param forum_per_page - @param offset - - @return output for the topic list. -**/ + * Format the topic listing. + * + * @param tid + * @param topics + * @param sortby + * @param forum_per_page + * @param offset + * + * @return output for the topic list. + */ function theme_forum_topic_list($tid, $topics, $sortby, $forum_per_page, $offset) { global $id, $status, $user, $pager_total, $forum_topic_list_header; @@ -632,7 +632,7 @@ function theme_forum_topic_list($tid, $topics, $sortby, $forum_per_page, $offset return $output; } -/** @} End of addtogroup themeable **/ +/** @} End of addtogroup themeable */ function _forum_icon($new_posts, $num_posts = 0, $comment_mode = 0) { diff --git a/modules/node.module b/modules/node.module index 97adb01cf82..e02546b1c5c 100644 --- a/modules/node.module +++ b/modules/node.module @@ -112,11 +112,13 @@ function node_last_viewed($nid) { } /** - * Determines whether the supplied timestamp is newer than the user's last view of a given node + * Determines whether the supplied timestamp is newer than the user's last view + * of a given node * - * @param $nid node-id twhose history supplies the 'last viewed' timestamp - * @param $timestamp time which is compared against node's 'last veiwed' timestamp -*/ + * @param $nid node-id twhose history supplies the 'last viewed' timestamp + * @param $timestamp time which is compared against node's 'last veiwed' + * timestamp + */ function node_is_new($nid, $timestamp) { global $user; static $cache; diff --git a/modules/node/node.module b/modules/node/node.module index 97adb01cf82..e02546b1c5c 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -112,11 +112,13 @@ function node_last_viewed($nid) { } /** - * Determines whether the supplied timestamp is newer than the user's last view of a given node + * Determines whether the supplied timestamp is newer than the user's last view + * of a given node * - * @param $nid node-id twhose history supplies the 'last viewed' timestamp - * @param $timestamp time which is compared against node's 'last veiwed' timestamp -*/ + * @param $nid node-id twhose history supplies the 'last viewed' timestamp + * @param $timestamp time which is compared against node's 'last veiwed' + * timestamp + */ function node_is_new($nid, $timestamp) { global $user; static $cache; diff --git a/modules/search.module b/modules/search.module index efb5876c106..f55f7eef332 100644 --- a/modules/search.module +++ b/modules/search.module @@ -32,7 +32,7 @@ function search_perm() { /** * Return an array of links to be displayed * - * @param $type The type of page requesting the link + * @param $type The type of page requesting the link * */ function search_link($type) { @@ -99,11 +99,11 @@ function search_cron() { * * Search function called by each node that supports the indexed search. * - * @param $search_array an array as returned from <i>module</i>_search - * of type array("keys" => ..., "type" => ..., "select" => ...) - * @see node_search for an explanation of array items + * @param $search_array an array as returned from <i>module</i>_search of type + * array("keys" => ..., "type" => ..., "select" => ...) + * @see node_search for an explanation of array items * - * @return array of search results, each element being an array indexed with + * @return array of search results, each element being an array indexed with * "count", "title", "link", "user" (name), "date", "keywords" */ function do_search($search_array) { @@ -216,9 +216,9 @@ function do_search($search_array) { /** * Update the search_index table * - * @param $search_array an array as returned from <i>module</i>_update_index + * @param $search_array an array as returned from <i>module</i>_update_index * of type array("last_update" => ..., "node_type" => ..., "select" => ...) - * @see node_update_index for an explanation of array items + * @see node_update_index for an explanation of array items */ function update_index($search_array) { $last_update = variable_get($search_array["last_update"], 1); @@ -327,8 +327,8 @@ function search_invalidate() { /** * Save the values entered by the administrator for the search module * - * @param $edit An array of fields as setup via calling form_textfield, - * form_textarea etc + * @param $edit An array of fields as setup via calling form_textfield, + * form_textarea etc */ function search_save($edit) { variable_set("minimum_word_size", $edit["minimum_word_size"]); diff --git a/modules/search/search.module b/modules/search/search.module index efb5876c106..f55f7eef332 100644 --- a/modules/search/search.module +++ b/modules/search/search.module @@ -32,7 +32,7 @@ function search_perm() { /** * Return an array of links to be displayed * - * @param $type The type of page requesting the link + * @param $type The type of page requesting the link * */ function search_link($type) { @@ -99,11 +99,11 @@ function search_cron() { * * Search function called by each node that supports the indexed search. * - * @param $search_array an array as returned from <i>module</i>_search - * of type array("keys" => ..., "type" => ..., "select" => ...) - * @see node_search for an explanation of array items + * @param $search_array an array as returned from <i>module</i>_search of type + * array("keys" => ..., "type" => ..., "select" => ...) + * @see node_search for an explanation of array items * - * @return array of search results, each element being an array indexed with + * @return array of search results, each element being an array indexed with * "count", "title", "link", "user" (name), "date", "keywords" */ function do_search($search_array) { @@ -216,9 +216,9 @@ function do_search($search_array) { /** * Update the search_index table * - * @param $search_array an array as returned from <i>module</i>_update_index + * @param $search_array an array as returned from <i>module</i>_update_index * of type array("last_update" => ..., "node_type" => ..., "select" => ...) - * @see node_update_index for an explanation of array items + * @see node_update_index for an explanation of array items */ function update_index($search_array) { $last_update = variable_get($search_array["last_update"], 1); @@ -327,8 +327,8 @@ function search_invalidate() { /** * Save the values entered by the administrator for the search module * - * @param $edit An array of fields as setup via calling form_textfield, - * form_textarea etc + * @param $edit An array of fields as setup via calling form_textfield, + * form_textarea etc */ function search_save($edit) { variable_set("minimum_word_size", $edit["minimum_word_size"]); diff --git a/modules/taxonomy.module b/modules/taxonomy.module index 74a1848c993..6274798b11b 100644 --- a/modules/taxonomy.module +++ b/modules/taxonomy.module @@ -540,12 +540,11 @@ function _taxonomy_term_children($tid) { } /** - * Try to map a string to existing vocabularies. - * Provide case insensitive and trimmed map so as to - * maximize likelihood of successful mapping. + * Try to map a string to existing vocabularies. Provide case insensitive and + * trimmed map so as to maximize likelihood of successful mapping. * - * @param $name Name of the vocabulary to search - * @return array of matching vocabularies, as objects + * @param $name Name of the vocabulary to search + * @return array of matching vocabularies, as objects */ function taxonomy_get_vocabulary_by_name($name) { // LOWER is ANSI SQL-92 @@ -559,12 +558,11 @@ function taxonomy_get_vocabulary_by_name($name) { } /** - * Try to map a string to existing terms - * Provide case insensitive and trimmed map so as to - * maximize likelihood of successful mapping. + * Try to map a string to existing terms Provide case insensitive and trimmed + * map so as to maximize likelihood of successful mapping. * - * @param name Name of the term to search - * @return rray of matching terms, as objects + * @param name Name of the term to search + * @return rray of matching terms, as objects */ function taxonomy_get_term_by_name($name) { // LOWER is ANSI SQL-92 diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index 74a1848c993..6274798b11b 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/taxonomy.module @@ -540,12 +540,11 @@ function _taxonomy_term_children($tid) { } /** - * Try to map a string to existing vocabularies. - * Provide case insensitive and trimmed map so as to - * maximize likelihood of successful mapping. + * Try to map a string to existing vocabularies. Provide case insensitive and + * trimmed map so as to maximize likelihood of successful mapping. * - * @param $name Name of the vocabulary to search - * @return array of matching vocabularies, as objects + * @param $name Name of the vocabulary to search + * @return array of matching vocabularies, as objects */ function taxonomy_get_vocabulary_by_name($name) { // LOWER is ANSI SQL-92 @@ -559,12 +558,11 @@ function taxonomy_get_vocabulary_by_name($name) { } /** - * Try to map a string to existing terms - * Provide case insensitive and trimmed map so as to - * maximize likelihood of successful mapping. + * Try to map a string to existing terms Provide case insensitive and trimmed + * map so as to maximize likelihood of successful mapping. * - * @param name Name of the term to search - * @return rray of matching terms, as objects + * @param name Name of the term to search + * @return rray of matching terms, as objects */ function taxonomy_get_term_by_name($name) { // LOWER is ANSI SQL-92