Exemplo n.º 1
0
 function postLoad()
 {
     Piwik_AddAction('template_headerVisitsFrequency', array('Piwik_VisitorInterest', 'headerVisitsFrequency'));
     Piwik_AddAction('template_footerVisitsFrequency', array('Piwik_VisitorInterest', 'footerVisitsFrequency'));
 }
Exemplo n.º 2
0
 function postLoad()
 {
     Piwik_AddAction('template_headerUserCountry', array('Piwik_Provider', 'headerUserCountry'));
     Piwik_AddAction('template_footerUserCountry', array('Piwik_Provider', 'footerUserCountry'));
 }
Exemplo n.º 3
0
 function postLoad()
 {
     Piwik_AddAction('template_headerMobileDevices', array('Piwik_MobileAnalytics', 'headerMobileDevices'));
     Piwik_AddAction('template_footerMobileDevices', array('Piwik_MobileAnalytics', 'footerMobileDevices'));
 }
Exemplo n.º 4
0
 /** Test no concurrency issues when deleting log data from log_action table. */
 public function test_purgeLogData_concurrency()
 {
     Piwik_AddAction("LogDataPurger.actionsToKeepInserted.olderThan", array($this, 'addReferenceToUnusedAction'));
     $this->addLogData();
     $purger = Piwik_PrivacyManager_LogDataPurger::make($this->settings, true);
     $this->unusedIdAction = Piwik_FetchOne("SELECT idaction FROM " . Piwik_Common::prefixTable('log_action') . " WHERE name = ?", array('whatever.com/_40'));
     $this->assertTrue($this->unusedIdAction);
     // purge data
     $purger->purgeData();
     // check that actions were purged
     $this->assertEqual(22, $this->getTableCount('log_action'));
     // January
     // check that the unused action still exists
     $count = Piwik_FetchOne("SELECT COUNT(*) FROM " . Piwik_Common::prefixTable('log_action') . " WHERE idaction = ?", array($this->unusedIdAction));
     $this->assertEqual(1, $count);
     $this->unusedIdAction = null;
     // so the hook won't get executed twice
 }
Exemplo n.º 5
0
<?php

Piwik_AddAction('Menu', 'Piwik_BuildMenu');
static $widgets = array();
function Piwik_GetListWidgets()
{
    global $widgets;
    return $widgets;
}
function Piwik_AddWidget($pluginName, $controllerMethodToCall, $widgetTitle)
{
    global $widgets;
    // get the plugin name from controller
    $widgets[$pluginName][] = array($widgetTitle, $controllerMethodToCall);
}