/** * initialize module with request datas * * @param object request * @return void */ function init(&$request, $o_tpl = null, $o_archive = null) { if (!is_a($o_tpl, "TemplateEngine")) { $o_tpl = null; } parent::init($request, $o_tpl); $date = $this->request->getDate(); if (is_null($this->data)) { if (is_null($o_archive)) { $o_archive = DataModel::getArchive($this->site, $date, $this->request->getPeriod()); } $this->data = new DataModel($o_archive, $this->request); } $d = new Date(getDateFromTimestamp(time())); if (($this->data->archive->date->get() == $d->get() || isset($this->disableCache)) && is_a($this->tpl, "TemplateEngine")) { printDebug("Current date asked is today's date, cache not activated<br>"); $this->tpl->caching = 0; } }