1
|
<?php
|
2
|
|
3
|
defined('_JEXEC') or die('Access denied');
|
4
|
|
5
|
jimport('joomla.application.component.helper');
|
6
|
jimport('joomla.application.component.view');
|
7
|
jimport('joomla.environment.request');
|
8
|
jimport('joomla.log.log');
|
9
|
|
10
|
class OpenAireViewRepositories extends JViewLegacy{
|
11
|
const MODEL = 'search';
|
12
|
const UNKNOWN = 'unknown';
|
13
|
const NON_COMPATIBLE = 'non compatible';
|
14
|
const LOG = 'openaire';
|
15
|
|
16
|
function display($template = NULL) {
|
17
|
$locale = JFactory :: getLanguage() -> getTag();
|
18
|
$parameters = JComponentHelper :: getParams('com_openaire');
|
19
|
$this -> itemId = JRequest :: getUInt('Itemid', 0);
|
20
|
$search = $this -> getModel(self :: MODEL);
|
21
|
JViewLegacy:: loadHelper('PiwikHelper');
|
22
|
PiwikHelper :: logPageView('viewCompatibleDatasources', 'locale=' . urlencode($locale));
|
23
|
$this -> repositories = $search -> getCompatibleDatasources($locale);
|
24
|
if (count($errors = $this -> get('Errors')) > 0) {
|
25
|
JLog :: add('Error viewing repositories: ' . implode("\n", $errors), JLog :: ERROR, self :: LOG);
|
26
|
return FALSE;
|
27
|
}
|
28
|
parent :: display($template);
|
29
|
}
|
30
|
}
|
31
|
|