use old-style plugin initializers as fallback for GoogleAnalytics
This commit is contained in:
parent
c4fc69ad2a
commit
aab265709a
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user