You are here

function _pathauto_get_schema_alias_maxlength in Pathauto 6.2

Same name and namespace in other branches
  1. 6 pathauto.inc \_pathauto_get_schema_alias_maxlength()
  2. 7 pathauto.inc \_pathauto_get_schema_alias_maxlength()

Fetch the maximum length of the {url_alias}.dst 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().

... See full list

File

./pathauto.inc, line 854
Miscellaneous functions for Pathauto.

Code

function _pathauto_get_schema_alias_maxlength() {
  static $maxlength;
  if (!isset($maxlength)) {
    $schema = drupal_get_schema('url_alias');
    $maxlength = $schema['fields']['dst']['length'];
  }
  return $maxlength;
}