Index: block_refresh.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/block_refresh/block_refresh.module,v
retrieving revision 1.6
diff -u -r1.6 block_refresh.module
--- block_refresh.module	16 Dec 2010 16:07:39 -0000	1.6
+++ block_refresh.module	20 Feb 2011 22:12:39 -0000
@@ -17,6 +17,7 @@
   drupal_add_js(array(
     'block_refresh' => array(
       'settings' => variable_get('block_refresh_settings', array()),
+      'args' => arg(),
       'refresh_link' => t('Refresh'), // We place this here instead of directly in the js file so that it can be translated
     )
   ), 'setting');
@@ -144,6 +145,16 @@
   if (!$settings['block-' . $module . '-' . $delta]['auto'] && !$settings['block-' . $module . '-' . $delta]['manual']) {
     drupal_not_found();
   }
+  //Validate args and get referrering page args from end.  Set as path.
+  $args = arg();
+  if(!empty($args[3]) && $args[0] == 'block_refresh' && $args[1] == $module && $args[2] == $delta) {
+    unset($args[0]);
+    unset($args[1]);
+    unset($args[2]);
+    $_GET['q'] = implode('/', $args);
+  } else {
+    $_GET['q'] = '';
+  }
   // Run the block_view hook from the block module
   $block = module_invoke($module, 'block_view', $delta);
   // Print out the content of the proceeding call
Index: js/block_refresh.js
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/block_refresh/js/block_refresh.js,v
retrieving revision 1.5
diff -u -r1.5 block_refresh.js
--- js/block_refresh.js	16 Dec 2010 16:07:39 -0000	1.5
+++ js/block_refresh.js	20 Feb 2011 22:02:14 -0000
@@ -3,9 +3,14 @@
 Drupal.behaviors.qtip = {
   attach: function(context) {
 		$.each(Drupal.settings.block_refresh.settings, function(element, settings) {
+      //Get argument from referring page and append to end of load request
+      args = '';
+      $.each(Drupal.settings.block_refresh.args, function(index, arg) {
+        args += '/'+arg;
+      });
 			if (settings['auto']) {
 				setInterval(function() {
-					$('#' + element + ' .content').load(Drupal.settings.basePath + 'block_refresh/' + settings['block']['block'] + '/' + settings['block']['delta']);
+					$('#' + element + ' .content').load(Drupal.settings.basePath + 'block_refresh/' + settings['block']['block'] + '/' + settings['block']['delta'] + args);
 				}, settings['timer'] * 1000); // We need to multiply by 1000 because the admin enters a number in seconds,  but the setInterval() function expects milliseconds
 			}
 			if (settings['manual']) {
@@ -23,7 +28,7 @@
 			
 			$('.block-refresh-button').click(function() {
 				$(this).addClass('block-refresh-button-throbbing');
-				$('#' + element + ' .content').load(Drupal.settings.basePath + 'block_refresh/' + settings['block']['block'] + '/' + settings['block']['delta'], '', function() {
+				$('#' + element + ' .content').load(Drupal.settings.basePath + 'block_refresh/' + settings['block']['block'] + '/' + settings['block']['delta'] + args, '', function() {
 					$('.block-refresh-button').removeClass('block-refresh-button-throbbing');
 				});
 			});

