1 |
45059
|
argiro.kok
|
<?php
|
2 |
|
|
|
3 |
|
|
defined('_JEXEC') or die('Access denied');
|
4 |
|
|
|
5 |
|
|
jimport('joomla.application.component.view');
|
6 |
|
|
jimport('joomla.environment.request');
|
7 |
|
|
jimport('joomla.log.log');
|
8 |
|
|
|
9 |
|
|
class OpenAireViewOrganization extends JViewLegacy{
|
10 |
|
|
const MODEL = 'search';
|
11 |
|
|
const SIZE = 10;
|
12 |
|
|
const LOG = 'openaire';
|
13 |
|
|
|
14 |
|
|
function display($template = NULL) {
|
15 |
|
|
$model = $this -> getModel(self :: MODEL);
|
16 |
|
|
$this -> itemId = JRequest :: getUInt('Itemid', 0);
|
17 |
|
|
$this -> organizationId = JRequest :: getString('organizationId');
|
18 |
|
|
$locale = JFactory :: getLanguage() -> getTag();
|
19 |
|
|
JViewLegacy:: loadHelper('PiwikHelper');
|
20 |
|
|
PiwikHelper :: logPageView('viewOrganization', 'organizationId=' . urlencode($this -> organizationId) . '&locale=' . urlencode($locale));
|
21 |
|
|
$this -> organization = ($this -> organizationId==NULL||$this -> organizationId=="")?NULL:$model -> getOrganization($this -> organizationId, $locale);
|
22 |
|
|
$this -> result = ($this -> organizationId==NULL||$this -> organizationId=="")?NULL:$model -> getOrganizationDatasources($this -> organizationId, self :: SIZE, $locale);
|
23 |
|
|
if (count($errors = $this -> get('Errors')) > 0) {
|
24 |
|
|
JLog :: add('Error viewing organization: ' . implode("\n", $errors), JLog :: ERROR, self :: LOG);
|
25 |
|
|
return FALSE;
|
26 |
|
|
}
|
27 |
|
|
parent :: display($template);
|
28 |
|
|
}
|
29 |
|
|
}
|