drupal_add_css((drupal_get_path('module', 'addthis') .'/addthis.css'));
      drupal_add_js(sprintf('
            addthis_pub = \'%s\';
            addthis_logo = \'%s\';
            addthis_logo_background = \'%s\';
            addthis_logo_color = \'%s\';
            addthis_brand = \'%s\';
            addthis_options = \'%s\';
            addthis_disable_flash = \'%s\';
        ',
        addslashes(variable_get('addthis_username', 'my-username')),
        addslashes(variable_get('addthis_logo', 'http://www.addthis.com/images/yourlogo.png')),
        addslashes(variable_get('addthis_logo_background', 'EFEFFF')),
        addslashes(variable_get('addthis_logo_color', '666699')),
        addslashes($brand),
        addslashes(variable_get('addthis_options', 'favorites, email, digg, delicious, myspace, facebook, google, live, more')),
        variable_get('addthis_options', FALSE) ? 'true' : 'false'
      ), 'inline');

On the code above (around line 122 of addthis.module), the last variable_get() call should be using 'addthis_disable_flash', shouldn't it?

Comments

flaviovs’s picture

Priority: Critical » Normal
StatusFileSize
new931 bytes

Here's the patch.

This patch also change the $_addthis_counter to be a static variable. There's no need for it to be global and, as everybody know, global is evil.

Also, issue priority changed to normal (was set to critical by accident).

dddave’s picture

Status: Active » Needs review

Correcting status.

jm.federico’s picture

Version: 6.x-2.8 » 6.x-2.9
StatusFileSize
new676 bytes

I'm attaching patch against 2.9.

I removed the static variable change because I use that counter outside the module. Need it as a global.

Federico

vesapalmu’s picture

Status: Needs review » Fixed

Thank you. It's now part of latest 2.x dev and part of next release.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.