itemId = JRequest :: getUInt('Itemid', 0); $this -> showCountries = (JRequest :: getString('showCountries') == 'true'); $this -> showInstitutions = (JRequest :: getString('showInstitutions') == 'true'); $model = $this -> getModel(self :: MODEL); $this -> statistics = $model -> getStatistics(); $this -> publicationsByAccessMode = $model -> getPublicationsByAccessMode(); $this -> openAccessPublications = 0; $this -> embargoPublications = 0; if ($this -> publicationsByAccessMode != NULL) { foreach ($this -> publicationsByAccessMode as $i => $pubilcationsByAccessMode) { if ($pubilcationsByAccessMode -> accessMode == self :: OPEN) { $this -> openAccessPublications += $pubilcationsByAccessMode -> publications; unset($this -> publicationsByAccessMode[$i]); } else $this -> embargoPublications += $pubilcationsByAccessMode -> publications; } } $this -> publicationsByProgramme = $model -> getPublicationsByProgramme(self :: UNLIMITED); $this -> publicationsByScientificArea = $model -> getPublicationsByScientificArea(self :: UNLIMITED); $this -> publicationsByCountry = $model -> getPublicationsByCountry($this -> showCountries ? self :: UNLIMITED : self :: LIMIT); $this -> publicationsByInstitution = $model -> getPublicationsByInstitution($this -> showInstitutions ? self :: UNLIMITED : self :: LIMIT); if (count($errors = $this -> get('Errors')) > 0) { JLog :: add('Error viewing statistics: ' . implode("\n", $errors), JLog :: ERROR, self :: LOG); return FALSE; } parent :: display($template); } }