Index: actions.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/actions/actions.inc,v
retrieving revision 1.22
diff -u -r1.22 actions.inc
--- actions.inc	17 Mar 2008 04:21:38 -0000	1.22
+++ actions.inc	23 Jul 2008 20:53:00 -0000
@@ -54,7 +54,7 @@
     $where_values = array();
     foreach ($action_ids as $action_id) {
       if (is_numeric($action_id)) {
-        $where[].= 'OR aid = %d';
+        $where[] .= 'OR aid = %d';
         $where_values[] = $action_id;
       }
       elseif (isset($available_actions[$action_id])) {
@@ -325,7 +325,7 @@
   }
 
   // Must be an instance; must check database.
-  $aid = db_result(db_query("SELECT callback FROM {actions} WHERE MD5(aid) = '%s' AND parameters != ''", $hash));
+  $aid = db_result(db_query("SELECT callback FROM {actions} WHERE MD5(aid) = '%s' AND parameters <> ''", $hash));
   return $aid;
 }
 
Index: actions.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/actions/actions.install,v
retrieving revision 1.9
diff -u -r1.9 actions.install
--- actions.install	19 May 2008 02:59:27 -0000	1.9
+++ actions.install	23 Jul 2008 20:53:00 -0000
@@ -27,15 +27,15 @@
 
       // Maps action to hook and operation assignments from actions.module.
       db_query("CREATE TABLE {actions_assignments} (
-      hook varchar(32) not null default '',
-      op varchar(40) not null default '',
-      aid varchar(255) not null default '',
-      weight int not null default '0',
-      PRIMARY KEY (hook, op, aid)
+        hook varchar(32) not null default '',
+        op varchar(40) not null default '',
+        aid varchar(255) not null default '',
+        weight int not null default '0',
+        PRIMARY KEY (hook, op, aid)
       ) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");
       break;
 
-   case 'pgsql':
+    case 'pgsql':
       // Stores action information.
       db_query("CREATE TABLE {actions} (
         aid varchar (255) not null default '0',
@@ -54,15 +54,15 @@
 
       // Maps action to hook and operation assignments from actions.module.
       db_query("CREATE TABLE {actions_assignments} (
-      hook varchar(32) not null default '',
-      op varchar(40) not null default '',
-      aid varchar(255) not null default '',
-      weight int not null default '0' CHECK (weight >= 0),
-      PRIMARY KEY (hook, op, aid)
+        hook varchar(32) not null default '',
+        op varchar(40) not null default '',
+        aid varchar(255) not null default '',
+        weight int not null default '0' CHECK (weight >= 0),
+        PRIMARY KEY (hook, op, aid)
       )");
       break;
   }
-  
+
   // Do initial synchronization of actions in code and the database.
   include_once(drupal_get_path('module', 'actions') .'/actions.module');
   actions_synchronize(actions_list());
@@ -150,7 +150,7 @@
       break;
   }
   return $ret;
-  
+
   // Do initial synchronization of actions in code and the database.
   include_once(drupal_get_path('module', 'actions') .'/actions.module');
   actions_synchronize(actions_list());
@@ -164,7 +164,7 @@
     case 'mysqli':
       $ret[] = update_sql("ALTER TABLE {actions_assignments} CHANGE op op VARCHAR(40)");
       break;
-      
+
     case 'pgsql':
       $ret[] = update_sql("BEGIN;
         ALTER TABLE {actions_assignments} ADD COLUMN op_temp VARCHAR(40);
@@ -175,4 +175,20 @@
       break;
   }
   return $ret;
-}
\ No newline at end of file
+}
+
+/**
+ * Remove the underscores from the administer actions permission
+ * on existing permission assignments.
+ *
+ * @return array
+ */
+function actions_update_5201() {
+  $ret = array();
+  $result = db_query("SELECT rid, perm FROM {permission} WHERE perm LIKE '%administer_actions%'");
+  while ($permission = db_fetch_object($result)) {
+    $permission->perm = str_replace('administer_actions', 'administer actions', $permission->perm);
+    $ret[] = update_sql("UPDATE {permission} SET perm = '{$permission->perm}' WHERE rid = {$permission->rid}");
+  }
+  return $ret;
+}
Index: actions.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/actions/actions.module,v
retrieving revision 1.39
diff -u -r1.39 actions.module
--- actions.module	5 May 2008 15:08:38 -0000	1.39
+++ actions.module	23 Jul 2008 20:53:00 -0000
@@ -46,7 +46,7 @@
  */
 function actions_menu($may_cache) {
   $items = array();
-  $access = user_access('administer_actions');
+  $access = user_access('administer actions');
 
   if ($may_cache) {
     $items[] = array(
@@ -175,7 +175,7 @@
  * Implementation of hook_perm().
  */
 function actions_perm() {
-  return array('administer_actions');
+  return array('administer actions');
 }
 
 /**
@@ -206,7 +206,7 @@
   }
 
   $row = array();
-  $instances_present = db_fetch_object(db_query("SELECT aid FROM {actions} WHERE parameters != ''"));
+  $instances_present = db_fetch_object(db_query("SELECT aid FROM {actions} WHERE parameters <> ''"));
   $header = array(
     array('data' => t('Action type'), 'field' => 'type'),
     array('data' => t('Description'), 'field' => 'description'),
@@ -512,7 +512,7 @@
     '#value' => $aid,
   );
 
-  $action = db_result(db_query("SELECT aid FROM {actions} WHERE MD5(aid) = '%s' AND parameters != ''", $aid));
+  $action = db_result(db_query("SELECT aid FROM {actions} WHERE MD5(aid) = '%s' AND parameters <> ''", $aid));
   $actions = actions_get_all_actions();
 
   $destination = 'admin/build/trigger/'. ($hook == 'nodeapi' ? 'node' : $hook);
@@ -1278,7 +1278,7 @@
       break;
     default:
       // Check context for node.
-     if (!isset($object) && isset($context['node'])) {
+      if (!isset($object) && isset($context['node'])) {
         $node = $context['node'];
       }
       else {
@@ -1291,7 +1291,7 @@
     $variables = array_merge($variables, array(
       '%uid' => $node->uid,
       '%node_url' => actions_node_url($node->nid),
-      '%node_alias' => url(drupal_get_path_alias('node/' . $node->nid), NULL, NULL, TRUE),
+      '%node_alias' => url(drupal_get_path_alias('node/'. $node->nid), NULL, NULL, TRUE),
       '%node_type' => check_plain(node_get_types('name', $node)),
       '%title' => filter_xss($node->title),
       '%teaser' => filter_xss($node->teaser),
@@ -1849,10 +1849,10 @@
   $script = (strpos($_SERVER['SERVER_SOFTWARE'], 'Apache') === FALSE) ? 'index.php' : '';
   $clean_url = (bool)variable_get('clean_url', '0');
   if ($clean_url) {
-    return  $base_url . '/node/' . $nid;
+    return  $base_url .'/node/'. $nid;
   }
   else {
-    return  $base_url . '/' . $script . '?q=node/' . $nid;
+    return  $base_url .'/'. $script .'?q=node/'. $nid;
   }
 }
 
