<?php

/**
* @desc This report shows you how many users you are following
*/

$reports["_TWITTER_FOLLOWING"] = Array(
    "ClassName" => "TwitterFollowing", 
    "Category" => "_TWITTER", 
    "icon" => "images/icons/32x32/twitter_following.png",
	"Options" => "daterangeField,displaymode",
	"Filename" => "twitter_following",
	"Distribution" => "Premium",
	"Order" => 6,
	"ReportVersion" => 1.0,
	"MinimumVersion" => 3.0,
	"DeleteOutdatedFiles" => false,
	"EmailAlerts" => false
);

class TwitterFollowing extends TwitterCore {

	function Settings() {
		parent::Settings();
		$this->columnDefinitions[] = array("Label" => _DATE);
		$this->columnDefinitions[] = array("Label" => "Following","bchart"=> true,"totalRow" => 'none',"dataType" => "String");
		$this->help = _TWITTER_FOLLOWERS_DESC;
		$this->DefaultDisplay = "table";
		$this->DisplayModes = "table,linechart";

		# overwrite the max and min from the db to get data even though the database does not has this..
		# Also set it to now so we can be sure it always only makes reports for today
		$this->dbMaximumDate = time();
		$this->dbMinimumDate = time();
	}

	function GetReportData(){

		$data = parent::GetReportData();
		$new_data = [];
		foreach ($data as $k => $row) {
			$new_data[$k][0] = $row[0];
			$new_data[$k][1] = $row[2];
		}
		return $new_data;
	}
    	
    
}
?>
