Commit aab26570 authored by Evan Prodromou's avatar Evan Prodromou

use old-style plugin initializers as fallback for GoogleAnalytics

parent c4fc69ad
......@@ -49,6 +49,9 @@ if (!defined('STATUSNET')) {
*/
class GoogleAnalyticsPlugin extends Plugin
{
var $code;
var $domain;
const VERSION = '0.2';
function __construct($code=null)
......@@ -64,7 +67,13 @@ class GoogleAnalyticsPlugin extends Plugin
function onEndShowScripts($action)
{
$code = common_config('googleanalytics', 'code');
if (empty($code)) {
$code = $this->code;
}
$domain = common_config('googleanalytics', 'domain');
if (empty($domain)) {
$domain = $this->domain;
}
$js = <<<ENDOFSCRIPT0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment