FlashMessage::add("Niciun rezultat relevant pentru „{$cuv}”."); } } } if (count($lexems) == 1 && $cuv != $lexems[0]->formNoAccent) { // Convenience redirect when there is only one correct form. We want all pages to be canonical $sourcePart = $source ? "-{$source->urlName}" : ''; session_setVariable('redirect', true); session_setVariable('init_word', $cuv); util_redirect(util_getWwwRoot() . "definitie{$sourcePart}/{$lexems[0]->formNoAccent}" . ($xml ? '/xml' : '')); } smarty_assign('lexems', $lexems); if ($searchType == SEARCH_INFLECTED) { // For successful searches, load the definitions, inflections and linguistic articles $definitions = Definition::loadForLexems($lexems, $sourceId, $cuv, $exclude_unofficial); smarty_assign('wikiArticles', WikiArticle::loadForLexems($lexems)); } if (isset($definitions)) { $searchResults = SearchResult::mapDefinitionArray($definitions); } } $conjugations = NULL; $declensions = NULL; if ($searchType == SEARCH_INFLECTED || $searchType == SEARCH_LEXEM_ID || $searchType == SEARCH_FULL_TEXT || $searchType == SEARCH_MULTIWORD) { smarty_assign('results', $searchResults); // Maps lexems to arrays of inflected forms (some lexems may lack inflections) // Also compute the text of the link to the paradigm div, // which can be 'conjugări', 'declinări' or both if (!empty($lexems)) { $ifMaps = array(); $conjugations = false;
} header("HTTP/1.0 404 Not Found"); } } if (count($lexems) == 1 && $cuv != $lexems[0]->formNoAccent) { // Convenience redirect when there is only one correct form. We want all pages to be canonical $sourcePart = $source ? "-{$source->urlName}" : ''; session_setVariable('redirect', true); session_setVariable('init_word', $cuv); util_redirect(util_getWwwRoot() . "definitie{$sourcePart}/{$lexems[0]->formNoAccent}" . ($xml ? '/xml' : '')); } SmartyWrap::assign('lexems', $lexems); if ($searchType == SEARCH_INFLECTED) { // For successful searches, load the definitions, inflections and linguistic articles $definitions = Definition::loadForLexems($lexems, $sourceId, $cuv, $exclude_unofficial); SmartyWrap::assign('wikiArticles', WikiArticle::loadForLexems($lexems)); } if (isset($definitions)) { $totalDefinitionsCount = count($definitions); if (!$all && $totalDefinitionsCount > PREVIEW_LIMIT) { $definitions = array_slice($definitions, 0, PREVIEW_LIMIT); SmartyWrap::assign('totalDefinitionsCount', $totalDefinitionsCount); } $searchResults = SearchResult::mapDefinitionArray($definitions); } } $conjugations = NULL; $declensions = NULL; if ($searchType == SEARCH_INFLECTED || $searchType == SEARCH_LEXEM_ID || $searchType == SEARCH_FULL_TEXT || $searchType == SEARCH_MULTIWORD) { // Filter out hidden definitions $hiddenSources = array();