mirror of
				https://github.com/Mibew/java.git
				synced 2025-10-31 18:41:09 +03:00 
			
		
		
		
	integrate 1.5.2 changes into trunk
git-svn-id: https://webim.svn.sourceforge.net/svnroot/webim/trunk@339 c66351dc-e62f-0410-b875-e3a5c0b9693f
This commit is contained in:
		
							parent
							
								
									ef036a4621
								
							
						
					
					
						commit
						0b4b186dd1
					
				| @ -32,7 +32,11 @@ if( !isset($_GET['token']) || !isset($_GET['thread']) ) { | ||||
| 			exit; | ||||
| 		} | ||||
| 
 | ||||
| 		$referer = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : ""; | ||||
| 		$referer = isset($_GET['url']) ? $_GET['url'] : | ||||
| 			(isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : ""); | ||||
| 		if(isset($_GET['referrer']) && $_GET['referrer']) { | ||||
| 			$referer .= "\n".$_GET['referrer']; | ||||
| 		} | ||||
| 		$extAddr = $_SERVER['REMOTE_ADDR']; | ||||
| 		if (isset($_SERVER['HTTP_X_FORWARDED_FOR']) && | ||||
| 		          $_SERVER['HTTP_X_FORWARDED_FOR'] != $_SERVER['REMOTE_ADDR']) { | ||||
|  | ||||
| @ -1,3 +1,8 @@ | ||||
|   1.5.2 | ||||
|   ----- | ||||
|   [!] lost query parameters after login redirect | ||||
|   [+] added referrer into button code | ||||
| 
 | ||||
|   1.5.1 | ||||
|   ----- | ||||
|   [!] significant optimization of chat window (both themes), reduced number of images and their sizes | ||||
|  | ||||
| @ -343,8 +343,9 @@ function wrong_field($key) { | ||||
| 	return getlocal2("errors.wrong_field",array(getlocal($key))); | ||||
| } | ||||
| 
 | ||||
| function get_popup($href,$message,$title,$wndName,$options) { | ||||
| 	return "<a href=\"$href\" target=\"_blank\" ".($title?"title=\"$title\" ":"")."onclick=\"if(navigator.userAgent.toLowerCase().indexOf('opera') != -1 && window.event.preventDefault) window.event.preventDefault();this.newWindow = window.open('$href', '$wndName', '$options');this.newWindow.focus();this.newWindow.opener=window;return false;\">$message</a>"; | ||||
| function get_popup($href,$jshref,$message,$title,$wndName,$options) { | ||||
| 	if(!$jshref) { $jshref = "'$href'"; } | ||||
| 	return "<a href=\"$href\" target=\"_blank\" ".($title?"title=\"$title\" ":"")."onclick=\"if(navigator.userAgent.toLowerCase().indexOf('opera') != -1 && window.event.preventDefault) window.event.preventDefault();this.newWindow = window.open($jshref, '$wndName', '$options');this.newWindow.focus();this.newWindow.opener=window;return false;\">$message</a>"; | ||||
| } | ||||
| 
 | ||||
| function get_image($href,$width,$height) { | ||||
|  | ||||
| @ -126,8 +126,9 @@ function get_operator_name($operator) { | ||||
| } | ||||
| 
 | ||||
| function generate_button($title,$locale,$style,$inner,$showhost,$forcesecure) { | ||||
| 	$link = get_app_location($showhost,$forcesecure)."/client.php". ($locale?"?locale=$locale" : "").($style ? ($locale?"&":"?")."style=$style" : ""); | ||||
| 	$temp = get_popup($link, $inner, $title, "webim", "toolbar=0,scrollbars=0,location=0,status=1,menubar=0,width=640,height=480,resizable=1" ); | ||||
| 	$link = get_app_location($showhost,$forcesecure)."/client.php". ($locale?"?locale=$locale" : "").($style ? ($locale?"&":"?")."style=$style" : ""); | ||||
| 	$temp = get_popup($link, "'$link".($locale||$style?"&":"?")."url='+escape(document.location.href)+'&referrer='+escape(document.referrer)", | ||||
| 			$inner, $title, "webim", "toolbar=0,scrollbars=0,location=0,status=1,menubar=0,width=640,height=480,resizable=1" ); | ||||
| 	return "<!-- webim button -->".$temp."<!-- / webim button -->"; | ||||
| } | ||||
| 
 | ||||
| @ -142,7 +143,11 @@ function check_login() { | ||||
| 				return $op; | ||||
| 			} | ||||
| 		} | ||||
| 		$_SESSION['backpath'] = $_SERVER['PHP_SELF']; | ||||
| 		$requested = $_SERVER['PHP_SELF']; | ||||
| 		if($_SERVER['REQUEST_METHOD'] == 'GET' && $_SERVER['QUERY_STRING']) { | ||||
| 			$requested .= "?".$_SERVER['QUERY_STRING']; | ||||
| 		} | ||||
| 		$_SESSION['backpath'] = $requested; | ||||
| 		header("Location: $webimroot/operator/login.php"); | ||||
| 		exit; | ||||
| 	} | ||||
|  | ||||
| @ -86,12 +86,14 @@ if($stringid) { | ||||
| 	if(isset($_POST['translation'])) { | ||||
| 
 | ||||
| 		$translation = getparam('translation'); | ||||
| 
 | ||||
| 		if(!$translation) { | ||||
| 			$errors[] = no_field("form.field.translation"); | ||||
| 		} | ||||
| 
 | ||||
| 		if(count($errors) == 0) { | ||||
| 			if (get_magic_quotes_gpc()) { | ||||
| 				$translation = stripslashes($translation); | ||||
| 			} | ||||
| 			save_message($target, $stringid, $translation); | ||||
| 
 | ||||
| 			$page['saved'] = true; | ||||
|  | ||||
| @ -72,7 +72,7 @@ function get_user_addr($addr) { | ||||
| 	global $settings; | ||||
| 	if($settings['geolink'] && preg_match( "/(\\d+\\.\\d+\\.\\d+\\.\\d+)/", $addr, $matches )) { | ||||
| 		$userip = $matches[1]; | ||||
| 		return get_popup(str_replace("{ip}", $userip, $settings['geolink']), htmlspecialchars($addr), "GeoLocation", "ip$userip", $settings['geolinkparams']); | ||||
| 		return get_popup(str_replace("{ip}", $userip, $settings['geolink']), '', htmlspecialchars($addr), "GeoLocation", "ip$userip", $settings['geolinkparams']); | ||||
| 	} | ||||
| 	return htmlspecialchars($addr); | ||||
| } | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user