summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5bbe379)
raw | patch | inline | side by side (parent: 5bbe379)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 26 Aug 2010 06:21:38 +0000 (06:21 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 26 Aug 2010 06:21:38 +0000 (06:21 +0000) |
- Fixed detect of unsubmitted stat files
- Only create statistics class once per session.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19452 594d385d-05f5-0310-b6e9-bd551577e9d8
- Only create statistics class once per session.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19452 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/gosa-core/plugins/generic/statistics/chartClasses/class_memoryUsageChart.inc b/gosa-core/plugins/generic/statistics/chartClasses/class_memoryUsageChart.inc
index 73b9ec42b0e65299fa4d2e9fe153e0761e70f561..da16ec54e9c092d81de8c1415202b58503315a5d 100644 (file)
$dataSet->AddPoint($this->graphData['dates'], 'date');
$dataSet->SetAbsciseLabelSerie('date');
- echo $this->enableCaching;
-
// Read graph from cache?
$pCache = new pCache('/var/spool/gosa/');
if($this->enableCaching && $pCache->IsInCache(get_class(),$dataSet->GetData())){
diff --git a/gosa-core/plugins/generic/statistics/class_statistics.inc b/gosa-core/plugins/generic/statistics/class_statistics.inc
index 0fe4889d9c3518077d5a2732840828f20634e05f..e0794141809fac51c9c7bf5dea7a8441f61e26ec 100644 (file)
var $graph1DatePicker2 = 0;
// A collection of timestamps for unsubmitted statistics data.
- var $unsbmittedFiles = array();
+ var $unsbmittedFiles = NULL;
var $graphs = array();
var $selectedGraphType = 0;
"WyukwauWoid2",
TRUE);
}
-
- // Get list of unsubmitted files.
- $this->unsbmittedFiles = $this->getUnsubmittedStatistics();
}
*/
function getUnsubmittedStatistics()
{
- $available = $this->getLocalStatisticsFiles();
$alreadyTransmitted = $this->getStatisticsDatesFromServer();
+ if($alreadyTransmitted == NULL){
+ return(NULL);
+ }
+
+ $available = $this->getLocalStatisticsFiles();
$unsubmitted = array();
foreach($available as $key => $day){
$dates = array();
if(!$this->rpcHandle->success()){
msg_dialog::display(_("Error"),msgPool::rpcError($this->rpcHandle->get_error()),ERROR_DIALOG);
+ return(NULL);
}else{
foreach($res as $date){
$dates[$date] = strtotime($date);
$smarty->assign('graph1DatePicker1', $this->graph1DatePicker1);
$smarty->assign('graph1DatePicker2', $this->graph1DatePicker2);
+ // Get list of unsubmitted files.
+ if($this->unsbmittedFiles == NULL){
+ $this->unsbmittedFiles = $this->getUnsubmittedStatistics();
+ }
+
// Do not render anything if we are not prepared to send and receive data via rpc.
$smarty->assign("rpcConfigured", $this->rpcConfigured);
$smarty->assign("validRpcHandle", TRUE);
diff --git a/gosa-core/plugins/generic/statistics/main.inc b/gosa-core/plugins/generic/statistics/main.inc
index ae48640d1ff763aed4f72b25d52fc44eca3ceed6..c82c84c925401bc9f8cb9e0b9bd42c712525f7b3 100644 (file)
/* Remove this plugin from session
*/
if ( $cleanup ){
- session::un_set('statistics');
+ # session::un_set('statistics');
}else{