Simplify.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29094 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2009-04-04 21:04:26 +00:00
parent 920bfedf1f
commit f7164212b1

View File

@ -165,21 +165,17 @@ docstring const BibTeXInfo::getAbbreviatedAuthor() const
docstring const BibTeXInfo::getYear() const
{
if (!is_bibtex_) {
docstring const opt = trim(operator[]("label"));
if (opt.empty())
return docstring();
if (is_bibtex_)
return operator[]("year");
docstring authors;
docstring const tmp = split(opt, authors, '(');
docstring year;
split(tmp, year, ')');
return year;
}
docstring const opt = trim(operator[]("label"));
if (opt.empty())
return docstring();
docstring year = operator[]("year");
if (year.empty())
year = _("No year");
docstring authors;
docstring const tmp = split(opt, authors, '(');
docstring year;
split(tmp, year, ')');
return year;
}