forbid redefinition of language plural_select function

This commit is contained in:
friendica
2014-05-13 02:10:06 -07:00
parent 13cf31ae73
commit 8c948f4bbe
13 changed files with 26 additions and 14 deletions

View File

@@ -44,9 +44,10 @@ function po2php_run($argv, $argc) {
$match=Array();
preg_match("|nplurals=([0-9]*); *plural=(.*)[;\\\\]|", $l, $match);
$cond = str_replace('n','$n',$match[2]);
$out .= 'if(! function_exists("' . 'string_plural_select_' . $lang .'") {' . "\n";
$out .= 'function string_plural_select_' . $lang . '($n){'."\n";
$out .= ' return '.$cond.';'."\n";
$out .= '}'."\n";
$out .= '}}'."\n";
}