silverstripe-labs/silverstripe-googleanalytics — pull request #12 by Juanitou (2012-11-27 16:52:13+00:00)
Title: FIX: Deprecated use of Object::add_extension and has_extension

After updating to the recent 3.0.3 release, the JS snippet was not being added to my pages. I tracked this down to the line 34 of `GoogleConfig.php`: the condition `Object::has_extension('SiteConfig', 'GoogleConfig')`was not being working.

Looking at Object class I’ve seen that Object::add_extension and has_extension are being deprecated in SS 3.1, so I tried changing the code to `SiteConfig::has_extension('GoogleConfig')` and it worked.

I don’t understand why these two functions are not working as expected in 3.0.3, so I’m not sure that this commit can be applied, but it’s the only way I’ve found to make the module work.

Hope ite helps,
Juan