You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openmeetings.apache.org by so...@apache.org on 2016/12/01 08:14:19 UTC

svn commit: r1772150 - in /openmeetings/application: branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/ branches/3.1.x/openmeetings-flash/src/main/swf/modules/invitation/ branches/3.1.x/openmeetings-web/src/main/java/or...

Author: solomax
Date: Thu Dec  1 08:14:19 2016
New Revision: 1772150

URL: http://svn.apache.org/viewvc?rev=1772150&view=rev
Log:
[OPENMEETINGS-1514] WB is auto-created for invited user

Modified:
    openmeetings/application/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/WhiteBoardService.java
    openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/modules/invitation/autoloaderBarOnly.lzx
    openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/modules/invitation/invitationQuickLoader.lzx
    openmeetings/application/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/HashPage.java
    openmeetings/application/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/MainPage.java
    openmeetings/application/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/SwfPanel.java
    openmeetings/application/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/util/ProfileImageResourceReference.java
    openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/WhiteBoardService.java
    openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/WhiteBoardService.java

Modified: openmeetings/application/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/WhiteBoardService.java
URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/WhiteBoardService.java?rev=1772150&r1=1772149&r2=1772150&view=diff
==============================================================================
--- openmeetings/application/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/WhiteBoardService.java (original)
+++ openmeetings/application/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/WhiteBoardService.java Thu Dec  1 08:14:19 2016
@@ -18,6 +18,7 @@
  */
 package org.apache.openmeetings.core.remote;
 
+import static org.apache.openmeetings.util.OpenmeetingsVariables.CONFIG_DEFAULT_LANG_KEY;
 import static org.apache.openmeetings.util.OpenmeetingsVariables.webAppRootKey;
 
 import java.io.File;
@@ -34,6 +35,7 @@ import org.apache.commons.collections4.C
 import org.apache.openmeetings.core.data.whiteboard.WhiteBoardObjectListManagerById;
 import org.apache.openmeetings.core.data.whiteboard.WhiteBoardObjectSyncManager;
 import org.apache.openmeetings.core.remote.red5.ScopeApplicationAdapter;
+import org.apache.openmeetings.db.dao.basic.ConfigurationDao;
 import org.apache.openmeetings.db.dao.label.LabelDao;
 import org.apache.openmeetings.db.dao.server.ISessionManager;
 import org.apache.openmeetings.db.dao.server.SessiondataDao;
@@ -43,6 +45,7 @@ import org.apache.openmeetings.db.dto.ro
 import org.apache.openmeetings.db.dto.room.WhiteboardObjectList;
 import org.apache.openmeetings.db.dto.room.WhiteboardSyncLockObject;
 import org.apache.openmeetings.db.entity.room.Client;
+import org.apache.openmeetings.db.entity.user.User;
 import org.apache.openmeetings.db.util.AuthLevelUtil;
 import org.apache.openmeetings.util.OmFileHelper;
 import org.red5.logging.Red5LoggerFactory;
@@ -75,6 +78,8 @@ public class WhiteBoardService implement
 	private SessiondataDao sessionDao;
 	@Autowired
 	private LabelDao labelDao;
+	@Autowired
+	private ConfigurationDao cfgDao;
 
 	public boolean getNewWhiteboardId(String name) {
 		try {
@@ -127,7 +132,16 @@ public class WhiteBoardService implement
 			WhiteboardObjectList whiteboardObjectList = wbListManagerById.getWhiteBoardObjectListByRoomId(roomId);
 
 			if (whiteboardObjectList.getWhiteboardObjects().size() == 0) {
-				wbListManagerById.getNewWhiteboardId(roomId, labelDao.getString("615", userDao.get(currentClient.getUserId()).getLanguageId()));
+				Long langId = null;
+				{
+					Long userId = currentClient.getUserId();
+					if (userId != null && userId.longValue() < 0) {
+						userId = -userId;
+					}
+					User u = userDao.get(userId);
+					langId = u == null ? cfgDao.getConfValue(CONFIG_DEFAULT_LANG_KEY, Long.class, "1") : u.getLanguageId();
+				}
+				wbListManagerById.getNewWhiteboardId(roomId, labelDao.getString("615", langId));
 				log.debug("Init New Room List");
 				whiteboardObjectList = wbListManagerById.getWhiteBoardObjectListByRoomId(roomId);
 			}

Modified: openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/modules/invitation/autoloaderBarOnly.lzx
URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/modules/invitation/autoloaderBarOnly.lzx?rev=1772150&r1=1772149&r2=1772150&view=diff
==============================================================================
--- openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/modules/invitation/autoloaderBarOnly.lzx (original)
+++ openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/modules/invitation/autoloaderBarOnly.lzx Thu Dec  1 08:14:19 2016
@@ -9,7 +9,7 @@
   with the License.  You may obtain a copy of the License at
   
       http://www.apache.org/licenses/LICENSE-2.0
-    	  
+  
   Unless required by applicable law or agreed to in writing,
   software distributed under the License is distributed on an
   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -25,12 +25,12 @@
 	<attribute name="maxwidth" value="400" type="number" />
 	<attribute name="maxsteps" value="22" type="number" />
 	<attribute name="currentsteps" value="0" type="number" />
-	
+
 	<method name="close">
 		canvas.thishib.loaderVar = null;
 		this.destroy();
 	</method>
-	
+
 	<method name="setProgress">
 		this.currentsteps += 1;
 		if($debug) Debug.write("autoLoader/setProgress ===== ",this.currentsteps);
@@ -39,50 +39,50 @@
 		if($debug) Debug.write("autoLoader/setResourceNumber == ",w);
 		this.loadingbar._loading.setAttribute('width',w);
 	</method>
-      
-    <view name="loadingbar"  height="1" pixellock="true"
-          x="-5" y="40" width="$once{ parent.maxwidth+2 }" visibility="hidden">
-          <view x="1" y="1" width="$once{ parent.width-2 }" height="1" opacity="0.3"
-          		bgcolor="$once{ canvas.getThemeColor('styleMenuBarBaseColor') }" />
-          <view name="_loading" x="1" y="1" width="0" height="1"  pixellock="true" 
-          		bgcolor="$once{ canvas.getThemeColor('styleMenuBarBaseColor') }"/>
-    </view>  
-          
-    <netRemoteCallHib name="getLanguageByIdAndMax" funcname="languageservice.getLanguageByIdAndMax" 
-		remotecontext="$once{ canvas.thishib }" >
-    	<attribute name="start" value="0" type="number" />
-    	<attribute name="step" value="100" type="number" /> 
-    	<attribute name="max" value="1600" type="number" />    
-        <netparam><method name="getValue">return canvas.thishib.userlang;</method></netparam> 
-        <netparam><method name="getValue">return parent.start;</method></netparam> 
-        <netparam><method name="getValue">return parent.step;</method></netparam> 
-        <handler name="ondata" args="value">
-        	<![CDATA[
-        		//if ($debug) Debug.write("getLanguageByIdAndMax: ",value);
-        		setLabelObjectByHundred(this.start,value);
-	            //The onResult-Handler will be called be the rtmpconnection
-	            if (this.start <= max){
-	            	this.start += this.step;
+
+	<view name="loadingbar"  height="1" pixellock="true"
+			x="-5" y="40" width="$once{ parent.maxwidth+2 }" visibility="hidden">
+		<view x="1" y="1" width="$once{ parent.width-2 }" height="1" opacity="0.3"
+				bgcolor="$once{ canvas.getThemeColor('styleMenuBarBaseColor') }" />
+		<view name="_loading" x="1" y="1" width="0" height="1"  pixellock="true" 
+				bgcolor="$once{ canvas.getThemeColor('styleMenuBarBaseColor') }"/>
+	</view>
+
+	<netRemoteCallHib name="getLanguageByIdAndMax" funcname="languageservice.getLanguageByIdAndMax" 
+			remotecontext="$once{ canvas.thishib }" >
+		<attribute name="start" value="0" type="number" />
+		<attribute name="step" value="100" type="number" /> 
+		<attribute name="max" value="1600" type="number" />
+		<netparam><method name="getValue">return canvas.thishib.userlang;</method></netparam> 
+		<netparam><method name="getValue">return parent.start;</method></netparam> 
+		<netparam><method name="getValue">return parent.step;</method></netparam> 
+		<handler name="ondata" args="value">
+			<![CDATA[
+				//if ($debug) Debug.write("getLanguageByIdAndMax: ",value);
+				setLabelObjectByHundred(this.start,value);
+				//The onResult-Handler will be called be the rtmpconnection
+				if (this.start <= max){
+					this.start += this.step;
 					canvas.thishib.loaderVar.setProgress();
 					this.doCall();
-	            } else {
-            		parent.setProgress();
+				} else {
+					parent.setProgress();
 				}
 			]]>
-        </handler>  
-    </netRemoteCallHib>	 
-    
-    <netRemoteCallHib name="setUsernameAndSession" funcname="setUsernameAndSession" remotecontext="$once{ canvas.thishib }" >   
-        <netparam><method name="getValue">return canvas.sessionId;</method></netparam>
-        <netparam><method name="getValue">return canvas.userId;</method></netparam>
-        <netparam><method name="getValue">return canvas.currentuser;</method></netparam>
-        <netparam><method name="getValue">return canvas.firstName;</method></netparam>
-        <netparam><method name="getValue">return canvas.lastName;</method></netparam>      
-        <handler name="ondata" args="value">
-            //The onResult-Handler will be called be the rtmpconnection
-            if ($debug) Debug.write("setUsername: value, ",canvas.thishib.currentInvitation.room.type);
-            clearStageContent();		
-            parent.close();
+		</handler>
+	</netRemoteCallHib>
+
+	<netRemoteCallHib name="setUsernameAndSession" funcname="setUsernameAndSession" remotecontext="$once{ canvas.thishib }" >
+		<netparam><method name="getValue">return canvas.sessionId;</method></netparam>
+		<netparam><method name="getValue">return canvas.userId;</method></netparam>
+		<netparam><method name="getValue">return canvas.currentuser;</method></netparam>
+		<netparam><method name="getValue">return canvas.firstName;</method></netparam>
+		<netparam><method name="getValue">return canvas.lastName;</method></netparam>
+		<handler name="ondata" args="value">
+			//The onResult-Handler will be called be the rtmpconnection
+			if ($debug) Debug.write("setUsername: value, ",canvas.thishib.currentInvitation.room.type);
+			clearStageContent();
+			parent.close();
 
 			var r = canvas.thishib.currentInvitation.room;
 			if (r.type == 'conference'){
@@ -92,8 +92,8 @@
 			} else if (r.type == 'interview'){
 				new lz.interviewConferenceRoom(canvas.main_content._content.inner, {roomobj: r});
 			}
-        </handler>
-    </netRemoteCallHib>
+		</handler>
+	</netRemoteCallHib>
 </class>
 
 </library>

Modified: openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/modules/invitation/invitationQuickLoader.lzx
URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/modules/invitation/invitationQuickLoader.lzx?rev=1772150&r1=1772149&r2=1772150&view=diff
==============================================================================
--- openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/modules/invitation/invitationQuickLoader.lzx (original)
+++ openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/modules/invitation/invitationQuickLoader.lzx Thu Dec  1 08:14:19 2016
@@ -9,7 +9,7 @@
   with the License.  You may obtain a copy of the License at
   
       http://www.apache.org/licenses/LICENSE-2.0
-    	  
+  
   Unless required by applicable law or agreed to in writing,
   software distributed under the License is distributed on an
   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -19,15 +19,14 @@
   
 -->
 <library>
-	<!---
-	-->
+
 	<!-- label: data loading, please wait -->
 	<class name="invitationQuickLoader" extends="labelExplorerBox" labelid="230"
 			docking="true" resizeable="false" closable="false" width="324" 
 			x="$once{ canvas.width/2 - this.width/2 }" y="0" height="120">
-		 
+
 		<attribute name="userlang" value="1" type="number" />
-		
+
 		<handler name="oninit">
 			if (canvas.thishib.currentInvitation.passwordProtected){
 				if ($debug) Debug.write("Is Password Protected");
@@ -38,7 +37,7 @@
 				this.selectLanguage();
 			}
 		</handler>
-		
+
 		<method name="selectLanguage">
 			if ($debug) Debug.write("invitationQuickLoader:oninit userlang = [",userlang,"]; canvas.lang = [",canvas.language_id,"]");
 			this.setRoomValues();
@@ -47,39 +46,39 @@
 			} else {
 				this.pass_label.setAttribute('visible', false);
 				this._password.setAttribute('visible', false);
-				this.invitation_pass.setAttribute('visible', false);		
+				this.invitation_pass.setAttribute('visible', false);
 				this.labellanguages.setAttribute('visible', true);
 				this.languages.setAttribute('visible', true);
 				this.connect.setAttribute('visible', true);
 			}
 		</method>
-		
+
 		<method name="checkPWD">
 			this.checkInvitationPass.doCall();
 		</method>
-		
-		<netRemoteCallHib name="isRoomFull" funcname="conferenceservice.isRoomFull" remotecontext="$once{ canvas.thishib }" activeErrorHandler="true" >  	
-        	<netparam name="roomId"><method name="getValue">return canvas.thishib.currentInvitation.room.id;</method></netparam>
-        	<handler name="ondata" args="value">
-        		<![CDATA[
-            		//The onResult-Handler will be called be the rtmpconnection
-            		if ($debug) Debug.write(canvas.thishib.currentInvitation.room.id);
-					if ($debug) Debug.write("isRoomFull: ",value);
-					
-					if (value) {
-						new lz.labelerrorPopup(canvas,{errorlabelid:618});
-						parent.close();
-					} else {
-						parent.login();
-					}
-            	]]>
-        	</handler>   
-    	</netRemoteCallHib> 
-		
+
+		<netRemoteCallHib name="isRoomFull" funcname="conferenceservice.isRoomFull" remotecontext="$once{ canvas.thishib }" activeErrorHandler="true" >
+			<netparam name="roomId"><method name="getValue">return canvas.thishib.currentInvitation.room.id;</method></netparam>
+			<handler name="ondata" args="value">
+			<![CDATA[
+				//The onResult-Handler will be called be the rtmpconnection
+				if ($debug) Debug.write(canvas.thishib.currentInvitation.room.id);
+				if ($debug) Debug.write("isRoomFull: ",value);
+
+				if (value) {
+					new lz.labelerrorPopup(canvas,{errorlabelid:618});
+					parent.close();
+				} else {
+					parent.login();
+				}
+			]]>
+			</handler>
+		</netRemoteCallHib>
+
 		<netRemoteCallHib name="checkInvitationPass" funcname="invitationservice.checkInvitationPass" remotecontext="$once{ canvas.thishib }" activeErrorHandler="true" >
 			<netparam name="invitationHash"><method name="getValue">return canvas.invitationHash;</method></netparam>
 			<netparam name="pass"><method name="getValue">return parent.parent._password.getText();</method></netparam>
-			
+
 			<handler name="ondata" args="value">
 			<![CDATA[
 				//The onResult-Handler will be called be the rtmpconnection
@@ -90,13 +89,13 @@
 				}
 			]]>
 			</handler>
-		</netRemoteCallHib>  	
-	    
+		</netRemoteCallHib>
+
 		<method name="setRoomValues">
 			canvas.thishib.setUser(canvas.thishib.currentInvitation.invitee);
 			canvas.setRoomValues(canvas.thishib.currentInvitation.room);
 		</method>
-		
+
 		<method name="login">
 		<![CDATA[
 			this.userlang = Number(this.languages.getValue());
@@ -104,15 +103,15 @@
 			this.languages.setAttribute('visibility','hidden');
 			this.connect.setAttribute('visibility','hidden');
 			this.labelloading.setAttribute('visibility','visible');
-			
+
 			parent.userlang = Number(this.userlang);
-			
+
 			var invitee = canvas.thishib.currentInvitation.invitee;
 			var email = invitee.address.email;
 			var fName = invitee.firstname == null ? "" : invitee.firstname;
 			var lName = invitee.lastname == null || invitee.lastname == "" ? email : invitee.lastname;
 			//if ($debug) Debug.write("!!!!!!!!!!! invitee :: ", invitee);
-			
+
 			canvas.setAttribute('currentuser', email);
 			canvas.setAttribute('userId', -invitee.id);
 			canvas.setAttribute('mail', email);
@@ -121,11 +120,11 @@
 			canvas.setAttribute('lastLogin', invitee.lastlogin);
 			canvas.setAttribute('picture_uri', invitee.pictureuri);
 			canvas.setAttribute('language', invitee.language_id);
-			
+
 			hib.userobject = invitee;
 			hib.userobject.firstname = fName;
 			hib.userobject.lastname = lName;
-			
+
 			hib.userlang = Number(this.userlang);
 			hib.getCurrentRoomClient.doCall();
 			this.close();
@@ -133,47 +132,47 @@
 			} else {
 				hib.getLanguageByIdAndMax.doCall();
 			}
-		]]>         
+		]]>
 		</method>
-		 
+
 		<!-- label: password -->
-	    	<labelText name="pass_label" labelid="536" visibility="hidden" width="200" y="30" resize="false" x="10" />  
+		<labelText name="pass_label" labelid="536" visibility="hidden" width="200" y="30" resize="false" x="10" />
 		<customEdittext name="_password" password="true" visibility="hidden" width="170" y="30" x="120" />
-		
+
 		<!-- label: Check password -->
-	 	<simpleLabelButton name="invitation_pass" y="80" x="120" text="start" visibility="hidden" labelid="537"
-	 					   	width="170" height="20" onclick="parent.checkPWD();" />
-		
+		<simpleLabelButton name="invitation_pass" y="80" x="120" text="start" visibility="hidden" labelid="537"
+				width="170" height="20" onclick="parent.checkPWD();" />
+
 		<!-- label: language -->
-		<labelText name="labellanguages" labelid="227" visibility="hidden" width="200" y="30" resize="false" x="10" />     
+		<labelText name="labellanguages" labelid="227" visibility="hidden" width="200" y="30" resize="false" x="10" />
 		<resetCombobox name="languages" width="170" y="30" x="120" visibility="hidden" editable="false">
-	      	<netRemoteCallHib name="getLanguages" funcname="languageservice.getLanguages" remotecontext="$once{ canvas.thishib }" >      
-	            <handler name="oninit">
-                 	this.doCall();
-	            </handler>
-	            <handler name="ondata" args="value">
-	            	//The onResult-Handler will be called be the rtmpconnection
-                  	<![CDATA[
-                        var selVal = canvas.language_id;
-                        var found = false;
-                  		for (var i = 0; i < value.length; ++i){
-	                  		this.parent.addItem(value[i].name,value[i].language_id);
-                            if (value[i].language_id == selVal) {
-                                found = true;
-                            }
-		                }
-                		this.parent.selectItem((found) ? selVal : value[0].language_id);
-		            ]]>
-				</handler>  
+			<netRemoteCallHib name="getLanguages" funcname="languageservice.getLanguages" remotecontext="$once{ canvas.thishib }" >
+				<handler name="oninit">
+					this.doCall();
+				</handler>
+				<handler name="ondata" args="value">
+				<![CDATA[
+					//The onResult-Handler will be called be the rtmpconnection
+					var selVal = canvas.language_id;
+					var found = false;
+					for (var i = 0; i < value.length; ++i){
+						this.parent.addItem(value[i].name,value[i].language_id);
+						if (value[i].language_id == selVal) {
+							found = true;
+						}
+					}
+					this.parent.selectItem((found) ? selVal : value[0].language_id);
+				]]>
+				</handler>
 			</netRemoteCallHib>
-		</resetCombobox>		 
+		</resetCombobox>
 
 		<!-- label: loading -->	
 		<labelText name="labelloading" y="30" x="10" fontstyle="bold" labelid="229" visibility="hidden" />
-		
+
 		<!-- label: enter -->
 		<simpleLabelButton name="connect" y="80" x="120" text="start" 
-						   visibility="hidden" labelid="228" width="170" height="20" 
-						   onclick="parent.isRoomFull.doCall();" />
+				visibility="hidden" labelid="228" width="170" height="20" 
+				onclick="parent.isRoomFull.doCall();" />
 	</class>
 </library>

Modified: openmeetings/application/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/HashPage.java
URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/HashPage.java?rev=1772150&r1=1772149&r2=1772150&view=diff
==============================================================================
--- openmeetings/application/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/HashPage.java (original)
+++ openmeetings/application/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/HashPage.java Thu Dec  1 08:14:19 2016
@@ -128,7 +128,9 @@ public class HashPage extends BaseInited
 		if (roomId != null) {
 			pp.add(WICKET_ROOM_ID, roomId);
 			SwfPanel rp = new SwfPanel(CHILD_ID, pp);
-			replace(new MainPanel(PANEL_MAIN, rp));
+			MainPanel mp = new MainPanel(PANEL_MAIN, rp);
+			mp.getChat().setVisible(false);
+			replace(mp);
 			rp.onMenuPanelLoad(null);
 		} else {
 			replace(new SwfPanel(PANEL_MAIN, pp));

Modified: openmeetings/application/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/MainPage.java
URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/MainPage.java?rev=1772150&r1=1772149&r2=1772150&view=diff
==============================================================================
--- openmeetings/application/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/MainPage.java (original)
+++ openmeetings/application/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/MainPage.java Thu Dec  1 08:14:19 2016
@@ -69,7 +69,7 @@ public class MainPage extends BaseInited
 			protected void respond(AjaxRequestTarget target) {
 				inviteUser.open(target, getParam(getComponent(), PARAM_USER_ID).toLong());
 			}
-			
+
 			@Override
 			public void renderHead(Component component, IHeaderResponse response) {
 				super.renderHead(component, response);

Modified: openmeetings/application/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/SwfPanel.java
URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/SwfPanel.java?rev=1772150&r1=1772149&r2=1772150&view=diff
==============================================================================
--- openmeetings/application/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/SwfPanel.java (original)
+++ openmeetings/application/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/SwfPanel.java Thu Dec  1 08:14:19 2016
@@ -85,11 +85,11 @@ public class SwfPanel extends BasePanel
 	private final PollResultsDialog pollResults;
 	private final StartSharingEventBehavior startSharing;
 	private Long roomId = null;
-	
+
 	public SwfPanel(String id, Long roomId) {
 		this(id, addServer(roomId, true));
 	}
-	
+
 	public SwfPanel(String id, PageParameters pp) {
 		super(id);
 		//OK let's find the room
@@ -124,13 +124,13 @@ public class SwfPanel extends BasePanel
 		if (roomId != null && roomId.longValue() > 0) {
 			add(new AbstractDefaultAjaxBehavior() {
 				private static final long serialVersionUID = 1L;
-	
+
 				@Override
 				protected void respond(AjaxRequestTarget target) {
 					invite.updateModel(target);
 					invite.open(target);
 				}
-				
+
 				@Override
 				public void renderHead(Component component, IHeaderResponse response) {
 					super.renderHead(component, response);
@@ -139,7 +139,7 @@ public class SwfPanel extends BasePanel
 			});
 			add(new AbstractDefaultAjaxBehavior() {
 				private static final long serialVersionUID = 1L;
-	
+
 				@Override
 				protected void respond(AjaxRequestTarget target) {
 					String publicSid = getPublicSid();
@@ -149,7 +149,7 @@ public class SwfPanel extends BasePanel
 						createPoll.open(target);
 					}
 				}
-				
+
 				@Override
 				public void renderHead(Component component, IHeaderResponse response) {
 					super.renderHead(component, response);
@@ -158,7 +158,7 @@ public class SwfPanel extends BasePanel
 			});
 			add(new AbstractDefaultAjaxBehavior() {
 				private static final long serialVersionUID = 1L;
-	
+
 				@Override
 				protected void respond(AjaxRequestTarget target) {
 					Client c = getClient(getPublicSid());
@@ -167,7 +167,7 @@ public class SwfPanel extends BasePanel
 						pollResults.open(target);
 					}
 				}
-				
+
 				@Override
 				public void renderHead(Component component, IHeaderResponse response) {
 					super.renderHead(component, response);
@@ -176,7 +176,7 @@ public class SwfPanel extends BasePanel
 			});
 			add(new AbstractDefaultAjaxBehavior() {
 				private static final long serialVersionUID = 1L;
-	
+
 				@Override
 				protected void respond(AjaxRequestTarget target) {
 					if (getBean(PollDao.class).hasPoll(roomId) && !getBean(PollDao.class).hasVoted(roomId, getUserId()) && getClient(getPublicSid()) != null) {
@@ -184,7 +184,7 @@ public class SwfPanel extends BasePanel
 						vote.open(target);
 					}
 				}
-				
+
 				@Override
 				public void renderHead(Component component, IHeaderResponse response) {
 					super.renderHead(component, response);
@@ -193,12 +193,12 @@ public class SwfPanel extends BasePanel
 			});
 			add(new AbstractDefaultAjaxBehavior() {
 				private static final long serialVersionUID = 1L;
-	
+
 				@Override
 				protected void respond(AjaxRequestTarget target) {
 					startSharing.respond(target);
 				}
-				
+
 				@Override
 				public void renderHead(Component component, IHeaderResponse response) {
 					super.renderHead(component, response);
@@ -216,7 +216,7 @@ public class SwfPanel extends BasePanel
 		}
 		return false;
 	}
-	
+
 	@Override
 	public BasePanel onMenuPanelLoad(IPartialPageRequestHandler handler) {
 		getBasePage().getHeader().setVisible(false);
@@ -228,11 +228,11 @@ public class SwfPanel extends BasePanel
 		}
 		return this;
 	}
-	
+
 	private static ResourceReference newResourceReference() {
 		return new JavaScriptResourceReference(SwfPanel.class, "swf-functions.js");
 	}
-	
+
 	@Override
 	public void renderHead(IHeaderResponse response) {
 		super.renderHead(response);
@@ -298,7 +298,7 @@ public class SwfPanel extends BasePanel
 	private static PageParameters addServer(PageParameters pp, Server s) {
 		return pp.add("protocol", s.getProtocol()).add("host", s.getAddress()).add("port", s.getPort()).add("context", s.getWebapp());
 	}
-	
+
 	public static PageParameters addServer(Long roomId, boolean addBasic) {
 		PageParameters pp = new PageParameters();
 		if (addBasic) {

Modified: openmeetings/application/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/util/ProfileImageResourceReference.java
URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/util/ProfileImageResourceReference.java?rev=1772150&r1=1772149&r2=1772150&view=diff
==============================================================================
--- openmeetings/application/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/util/ProfileImageResourceReference.java (original)
+++ openmeetings/application/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/util/ProfileImageResourceReference.java Thu Dec  1 08:14:19 2016
@@ -81,6 +81,9 @@ public class ProfileImageResourceReferen
 			protected ResourceResponse newResourceResponse(Attributes attributes) {
 				PageParameters params = attributes.getParameters();
 				userId = params.get("id").toOptionalLong();
+				if (userId != null && userId.longValue() < 0) {
+					userId = -userId;
+				}
 				uri = getBean(UserDao.class).get(userId).getPictureuri();
 				ResourceResponse rr = super.newResourceResponse(attributes);
 				rr.disableCaching();

Modified: openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/WhiteBoardService.java
URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/WhiteBoardService.java?rev=1772150&r1=1772149&r2=1772150&view=diff
==============================================================================
--- openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/WhiteBoardService.java (original)
+++ openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/WhiteBoardService.java Thu Dec  1 08:14:19 2016
@@ -18,6 +18,7 @@
  */
 package org.apache.openmeetings.core.remote;
 
+import static org.apache.openmeetings.util.OpenmeetingsVariables.CONFIG_DEFAULT_LANG_KEY;
 import static org.apache.openmeetings.util.OpenmeetingsVariables.webAppRootKey;
 
 import java.io.File;
@@ -34,6 +35,7 @@ import org.apache.commons.collections4.C
 import org.apache.openmeetings.core.data.whiteboard.WhiteBoardObjectListManagerById;
 import org.apache.openmeetings.core.data.whiteboard.WhiteBoardObjectSyncManager;
 import org.apache.openmeetings.core.remote.red5.ScopeApplicationAdapter;
+import org.apache.openmeetings.db.dao.basic.ConfigurationDao;
 import org.apache.openmeetings.db.dao.label.LabelDao;
 import org.apache.openmeetings.db.dao.server.ISessionManager;
 import org.apache.openmeetings.db.dao.server.SessiondataDao;
@@ -44,6 +46,7 @@ import org.apache.openmeetings.db.dto.ro
 import org.apache.openmeetings.db.dto.room.WhiteboardSyncLockObject;
 import org.apache.openmeetings.db.entity.room.Client;
 import org.apache.openmeetings.db.entity.server.Sessiondata;
+import org.apache.openmeetings.db.entity.user.User;
 import org.apache.openmeetings.db.util.AuthLevelUtil;
 import org.apache.openmeetings.util.OmFileHelper;
 import org.red5.logging.Red5LoggerFactory;
@@ -76,6 +79,8 @@ public class WhiteBoardService implement
 	private SessiondataDao sessionDao;
 	@Autowired
 	private LabelDao labelDao;
+	@Autowired
+	private ConfigurationDao cfgDao;
 
 	public boolean getNewWhiteboardId(String name) {
 		try {
@@ -128,7 +133,16 @@ public class WhiteBoardService implement
 			WhiteboardObjectList whiteboardObjectList = wbListManagerById.getWhiteBoardObjectListByRoomId(roomId);
 
 			if (whiteboardObjectList.getWhiteboardObjects().size() == 0) {
-				wbListManagerById.getNewWhiteboardId(roomId, labelDao.getString("615", userDao.get(currentClient.getUserId()).getLanguageId()));
+				Long langId = null;
+				{
+					Long userId = currentClient.getUserId();
+					if (userId != null && userId.longValue() < 0) {
+						userId = -userId;
+					}
+					User u = userDao.get(userId);
+					langId = u == null ? cfgDao.getConfValue(CONFIG_DEFAULT_LANG_KEY, Long.class, "1") : u.getLanguageId();
+				}
+				wbListManagerById.getNewWhiteboardId(roomId, labelDao.getString("615", langId));
 				log.debug("Init New Room List");
 				whiteboardObjectList = wbListManagerById.getWhiteBoardObjectListByRoomId(roomId);
 			}

Modified: openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/WhiteBoardService.java
URL: http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/WhiteBoardService.java?rev=1772150&r1=1772149&r2=1772150&view=diff
==============================================================================
--- openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/WhiteBoardService.java (original)
+++ openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/WhiteBoardService.java Thu Dec  1 08:14:19 2016
@@ -18,6 +18,7 @@
  */
 package org.apache.openmeetings.core.remote;
 
+import static org.apache.openmeetings.util.OpenmeetingsVariables.CONFIG_DEFAULT_LANG_KEY;
 import static org.apache.openmeetings.util.OpenmeetingsVariables.webAppRootKey;
 
 import java.io.File;
@@ -34,6 +35,7 @@ import org.apache.commons.collections4.C
 import org.apache.openmeetings.core.data.whiteboard.WhiteBoardObjectListManagerById;
 import org.apache.openmeetings.core.data.whiteboard.WhiteBoardObjectSyncManager;
 import org.apache.openmeetings.core.remote.red5.ScopeApplicationAdapter;
+import org.apache.openmeetings.db.dao.basic.ConfigurationDao;
 import org.apache.openmeetings.db.dao.label.LabelDao;
 import org.apache.openmeetings.db.dao.server.ISessionManager;
 import org.apache.openmeetings.db.dao.server.SessiondataDao;
@@ -44,6 +46,7 @@ import org.apache.openmeetings.db.dto.ro
 import org.apache.openmeetings.db.dto.room.WhiteboardSyncLockObject;
 import org.apache.openmeetings.db.entity.room.Client;
 import org.apache.openmeetings.db.entity.server.Sessiondata;
+import org.apache.openmeetings.db.entity.user.User;
 import org.apache.openmeetings.db.util.AuthLevelUtil;
 import org.apache.openmeetings.util.OmFileHelper;
 import org.red5.logging.Red5LoggerFactory;
@@ -76,6 +79,8 @@ public class WhiteBoardService implement
 	private SessiondataDao sessionDao;
 	@Autowired
 	private LabelDao labelDao;
+	@Autowired
+	private ConfigurationDao cfgDao;
 
 	public boolean getNewWhiteboardId(String name) {
 		try {
@@ -128,7 +133,16 @@ public class WhiteBoardService implement
 			WhiteboardObjectList whiteboardObjectList = wbListManagerById.getWhiteBoardObjectListByRoomId(roomId);
 
 			if (whiteboardObjectList.getWhiteboardObjects().size() == 0) {
-				wbListManagerById.getNewWhiteboardId(roomId, labelDao.getString("615", userDao.get(currentClient.getUserId()).getLanguageId()));
+				Long langId = null;
+				{
+					Long userId = currentClient.getUserId();
+					if (userId != null && userId.longValue() < 0) {
+						userId = -userId;
+					}
+					User u = userDao.get(userId);
+					langId = u == null ? cfgDao.getConfValue(CONFIG_DEFAULT_LANG_KEY, Long.class, "1") : u.getLanguageId();
+				}
+				wbListManagerById.getNewWhiteboardId(roomId, labelDao.getString("615", langId));
 				log.debug("Init New Room List");
 				whiteboardObjectList = wbListManagerById.getWhiteBoardObjectListByRoomId(roomId);
 			}