Index: journal.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/journal/journal.install,v
retrieving revision 1.1.2.2
diff -u -p -r1.1.2.2 journal.install
--- journal.install	16 Apr 2008 19:38:51 -0000	1.1.2.2
+++ journal.install	27 Apr 2008 20:38:53 -0000
@@ -56,3 +56,18 @@ function journal_update_5100() {
   }
   return $ret;
 }
+
+/**
+ * Fix location of journal entries for path admin/build/modules.
+ */
+function journal_update_5101() {
+  $ret = array();
+  switch ($GLOBALS['db_type']) {
+    case 'mysql':
+    case 'mysqli':
+    case 'pgsql':
+      $ret[] = update_sql("UPDATE {journal} SET location = 'admin/build/modules' WHERE location LIKE 'admin/build/modules/%'");
+      break;
+  }
+  return $ret;
+}
Index: journal.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/journal/journal.module,v
retrieving revision 1.1.2.7
diff -u -p -r1.1.2.7 journal.module
--- journal.module	18 Apr 2008 02:22:09 -0000	1.1.2.7
+++ journal.module	27 Apr 2008 20:33:29 -0000
@@ -88,6 +88,14 @@ function journal_form_alter($form_id, &$
   // otherwise.
   $form['#submit'] = array('journal_form_submit' => array()) + (array)$form['#submit'];
   
+  // Store the path on which this form was initially displayed.
+  // We need to store this in a hidden field, since forms with custom '#action's
+  // (like admin/build/modules) will reset our value to $_GET['q'] otherwise.
+  $form['journal']['journal_location'] = array(
+    '#type' => 'hidden',
+    '#value' => (!empty($_REQUEST['journal_location']) ? $_REQUEST['journal_location'] : $_GET['q']),
+  );
+
   // Add journal entry field.
   $form['journal']['journal_entry'] = array(
     '#type' => 'textarea',
@@ -103,9 +111,9 @@ function journal_form_alter($form_id, &$
  */
 function journal_form_submit($form_id, $form_values) {
   if (!empty($form_values['journal_entry'])) {
-    journal_add_entry($form_values['journal_entry']);
+    journal_add_entry($form_values['journal_entry'], $form_values['journal_location']);
   }
-  unset($form_values['journal_entry']);
+  unset($form_values['journal_entry'], $form_values['journal_location']);
 }
 
 /**
@@ -305,11 +313,14 @@ function journal_convert($data, $type = 
  * Store a new journal entry in the database.
  *
  * @param string $description
+ *   A journal entry text entered by an user.
+ * @param string $location
+ *   The path on which the journal entry has been entered.
  */
-function journal_add_entry($description) {
+function journal_add_entry($description, $location) {
   global $user;
   
   $jid = db_next_id("{journal}_jid");
-  db_query("INSERT INTO {journal} (jid, uid, message, location, timestamp) VALUES (%d, %d, '%s', '%s', %d)", $jid, $user->uid, $description, $_GET['q'], time());
+  db_query("INSERT INTO {journal} (jid, uid, message, location, timestamp) VALUES (%d, %d, '%s', '%s', %d)", $jid, $user->uid, $description, $location, time());
 }
 
