1 |
35459
|
argiro.kok
|
<?php
|
2 |
|
|
|
3 |
|
|
defined('_JEXEC') or die('Access denied');
|
4 |
|
|
|
5 |
|
|
jimport('joomla.application.component.view');
|
6 |
|
|
|
7 |
|
|
class OpenAireViewValidator extends JViewLegacy{
|
8 |
|
|
const REDIRECT = 'redirect';
|
9 |
|
|
const PIWIK = 'piwik';
|
10 |
|
|
|
11 |
|
|
function display($template = NULL) {
|
12 |
|
|
$this -> getModel(self :: PIWIK) -> track('validator', '');
|
13 |
|
|
JFactory :: getApplication() -> redirect($this -> getModel(self :: REDIRECT) -> createValidatorRedirectUrl(JFactory :: getUser()));
|
14 |
|
|
if (count($errors = $this -> get('Errors')) > 0) {
|
15 |
|
|
JLog :: add('Error viewing validator: ' . implode("\n", $errors), JLog :: ERROR, self :: LOG);
|
16 |
|
|
return FALSE;
|
17 |
|
|
}
|
18 |
|
|
return TRUE;
|
19 |
|
|
}
|
20 |
|
|
}
|