function OA_Dashboard_Widget_GraphOAC($aParams) { parent::OA_Dashboard_Widget_Graph($aParams); $this->oTpl->setCacheLifetime(new Date_Span('0-8-0-0')); if (!$this->oTpl->is_cached()) { $oDashboard = new OA_Central_Dashboard(); if ($aData = $oDashboard->getCommunityStats()) { $this->setData($aData); } } }
/** * A method to launch and display the widget * */ function display() { $oDashboard = new OA_Central_Dashboard(); $m2mTicket = $oDashboard->getM2MTicket(); if (PEAR::isError($m2mTicket)) { $this->showError($m2mTicket); } else { $url = $this->buildDashboardUrl($m2mTicket, $this->buildUrl($this->aUrl), '&'); if (!preg_match('/[\\r\\n]/', $url)) { header("Location: {$url}"); } } }