? .svn
? addtoany.block-caching-patch.610564.31.patch
? images/.svn
? views/.svn
Index: addtoany.install
===================================================================
RCS file: addtoany.install
diff -N addtoany.install
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ addtoany.install	28 Jan 2011 22:23:38 -0000
@@ -0,0 +1,17 @@
+<?php
+// $Id$
+
+/**
+ * @file addtoany/addtoany.install
+ *
+ * Installation file for the Add To Any module.
+ */
+
+/**
+ * Change the caching on existing blocks.
+ */
+function addtoany_update_6001() {
+  $ret = array();
+  $ret[] = update_sql("UPDATE {blocks} SET cache = -1 WHERE module = 'addtoany' AND delta=0");
+  return $ret;
+}
Index: addtoany.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/addtoany/addtoany.module,v
retrieving revision 1.7.2.8.2.10
diff -u -p -r1.7.2.8.2.10 addtoany.module
--- addtoany.module	9 Jul 2010 09:45:02 -0000	1.7.2.8.2.10
+++ addtoany.module	28 Jan 2011 22:23:39 -0000
@@ -8,7 +8,7 @@
 
 /**
  * Implementation of hook_perm().
- * 
+ *
  * @return
  */
 function addtoany_perm() {
@@ -18,7 +18,7 @@ function addtoany_perm() {
 
 /**
  * Implementation of hook_link().
- * 
+ *
  * @param object $type
  * @param object $node [optional]
  * @param object $teaser [optional]
@@ -29,10 +29,10 @@ function addtoany_link($type, $node = NU
 
   $types = variable_get('addtoany_nodetypes', array());
 
-  $show  = (!empty($types[$node->type]) && 
+  $show  = (!empty($types[$node->type]) &&
            (($teaser && variable_get('addtoany_display_in_teasers', '1')!=0) ||
            (!$teaser && variable_get('addtoany_display_in_nodelink', '1')!=0)));
-           
+
   if ($type === 'node' && $show) {
     $links['addtoany'] = array(
         'title' => _addtoany_create_button($node, $teaser),
@@ -45,20 +45,20 @@ function addtoany_link($type, $node = NU
 
 /**
  * Implementation of hook_block().
- * 
+ *
  * @param object $op [optional]
  * @param object $delta [optional]
- * @return 
+ * @return
  */
 function addtoany_block($op = 'list', $delta = 0) {
   if ($op == 'list') {
     $blocks[0]['info'] = t('AddToAny button');
+    $blocks[0]['cache'] = BLOCK_NO_CACHE;
     return $blocks;
   }
   else if ($op == 'view') {
     $block['subject'] = t('AddToAny');
     $block['content'] = _addtoany_create_button(menu_get_object());
-	$block['cache'] = BLOCK_NO_CACHE; // Caching issue: http://drupal.org/node/610564
     return $block;
   }
 }
@@ -77,12 +77,12 @@ function addtoany_nodeapi(&$node, $op, $
       // Only show comments on the full non-teasered page
       if (!$a3 && $a4) {
         $types  = variable_get('addtoany_nodetypes', array());
-        
-        $show  = (!empty($types[$node->type]) && 
+
+        $show  = (!empty($types[$node->type]) &&
                    variable_get('addtoany_display_in_nodecont', '0'));
-         
+
         $weight = variable_get('addtoany_display_weight', 40);
-        
+
         if ($show) {
           $node->content['addtoany'] = array(
             '#value' => _addtoany_create_button($node, FALSE),
@@ -124,18 +124,18 @@ function addtoany_menu() {
 
 /**
  * Implementation of hook_footer().  Would use drupal_add_js, but external scripts are not well supported
- * 
+ *
  * @param object $main [optional]
  * @return
  *   String containing JavaScript code to initialize each drop-down menu
  */
 function addtoany_footer($main = 0) {
 	global $_addtoany_script, $_addtoany_script_init;
-	
+
 	// Only output when needed (fixes http://drupal.org/node/843068)
 	if ( ! $_addtoany_script_init)
 		return;
-	
+
 	$javascript = "<script type=\"text/javascript\">\n"
 		. "<!--//--><![CDATA[//><!--\n"
 		. "da2a.init = function(){\n"
@@ -146,26 +146,26 @@ function addtoany_footer($main = 0) {
 		. "if(da2a.script_ready && !da2a.ready)da2a.init();\n" // Call a2a.init() if external script is ready, and if a2a.init() hasn't been called already
 		. "//--><!]]>\n"
 		. "</script>\n";
-	
+
 	return $javascript;
 }
 
 /**
  * Internal function to create asynchronous load JavaScript after first button, and create the on-ready JS for footer.
- * 
+ *
  * @param object $id_num
  * @param object $link_name
  * @param object $link_url
- * @return 
+ * @return
  *   String containing the asynchronous load JavaScript for the first button.
  */
 function _addtoany_create_script($id_num, $link_name, $link_url) {
 	global $_addtoany_script, $_addtoany_script_init;
-		
+
 	$_addtoany_script .= "a2a_config.linkname='". check_plain($link_name)
 		. "'; a2a_config.linkurl='" . check_plain($link_url)
 		. "'; a2a.init('page', {target: '#da2a_" . $id_num . "'});\n";
-	
+
 	if ( ! $_addtoany_script_init) {
 		$script_url = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https://static.addtoany.com/menu/page.js' : 'http://static.addtoany.com/menu/page.js';
 		$javascript_async = "<script type=\"text/javascript\">\n"
@@ -178,21 +178,21 @@ function _addtoany_create_script($id_num
 			. "}; "
 			. "a2a_config.tracking_callback = ['ready', da2a.script_onready];"
 			. variable_get('addtoany_additional_js', '')
-			. "\n(function(){var a = document.createElement('script');a.type = 'text/javascript';a.async = true;a.src = '" . $script_url . "';var s = document.getElementsByTagName('script')[0];s.parentNode.insertBefore(a, s);})();\n"			
+			. "\n(function(){var a = document.createElement('script');a.type = 'text/javascript';a.async = true;a.src = '" . $script_url . "';var s = document.getElementsByTagName('script')[0];s.parentNode.insertBefore(a, s);})();\n"
 			. "//--><!]]>\n"
 			. "</script>";
 	}
 	else
 		$javascript_async = "";
-	
+
 	$_addtoany_script_init = TRUE;
-	
+
 	return $javascript_async;
 }
 
 /**
  * Internal function to generate code for AddToAny button
- * 
+ *
  * @param object $node [optional]
  * @param object $teaser [optional]
  * @return
@@ -200,12 +200,12 @@ function _addtoany_create_script($id_num
  */
 function _addtoany_create_button($node=NULL, $teaser = FALSE) {
 	global $_addtoany_counter, $base_path;
-	
+
 	$_addtoany_counter++;
 	if ($_addtoany_counter == 1) {
 		drupal_add_css((drupal_get_path('module', 'addtoany') .'/addtoany.css'));
 	}
-	
+
 	$disable_dropdown = variable_get('addtoany_dropdown_disabled', '0');
 
 	if (is_object($node)) {
@@ -215,15 +215,15 @@ function _addtoany_create_button($node=N
 		$link_name	= (module_exists('page_title')) ? page_title_page_get_title() : variable_get('site_name', '');
 		$link_url = url('<front>', array('absolute' => 1));
 	}
-	
+
 	$javascript = ($disable_dropdown) ? '' : _addtoany_create_script($_addtoany_counter, $link_name, $link_url);
-	
+
 	$button_setting = variable_get('addtoany_image', 'share_save_171_16.png|171|16');
 
 	if ($button_setting == "custom") {
 		$button_image 		= variable_get('addtoany_custom_image', '');
 		$button_width    	= '';
-		$button_height		= ''; 
+		$button_height		= '';
 	} elseif ($button_setting != "text") {
 		$button 			= explode('|', $button_setting);
 		$button_filename 	= $button[0];
@@ -231,11 +231,11 @@ function _addtoany_create_button($node=N
 		$button_height	= ' height="' . $button[2] . '"';
 		$button_image 	= $base_path . drupal_get_path('module', 'addtoany') . '/images/' . $button_filename;
 	}
-	
+
 	$button_text = variable_get('addtoany_link_text', '');
 	if (strlen($button_text) > 0)
-		$button_text = ' ' . $button_text; 
-	
+		$button_text = ' ' . $button_text;
+
 	$button_innerHTML = ($button_setting == "text") ? $button_text : sprintf('<img src="%s"%s%s %s/>%s',
 		$button_image,
 		$button_width,
@@ -243,7 +243,7 @@ function _addtoany_create_button($node=N
 		variable_get('addtoany_image_attributes', 'alt="Share this"'),
 		$button_text
 	);
-	
+
 	return ( sprintf('
 		<a%s href="http://www.addtoany.com/share_save?linkurl=%s&amp;linkname=%s" id="da2a_%s">%s</a>
 		%s
