hideOnEmpty = (JRequest :: getString('hideOnEmpty') == 'true'); $this -> data = new JObject(); if ($projectId != null) { $locale = JFactory :: getLanguage() -> getTag(); $model = $this -> getModel(self :: MODEL); $project = $model -> getProject($projectId, $locale); $result = $model -> browsePublications(NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, 1, $locale, $projectId, NULL); // fetch the first publication to view how many there are... $result = $model -> browsePublications(NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, $result -> totalPublications, $locale, $projectId, NULL); // ... and then fetch them all $this -> data -> title = JText :: sprintf('PUBLICATIONS_OF_PROJECT_S_S_S_', $project -> title, $project -> acronym, $project -> call); $this -> data -> publications = $result -> publications; $this -> data -> via = JText :: _('VIA_'); $this -> data -> openAireImageUrl = JURI :: base() . 'components/com_openaire/images/openairepluslogo.png'; if (count($errors = $this -> get('Errors')) > 0) { JLog :: add('Error viewing data: ' . implode("\n", $errors), JLog :: ERROR, self :: LOG); return FALSE; } } else { JLog :: add('No project id!!!', JLog :: ERROR, self :: LOG); } parent :: display($template); } }