Index: path.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/path/path.module,v
retrieving revision 1.137
diff -u -r1.137 path.module
--- path.module	23 Dec 2007 15:32:36 -0000	1.137
+++ path.module	1 Feb 2008 15:40:15 -0000
@@ -130,43 +130,41 @@
  * than through the administrative interface.
  */
 function path_nodeapi(&$node, $op, $arg) {
-  if (user_access('create url aliases') || user_access('administer url aliases')) {
-    $language = isset($node->language) ? $node->language : '';
-    switch ($op) {
-      case 'validate':
-        $node->path = trim($node->path);
-        if (db_result(db_query("SELECT COUNT(dst) FROM {url_alias} WHERE dst = '%s' AND src != '%s' AND language = '%s'", $node->path, "node/$node->nid", $language))) {
-          form_set_error('path', t('The path is already in use.'));
-        }
-        break;
-
-      case 'load':
-        $path = 'node/'. $node->nid;
-        $alias = drupal_get_path_alias($path, $language);
-        if ($path != $alias) {
-          $node->path = $alias;
-        }
-        break;
-
-      case 'insert':
-        // Don't try to insert if path is NULL. We may have already set
-        // the alias ahead of time.
-        if (isset($node->path)) {
-          path_set_alias('node/'. $node->nid, $node->path, NULL, $language);
-        }
-        break;
-
-      case 'update':
-        path_set_alias('node/'. $node->nid, isset($node->path) ? $node->path : NULL, isset($node->pid) ? $node->pid : NULL, $language);
-        break;
-
-      case 'delete':
-        $path = 'node/'. $node->nid;
-        if (drupal_get_path_alias($path) != $path) {
-          path_set_alias($path);
-        }
-        break;
-    }
+  $language = isset($node->language) ? $node->language : '';
+  switch ($op) {
+    case 'validate':
+      $node->path = trim($node->path);
+      if (db_result(db_query("SELECT COUNT(dst) FROM {url_alias} WHERE dst = '%s' AND src != '%s' AND language = '%s'", $node->path, "node/$node->nid", $language))) {
+        form_set_error('path', t('The path is already in use.'));
+      }
+      break;
+
+    case 'load':
+      $path = 'node/'. $node->nid;
+      $alias = drupal_get_path_alias($path, $language);
+      if ($path != $alias) {
+        $node->path = $alias;
+      }
+      break;
+
+    case 'insert':
+      // Don't try to insert if path is NULL. We may have already set
+      // the alias ahead of time.
+      if (isset($node->path)) {
+        path_set_alias('node/'. $node->nid, $node->path, NULL, $language);
+      }
+      break;
+
+    case 'update':
+      path_set_alias('node/'. $node->nid, isset($node->path) ? $node->path : NULL, isset($node->pid) ? $node->pid : NULL, $language);
+      break;
+
+    case 'delete':
+      $path = 'node/'. $node->nid;
+      if (drupal_get_path_alias($path) != $path) {
+        path_set_alias($path);
+      }
+      break;
   }
 }
 

