Project

General

Profile

« Previous | Next » 

Revision 49621

Remove person as entities, change bestlicense field to bestaccessmode

View differences:

view.raw.php
1
<?php
2

  
3
defined ('_JEXEC') or die('Access denied');
4

  
5
jimport('joomla.application.component.view');
6
jimport('joomla.log.log');
7
jimport('joomla.utilities.utility');
8

  
9
class OpenAireViewSearchPeopleRaw extends JViewLegacy{
10
	const MODEL = 'search';
11
	const PAGE = 1;
12
	const SIZE = 10;
13
	const LOG = 'openaire';
14
	
15
	function display($template = NULL) {
16
		$model = $this -> getModel(self :: MODEL);
17
		$locale = JFactory :: getLanguage() -> getTag();
18
		$this -> keyword = JRequest :: getString('keyword');
19
		$this -> itemId = JRequest :: getString('Itemid');
20
		$this -> result = ($this -> keyword == NULL) ? $model -> getPeopleStatistics($locale) : $model -> searchPeople($this -> keyword, NULL, self :: PAGE, self :: SIZE, $locale, FALSE);
21
		if (count($errors = $this -> get('Errors')) > 0) {
22
			JLog :: add('Error viewing raw search people: ' . implode("\n", $errors), JLog :: ERROR, self :: LOG);
23
			return FALSE;
24
		}
25
		parent :: display($template);
26
	}
27
}
28

  

Also available in: Unified diff