Index: CHANGELOG.txt =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/feedback/CHANGELOG.txt,v retrieving revision 1.2.4.16 diff -u -p -r1.2.4.16 CHANGELOG.txt --- CHANGELOG.txt 7 Mar 2009 00:36:30 -0000 1.2.4.16 +++ CHANGELOG.txt 21 Mar 2009 20:21:57 -0000 @@ -6,6 +6,7 @@ Feedback x.x-x.x, xxxx-xx-xx Feedback 5.x-2.x, xxxx-xx-xx ---------------------------- +#409590 by sun: Added storage and output of absolute URL for feedback messages. #378878 by jcruz, sun: Added display of useragent if Browscap is not installed. #364388 by xibun: Added French translation. #357247 by cassus: Added Hungarian translation. Index: feedback.install =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/feedback/feedback.install,v retrieving revision 1.5.2.3 diff -u -p -r1.5.2.3 feedback.install --- feedback.install 16 Jul 2008 11:16:39 -0000 1.5.2.3 +++ feedback.install 21 Mar 2009 20:12:47 -0000 @@ -15,6 +15,7 @@ function feedback_install() { message longtext NOT NULL, location text NOT NULL, location_masked text NOT NULL, + url text NOT NULL, timestamp int NOT NULL, useragent varchar(255) NOT NULL, PRIMARY KEY (fid), @@ -31,6 +32,7 @@ function feedback_install() { message text NOT NULL, location text NOT NULL, location_masked text NOT NULL, + url text NOT NULL, timestamp int NOT NULL, useragent varchar(255) NOT NULL, PRIMARY KEY (fid) @@ -87,3 +89,24 @@ function feedback_update_5201() { } return $ret; } + +/** + * Add column for absolute URL. + */ +function feedback_update_5202() { + $ret = array(); + switch ($GLOBALS['db_type']) { + case 'mysql': + case 'mysqli': + $ret[] = update_sql("ALTER TABLE {feedback} ADD url text NOT NULL AFTER location_masked"); + $ret[] = update_sql("UPDATE {feedback} SET url = location"); + break; + + case 'pgsql': + db_add_column($ret, 'feedback', 'url', 'text', array('not null' => TRUE)); + $ret[] = update_sql("UPDATE {feedback} SET url = location"); + break; + } + return $ret; +} + Index: feedback.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/feedback/feedback.module,v retrieving revision 1.68.2.9 diff -u -p -r1.68.2.9 feedback.module --- feedback.module 7 Mar 2009 00:36:30 -0000 1.68.2.9 +++ feedback.module 21 Mar 2009 20:13:09 -0000 @@ -212,7 +212,7 @@ function feedback_add_entry($message, $l global $user; $fid = db_next_id("{feedback}_fid"); - db_query("INSERT INTO {feedback} (fid, uid, message, location, location_masked, timestamp, useragent) VALUES (%d, %d, '%s', '%s', '%s', %d, '%s')", $fid, $user->uid, trim($message), $location, feedback_mask_path($location), time(), $_SERVER['HTTP_USER_AGENT']); + db_query("INSERT INTO {feedback} (fid, uid, message, location, location_masked, url, timestamp, useragent) VALUES (%d, %d, '%s', '%s', '%s', '%s', %d, '%s')", $fid, $user->uid, trim($message), $location, feedback_mask_path($location), url($location, NULL, NULL, TRUE), time(), $_SERVER['HTTP_USER_AGENT']); } /** @@ -268,7 +268,7 @@ function feedback_admin_view_form() { '#return_value' => 1, '#default_value' => FALSE, ); - $form['feedback-messages'][$status][$entry->fid]['location'] = array('#value' => l(truncate_utf8($entry->location, 32, FALSE, TRUE), $entry->location)); + $form['feedback-messages'][$status][$entry->fid]['location'] = array('#value' => l(truncate_utf8($entry->location, 32, FALSE, TRUE), $entry->url)); $form['feedback-messages'][$status][$entry->fid]['date'] = array('#value' => format_date($entry->timestamp, 'small')); $form['feedback-messages'][$status][$entry->fid]['user'] = array('#value' => theme('username', $entry)); $form['feedback-messages'][$status][$entry->fid]['message'] = array('#value' => feedback_format_message($entry));