Index: addanother.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/addanother/addanother.install,v
retrieving revision 1.1
diff -u -p -r1.1 addanother.install
--- addanother.install	15 Jan 2009 23:22:22 -0000	1.1
+++ addanother.install	30 Mar 2009 23:32:03 -0000
@@ -1,15 +1,18 @@
 <?php
 // $Id: addanother.install,v 1.1 2009/01/15 23:22:22 robinmonks Exp $
+
 /**
  * @file
  * Uninstall and update routines for AddAnother module.
  */
+ 
 /**
  * Implementation of hook_uninstall().
  */
 function addanother_uninstall() {
   variable_del('addanother_nodetypes');
 }
+
 /**
  * Port over to the new variable storage system.
  */
@@ -27,3 +30,19 @@ function addanother_update_1() {
   variable_set('addanother_nodetypes', $addanother_nodetypes);
   return array();
 }
+
+/**
+ * Update permission name to 'access add another' instead of 'enable add another' to improve usability/consistency.
+ */
+
+function addanother_update_2() {
+  $ret = array();
+  $result = db_query("SELECT rid, perm FROM {permission} ORDER BY rid");
+  while ($role = db_fetch_object($result)) {
+    $renamed_permission = preg_replace('/enable add another/', 'access add another', $role->perm);
+    if ($renamed_permission != $role->perm) {
+      $ret[] = update_sql("UPDATE {permission} SET perm = '$renamed_permission' WHERE rid = $role->rid");
+    }
+  }
+  return $ret;
+}
Index: addanother.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/addanother/addanother.module,v
retrieving revision 1.5
diff -u -p -r1.5 addanother.module
--- addanother.module	4 Feb 2009 14:45:56 -0000	1.5
+++ addanother.module	30 Mar 2009 23:32:03 -0000
@@ -15,7 +15,7 @@ function addanother_help($path, $arg) {
       $output = '<p>'.  t("Presents users with an option to create another node of the same type after a node is added.") .'</p>';
       return $output;
     case 'admin/settings/addanother':
-      $output = 'Here you can select the content types for which an <em>"Add another..."</em> message will be displayed. After creating a new content node, users with the <a href="@addanother_perm">enable add another</a> permission will receive a message allowing them to add another content node of the same type.';
+      $output = 'Here you can select the content types for which an <em>"Add another..."</em> message will be displayed. After creating a new content node, users with the <a href="@addanother_perm">access add another</a> permission will receive a message allowing them to add another content node of the same type.';
       return '<p>'. t($output, array(
         '@addanother_perm' => url('admin/user/permissions', array('fragment' => 'module-addanother')),
       )) .'</p>';
@@ -25,7 +25,7 @@ function addanother_help($path, $arg) {
  * Implementation of hook_perm().
  */
 function addanother_perm() {
-  return array('enable add another');
+  return array('administer add another','access add another');
 }
 /**
  * Implementation of hook_menu().
@@ -37,7 +37,7 @@ function addanother_menu() {
     'description' => 'Modify which node types display the Add Another message.',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('addanother_admin'),
-    'access arguments' => array('access administration pages'),
+    'access arguments' => array('administer add another'),
     'type' => MENU_NORMAL_ITEM,
   );
   return $items;
@@ -66,7 +66,7 @@ function addanother_nodeapi(&$node, $op,
         return;
       }
       $allowed_nodetypes = variable_get('addanother_nodetypes', array());
-      if (user_access('enable add another') && isset($allowed_nodetypes[$node->type]) && $allowed_nodetypes[$node->type]) {
+      if (user_access('access add another') && isset($allowed_nodetypes[$node->type]) && $allowed_nodetypes[$node->type]) {
         global $_addanother_message;
         $_addanother_message = t('Add another <a href="@typeurl">%type</a>.', array(
           '@typeurl' => url('node/add/'. str_replace('_', '-', $node->type)),
