Ejemplo n.º 1
0
        } else {
            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();