function _pathauto_get_schema_alias_maxlength in Pathauto 7
Same name and namespace in other branches
- 6.2 pathauto.inc \_pathauto_get_schema_alias_maxlength()
- 6 pathauto.inc \_pathauto_get_schema_alias_maxlength()
Fetch the maximum length of the {url_alias}.alias field from the schema.
Return value
An integer of the maximum URL alias length allowed by the database.
6 calls to _pathauto_get_schema_alias_maxlength()
- PathautoUnitTestCase::testGetSchemaAliasMaxLength in ./
pathauto.test - Test _pathauto_get_schema_alias_maxlength().
- pathauto_alias_uniquify in ./
pathauto.inc - Check to ensure a path alias is unique and add suffix variants if necessary.
- pathauto_cleanstring in ./
pathauto.inc - Clean up a string segment to be used in an URL alias.
- pathauto_clean_alias in ./
pathauto.inc - Clean up an URL alias.
- pathauto_help in ./
pathauto.module - Implements hook_help().
File
- ./
pathauto.inc, line 700 - Miscellaneous functions for Pathauto.
Code
function _pathauto_get_schema_alias_maxlength() {
$maxlength =& drupal_static(__FUNCTION__);
if (!isset($maxlength)) {
$schema = drupal_get_schema('url_alias');
$maxlength = $schema['fields']['alias']['length'];
}
return $maxlength;
}