Index: includes/path.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/path.inc,v retrieving revision 1.32 diff -u -p -r1.32 path.inc --- includes/path.inc 4 Jan 2009 20:04:32 -0000 1.32 +++ includes/path.inc 21 Feb 2009 17:54:58 -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_query('SELECT COUNT(pid) FROM {url_alias}')->fetchField(); + $count = variable_get('path_disabled', FALSE) ? 0 : db_query('SELECT COUNT(pid) FROM {url_alias}')->fetchField(); } if ($action == 'wipe') {