log_userLog("Edited definition {$definition->id} ({$definition->lexicon})");
    util_redirect('definitionEdit.php?definitionId=' . $definitionId);
}
$source = Source::get_by_id($definition->sourceId);
if (!$refreshButton && !$acceptButton && !$moveButton) {
    // If a button was pressed, then this is a POST request and the URL
    // does not contain the definition ID.
    RecentLink::createOrUpdate(sprintf("Definiție: %s (%s)", $definition->lexicon, $source->shortName));
}
smarty_assign('def', $definition);
smarty_assign('source', $source);
smarty_assign('user', User::get_by_id($definition->userId));
smarty_assign('comment', $comment);
smarty_assign('commentUser', $commentUser);
smarty_assign('lexems', $lexems);
smarty_assign('typos', Typo::get_all_by_definitionId($definition->id));
smarty_assign('homonyms', loadSetHomonyms($lexems));
smarty_assign("allStatuses", util_getAllStatuses());
smarty_assign("allModeratorSources", Model::factory('Source')->where('canModerate', true)->order_by_asc('displayOrder')->find_many());
smarty_assign('recentLinks', RecentLink::loadForUser());
smarty_displayWithoutSkin('admin/definitionEdit.ihtml');
/**
 * Load all lexems having the same form as one of the given lexems, but exclude the given lexems.
 **/
function loadSetHomonyms($lexems)
{
    if (count($lexems) == 0) {
        return array();
    }
    $names = array();
    $ids = array();