diff --git a/bigbluebutton-client/src/BigBlueButtonMainContainer.mxml b/bigbluebutton-client/src/BigBlueButtonMainContainer.mxml index f89ef629dc3706db318bd3577de27109d486a935..99c2306d57b9f22c544d99b8e1426ab10ca412d8 100644 --- a/bigbluebutton-client/src/BigBlueButtonMainContainer.mxml +++ b/bigbluebutton-client/src/BigBlueButtonMainContainer.mxml @@ -90,7 +90,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>. } private function getSessionToken():String { - return BBB.getSessionTokenUtil().getSessionToken(); + return BBB.getQueryStringParameters().getSessionToken(); } private function timerHandler(e:TimerEvent):void{ diff --git a/bigbluebutton-client/src/ScreenshareStandalone.mxml b/bigbluebutton-client/src/ScreenshareStandalone.mxml index 741e8b75b0be9fc8f87820cf761c467378718e23..6510fd8e736a082d8b54e9afefe259036f9df04a 100755 --- a/bigbluebutton-client/src/ScreenshareStandalone.mxml +++ b/bigbluebutton-client/src/ScreenshareStandalone.mxml @@ -38,15 +38,15 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>. <fx:Script> <![CDATA[ - - import mx.core.UIComponent; - - import org.bigbluebutton.modules.screenshare.events.AppletStartedEvent; - import org.bigbluebutton.modules.screenshare.events.CursorEvent; - import org.bigbluebutton.modules.screenshare.events.ViewStreamEvent; - import org.bigbluebutton.modules.screenshare.services.ScreenshareService; - import org.bigbluebutton.modules.screenshare.services.red5.ConnectionEvent; - import org.bigbluebutton.util.QueryStringParameters; + import mx.core.UIComponent; + + import org.bigbluebutton.core.BBB; + import org.bigbluebutton.modules.screenshare.events.AppletStartedEvent; + import org.bigbluebutton.modules.screenshare.events.CursorEvent; + import org.bigbluebutton.modules.screenshare.events.ViewStreamEvent; + import org.bigbluebutton.modules.screenshare.services.ScreenshareService; + import org.bigbluebutton.modules.screenshare.services.red5.ConnectionEvent; + import org.bigbluebutton.util.QueryStringParameters; private var videoHolder:UIComponent; @@ -67,7 +67,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>. private var videoHeight:int; private function onCreationComplete():void { - var p:QueryStringParameters = new QueryStringParameters(); + var p:QueryStringParameters = BBB.getQueryStringParameters(); p.collectParameters(); logoutURL = p.getParameter("LOGOUTURL"); host = p.getParameter("HOST"); diff --git a/bigbluebutton-client/src/org/bigbluebutton/core/BBB.as b/bigbluebutton-client/src/org/bigbluebutton/core/BBB.as index 8b35594cc05aff4b9ee24e380ed7e973a1b41203..a9400a187dd23417ac2fa2681a7d15f8fe0ad680 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/core/BBB.as +++ b/bigbluebutton-client/src/org/bigbluebutton/core/BBB.as @@ -19,16 +19,16 @@ package org.bigbluebutton.core { import flash.system.Capabilities; - + import mx.core.FlexGlobals; import mx.utils.URLUtil; - + import org.bigbluebutton.core.managers.ConfigManager2; import org.bigbluebutton.core.managers.ConnectionManager; import org.bigbluebutton.core.managers.VideoProfileManager; import org.bigbluebutton.core.model.LiveMeeting; import org.bigbluebutton.core.model.VideoProfile; - import org.bigbluebutton.util.SessionTokenUtil; + import org.bigbluebutton.util.QueryStringParameters; public class BBB { private static var configManager:ConfigManager2 = null; @@ -37,13 +37,13 @@ package org.bigbluebutton.core { private static var videoProfileManager:VideoProfileManager = null; - private static var sessionTokenUtil:SessionTokenUtil = null; + private static var queryStringParameters:QueryStringParameters = null; - public static function getSessionTokenUtil():SessionTokenUtil { - if (sessionTokenUtil == null) { - sessionTokenUtil = new SessionTokenUtil(); + public static function getQueryStringParameters():QueryStringParameters { + if (queryStringParameters == null) { + queryStringParameters = new QueryStringParameters(); } - return sessionTokenUtil; + return queryStringParameters; } public static function getConfigManager():ConfigManager2 { @@ -119,7 +119,7 @@ package org.bigbluebutton.core { } public static function getSignoutURL():String { - var sessionToken:String = BBB.sessionTokenUtil.getSessionToken(); + var sessionToken:String = getQueryStringParameters().getSessionToken(); var logoutUrl:String = getBaseURL(); if (sessionToken != "") { logoutUrl += "/bigbluebutton/api/signOut?sessionToken=" + sessionToken; diff --git a/bigbluebutton-client/src/org/bigbluebutton/core/UsersUtil.as b/bigbluebutton-client/src/org/bigbluebutton/core/UsersUtil.as index 56244babe415790d7ce7116324009f96f2a36da1..702c192a37287d881dc6e05e2de44ddd2010faa5 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/core/UsersUtil.as +++ b/bigbluebutton-client/src/org/bigbluebutton/core/UsersUtil.as @@ -33,7 +33,6 @@ package org.bigbluebutton.core import org.bigbluebutton.core.vo.LockSettingsVO; import org.bigbluebutton.main.model.options.LockOptions; import org.bigbluebutton.main.model.users.BreakoutRoom; - import org.bigbluebutton.util.SessionTokenUtil; public class UsersUtil { @@ -313,8 +312,7 @@ package org.bigbluebutton.core } public static function getUserSession():String { - var sessionUtil:SessionTokenUtil = new SessionTokenUtil() - return sessionUtil.getSessionToken(); + return BBB.getQueryStringParameters().getSessionToken(); } public static function applyLockSettings():void { diff --git a/bigbluebutton-client/src/org/bigbluebutton/core/managers/ConfigManager2.as b/bigbluebutton-client/src/org/bigbluebutton/core/managers/ConfigManager2.as index d1ba4c13eb16bed92496e29c0032733deebb8cbd..c220ffdb158d79dc0c734b220b3286b38b27ee19 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/core/managers/ConfigManager2.as +++ b/bigbluebutton-client/src/org/bigbluebutton/core/managers/ConfigManager2.as @@ -32,11 +32,11 @@ package org.bigbluebutton.core.managers { import org.as3commons.logging.api.ILogger; import org.as3commons.logging.api.getClassLogger; import org.bigbluebutton.common.LogUtil; + import org.bigbluebutton.core.BBB; import org.bigbluebutton.core.model.Config; import org.bigbluebutton.main.events.ConfigLoadedEvent; import org.bigbluebutton.main.events.MeetingNotFoundEvent; import org.bigbluebutton.main.model.modules.ModuleDescriptor; - import org.bigbluebutton.util.QueryStringParameters; public class ConfigManager2 { private static const LOGGER:ILogger = getClassLogger(ConfigManager2); @@ -46,9 +46,7 @@ package org.bigbluebutton.core.managers { private var _config:Config = null; public function loadConfig():void { - var p:QueryStringParameters = new QueryStringParameters(); - p.collectParameters(); - var sessionToken:String = p.getParameter("sessionToken"); + var sessionToken:String = BBB.getQueryStringParameters().getSessionToken(); var reqVars:URLVariables = new URLVariables(); reqVars.sessionToken = sessionToken; diff --git a/bigbluebutton-client/src/org/bigbluebutton/main/api/ExternalApiCallbacks.as b/bigbluebutton-client/src/org/bigbluebutton/main/api/ExternalApiCallbacks.as index aab02604af82012476fcea6b7c0d445182577656..7a70b20fb9cdbbbe5e15b630037d5809e5bea094 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/main/api/ExternalApiCallbacks.as +++ b/bigbluebutton-client/src/org/bigbluebutton/main/api/ExternalApiCallbacks.as @@ -264,7 +264,7 @@ package org.bigbluebutton.main.api } private function handleGetSessionToken():String { - return BBB.getSessionTokenUtil().getSessionToken(); + return BBB.getQueryStringParameters().getSessionToken(); } diff --git a/bigbluebutton-client/src/org/bigbluebutton/main/model/users/Conference.as b/bigbluebutton-client/src/org/bigbluebutton/main/model/users/Conference.as index 299422437666858902a6a3c0dea3a77cfe62f6d7..d00494909bd715a148bf47dd892ee6421ce117d1 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/main/model/users/Conference.as +++ b/bigbluebutton-client/src/org/bigbluebutton/main/model/users/Conference.as @@ -394,7 +394,7 @@ package org.bigbluebutton.main.model.users { var p:Object = getUserIndex(userID); if (p != null) { var u:BBBUser = p.participant as BBBUser; - if(u.avatarURL == null || u.avatarURL == ""){ + if(StringUtils.isEmpty(u.avatarURL)){ return LiveMeeting.inst().me.avatarURL; } return u.avatarURL; diff --git a/bigbluebutton-client/src/org/bigbluebutton/main/model/users/JoinService.as b/bigbluebutton-client/src/org/bigbluebutton/main/model/users/JoinService.as index a1a195cb3fd9d1730f1e3f8b858e38004f11dceb..405042d0ec43525ff9740e24ef8784aa99f77ed7 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/main/model/users/JoinService.as +++ b/bigbluebutton-client/src/org/bigbluebutton/main/model/users/JoinService.as @@ -30,10 +30,10 @@ package org.bigbluebutton.main.model.users import org.as3commons.logging.api.ILogger; import org.as3commons.logging.api.getClassLogger; + import org.bigbluebutton.core.BBB; import org.bigbluebutton.core.UsersUtil; import org.bigbluebutton.main.events.MeetingNotFoundEvent; - import org.bigbluebutton.main.model.users.events.ConnectionFailedEvent; - import org.bigbluebutton.util.QueryStringParameters; + import org.bigbluebutton.main.model.users.events.ConnectionFailedEvent; public class JoinService { @@ -50,9 +50,7 @@ package org.bigbluebutton.main.model.users } public function load(url:String):void { - var p:QueryStringParameters = new QueryStringParameters(); - p.collectParameters(); - var sessionToken:String = p.getParameter("sessionToken"); + var sessionToken:String = BBB.getQueryStringParameters().getSessionToken(); reqVars.sessionToken = sessionToken; diff --git a/bigbluebutton-client/src/org/bigbluebutton/main/views/MainApplicationShell.mxml b/bigbluebutton-client/src/org/bigbluebutton/main/views/MainApplicationShell.mxml index 7e146238ea7dc46fc9d592252c97a3dfd313c147..e299657e76b0a1dad21d35cb1d05fabca0efa092 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/main/views/MainApplicationShell.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/main/views/MainApplicationShell.mxml @@ -563,7 +563,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>. logData.message = "Loaded locale."; LOGGER.info(JSON.stringify(logData)); - if ((version == "old-locales") || (version == "") || (version == null)) { + if ((version == "old-locales") || StringUtils.isEmpty(version)) { wrongLocaleVersion(); } else { if (version != localeVersion) wrongLocaleVersion(); diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/caption/views/CaptionWindow.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/caption/views/CaptionWindow.mxml index e4e9df66dbacc40178e6fe784403c09173e81b66..f05397d6795106a96bf5e3ab214d2012cb068eaa 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/caption/views/CaptionWindow.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/caption/views/CaptionWindow.mxml @@ -44,6 +44,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>. import flexlib.controls.tabBarClasses.SuperTab; + import org.as3commons.lang.StringUtils; import org.bigbluebutton.common.events.LocaleChangeEvent; import org.bigbluebutton.core.Options; import org.bigbluebutton.core.UsersUtil; @@ -185,7 +186,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>. private function setTextTabLabel(ownerId:String):void { var ownerText:String = null; - if (ownerId == "") { + if (StringUtils.isEmpty(ownerId)) { //unclaimed text //ownerNameOutputLabel.text = "Owner - " + "None"; ownerText = ResourceUtil.getInstance().getString('bbb.caption.transcript.noowner'); diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/chat/model/ChatMessage.as b/bigbluebutton-client/src/org/bigbluebutton/modules/chat/model/ChatMessage.as index 9f00c500305d3a50cc998d2b38503ea29bc1301b..bd3f7ea7b1b566a281b78b46bae00c752708e377 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/chat/model/ChatMessage.as +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/chat/model/ChatMessage.as @@ -17,6 +17,7 @@ * */ package org.bigbluebutton.modules.chat.model { + import org.as3commons.lang.StringUtils; import org.bigbluebutton.util.i18n.ResourceUtil; public class ChatMessage { @@ -43,7 +44,7 @@ package org.bigbluebutton.modules.chat.model { public function toString() : String { var result:String; - var accName:String = (!name || name == "" || name == " "? ResourceUtil.getInstance().getString("bbb.chat.chatMessage.systemMessage") : name); + var accName:String = (StringUtils.isBlank(name) ? ResourceUtil.getInstance().getString("bbb.chat.chatMessage.systemMessage") : name); result = ResourceUtil.getInstance().getString("bbb.chat.chatMessage.stringRespresentation", [accName, stripTags(text), time]); return result; } diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/ChatView.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/ChatView.mxml index 75de9da2b2962f8311b5f0e971ff9dc72610ff4a..bf092061b11da04d3051b0c3c0e4b7089c5f03f1 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/ChatView.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/ChatView.mxml @@ -53,6 +53,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>. import flexlib.controls.tabBarClasses.SuperTab; import flexlib.events.SuperTabEvent; + import org.as3commons.lang.StringUtils; import org.bigbluebutton.core.EventConstants; import org.bigbluebutton.core.Options; import org.bigbluebutton.core.UsersUtil; @@ -128,7 +129,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>. var chatBox:ChatBox = getPublicChatBox(); var saveEvent:ChatSaveEvent = new ChatSaveEvent(ChatSaveEvent.SAVE_CHAT_EVENT); - if (chatBox.chatWithUsername == null || chatBox.chatWithUsername == "") { + if (StringUtils.isEmpty(chatBox.chatWithUsername)) { saveEvent.filename = ResourceUtil.getInstance().getString('bbb.chat.save.filename'); } else { saveEvent.filename = chatBox.chatWithUsername; diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/layout/services/MessageReceiver.as b/bigbluebutton-client/src/org/bigbluebutton/modules/layout/services/MessageReceiver.as index 3e6f666182d0780a27c6089178d7e157e52226ea..b951a7179625b3f668315a9c41c9c9f8ad7a8530 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/layout/services/MessageReceiver.as +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/layout/services/MessageReceiver.as @@ -4,6 +4,7 @@ package org.bigbluebutton.modules.layout.services { import flash.events.TimerEvent; import flash.utils.Timer; + import org.as3commons.lang.StringUtils; import org.as3commons.logging.api.ILogger; import org.as3commons.logging.api.getClassLogger; import org.bigbluebutton.core.BBB; @@ -90,7 +91,7 @@ package org.bigbluebutton.modules.layout.services { private function onReceivedFirstLayout(message:Object):void { LOGGER.debug("LayoutService: handling the first layout. locked = [{0}] layout = [{1}]", [message.locked, message.layout]); trace("LayoutService: handling the first layout. locked = [" + message.locked + "] layout = [" + message.layout + "], moderator = [" + UsersUtil.amIModerator() + "]"); - if (message.layout == "" || UsersUtil.amIModerator()) + if (StringUtils.isEmpty(message.layout) || UsersUtil.amIModerator()) _dispatcher.dispatchEvent(new LayoutEvent(LayoutEvent.APPLY_DEFAULT_LAYOUT_EVENT)); else { handleSyncLayout(message); @@ -102,8 +103,8 @@ package org.bigbluebutton.modules.layout.services { private function handleSyncLayout(message:Object):void { // is this event needed? Doesn't seem to do anything becasue it only applies to the original layout and then it's changed right afterwards once the new one is loaded _dispatcher.dispatchEvent(new RemoteSyncLayoutEvent(message.layout)); - - if (message.layout == "") + + if (StringUtils.isEmpty(message.layout)) return; var layoutDefinition:LayoutDefinition = new LayoutDefinition(); @@ -122,5 +123,5 @@ package org.bigbluebutton.modules.layout.services { _dispatcher.dispatchEvent(redefineLayout); } } -} +} diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/polling/service/PollDataProcessor.as b/bigbluebutton-client/src/org/bigbluebutton/modules/polling/service/PollDataProcessor.as index 406ad42aa63fc9ef3fddf3599d2da3664117c001..03a39e1fbe023334eb39c9150b99541e13faa117 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/polling/service/PollDataProcessor.as +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/polling/service/PollDataProcessor.as @@ -4,6 +4,7 @@ package org.bigbluebutton.modules.polling.service import flash.accessibility.Accessibility; + import org.as3commons.lang.StringUtils; import org.as3commons.logging.api.ILogger; import org.as3commons.logging.api.getClassLogger; import org.bigbluebutton.modules.chat.ChatConstants; @@ -77,7 +78,7 @@ package org.bigbluebutton.modules.polling.service for (var k:int = 0; k < answers.length; k++) { var localizedKey: String = ResourceUtil.getInstance().getString('bbb.polling.answer.'+answers[k].key); - if (localizedKey == null || localizedKey == "" || localizedKey == "undefined") { + if (StringUtils.isEmpty(localizedKey) || localizedKey == "undefined") { localizedKey = answers[k].key; } accessibleAnswers += ResourceUtil.getInstance().getString("bbb.polling.results.accessible.answer", [localizedKey, answers[k].numVotes]) + "<br />"; diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/polling/views/PollResultsModal.as b/bigbluebutton-client/src/org/bigbluebutton/modules/polling/views/PollResultsModal.as index e66866b4b79d8049fdcfe335e17db03579964a3a..d613eae8fe20eec82bf4f230cb2d6e42178c3869 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/polling/views/PollResultsModal.as +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/polling/views/PollResultsModal.as @@ -14,6 +14,7 @@ package org.bigbluebutton.modules.polling.views import mx.controls.HRule; import mx.controls.Label; + import org.as3commons.lang.StringUtils; import org.bigbluebutton.common.AdvancedLabel; import org.bigbluebutton.core.PopUpUtil; import org.bigbluebutton.modules.polling.events.PollStoppedEvent; @@ -130,7 +131,7 @@ package org.bigbluebutton.modules.polling.views var a:SimpleAnswer = answers[j] as SimpleAnswer; var localizedKey: String = ResourceUtil.getInstance().getString('bbb.polling.answer.' + a.key); - if (localizedKey == null || localizedKey == "" || localizedKey == "undefined") { + if (StringUtils.isEmpty(localizedKey) || localizedKey == "undefined") { localizedKey = a.key } resultData.push({a:localizedKey, v:0}); @@ -155,7 +156,7 @@ package org.bigbluebutton.modules.polling.views var a:SimpleAnswerResult = answers[j] as SimpleAnswerResult; var localizedKey: String = ResourceUtil.getInstance().getString('bbb.polling.answer.' + a.key); - if (localizedKey == null || localizedKey == "" || localizedKey == "undefined") { + if (StringUtils.isEmpty(localizedKey) || localizedKey == "undefined") { localizedKey = a.key; } diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/present/ui/views/PresentationWindow.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/present/ui/views/PresentationWindow.mxml index 67617d8224335eeaad4b4b0e13a107b323eea41a..33746543080db22271f5cf4a204083839c4fc6b0 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/present/ui/views/PresentationWindow.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/present/ui/views/PresentationWindow.mxml @@ -77,6 +77,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>. import flexlib.mdi.events.MDIWindowEvent; + import org.as3commons.lang.StringUtils; import org.as3commons.logging.api.ILogger; import org.as3commons.logging.api.getClassLogger; import org.bigbluebutton.common.events.AddUIComponentToMainCanvas; @@ -721,7 +722,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>. var localizedKey: String = ResourceUtil.getInstance().getString('bbb.polling.answer.'+e.poll.answers[i].key); - if (localizedKey == null || localizedKey == "" || localizedKey == "undefined") { + if (StringUtils.isEmpty(localizedKey) || localizedKey == "undefined") { localizedKey = e.poll.answers[i].key; } diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/sharednotes/views/components/SharedNotesRichTextEditor.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/sharednotes/views/components/SharedNotesRichTextEditor.mxml index b10042db3cfd47c35ce5e7a1743b0f8a83f33761..c2fe647dac2f6b6afaa67467ab5c44e783c81309 100644 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/sharednotes/views/components/SharedNotesRichTextEditor.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/sharednotes/views/components/SharedNotesRichTextEditor.mxml @@ -283,23 +283,23 @@ <fx:Script> <![CDATA[ - - import flash.events.Event; - import flash.events.FocusEvent; - import flash.events.KeyboardEvent; - import flash.events.MouseEvent; - import flash.events.TextEvent; - import flash.text.TextFormat; - - import mx.collections.ArrayCollection; - import mx.controls.textClasses.TextRange; - import mx.core.IUITextField; - import mx.core.UITextFormat; - import mx.core.mx_internal; - - import org.as3commons.logging.api.ILogger; - import org.as3commons.logging.api.getClassLogger; - import org.bigbluebutton.modules.sharednotes.util.DiffPatch; + import flash.events.Event; + import flash.events.FocusEvent; + import flash.events.KeyboardEvent; + import flash.events.MouseEvent; + import flash.events.TextEvent; + import flash.text.TextFormat; + + import mx.collections.ArrayCollection; + import mx.controls.textClasses.TextRange; + import mx.core.IUITextField; + import mx.core.UITextFormat; + import mx.core.mx_internal; + + import org.as3commons.lang.StringUtils; + import org.as3commons.logging.api.ILogger; + import org.as3commons.logging.api.getClassLogger; + import org.bigbluebutton.modules.sharednotes.util.DiffPatch; use namespace mx_internal; private static const LOGGER:ILogger = getClassLogger(SharedNotesRichTextEditor); @@ -902,7 +902,7 @@ if (carIndex < textArea.getTextField().length) { var tfNext:TextFormat=textArea.getTextField().getTextFormat(carIndex, carIndex + 1); - if (!tfNext.url || tfNext.url == "") + if (StringUtils.isEmpty(tfNext.url)) tf.url = tf.target = ""; } else @@ -938,7 +938,7 @@ if (!previousTextFormat || previousTextFormat.bullet != tf.bullet) bulletButton.selected = tf.bullet; if (!previousTextFormat || previousTextFormat.url != tf.url) - linkTextInput.text = (tf.url == "" || tf.url == null) ? defaultLinkProtocol : tf.url; + linkTextInput.text = (StringUtils.isEmpty(tf.url)) ? defaultLinkProtocol : tf.url; if (textArea.getTextField().defaultTextFormat != tf) textArea.getTextField().defaultTextFormat = tf; diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/business/shapes/PollResultObject.as b/bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/business/shapes/PollResultObject.as index 594856ddb8416d1896930be986d15ec1c2a59cdc..e59bdcb77435968fcb48c333943035ad651884a0 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/business/shapes/PollResultObject.as +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/business/shapes/PollResultObject.as @@ -26,6 +26,7 @@ package org.bigbluebutton.modules.whiteboard.business.shapes import flash.text.TextFormat; import flash.text.TextFormatAlign; + import org.as3commons.lang.StringUtils; import org.as3commons.logging.api.ILogger; import org.as3commons.logging.api.getClassLogger; import org.as3commons.logging.util.jsonXify; @@ -313,7 +314,7 @@ package org.bigbluebutton.modules.whiteboard.business.shapes var ar:Object = answers[j]; var localizedKey: String = ResourceUtil.getInstance().getString('bbb.polling.answer.' + ar.key); - if (localizedKey == null || localizedKey == "" || localizedKey == "undefined") { + if (StringUtils.isEmpty(localizedKey) || localizedKey == "undefined") { localizedKey = ar.key; } var rs:Object = {a: localizedKey, v: ar.numVotes}; diff --git a/bigbluebutton-client/src/org/bigbluebutton/util/QueryStringParameters.as b/bigbluebutton-client/src/org/bigbluebutton/util/QueryStringParameters.as index 2e836c410881217a656f9cc45b823684cff1c0dc..02d66634d78b074ba5d2797f1cb0b0ecd5fbdfe5 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/util/QueryStringParameters.as +++ b/bigbluebutton-client/src/org/bigbluebutton/util/QueryStringParameters.as @@ -1,52 +1,54 @@ /** -* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/ -* -* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below). -* -* This program is free software; you can redistribute it and/or modify it under the -* terms of the GNU Lesser General Public License as published by the Free Software -* Foundation; either version 3.0 of the License, or (at your option) any later -* version. -* -* BigBlueButton 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 Lesser General Public License for more details. -* -* You should have received a copy of the GNU Lesser General Public License along -* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>. -* -*/ -package org.bigbluebutton.util -{ + * BigBlueButton open source conferencing system - http://www.bigbluebutton.org/ + * + * Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below). + * + * This program is free software; you can redistribute it and/or modify it under the + * terms of the GNU Lesser General Public License as published by the Free Software + * Foundation; either version 3.0 of the License, or (at your option) any later + * version. + * + * BigBlueButton 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 Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License along + * with BigBlueButton; if not, see <http://www.gnu.org/licenses/>. + * + */ +package org.bigbluebutton.util { import flash.external.ExternalInterface; - + + import org.as3commons.lang.StringUtils; import org.as3commons.logging.api.ILogger; import org.as3commons.logging.api.getClassLogger; - + public class QueryStringParameters { private static const LOGGER:ILogger = getClassLogger(QueryStringParameters); private var params:Array = []; - + + private var _sessionToken:String = null; + public function collectParameters():void { try { var url:String = ExternalInterface.call("window.location.search.substring", 1); //var url:String = "host.pl?logouturl=http://www.google.com&host=rtmp://192.168.0.120/deskShare&room=6e87dfef-9f08-4f80-993f-c0ef5f7b999b&width=1024&height=768"; // Remove everything before the question mark, including the question mark - var paramPattern:RegExp = /.*\?/; + var paramPattern:RegExp = /.*\?/; url = url.replace(paramPattern, ""); - + // Create an array of name=value Strings. params = url.split("&"); - - } catch(e:Error) { + + } catch (e:Error) { LOGGER.error(e.toString()); } } - + public function getParameter(key:String):String { var value:String = ""; - + for (var i:int = 0; i < params.length; i++) { var tempA:Array = params[i].split("="); //LOGGER.debug("{0} {1}", [String(tempA[0]).toUpperCase(), String(tempA[1]).toUpperCase()]); @@ -57,5 +59,13 @@ package org.bigbluebutton.util } return value; } + + public function getSessionToken():String { + if (StringUtils.isEmpty(_sessionToken)) { + collectParameters(); + _sessionToken = getParameter("sessionToken"); + } + return _sessionToken; + } } -} \ No newline at end of file +} diff --git a/bigbluebutton-client/src/org/bigbluebutton/util/SessionTokenUtil.as b/bigbluebutton-client/src/org/bigbluebutton/util/SessionTokenUtil.as deleted file mode 100755 index 276fab399e473682425d3cfaadc6fddaa44da783..0000000000000000000000000000000000000000 --- a/bigbluebutton-client/src/org/bigbluebutton/util/SessionTokenUtil.as +++ /dev/null @@ -1,33 +0,0 @@ -/** - * BigBlueButton open source conferencing system - http://www.bigbluebutton.org/ - * - * Copyright (c) 2017 BigBlueButton Inc. and by respective authors (see below). - * - * This program is free software; you can redistribute it and/or modify it under the - * terms of the GNU Lesser General Public License as published by the Free Software - * Foundation; either version 3.0 of the License, or (at your option) any later - * version. - * - * BigBlueButton 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License along - * with BigBlueButton; if not, see <http://www.gnu.org/licenses/>. - * - */ -package org.bigbluebutton.util { - - public class SessionTokenUtil { - private var _sessionToken:String = null; - - public function getSessionToken():String { - if (_sessionToken == null || _sessionToken == "") { - var p:QueryStringParameters = new QueryStringParameters(); - p.collectParameters(); - _sessionToken = p.getParameter("sessionToken"); - } - return _sessionToken; - } - } -}