? .DS_Store
Index: activity.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/activity/activity.install,v
retrieving revision 1.1.2.1.2.6.2.4.2.12
diff -u -p -r1.1.2.1.2.6.2.4.2.12 activity.install
--- activity.install	9 Dec 2009 16:59:04 -0000	1.1.2.1.2.6.2.4.2.12
+++ activity.install	21 Jan 2010 20:39:49 -0000
@@ -3,6 +3,11 @@
 
 function activity_install() {
   drupal_install_schema('activity');
+  // Set Trigger's weight to 2 so that it will fire AFTER pathauto. This makes
+  // pathauto alias' work.
+  if (activity_bad_trigger_weight()) {
+    drupal_set_message(t('In order for proper Pathauto behavior with Activity module, the Trigger module\'s weight needs to be fixed up. !clickhere', array('!clickhere' => l(t('Click here to fix Trigger\'s weight'), 'admin/activity/weight', array('query' => drupal_get_destination())))), 'error');
+  }
 }
 
 function activity_schema() {
@@ -166,5 +171,34 @@ function activity_requirements($phase) {
       'severity' => ($phase == 'install') ? REQUIREMENT_WARNING : REQUIREMENT_ERROR,
     );
   }
+
+  if (activity_bad_trigger_weight()) {
+    $requirements['activity_trigger_weight'] = array(
+      'title' => $t('Activity Trigger Weight'),
+      'description' => $t('Activity2 requires Trigger\'s weight be greater then Pathauto\'s in order to produce proper aliased paths. !clickhere to fix that', array('!clickhere' => l(t('Click here'), 'admin/activity/weight', array('query' => drupal_get_destination())))),
+      'severity' => REQUIREMENT_WARNING,
+    );
+  }
   return $requirements;
+}
+
+/**
+ * Sets Trigger modules weight to be higher then pathauto.
+ */
+function activity_fix_trigger_weight() {
+  db_query("UPDATE {system} SET weight = 2 WHERE name = 'trigger'");
+  drupal_goto();
+}
+
+/**
+ * Check to see if we need to fix the Trigger weight.
+ */
+function activity_bad_trigger_weight() {
+  // Verify Triggers weight.
+  $pathauto_weight = db_result(db_query("SELECT weight FROM {system} WHERE name = 'pathauto'"));
+  if ($pathauto_weight !== FALSE) {
+    $trigger_weight = db_result(db_query("SELECT weight FROM {system} WHERE name = 'trigger'"));
+    return $trigger_weight <= $pathauto_weight;
+  }
+  return FALSE;
 }
\ No newline at end of file
Index: activity.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/activity/activity.module,v
retrieving revision 1.1.2.2.2.30.2.31.2.69
diff -u -p -r1.1.2.2.2.30.2.31.2.69 activity.module
--- activity.module	9 Dec 2009 05:54:48 -0000	1.1.2.2.2.30.2.31.2.69
+++ activity.module	21 Jan 2010 20:39:49 -0000
@@ -150,6 +150,13 @@ function activity_menu() {
     'file' => 'activity.admin.inc',
     'type' => MENU_LOCAL_TASK,
   );
+  $items['admin/activity/weight'] = array(
+    'title' => 'Fix Trigger weight',
+    'page callback' => 'activity_fix_trigger_weight',
+    'file' => 'activity.install',
+    'access arguments' => array('administer activity'),
+    'type' => MENU_CALLBACK,
+  );
   $items['admin/build/activity'] = array(
     'title' => 'Activity publisher templates',
     'description' => 'Modify how your activity messages will look',
Index: modules/node.activity.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/activity/modules/Attic/node.activity.inc,v
retrieving revision 1.1.2.15
diff -u -p -r1.1.2.15 node.activity.inc
--- modules/node.activity.inc	21 Jan 2010 17:31:19 -0000	1.1.2.15
+++ modules/node.activity.inc	21 Jan 2010 20:39:49 -0000
@@ -34,7 +34,7 @@ function node_activity_token_values($typ
   if ($type == 'node') {
     // Because the path hasn't been set when drupal_lookup_path was called
     // before, we have to wipe its static cache for this to work.
-    drupal_lookup_path('wipe');
+    drupal_clear_path_cache();
     return array(
       'activity-node-link' => l($object->title, "node/{$object->nid}"),
       'activity-node-creator-link' => theme('activity_username', $object),
Index: modules/user.activity.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/activity/modules/Attic/user.activity.inc,v
retrieving revision 1.1.2.14
diff -u -p -r1.1.2.14 user.activity.inc
--- modules/user.activity.inc	21 Jan 2010 17:39:35 -0000	1.1.2.14
+++ modules/user.activity.inc	21 Jan 2010 20:39:49 -0000
@@ -38,7 +38,7 @@ function user_activity_token_values($typ
     // Wipe the static lookup path cache in case this token is fired for a new
     // user and using pathauto, we create alias' for new users. It is only to
     // handle that one case.
-    drupal_lookup_path('wipe');
+    drupal_clear_path_cache();
     return array(
       'activity-user-link' => theme('activity_username', $object),
     );
