Index: includes/path.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/path.inc,v retrieving revision 1.24 diff -u -p -r1.24 path.inc --- includes/path.inc 24 Jun 2008 22:12:15 -0000 1.24 +++ includes/path.inc 15 Sep 2008 15:32:34 -0000 @@ -52,7 +52,7 @@ function drupal_lookup_path($action, $pa // Use $count to avoid looking up paths in subsequent calls if there simply are no aliases if (!isset($count)) { - $count = db_result(db_query('SELECT COUNT(pid) FROM {url_alias}')); + $count = db_table_exists('url_alias') ? db_result(db_query('SELECT COUNT(pid) FROM {url_alias}')) : 0; } if ($action == 'wipe') { Index: modules/path/path.install =================================================================== RCS file: modules/path/path.install diff -N modules/path/path.install --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ modules/path/path.install 15 Sep 2008 15:32:34 -0000 @@ -0,0 +1,65 @@ + t('A list of URL aliases for Drupal paths; a user may visit either the source or destination path.'), + 'fields' => array( + 'pid' => array( + 'description' => t('A unique path alias identifier.'), + 'type' => 'serial', + 'unsigned' => TRUE, + 'not null' => TRUE, + ), + 'src' => array( + 'description' => t('The Drupal path this alias is for; e.g. node/12.'), + 'type' => 'varchar', + 'length' => 128, + 'not null' => TRUE, + 'default' => '', + ), + 'dst' => array( + 'description' => t('The alias for this path; e.g. title-of-the-story.'), + 'type' => 'varchar', + 'length' => 128, + 'not null' => TRUE, + 'default' => '', + ), + 'language' => array( + 'description' => t('The language this alias is for; if blank, the alias will be used for unknown languages. Each Drupal path can have an alias for each supported language.'), + 'type' => 'varchar', + 'length' => 12, + 'not null' => TRUE, + 'default' => '', + ), + ), + 'unique keys' => array( + 'dst_language' => array('dst', 'language'), + ), + 'primary key' => array('pid'), + 'indexes' => array( + 'src' => array('src'), + ), + ); + + return $schema; +} + +/** + * Implementation of hook_install(). + */ +function path_install() { + if (!db_table_exists('url_alias')) { + drupal_install_schema('path'); + } +} + +/** + * Implementation of hook_uninstall(). + */ +function path_uninstall() { + drupal_uninstall_schema('path'); +} Index: modules/system/system.install =================================================================== RCS file: /cvs/drupal/drupal/modules/system/system.install,v retrieving revision 1.264 diff -u -p -r1.264 system.install --- modules/system/system.install 15 Sep 2008 09:28:50 -0000 1.264 +++ modules/system/system.install 15 Sep 2008 15:32:39 -0000 @@ -1239,46 +1239,6 @@ function system_schema() { ), ); - $schema['url_alias'] = array( - 'description' => t('A list of URL aliases for Drupal paths; a user may visit either the source or destination path.'), - 'fields' => array( - 'pid' => array( - 'description' => t('A unique path alias identifier.'), - 'type' => 'serial', - 'unsigned' => TRUE, - 'not null' => TRUE, - ), - 'src' => array( - 'description' => t('The Drupal path this alias is for; e.g. node/12.'), - 'type' => 'varchar', - 'length' => 128, - 'not null' => TRUE, - 'default' => '', - ), - 'dst' => array( - 'description' => t('The alias for this path; e.g. title-of-the-story.'), - 'type' => 'varchar', - 'length' => 128, - 'not null' => TRUE, - 'default' => '', - ), - 'language' => array( - 'description' => t('The language this alias is for; if blank, the alias will be used for unknown languages. Each Drupal path can have an alias for each supported language.'), - 'type' => 'varchar', - 'length' => 12, - 'not null' => TRUE, - 'default' => '', - ), - ), - 'unique keys' => array( - 'dst_language' => array('dst', 'language'), - ), - 'primary key' => array('pid'), - 'indexes' => array( - 'src' => array('src'), - ), - ); - return $schema; }