X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=class%2Fl10n%2Fgettext.class.php;h=d8a9b78ae4a2fdf307c56582cf13d7c8abeb5e03;hp=bb9c6422bae95ccab07a30cb50f8cafb79f4535e;hb=2f8c79ee4f62a50c854141fb0ff2f44d8f5f5b9c;hpb=91e0dccca7b2452d8b450791cae3aa4125e8889e;ds=inline diff --git a/class/l10n/gettext.class.php b/class/l10n/gettext.class.php index bb9c6422..d8a9b78a 100644 --- a/class/l10n/gettext.class.php +++ b/class/l10n/gettext.class.php @@ -1,23 +1,27 @@ . * * This file is part of PHP-gettext. * - * PHP-gettext is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * PHP-gettext is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * PHP-gettext is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * PHP-gettext is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with PHP-gettext; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * You should have received a copy of the GNU General Public License + * along with PHP-gettext; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * + * @copyright 2004-2011 The SquirrelMail Project Team + * @license http://opensource.org/licenses/gpl-license.php GNU Public License + * @version $Id$ * @package squirrelmail * @subpackage i18n */ @@ -225,7 +229,7 @@ class gettext_reader { else { $header = $this->get_translation_number(0); - if (eregi("plural-forms: (.*)\n",$header,$regs)) { + if (preg_match('/plural-forms: (.*)\n/i',$header,$regs)) { $expr = $regs[1]; } else { $expr = "nplurals=2; plural=n == 1 ? 0 : 1;"; @@ -284,4 +288,3 @@ class gettext_reader { } } } -?> \ No newline at end of file