smarty_assign('page_title', "Lexem neoficial: {$lexem->formNoAccent}"); smarty_assign('exclude_unofficial', $exclude_unofficial); } } else { $lexems = array(); smarty_assign('page_title', "Eroare"); FlashMessage::add("Nu există niciun lexem cu ID-ul căutat."); } smarty_assign('lexems', $lexems); } smarty_assign('src_selected', $sourceId); // Regular expressions if ($hasRegexp) { $searchType = SEARCH_REGEXP; $numResults = Lexem::countRegexpMatches($cuv, $hasDiacritics, $sourceId, true); $lexems = Lexem::searchRegexp($cuv, $hasDiacritics, $sourceId, true); smarty_assign('numResults', $numResults); smarty_assign('lexems', $lexems); if (!$numResults) { FlashMessage::add("Niciun rezultat pentru {$cuv}."); } } // Definition.id search if ($defId) { smarty_assign('defId', $defId); $searchType = SEARCH_DEF_ID; if (util_isModerator(PRIV_VIEW_HIDDEN)) { $def = Model::factory('Definition')->where('id', $defId)->where_in('status', array(ST_ACTIVE, ST_HIDDEN))->find_one(); } else { $def = Model::factory('Definition')->where('id', $defId)->where('status', ST_ACTIVE)->find_one(); }
<?php require_once "../../phplib/util.php"; $lexemName = util_getRequestParameter('lexemName'); if (StringUtil::hasRegexp($lexemName)) { $hasDiacritics = StringUtil::hasDiacritics($lexemName); $lexems = Lexem::searchRegexp($lexemName, $hasDiacritics, null, true); } else { $lexems = Lexem::loadByExtendedName($lexemName); } if (count($lexems) == 1) { util_redirect('lexemEdit.php?lexemId=' . $lexems[0]->id); } smarty_assign('lexems', $lexems); smarty_assign('sectionTitle', "Căutare lexem: '{$lexemName}'"); smarty_assign('recentLinks', RecentLink::loadForUser()); smarty_displayWithoutSkin('admin/lexemList.ihtml');