b6d9d59e37
+YUCHENG HU+ git-svn-id: https://svn.code.sf.net/p/hawebs/svn@477 a2543c7e-f6e9-4f8a-8bff-1ffc34733512
42 lines
947 B
PHP
42 lines
947 B
PHP
<?php
|
|
/**
|
|
* Piwik - Open source web analytics
|
|
*
|
|
* @link http://piwik.org
|
|
* @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later
|
|
* @version $Id: Controller.php 1420 2009-08-22 13:23:16Z vipsoft $
|
|
*
|
|
* @category Piwik_Plugins
|
|
* @package Piwik_Provider
|
|
*/
|
|
|
|
/**
|
|
*
|
|
* @package Piwik_Provider
|
|
*/
|
|
class Piwik_Provider_Controller extends Piwik_Controller
|
|
{
|
|
/**
|
|
* Provider
|
|
*/
|
|
function getProvider($fetch = false)
|
|
{
|
|
$view = Piwik_ViewDataTable::factory();
|
|
$view->init( $this->pluginName, __FUNCTION__, "Provider.getProvider" );
|
|
|
|
$this->setPeriodVariablesView($view);
|
|
$column = 'nb_visits';
|
|
if($view->period == 'day')
|
|
{
|
|
$column = 'nb_uniq_visitors';
|
|
}
|
|
$view->setColumnsToDisplay( array('label',$column) );
|
|
$view->setColumnTranslation('label', Piwik_Translate('Provider_ColumnProvider'));
|
|
$view->setSortedColumn( $column );
|
|
$view->setLimit( 5 );
|
|
return $this->renderView($view, $fetch);
|
|
}
|
|
|
|
}
|
|
|