[geeklog-cvs] Geeklog-1.x/public_html/fckeditor/editor/filemanager/connectors/perl commands.pl, 1.2, 1.3

Blaine Lang blaine at qs1489.pair.com
Sun Aug 10 12:46:35 EDT 2008


Update of /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/filemanager/connectors/perl
In directory qs1489.pair.com:/tmp/cvs-serv4567/editor/filemanager/connectors/perl

Modified Files:
	commands.pl 
Log Message:
Upgrade to FCKeditor ver 2.6.3

Index: commands.pl
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/filemanager/connectors/perl/commands.pl,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** commands.pl	5 May 2008 00:35:25 -0000	1.2
--- commands.pl	10 Aug 2008 16:46:32 -0000	1.3
***************
*** 170,208 ****
  	local($sErrorNumber, $sFileUrl, $sFileName, $customMsg) = @_;
  
  	print <<EOF;
  Content-type: text/html
  
  <script type="text/javascript">
! // Automatically detect the correct document.domain (#1919).
! (function()
! {
! 	var d = document.domain ;
! 
! 	while ( true )
! 	{
! 		// Test if we can access a parent property.
! 		try
! 		{
! 			var test = window.top.opener.document.domain ;
! 			break ;
! 		}
! 		catch( e ) {}
! 
! 		// Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ...
! 		d = d.replace( /.*?(?:\\.|\$)/, '' ) ;
! 
! 		if ( d.length == 0 )
! 			break ;		// It was not able to detect the domain.
! 
! 		try
! 		{
! 			document.domain = d ;
! 		}
! 		catch (e)
! 		{
! 			break ;
! 		}
! 	}
! })() ;
  
  EOF
--- 170,181 ----
  	local($sErrorNumber, $sFileUrl, $sFileName, $customMsg) = @_;
  
+ 	# Minified version of the document.domain automatic fix script (#1919).
+ 	# The original script can be found at _dev/domain_fix_template.js
+ 	# Note: in Perl replace \ with \\ and $ with \$
  	print <<EOF;
  Content-type: text/html
  
  <script type="text/javascript">
! (function(){var d=document.domain;while (true){try{var A=window.parent.document.domain;break;}catch(e) {};d=d.replace(/.*?(?:\\.|\$)/,'');if (d.length==0) break;try{document.domain=d;}catch (e){break;}}})();
  
  EOF




More information about the geeklog-cvs mailing list