mirror of
https://github.com/Mibew/mibew.git
synced 2024-11-15 08:34:11 +03:00
code generation: fix lang parameter
git-svn-id: https://webim.svn.sourceforge.net/svnroot/webim/trunk@113 c66351dc-e62f-0410-b875-e3a5c0b9693f
This commit is contained in:
parent
bcc0ad4746
commit
eb1692f556
@ -17,13 +17,12 @@ require_once('../libs/operator.php');
|
||||
|
||||
$operator = check_login();
|
||||
|
||||
// collect available images and locales
|
||||
$imageLocales = array();
|
||||
foreach($available_locales as $curr) {
|
||||
$imagesDir = "../locales/$curr/button";
|
||||
if($handle = opendir($imagesDir)) {
|
||||
while (false !== ($file = readdir($handle))) {
|
||||
if (preg_match("/^(\w+)_on.gif$/", $file, $matches)
|
||||
if (preg_match("/^(\w+)_on.gif$/", $file, $matches)
|
||||
&& is_file("$imagesDir/".$matches[1]."_off.gif")) {
|
||||
$image = $matches[1];
|
||||
if( !isset($imageLocales[$image]) ) {
|
||||
@ -49,7 +48,7 @@ if( !$lang || !in_array($lang,$image_locales) )
|
||||
$file = "../locales/${lang}/button/${image}_on.gif";
|
||||
$size = get_gifimage_size($file);
|
||||
|
||||
$message = get_image(get_app_location($showhost,$forcesecure)."/button.php?image=$image&lang=$lang",$size[0],$size[1]);
|
||||
$message = get_image(get_app_location($showhost,$forcesecure)."/button.php?image=$image&lang=$lang",$size[0],$size[1]);
|
||||
|
||||
$page = array();
|
||||
$page['operator'] = topage(get_operator_name($operator));
|
||||
|
Loading…
Reference in New Issue
Block a user