From f57b2659e3bd651f13f4964daf5b62e711eccc27 Mon Sep 17 00:00:00 2001
From: Ivan Tcholakov
Date: Tue, 7 Jul 2009 21:17:55 +0200
Subject: [PATCH] [svn r21856] FS#4383 - In addition, changes for mainstream
code: A minor typo-correction in _whatsnew.html; updating the build number,
because within the editor in SVN there are more patches applied; updating the
file commands.php (*); updating fck_about.html.
---
documentation/changelog.html | 3 +-
main/inc/lib/fckeditor/_whatsnew.html | 2 +-
.../fckeditor/editor/_source/fckeditorapi.js | 2 +-
.../fckeditor/editor/dialog/fck_about.html | 2 +-
.../filemanager/connectors/php/commands.php | 50 ++++++++++---------
.../editor/js/fckeditorcode_gecko.js | 2 +-
.../fckeditor/editor/js/fckeditorcode_ie.js | 2 +-
7 files changed, 34 insertions(+), 29 deletions(-)
diff --git a/documentation/changelog.html b/documentation/changelog.html
index 3e2b1b1aa1..4b95ca4572 100644
--- a/documentation/changelog.html
+++ b/documentation/changelog.html
@@ -32,7 +32,8 @@
A transliteration function has been added. Currently, it is used in uploading files. Files with non-English names get names that contain ASCII letters only, remaining readable in the corresponding language. Rationale: The PHP5 run-time environment does not manage file name encodings, adding such a non-native feature involves too much work. For avoiding character encoding problems, transliteration of file names is the possible solution. (FS#306)
An internationalization option has been added for improving sorting in arbitrary language. When the intl php-extension has been installed, various sorting routines exploit it for better sorting. Rationale: The PHP5 run-time environment does not provide native and reliable way for sorting UTF-8 strings. (FS#306)
The installation sript: The page about system requilements has been updated. Also, at the very beginning, a check has been added whether the mbstring php-extension is installed - see the related forum topic . (FS#306)
- The online editor (FCKEditor 2.6.4): Several known bug-fixes have been implemented, tickets #2821 , #2856 , #2915 , #3120 , #3181 , #3429 , #3439 , #3880 . (FS#2867)
+ The online editor: A upgrade from FCKEditor 2.6.4 to FCKEditor 2.6.4.1 has been implemented. (FS#4383)
+ The online editor: Several known bug-fixes from FCKEditor 2.6.5 SVN have been implemented, tickets #2821 , #2856 , #2915 , #3120 , #3181 , #3429 , #3439 , #3880 . (FS#2867)
The online editor: Blocking copy/paste for trainees has been added. The feature is configurable through editing the file .../dokeos/main/inc/lib/fckeditor/myconfig.js . (FS#2867)
The online editor: Preview tabs have been added to the dialogs for inserting video, flv-video, and YouTube video. (FS#2867)
The online editor: The "audio" plugin has been activated by default as an implementation of the "Insert audio / Audio properties" dialog. This new plugin is intended to replace the "MP3" plugin. (FS#2867)
diff --git a/main/inc/lib/fckeditor/_whatsnew.html b/main/inc/lib/fckeditor/_whatsnew.html
index 9b52f4aeba..63db5674cf 100644
--- a/main/inc/lib/fckeditor/_whatsnew.html
+++ b/main/inc/lib/fckeditor/_whatsnew.html
@@ -38,7 +38,7 @@
Fixed Bugs:
Security release, upgrade is highly recommended.
-
+
Version 2.6.4
diff --git a/main/inc/lib/fckeditor/editor/_source/fckeditorapi.js b/main/inc/lib/fckeditor/editor/_source/fckeditorapi.js
index 0fb29709a3..c0937f71e2 100644
--- a/main/inc/lib/fckeditor/editor/_source/fckeditorapi.js
+++ b/main/inc/lib/fckeditor/editor/_source/fckeditorapi.js
@@ -41,7 +41,7 @@ function InitializeAPI()
var sScript =
'window.FCKeditorAPI = {' +
'Version : "2.6.4.1",' +
- 'VersionBuild : "23187",' +
+ 'VersionBuild : "23195",' +
'Instances : window.FCKeditorAPI && window.FCKeditorAPI.Instances || {},' +
'GetInstance : function( name )' +
diff --git a/main/inc/lib/fckeditor/editor/dialog/fck_about.html b/main/inc/lib/fckeditor/editor/dialog/fck_about.html
index 026983e21a..66b2fc9aa6 100644
--- a/main/inc/lib/fckeditor/editor/dialog/fck_about.html
+++ b/main/inc/lib/fckeditor/editor/dialog/fck_about.html
@@ -78,7 +78,7 @@ window.onload = function()
border-left: #000000 1px solid; border-bottom: #000000 1px solid">
version
- 2.6.4
+ 2.6.4.1
Build 23195
diff --git a/main/inc/lib/fckeditor/editor/filemanager/connectors/php/commands.php b/main/inc/lib/fckeditor/editor/filemanager/connectors/php/commands.php
index bb4d799c9c..dd1e20b8f9 100644
--- a/main/inc/lib/fckeditor/editor/filemanager/connectors/php/commands.php
+++ b/main/inc/lib/fckeditor/editor/filemanager/connectors/php/commands.php
@@ -76,41 +76,45 @@ function GetFoldersAndFiles( $resourceType, $currentFolder )
$aFolders = array() ;
$aFiles = array() ;
- $oCurrentFolder = opendir( $sServerDir ) ;
+ $oCurrentFolder = @opendir( $sServerDir ) ;
$in_group = api_is_in_group();
$in_shared_folder = $currentFolder == '/shared_folder/';
$user_id = api_get_user_id();
- while ( $sFile = readdir( $oCurrentFolder ) )
+ if ($oCurrentFolder !== false)
{
- $is_dir = @is_dir( $sServerDir . $sFile );
- if ( $sFile != '.' && $sFile != '..'
- && strpos( $sFile, '_DELETED_' ) === false
- && strpos( $sFile, 'chat_files' ) === false
- && strpos( $sFile, 'HotPotatoes_files' ) === false
- && ( $in_group || ( !$in_group && strpos( $sFile, '_groupdocs' ) === false ) )
- && (!$in_shared_folder || ($in_shared_folder && (!$is_dir || ($is_dir && $sFile == $user_id))))
- && $sFile != '.thumbs'
- && $sFile != '.svn' )
+ while ( $sFile = readdir( $oCurrentFolder ) )
{
- if ( $is_dir )
- $aFolders[] = ' ' ;
- else
+ $is_dir = @is_dir( $sServerDir . $sFile );
+ if ( $sFile != '.' && $sFile != '..'
+ && strpos( $sFile, '_DELETED_' ) === false
+ && strpos( $sFile, 'chat_files' ) === false
+ && strpos( $sFile, 'HotPotatoes_files' ) === false
+ && ( $in_group || ( !$in_group && strpos( $sFile, '_groupdocs' ) === false ) )
+ && (!$in_shared_folder || ($in_shared_folder && (!$is_dir || ($is_dir && $sFile == $user_id))))
+ && $sFile != '.thumbs'
+ && $sFile != '.svn' )
{
- $iFileSize = @filesize( $sServerDir . $sFile ) ;
- if ( !$iFileSize ) {
- $iFileSize = 0 ;
- }
- if ( $iFileSize > 0 )
+ if ( $is_dir )
+ $aFolders[] = ' ' ;
+ else
{
- $iFileSize = round( $iFileSize / 1024 ) ;
- if ( $iFileSize < 1 ) $iFileSize = 1 ;
- }
+ $iFileSize = @filesize( $sServerDir . $sFile ) ;
+ if ( !$iFileSize ) {
+ $iFileSize = 0 ;
+ }
+ if ( $iFileSize > 0 )
+ {
+ $iFileSize = round( $iFileSize / 1024 ) ;
+ if ( $iFileSize < 1 ) $iFileSize = 1 ;
+ }
- $aFiles[] = ' ' ;
+ $aFiles[] = ' ' ;
+ }
}
}
+ closedir( $oCurrentFolder ) ;
}
// Send the folders
diff --git a/main/inc/lib/fckeditor/editor/js/fckeditorcode_gecko.js b/main/inc/lib/fckeditor/editor/js/fckeditorcode_gecko.js
index 4b507cdcca..ca2c8b7183 100644
--- a/main/inc/lib/fckeditor/editor/js/fckeditorcode_gecko.js
+++ b/main/inc/lib/fckeditor/editor/js/fckeditorcode_gecko.js
@@ -35,7 +35,7 @@ var FCKDebug={Output:function(){},OutputObject:function(){}};
var FCKDomTools={MoveChildren:function(A,B,C){if (A==B) return;var D;if (C){while ((D=A.lastChild)) B.insertBefore(A.removeChild(D),B.firstChild);}else{while ((D=A.firstChild)) B.appendChild(A.removeChild(D));}},MoveNode:function(A,B,C){if (C) B.insertBefore(FCKDomTools.RemoveNode(A),B.firstChild);else B.appendChild(FCKDomTools.RemoveNode(A));},TrimNode:function(A){this.LTrimNode(A);this.RTrimNode(A);},LTrimNode:function(A){var B;while ((B=A.firstChild)){if (B.nodeType==3){var C=B.nodeValue.LTrim();var D=B.nodeValue.length;if (C.length==0){A.removeChild(B);continue;}else if (C.length0) break;if (A.lastChild) A=A.lastChild;else return this.GetPreviousSourceElement(A,B,C,D);};return null;},GetNextSourceElement:function(A,B,C,D,E){while((A=this.GetNextSourceNode(A,E))){if (A.nodeType==1){if (C&&A.nodeName.IEquals(C)) break;if (D&&A.nodeName.IEquals(D)) return this.GetNextSourceElement(A,B,C,D);return A;}else if (B&&A.nodeType==3&&A.nodeValue.RTrim().length>0) break;};return null;},GetNextSourceNode:function(A,B,C,D){if (!A) return null;var E;if (!B&&A.firstChild) E=A.firstChild;else{if (D&&A==D) return null;E=A.nextSibling;if (!E&&(!D||D!=A.parentNode)) return this.GetNextSourceNode(A.parentNode,true,C,D);};if (C&&E&&E.nodeType!=C) return this.GetNextSourceNode(E,false,C,D);return E;},GetPreviousSourceNode:function(A,B,C,D){if (!A) return null;var E;if (!B&&A.lastChild) E=A.lastChild;else{if (D&&A==D) return null;E=A.previousSibling;if (!E&&(!D||D!=A.parentNode)) return this.GetPreviousSourceNode(A.parentNode,true,C,D);};if (C&&E&&E.nodeType!=C) return this.GetPreviousSourceNode(E,false,C,D);return E;},InsertAfterNode:function(A,B){return A.parentNode.insertBefore(B,A.nextSibling);},GetParents:function(A){var B=[];while (A){B.unshift(A);A=A.parentNode;};return B;},GetCommonParents:function(A,B){var C=this.GetParents(A);var D=this.GetParents(B);var E=[];for (var i=0;i0) D[C.pop().toLowerCase()]=1;var E=this.GetCommonParents(A,B);var F=null;while ((F=E.pop())){if (D[F.nodeName.toLowerCase()]) return F;};return null;},GetIndexOf:function(A){var B=A.parentNode?A.parentNode.firstChild:null;var C=-1;while (B){C++;if (B==A) return C;B=B.nextSibling;};return-1;},PaddingNode:null,EnforcePaddingNode:function(A,B){try{if (!A||!A.body) return;}catch (e){return;};this.CheckAndRemovePaddingNode(A,B,true);try{if (A.body.lastChild&&(A.body.lastChild.nodeType!=1||A.body.lastChild.tagName.toLowerCase()==B.toLowerCase())) return;}catch (e){return;};var C=A.createElement(B);if (FCKBrowserInfo.IsGecko&&FCKListsLib.NonEmptyBlockElements[B]) FCKTools.AppendBogusBr(C);this.PaddingNode=C;if (A.body.childNodes.length==1&&A.body.firstChild.nodeType==1&&A.body.firstChild.tagName.toLowerCase()=='br'&&(A.body.firstChild.getAttribute('_moz_dirty')!=null||A.body.firstChild.getAttribute('type')=='_moz')) A.body.replaceChild(C,A.body.firstChild);else A.body.appendChild(C);},CheckAndRemovePaddingNode:function(A,B,C){var D=this.PaddingNode;if (!D) return;try{if (D.parentNode!=A.body||D.tagName.toLowerCase()!=B||(D.childNodes.length>1)||(D.firstChild&&D.firstChild.nodeValue!='\xa0'&&String(D.firstChild.tagName).toLowerCase()!='br')){this.PaddingNode=null;return;}}catch (e){this.PaddingNode=null;return;};if (!C){if (D.parentNode.childNodes.length>1) D.parentNode.removeChild(D);this.PaddingNode=null;}},HasAttribute:function(A,B){if (A.hasAttribute) return A.hasAttribute(B);else{var C=A.attributes[B];return (C!=undefined&&C.specified);}},HasAttributes:function(A){var B=A.attributes;for (var i=0;i0) return true;}else if (B[i].specified) return true;};return false;},RemoveAttribute:function(A,B){if (FCKBrowserInfo.IsIE&&B.toLowerCase()=='class') B='className';return A.removeAttribute(B,0);},RemoveAttributes:function (A,B){for (var i=0;i0) return false;C=C.nextSibling;};return D?this.CheckIsEmptyElement(D,B):true;},SetElementStyles:function(A,B){var C=A.style;for (var D in B) C[D]=B[D];},SetOpacity:function(A,B){if (FCKBrowserInfo.IsIE){B=Math.round(B*100);A.style.filter=(B>100?'':'progid:DXImageTransform.Microsoft.Alpha(opacity='+B+')');}else A.style.opacity=B;},GetCurrentElementStyle:function(A,B){if (FCKBrowserInfo.IsIE) return A.currentStyle[B];else return A.ownerDocument.defaultView.getComputedStyle(A,'').getPropertyValue(B);},GetPositionedAncestor:function(A){var B=A;while (B!=FCKTools.GetElementDocument(B).documentElement){if (this.GetCurrentElementStyle(B,'position')!='static') return B;if (B==FCKTools.GetElementDocument(B).documentElement&¤tWindow!=w) B=currentWindow.frameElement;else B=B.parentNode;};return null;},ScrollIntoView:function(A,B){var C=FCKTools.GetElementWindow(A);var D=FCKTools.GetViewPaneSize(C).Height;var E=D*-1;if (B===false){E+=A.offsetHeight||0;E+=parseInt(this.GetCurrentElementStyle(A,'marginBottom')||0,10)||0;};var F=FCKTools.GetDocumentPosition(C,A);E+=F.y;var G=FCKTools.GetScrollPosition(C).Y;if (E>0&&(E>G||E'+styleDef+'';};var C=function(cssFileUrl,markTemp){if (cssFileUrl.length==0) return '';var B=markTemp?' _fcktemp="true"':'';return ' ';};return function(cssFileOrArrayOrDef,markTemp){if (!cssFileOrArrayOrDef) return '';if (typeof(cssFileOrArrayOrDef)=='string'){if (/[\\\/\.][^{}]*$/.test(cssFileOrArrayOrDef)){return this.GetStyleHtml(cssFileOrArrayOrDef.split(','),markTemp);}else return A(this._GetUrlFixedCss(cssFileOrArrayOrDef),markTemp);}else{var E='';for (var i=0;i /g,'>');return A;};FCKTools.HTMLDecode=function(A){if (!A) return '';A=A.replace(/>/g,'>');A=A.replace(/</g,'<');A=A.replace(/&/g,'&');return A;};FCKTools._ProcessLineBreaksForPMode=function(A,B,C,D,E){var F=0;var G="";var H="
";var I=" ";if (C){G="";H=" ";F=1;}while (D&&D!=A.FCK.EditorDocument.body){if (D.tagName.toLowerCase()=='p'){F=1;break;};D=D.parentNode;};for (var i=0;i";H="";F=1;}while (D&&D!=A.FCK.EditorDocument.body){if (D.tagName.toLowerCase()=='div'){F=1;break;};D=D.parentNode;};for (var i=0;i";H="";F=1;};for (var i=0;i0) return A[A.length-1];return null;};FCKTools.GetDocumentPosition=function(w,A){var x=0;var y=0;var B=A;var C=null;var D=FCKTools.GetElementWindow(B);while (B&&!(D==w&&(B==w.document.body||B==w.document.documentElement))){x+=B.offsetLeft-B.scrollLeft;y+=B.offsetTop-B.scrollTop;if (!FCKBrowserInfo.IsOpera){var E=C;while (E&&E!=B){x-=E.scrollLeft;y-=E.scrollTop;E=E.parentNode;}};C=B;if (B.offsetParent) B=B.offsetParent;else{if (D!=w){B=D.frameElement;C=null;if (B) D=B.contentWindow.parent;}else B=null;}};if (FCKDomTools.GetCurrentElementStyle(w.document.body,'position')!='static'||(FCKBrowserInfo.IsIE&&FCKDomTools.GetPositionedAncestor(A)==null)){x+=w.document.body.offsetLeft;y+=w.document.body.offsetTop;};return { "x":x,"y":y };};FCKTools.GetWindowPosition=function(w,A){var B=this.GetDocumentPosition(w,A);var C=FCKTools.GetScrollPosition(w);B.x-=C.X;B.y-=C.Y;return B;};FCKTools.ProtectFormStyles=function(A){if (!A||A.nodeType!=1||A.tagName.toLowerCase()!='form') return [];var B=[];var C=['style','className'];for (var i=0;i0){for (var i=B.length-1;i>=0;i--){var C=B[i][0];var D=B[i][1];if (D) A.insertBefore(C,D);else A.appendChild(C);}}};FCKTools.GetNextNode=function(A,B){if (A.firstChild) return A.firstChild;else if (A.nextSibling) return A.nextSibling;else{var C=A.parentNode;while (C){if (C==B) return null;if (C.nextSibling) return C.nextSibling;else C=C.parentNode;}};return null;};FCKTools.GetNextTextNode=function(A,B,C){node=this.GetNextNode(A,B);if (C&&node&&C(node)) return null;while (node&&node.nodeType!=3){node=this.GetNextNode(node,B);if (C&&node&&C(node)) return null;};return node;};FCKTools.Merge=function(){var A=arguments;var o=A[0];for (var i=1;i