Input validation in Drupal 5
Same name and namespace in other branches
- 8 core/includes/common.inc \validation
- 4 includes/common.inc \validation
- 6 includes/common.inc \validation
- 7 includes/common.inc \validation
Functions to validate user input.
File
- includes/
common.inc, line 893 - Common functions that many Drupal modules will need to reference.
Functions
Name | Location | Description |
---|---|---|
base_path |
includes/ |
Returns the base URL path of the Drupal installation. At the very least, this will always default to /. |
check_file |
includes/ |
|
check_url |
includes/ |
Prepare a URL for use in an HTML attribute. Strips harmful protocols. |
drupal_add_css |
includes/ |
Adds a CSS file to the stylesheet queue. |
drupal_add_js |
includes/ |
Add a JavaScript file, setting or inline code to the page. |
drupal_add_link |
includes/ |
Add a <link> tag to the page's HEAD. |
drupal_attributes |
includes/ |
Format an attribute string to insert in a tag. |
drupal_build_css_cache |
includes/ |
Aggregate and optimize CSS files, putting them in the files directory. |
drupal_clear_css_cache |
includes/ |
Delete all cached CSS files. |
drupal_clone |
includes/ |
Provide a substitute clone() function for PHP4. |
drupal_cron_cleanup |
includes/ |
Shutdown function for cron cleanup. |
drupal_cron_run |
includes/ |
Executes a cron run when called |
drupal_eval |
includes/ |
Evaluate a string of PHP code. |
drupal_get_css |
includes/ |
Returns a themed representation of all stylesheets that should be attached to the page. It loads the CSS in order, with 'core' CSS first, then 'module' CSS, then 'theme' CSS files. This ensures proper cascading of styles… |
drupal_get_js |
includes/ |
Returns a themed presentation of all JavaScript code for the current page. References to JavaScript files are placed in a certain order: first, all 'core' files, then all 'module' and finally all 'theme' JavaScript… |
drupal_get_path |
includes/ |
Returns the path to a system item (module, theme, etc.). |
drupal_get_private_key |
includes/ |
Ensure the private key variable used to generate tokens is set. |
drupal_get_token |
includes/ |
Generate a token based on $value, the current user session and private key. |
drupal_mail |
includes/ |
Send an e-mail message, using Drupal variables and default settings. More information in the PHP function reference for mail() |
drupal_map_assoc |
includes/ |
Form an associative array from a linear array. |
drupal_page_footer |
includes/ |
Perform end-of-request tasks. |
drupal_render |
includes/ |
Renders HTML given a structured array tree. Recursively iterates over each of the array elements, generating HTML code. This function is usually called from within a another function, like drupal_get_form() or node_view(). |
drupal_system_listing |
includes/ |
Returns an array of files objects of the given type from the site-wide directory (i.e. modules/), the all-sites directory (i.e. sites/all/modules/), the profiles directory, and site-specific directory (i.e. sites/somesite/modules/). The returned array… |
drupal_to_js |
includes/ |
Converts a PHP variable into its Javascript equivalent. |
drupal_urlencode |
includes/ |
Wrapper around urlencode() which avoids Apache quirks. |
drupal_valid_token |
includes/ |
Validate a token based on $value, the current user session and private key. |
element_child |
includes/ |
Check if the key is a child. |
element_children |
includes/ |
Get keys of a structured array tree element that are not properties (i.e., do not begin with '#'). |
element_properties |
includes/ |
Get properties of a structured array element. Properties begin with '#'. |
element_property |
includes/ |
Check if the key is a property. |
flood_is_allowed |
includes/ |
Check if the current visitor (hostname/IP) is allowed to proceed with the specified event. The user is allowed to proceed if he did not trigger the specified event more than $threshold times per hour. |
flood_register_event |
includes/ |
Register an event for the current visitor (hostname/IP) to the flood control mechanism. |
format_date |
includes/ |
Format a date with the given configured format or a custom format string. |
format_interval |
includes/ |
Format a time interval with the requested granularity. |
format_plural |
includes/ |
Format a string containing a count of items. |
format_rss_channel |
includes/ |
Formats an RSS channel. |
format_rss_item |
includes/ |
Format a single RSS item. |
format_size |
includes/ |
Generate a string representation for the given byte count. |
format_xml_elements |
includes/ |
Format XML elements. |
l |
includes/ |
Format an internal Drupal link. |
page_set_cache |
includes/ |
Store the current page in the cache. |
parse_size |
includes/ |
Parse a given byte count. |
url |
includes/ |
Generate a URL from a Drupal menu path. Will also pass-through existing URLs. |
valid_email_address |
includes/ |
Verify the syntax of the given e-mail address. |
valid_url |
includes/ |
Verify the syntax of the given URL. |
xmlrpc |
includes/ |
Performs one or more XML-RPC request(s). |
_drupal_add_js |
includes/ |
Helper function for drupal_add_js(). |
_drupal_bootstrap_full |
includes/ |
|
_element_sort |
includes/ |
Function used by uasort in drupal_render() to sort structured arrays by weight. |
Sub-Topics
Name | Location | Description |
---|---|---|
Formatting |
includes/ |
Functions to format numbers, strings, dates, etc. |