From f453cf1b82cd4a4d56fc7a2ef0c41c5237415015 Mon Sep 17 00:00:00 2001 From: Igor Date: Sat, 6 Nov 2010 19:05:05 +0300 Subject: Fixed: dublicate again and again --- bibtex.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bibtex.php b/bibtex.php index a6aa8ac..13796e9 100644 --- a/bibtex.php +++ b/bibtex.php @@ -64,7 +64,6 @@ class BibtexParser * $ENTRIES['pashev_2010_axiom']['year'] = 2010 * $ENTRIES['pashev_2010_axiom']['numpages'] = 68 * and so on... - * */ } } @@ -108,10 +107,11 @@ class BibtexParser public function expand_years() { - $entries = array(); // \/ - no ref! + $entries = array(); // \/ - not a ref! foreach ($this->ENTRIES as $e) { - if (!empty($e['years']) && preg_match('/(\d{4})\D+?(\d{4})/', $e['years'], $m)) + if (empty($e['year']) && !empty($e['years']) + && preg_match('/(\d{4})\D+?(\d{4})/', $e['years'], $m)) { for ($y = $m[1]; $y <= $m[2]; $y++) { -- cgit v1.2.3