Author: solomax
Date: Mon Aug 6 08:28:28 2012
New Revision: 1369749
URL: http://svn.apache.org/viewvc?rev=1369749&view=rev
Log:
OPENMEETINGS-390 charcter encoding convertion is added to support sites in 1251
encoding
Modified:
incubator/openmeetings/trunk/plugins/bitrix/build.xml
incubator/openmeetings/trunk/plugins/bitrix/classes/general/openmeetings.php
incubator/openmeetings/trunk/plugins/bitrix/install/components/openmeetings/rooms/.description.php
incubator/openmeetings/trunk/plugins/bitrix/install/components/openmeetings/rooms/component.php
incubator/openmeetings/trunk/plugins/bitrix/install/components/openmeetings/rooms/templates/.default/template.php
incubator/openmeetings/trunk/plugins/bitrix/install/components/openmeetings/rooms/templates/show_room/template.php
incubator/openmeetings/trunk/plugins/bitrix/install/index.php
incubator/openmeetings/trunk/plugins/bitrix/options.php
Modified: incubator/openmeetings/trunk/plugins/bitrix/build.xml
URL:
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/plugins/bitrix/build.xml?rev=1369749&r1=1369748&r2=1369749&view=diff
==============================================================================
--- incubator/openmeetings/trunk/plugins/bitrix/build.xml (original)
+++ incubator/openmeetings/trunk/plugins/bitrix/build.xml Mon Aug 6 08:28:28
2012
@@ -16,7 +16,7 @@
<project name="openmeetings bitrix plugin" basedir="./" default="dist-bin"
xmlns="antlib:org.apache.tools.ant" xmlns:rat="antlib:org.apache.rat.anttasks"
xmlns:ivy="antlib:org.apache.ivy.ant">
<property name="dist.dir" value="dist" />
- <property name="project.version" value="0.2" />
+ <property name="project.version" value="0.3" />
<property name="project.distname" value="openmeetings-bitrix-plugin" />
<property name="plugin.name" value="openmeetings" />
Modified:
incubator/openmeetings/trunk/plugins/bitrix/classes/general/openmeetings.php
URL:
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/plugins/bitrix/classes/general/openmeetings.php?rev=1369749&r1=1369748&r2=1369749&view=diff
==============================================================================
---
incubator/openmeetings/trunk/plugins/bitrix/classes/general/openmeetings.php
(original)
+++
incubator/openmeetings/trunk/plugins/bitrix/classes/general/openmeetings.php
Mon Aug 6 08:28:28 2012
@@ -45,7 +45,7 @@ class COpenmeetings {
$result = array();
$gate = new openmeetings_gateway();
if (!$gate->loginuser()) {
-
CMain::ThrowException(GetMessage("OPENMEETINGS_FAILED_TO_LOGIN"));
+
CMain::ThrowException(COpenmeetings::GetString(GetMessage("OPENMEETINGS_FAILED_TO_LOGIN")));
}
if ($gate->setUserObjectWithExternalUser($USER->GetLogin()
, $USER->GetFirstName()
@@ -60,7 +60,7 @@ class COpenmeetings {
$rooms[0] = $tmp;
}
foreach ($rooms as $room) {
- $result[] = array("name" => $room["name"], "id"
=> $room["rooms_id"]);
+ $result[] = array("name" =>
COpenmeetings::GetString($room["name"]), "id" => $room["rooms_id"]);
}
}
return $result;
@@ -76,11 +76,11 @@ class COpenmeetings {
global $USER;
$gate = new openmeetings_gateway();
if (!$gate->loginuser()) {
-
CMain::ThrowException(GetMessage("OPENMEETINGS_FAILED_TO_LOGIN"));
+
CMain::ThrowException(COpenmeetings::GetString(GetMessage("OPENMEETINGS_FAILED_TO_LOGIN")));
}
$roomhash =
$gate->setUserObjectAndGenerateRoomHash($USER->GetLogin()
- , $USER->GetFirstName()
- , $USER->GetLastName()
+ , COpenmeetings::GetUtfString($USER->GetFirstName())
+ , COpenmeetings::GetUtfString($USER->GetLastName())
, COpenmeetings::GetUserPhotoUrl()
, $USER->GetEmail()
, $USER->GetID()
@@ -91,4 +91,12 @@ class COpenmeetings {
return $roomhash;
}
+
+ function GetUtfString($str) {
+ return (LANG_CHARSET == "UTF-8") ? $str :
mb_convert_encoding($str, "UTF-8", LANG_CHARSET);
+ }
+
+ function GetString($str) {
+ return (LANG_CHARSET == "UTF-8") ? $str :
mb_convert_encoding($str, LANG_CHARSET, "UTF-8");
+ }
}
Modified:
incubator/openmeetings/trunk/plugins/bitrix/install/components/openmeetings/rooms/.description.php
URL:
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/plugins/bitrix/install/components/openmeetings/rooms/.description.php?rev=1369749&r1=1369748&r2=1369749&view=diff
==============================================================================
---
incubator/openmeetings/trunk/plugins/bitrix/install/components/openmeetings/rooms/.description.php
(original)
+++
incubator/openmeetings/trunk/plugins/bitrix/install/components/openmeetings/rooms/.description.php
Mon Aug 6 08:28:28 2012
@@ -20,15 +20,15 @@
if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true) die();
$arComponentDescription = array(
- "NAME" => GetMessage("OPENMEETINGS_ROOMS_NAME"),
- "DESCRIPTION" => GetMessage("OPENMEETINGS_ROOMS_DESCRIPTION"),
+ "NAME" => COpenmeetings::GetString(GetMessage("OPENMEETINGS_ROOMS_NAME")),
+ "DESCRIPTION" =>
COpenmeetings::GetString(GetMessage("OPENMEETINGS_ROOMS_DESCRIPTION")),
"ICON" => "/images/icon.gif",
// "SORT" => 300,
"PATH" => array(
"ID" => "communication",
"CHILD" => array(
"ID" => "openmeetings",
- "NAME" => GetMessage("OPENMEETINGS_NAME")
+ "NAME" => COpenmeetings::GetString(GetMessage("OPENMEETINGS_NAME"))
)
),
);
Modified:
incubator/openmeetings/trunk/plugins/bitrix/install/components/openmeetings/rooms/component.php
URL:
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/plugins/bitrix/install/components/openmeetings/rooms/component.php?rev=1369749&r1=1369748&r2=1369749&view=diff
==============================================================================
---
incubator/openmeetings/trunk/plugins/bitrix/install/components/openmeetings/rooms/component.php
(original)
+++
incubator/openmeetings/trunk/plugins/bitrix/install/components/openmeetings/rooms/component.php
Mon Aug 6 08:28:28 2012
@@ -20,7 +20,7 @@
if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) die();
if (!CModule::IncludeModule("openmeetings")) {
- ShowError(GetMessage("OPENMEETINGS_MODULE_IS_NOT_INSTALLED"));
+
ShowError(COpenmeetings::GetString(GetMessage("OPENMEETINGS_MODULE_IS_NOT_INSTALLED")));
return;
}
@@ -32,7 +32,7 @@ if (isset($_REQUEST["ID"]) && is_numeric
$arResult["ROOM"] = $_REQUEST["ID"];
$arResult["URL"] = COpenmeetings::GetOMUrl();
$arResult["HASH"] = COpenmeetings::GetRoomHash($_REQUEST["ID"]);
- $arResult["LANGUAGE"] = GetMessage("OPENMEETINGS_LANGUAGE");
+ $arResult["LANGUAGE"] =
COpenmeetings::GetString(GetMessage("OPENMEETINGS_LANGUAGE"));
$this->__templateName = "show_room";
} else {
$arResult["ROOMS"] = COpenmeetings::GetRoomList();
Modified:
incubator/openmeetings/trunk/plugins/bitrix/install/components/openmeetings/rooms/templates/.default/template.php
URL:
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/plugins/bitrix/install/components/openmeetings/rooms/templates/.default/template.php?rev=1369749&r1=1369748&r2=1369749&view=diff
==============================================================================
---
incubator/openmeetings/trunk/plugins/bitrix/install/components/openmeetings/rooms/templates/.default/template.php
(original)
+++
incubator/openmeetings/trunk/plugins/bitrix/install/components/openmeetings/rooms/templates/.default/template.php
Mon Aug 6 08:28:28 2012
@@ -23,12 +23,12 @@ if (empty($arResult["ROOMS"])) {
return true;
}
?>
-<div><?=GetMessage("ROOMS_DESCRIPTION")?></div>
+<div><?=COpenmeetings::GetString(GetMessage("ROOMS_DESCRIPTION"))?></div>
<div>
<?php
foreach($arResult["ROOMS"] as $room) {
?>
- <div><?=GetMessage("ENTER_ROOM")?> <a href="<?php
echo($APPLICATION->GetCurPage()); ?>?ID=<?php echo($room["id"]); ?>"><?php
echo($room["name"]); ?></a></div>
+ <div><?=COpenmeetings::GetString(GetMessage("ENTER_ROOM"))?> <a
href="<?php echo($APPLICATION->GetCurPage()); ?>?ID=<?php echo($room["id"]);
?>"><?php echo($room["name"]); ?></a></div>
<?php
}
?>
Modified:
incubator/openmeetings/trunk/plugins/bitrix/install/components/openmeetings/rooms/templates/show_room/template.php
URL:
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/plugins/bitrix/install/components/openmeetings/rooms/templates/show_room/template.php?rev=1369749&r1=1369748&r2=1369749&view=diff
==============================================================================
---
incubator/openmeetings/trunk/plugins/bitrix/install/components/openmeetings/rooms/templates/show_room/template.php
(original)
+++
incubator/openmeetings/trunk/plugins/bitrix/install/components/openmeetings/rooms/templates/show_room/template.php
Mon Aug 6 08:28:28 2012
@@ -32,8 +32,8 @@ $swfurl = $arResult["URL"]
?>
<iframe src="<?=$swfurl?>" style="width: 800px; height: 600px;">
<p align="center">
- <strong><?=GetMessage("NEED_FLASH")?><a
-
href="http://www.macromedia.com/go/getflash/"><?=GetMessage("GET_FLASH")?></a>
+
<strong><?=COpenmeetings::GetString(GetMessage("NEED_FLASH"))?><a
+
href="http://www.macromedia.com/go/getflash/"><?=COpenmeetings::GetString(GetMessage("GET_FLASH"))?></a>
</strong>!
</p>
</iframe>
Modified: incubator/openmeetings/trunk/plugins/bitrix/install/index.php
URL:
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/plugins/bitrix/install/index.php?rev=1369749&r1=1369748&r2=1369749&view=diff
==============================================================================
--- incubator/openmeetings/trunk/plugins/bitrix/install/index.php (original)
+++ incubator/openmeetings/trunk/plugins/bitrix/install/index.php Mon Aug 6
08:28:28 2012
@@ -22,6 +22,8 @@ $PathInstall = str_replace("\\", "/", __
$PathInstall = substr($PathInstall, 0,
strlen($PathInstall)-strlen("/index.php"));
IncludeModuleLangFile($PathInstall."/install.php");
+require_once($PathInstall . "/../classes/general/openmeetings.php"); //Need to
get COpenmeetings::GetString method
+
if(class_exists("openmeetings")) return;
Class openmeetings extends CModule {
@@ -47,8 +49,8 @@ Class openmeetings extends CModule {
$this->MODULE_VERSION_DATE = OPENMEETINGS_VERSION_DATE;
}
- $this->MODULE_NAME = GetMessage("OPENMEETINGS_MODULE_NAME");
- $this->MODULE_DESCRIPTION =
GetMessage("OPENMEETINGS_MODULE_DESCRIPTION");
+ $this->MODULE_NAME =
COpenmeetings::GetString(GetMessage("OPENMEETINGS_MODULE_NAME"));
+ $this->MODULE_DESCRIPTION =
COpenmeetings::GetString(GetMessage("OPENMEETINGS_MODULE_DESCRIPTION"));
}
function DoInstall() {
Modified: incubator/openmeetings/trunk/plugins/bitrix/options.php
URL:
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/plugins/bitrix/options.php?rev=1369749&r1=1369748&r2=1369749&view=diff
==============================================================================
--- incubator/openmeetings/trunk/plugins/bitrix/options.php (original)
+++ incubator/openmeetings/trunk/plugins/bitrix/options.php Mon Aug 6 08:28:28
2012
@@ -41,11 +41,11 @@ if ($OPENMEETINGS_RIGHT>="R") {
}
$arAllOptions = array(
- array("URL", GetMessage("OPENMEETINGS_URL"),
array("text", 64)),
- array("CONTEXT", GetMessage("OPENMEETINGS_CONTEXT"),
array("text", 64)),
- array("MODULE_KEY",
GetMessage("OPENMEETINGS_MODULE_KEY"), array("text", 64)),
- array("OM_USER", GetMessage("OPENMEETINGS_USER"),
array("text", 64)),
- array("OM_PASSWORD",
GetMessage("OPENMEETINGS_PASSWORD"), array("password", 64))
+ array("URL",
COpenmeetings::GetString(GetMessage("OPENMEETINGS_URL")), array("text", 64)),
+ array("CONTEXT",
COpenmeetings::GetString(GetMessage("OPENMEETINGS_CONTEXT")), array("text",
64)),
+ array("MODULE_KEY",
COpenmeetings::GetString(GetMessage("OPENMEETINGS_MODULE_KEY")), array("text",
64)),
+ array("OM_USER",
COpenmeetings::GetString(GetMessage("OPENMEETINGS_USER")), array("text", 64)),
+ array("OM_PASSWORD",
COpenmeetings::GetString(GetMessage("OPENMEETINGS_PASSWORD")),
array("password", 64))
);
if($REQUEST_METHOD=="POST" && strlen($Update)>0 &&
COpenmeetings::IsAdmin() && check_bitrix_sessid()) {
@@ -105,10 +105,10 @@ if ($OPENMEETINGS_RIGHT>="R") {
window.location = "<?echo
$APPLICATION->GetCurPage()?>?RestoreDefaults=Y&lang=<?=LANGUAGE_ID?>&mid=<?echo
urlencode($mid)?>&<?=bitrix_sessid_get()?>";
}
</script>
- <input <?if ($OPENMEETINGS_RIGHT<"W") echo "disabled" ?> type="submit"
name="Update" value="<?=GetMessage("OPENMEETINGS_SAVE")?>">
+ <input <?if ($OPENMEETINGS_RIGHT<"W") echo "disabled" ?> type="submit"
name="Update"
value="<?=COpenmeetings::GetString(GetMessage("OPENMEETINGS_SAVE"))?>">
<input type="hidden" name="Update" value="Y">
- <input type="reset" name="reset"
value="<?=GetMessage("OPENMEETINGS_RESET")?>">
- <input <?if ($OPENMEETINGS_RIGHT<"W") echo "disabled" ?> type="button"
title="<?echo GetMessage("MAIN_HINT_RESTORE_DEFAULTS")?>"
OnClick="RestoreDefaults();" value="<?echo
GetMessage("MAIN_RESTORE_DEFAULTS")?>">
+ <input type="reset" name="reset"
value="<?=COpenmeetings::GetString(GetMessage("OPENMEETINGS_RESET"))?>">
+ <input <?if ($OPENMEETINGS_RIGHT<"W") echo "disabled" ?> type="button"
title="<?echo GetMessage("MAIN_HINT_RESTORE_DEFAULTS")?>"
OnClick="RestoreDefaults();" value="<?echo
COpenmeetings::GetString(GetMessage("MAIN_RESTORE_DEFAULTS"))?>">
<?$tabControl->End();?>
</form>
<?php