getModel(self :: MODEL); $this -> itemId = JRequest :: getUInt('Itemid', 0); $this -> datasourceId = JRequest :: getString('datasourceId'); $locale = JFactory :: getLanguage() -> getTag(); JViewLegacy:: loadHelper('PiwikHelper'); PiwikHelper :: logPageView('viewDatasource', 'datasourceId=' . urlencode($this -> datasourceId) . '&locale=' . urlencode($locale)); $this -> datasource = ($this -> datasourceId==NULL||$this -> datasourceId=="")?NULL:$model -> getDatasource($this -> datasourceId, $locale, true); // if type is Aggregator show related datasources if ($this -> datasource -> type!=null && strpos($this -> datasource -> type, 'Aggregator') !== false){ $this -> publications =($this -> datasourceId==NULL||$this -> datasourceId=="")?NULL: $model -> browsePublications(NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, $this -> datasourceId, NULL, self :: PAGE, self :: SIZE, $locale, NULL, NULL,TRUE,'&fields=' . OpenAireModelSearch :: PUBLICATION_PROJECT. '&fields=' . OpenAireModelSearch :: RESULT_HOSTING_DATASOURCE); $this -> datasets =($this -> datasourceId==NULL||$this -> datasourceId=="")?NULL: $model -> browseDatasets(NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, $this -> datasourceId, self :: PAGE, self :: SIZE, $locale, NULL, NULL,TRUE, '&fields=' . OpenAireModelSearch :: RESULT_HOSTING_DATASOURCE); }else{ $this -> publications =($this -> datasourceId==NULL||$this -> datasourceId=="")?NULL: $model -> browsePublications(NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, $this -> datasourceId, NULL, self :: PAGE, self :: SIZE, $locale, NULL, NULL,TRUE,'&fields=' . OpenAireModelSearch :: PUBLICATION_PROJECT); $this -> datasets =($this -> datasourceId==NULL||$this -> datasourceId=="")?NULL: $model -> browseDatasets(NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, $this -> datasourceId, self :: PAGE, self :: SIZE, $locale, NULL, NULL,FALSE); } if ($this -> datasource == NULL) { $this -> statisticsExistUrl = NULL; $this -> statisticsChartUrl = NULL; } else { $this -> statisticsExistUrl = $model -> getDatasourceStatisticsExistUrl() . $this -> datasource -> url; $this -> statisticsChartUrl = $model -> getDatasourceStatisticsChartUrl() . $this -> datasource -> url; } $this -> projectStatisticsChartUrl = $model -> getProjectStatisticsChartUrl(); if (count($errors = $this -> get('Errors')) > 0) { JLog :: add('Error viewing datasource: ' . implode("\n", $errors), JLog :: ERROR, self :: LOG); return FALSE; } parent :: display($template); } }