aboutsummaryrefslogtreecommitdiffstats
path: root/util/po2php.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-05-13 02:10:06 -0700
committerfriendica <info@friendica.com>2014-05-13 02:10:06 -0700
commit8c948f4bbe04e4221e6a845995048a565d6ce808 (patch)
tree62d5a85fdb84aa1526d01941cf9e135d87aaf13d /util/po2php.php
parent13cf31ae738985514bc06a2d889860a79bd7e3ad (diff)
downloadvolse-hubzilla-8c948f4bbe04e4221e6a845995048a565d6ce808.tar.gz
volse-hubzilla-8c948f4bbe04e4221e6a845995048a565d6ce808.tar.bz2
volse-hubzilla-8c948f4bbe04e4221e6a845995048a565d6ce808.zip
forbid redefinition of language plural_select function
Diffstat (limited to 'util/po2php.php')
-rw-r--r--util/po2php.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/util/po2php.php b/util/po2php.php
index c703172af..3ac8b89dd 100644
--- a/util/po2php.php
+++ b/util/po2php.php
@@ -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";
}