You are here

function pathauto_install in Pathauto 6.2

Same name and namespace in other branches
  1. 8 pathauto.install \pathauto_install()
  2. 5.2 pathauto.install \pathauto_install()
  3. 6 pathauto.install \pathauto_install()
  4. 7 pathauto.install \pathauto_install()

Implements hook_install().

File

./pathauto.install, line 13
Install, update, and uninstall functions for Pathauto.

Code

function pathauto_install() {

  // Set some default variables necessary for the module to perform.
  variable_set('pathauto_node_pattern', 'content/[title-raw]');
  variable_set('pathauto_taxonomy_pattern', '[vocab-raw]/[catpath-raw]');
  variable_set('pathauto_forum_pattern', '[vocab-raw]/[catpath-raw]');
  variable_set('pathauto_user_pattern', 'users/[user-raw]');
  variable_set('pathauto_blog_pattern', 'blogs/[user-raw]');

  // Set the default separator character to replace instead of remove (default).
  variable_set('pathauto_punctuation_hyphen', 1);

  // Set the weight to 1
  db_query("UPDATE {system} SET weight = 1 WHERE type = 'module' AND name = 'pathauto'");
}