Exemple #1
0
	public function getItems()
	{
		$params             = $this->getState('params');
		$documentObjectList = parent::getItems();

		JUDownloadFrontHelper::appendDataToDocumentObjList($documentObjectList, $params);

		return $documentObjectList;
	}
Exemple #2
0
	public function getItems()
	{
		$app              = JFactory::getApplication();
		$searchword       = $app->input->getString('searchword', '');
		$params           = $this->getState('params');
		$minSearchWord    = $params->get('searchword_min_length', 3);
		$maxSearchWord    = $params->get('searchword_max_length', 30);
		$searchwordLength = strlen($searchword);
		if (!$searchwordLength || ($minSearchWord > 0 && $searchwordLength < $minSearchWord) || ($maxSearchWord > 0 && $searchwordLength > $maxSearchWord))
		{
			if ($searchwordLength > 0)
			{
				$app->enqueueMessage(JText::sprintf("COM_JUDOWNLOAD_SEARCH_TERM_MUST_BE_A_MINIMUM_OF_X_CHARACTERS_AND_MAXIMUM_OF_X_CHARACTER", $minSearchWord, $maxSearchWord));
			}

			return array();
		}
		else
		{
			$documentObjectList = parent::getItems();
			JUDownloadFrontHelper::appendDataToDocumentObjList($documentObjectList, $params);

			return $documentObjectList;
		}
	}