Permalink
Browse files

Resolve merge conflict

  • Loading branch information...
2 parents 69adf28 + f39c228 commit 640481441ed7830c421c27df30f5552b807f98b1 @dieterve dieterve committed Aug 28, 2012
Showing with 7,544 additions and 9,144 deletions.
  1. +6 −0 CHANGELOG.md
  2. +31 −0 backend/core/js/ckfinder/changelog.txt
  3. +7 −7 backend/core/js/ckfinder/ckfinder.html
  4. +2 −2 backend/core/js/ckfinder/ckfinder.js
  5. +1 −4 backend/core/js/ckfinder/ckfinder.php
  6. +8 −0 backend/core/js/ckfinder/ckfinder_v1.js
  7. +18 −4 backend/core/js/ckfinder/config.php
  8. +6 −10 backend/core/js/ckfinder/core/connector/php/constants.php
  9. +1 −0 backend/core/js/ckfinder/core/connector/php/lang/bg.php
  10. +36 −0 backend/core/js/ckfinder/core/connector/php/lang/ca.php
  11. +1 −0 backend/core/js/ckfinder/core/connector/php/lang/cs.php
  12. +1 −0 backend/core/js/ckfinder/core/connector/php/lang/cy.php
  13. +1 −0 backend/core/js/ckfinder/core/connector/php/lang/da.php
  14. +1 −0 backend/core/js/ckfinder/core/connector/php/lang/de.php
  15. +1 −0 backend/core/js/ckfinder/core/connector/php/lang/el.php
  16. +1 −0 backend/core/js/ckfinder/core/connector/php/lang/en.php
  17. +1 −0 backend/core/js/ckfinder/core/connector/php/lang/eo.php
  18. +1 −0 backend/core/js/ckfinder/core/connector/php/lang/es-mx.php
  19. +1 −0 backend/core/js/ckfinder/core/connector/php/lang/es.php
  20. +1 −0 backend/core/js/ckfinder/core/connector/php/lang/et.php
  21. +1 −0 backend/core/js/ckfinder/core/connector/php/lang/fa.php
  22. +1 −0 backend/core/js/ckfinder/core/connector/php/lang/fi.php
  23. +1 −0 backend/core/js/ckfinder/core/connector/php/lang/fr.php
  24. +1 −0 backend/core/js/ckfinder/core/connector/php/lang/gu.php
  25. +1 −0 backend/core/js/ckfinder/core/connector/php/lang/he.php
  26. +1 −0 backend/core/js/ckfinder/core/connector/php/lang/hi.php
  27. +1 −0 backend/core/js/ckfinder/core/connector/php/lang/hr.php
  28. +1 −0 backend/core/js/ckfinder/core/connector/php/lang/hu.php
  29. +1 −0 backend/core/js/ckfinder/core/connector/php/lang/it.php
  30. +1 −0 backend/core/js/ckfinder/core/connector/php/lang/ja.php
  31. +1 −0 backend/core/js/ckfinder/core/connector/php/lang/lt.php
  32. +1 −0 backend/core/js/ckfinder/core/connector/php/lang/lv.php
  33. +1 −0 backend/core/js/ckfinder/core/connector/php/lang/nb.php
  34. +1 −0 backend/core/js/ckfinder/core/connector/php/lang/nl.php
  35. +1 −0 backend/core/js/ckfinder/core/connector/php/lang/nn.php
  36. +1 −0 backend/core/js/ckfinder/core/connector/php/lang/no.php
  37. +1 −0 backend/core/js/ckfinder/core/connector/php/lang/pl.php
  38. +1 −0 backend/core/js/ckfinder/core/connector/php/lang/pt-br.php
  39. +1 −0 backend/core/js/ckfinder/core/connector/php/lang/ro.php
  40. +1 −0 backend/core/js/ckfinder/core/connector/php/lang/ru.php
  41. +1 −0 backend/core/js/ckfinder/core/connector/php/lang/sk.php
  42. +1 −0 backend/core/js/ckfinder/core/connector/php/lang/sl.php
  43. +1 −0 backend/core/js/ckfinder/core/connector/php/lang/sv.php
  44. +1 −0 backend/core/js/ckfinder/core/connector/php/lang/tr.php
  45. +1 −0 backend/core/js/ckfinder/core/connector/php/lang/vi.php
  46. +1 −0 backend/core/js/ckfinder/core/connector/php/lang/zh-cn.php
  47. +1 −0 backend/core/js/ckfinder/core/connector/php/lang/zh-tw.php
  48. +0 −99 backend/core/js/ckfinder/core/connector/php/php5/CommandHandler/DeleteFile.php
  49. +162 −0 backend/core/js/ckfinder/core/connector/php/php5/CommandHandler/DeleteFiles.php
  50. +1 −1 backend/core/js/ckfinder/core/connector/php/php5/CommandHandler/DownloadFile.php
  51. +2 −7 backend/core/js/ckfinder/core/connector/php/php5/CommandHandler/FileUpload.php
  52. +3 −2 backend/core/js/ckfinder/core/connector/php/php5/CommandHandler/GetFolders.php
  53. +4 −2 backend/core/js/ckfinder/core/connector/php/php5/CommandHandler/Init.php
  54. +7 −0 backend/core/js/ckfinder/core/connector/php/php5/CommandHandler/MoveFiles.php
  55. +2 −2 backend/core/js/ckfinder/core/connector/php/php5/CommandHandler/RenameFolder.php
  56. +63 −0 backend/core/js/ckfinder/core/connector/php/php5/Core/Config.php
  57. +1 −1 backend/core/js/ckfinder/core/connector/php/php5/Core/Connector.php
  58. +10 −0 backend/core/js/ckfinder/core/connector/php/php5/Core/ResourceTypeConfig.php
  59. +183 −5 backend/core/js/ckfinder/core/connector/php/php5/Utils/FileSystem.php
  60. +1 −1 backend/core/js/ckfinder/core/connector/php/php5/Utils/Misc.php
  61. +33 −7 backend/core/js/ckfinder/lang/bg.js
  62. +33 −7 backend/core/js/ckfinder/lang/cs.js
  63. +33 −7 backend/core/js/ckfinder/lang/de.js
  64. +33 −7 backend/core/js/ckfinder/lang/el.js
  65. +33 −7 backend/core/js/ckfinder/lang/en.js
  66. +33 −7 backend/core/js/ckfinder/lang/es.js
  67. +33 −7 backend/core/js/ckfinder/lang/fr.js
  68. +33 −7 backend/core/js/ckfinder/lang/hu.js
  69. +33 −7 backend/core/js/ckfinder/lang/it.js
  70. +31 −5 backend/core/js/ckfinder/lang/ja.js
  71. +33 −7 backend/core/js/ckfinder/lang/lt.js
  72. +33 −7 backend/core/js/ckfinder/lang/nl.js
  73. +33 −7 backend/core/js/ckfinder/lang/pl.js
  74. +33 −7 backend/core/js/ckfinder/lang/ro.js
  75. +31 −5 backend/core/js/ckfinder/lang/ru.js
  76. +33 −7 backend/core/js/ckfinder/lang/sv.js
  77. +33 −7 backend/core/js/ckfinder/lang/tr.js
  78. +31 −5 backend/core/js/ckfinder/lang/zh-cn.js
  79. +19 −19 backend/core/js/ckfinder/plugins/fileeditor/codemirror/LICENSE
  80. +0 −59 backend/core/js/ckfinder/plugins/fileeditor/codemirror/contrib/csharp/css/csharpcolors.css
  81. +0 −329 backend/core/js/ckfinder/plugins/fileeditor/codemirror/contrib/csharp/js/parsecsharp.js
  82. +0 −196 backend/core/js/ckfinder/plugins/fileeditor/codemirror/contrib/csharp/js/tokenizecsharp.js
  83. +0 −37 backend/core/js/ckfinder/plugins/fileeditor/codemirror/contrib/php/LICENSE
  84. +0 −114 backend/core/js/ckfinder/plugins/fileeditor/codemirror/contrib/php/css/phpcolors.css
  85. +0 −419 backend/core/js/ckfinder/plugins/fileeditor/codemirror/contrib/php/js/parsephp.js
  86. +0 −116 backend/core/js/ckfinder/plugins/fileeditor/codemirror/contrib/php/js/parsephphtmlmixed.js
  87. +0 −1,208 backend/core/js/ckfinder/plugins/fileeditor/codemirror/contrib/php/js/tokenizephp.js
  88. +0 −55 backend/core/js/ckfinder/plugins/fileeditor/codemirror/css/csscolors.css
  89. +0 −158 backend/core/js/ckfinder/plugins/fileeditor/codemirror/css/docs.css
  90. +0 −15 backend/core/js/ckfinder/plugins/fileeditor/codemirror/css/font.js
  91. +0 −59 backend/core/js/ckfinder/plugins/fileeditor/codemirror/css/jscolors.css
  92. +0 −43 backend/core/js/ckfinder/plugins/fileeditor/codemirror/css/sparqlcolors.css
  93. +0 −55 backend/core/js/ckfinder/plugins/fileeditor/codemirror/css/xmlcolors.css
  94. +0 −582 backend/core/js/ckfinder/plugins/fileeditor/codemirror/js/codemirror.js
  95. +0 −1,670 backend/core/js/ckfinder/plugins/fileeditor/codemirror/js/editor.js
  96. +0 −68 backend/core/js/ckfinder/plugins/fileeditor/codemirror/js/highlight.js
  97. +0 −81 backend/core/js/ckfinder/plugins/fileeditor/codemirror/js/mirrorframe.js
  98. +0 −161 backend/core/js/ckfinder/plugins/fileeditor/codemirror/js/parsecss.js
  99. +0 −32 backend/core/js/ckfinder/plugins/fileeditor/codemirror/js/parsedummy.js
  100. +0 −93 backend/core/js/ckfinder/plugins/fileeditor/codemirror/js/parsehtmlmixed.js
  101. +0 −359 backend/core/js/ckfinder/plugins/fileeditor/codemirror/js/parsejavascript.js
  102. +0 −162 backend/core/js/ckfinder/plugins/fileeditor/codemirror/js/parsesparql.js
  103. +0 −291 backend/core/js/ckfinder/plugins/fileeditor/codemirror/js/parsexml.js
  104. +0 −697 backend/core/js/ckfinder/plugins/fileeditor/codemirror/js/select.js
  105. +0 −159 backend/core/js/ckfinder/plugins/fileeditor/codemirror/js/stringstream.js
  106. +0 −57 backend/core/js/ckfinder/plugins/fileeditor/codemirror/js/tokenize.js
  107. +0 −174 backend/core/js/ckfinder/plugins/fileeditor/codemirror/js/tokenizejavascript.js
  108. +0 −413 backend/core/js/ckfinder/plugins/fileeditor/codemirror/js/undo.js
  109. +0 −133 backend/core/js/ckfinder/plugins/fileeditor/codemirror/js/util.js
  110. +114 −0 backend/core/js/ckfinder/plugins/fileeditor/codemirror/lib/codemirror.css
  111. +3,047 −0 backend/core/js/ckfinder/plugins/fileeditor/codemirror/lib/codemirror.js
  112. +234 −0 backend/core/js/ckfinder/plugins/fileeditor/codemirror/mode/clike/clike.js
  113. +124 −0 backend/core/js/ckfinder/plugins/fileeditor/codemirror/mode/css/css.js
  114. +85 −0 backend/core/js/ckfinder/plugins/fileeditor/codemirror/mode/htmlmixed/htmlmixed.js
  115. +361 −0 backend/core/js/ckfinder/plugins/fileeditor/codemirror/mode/javascript/javascript.js
  116. +150 −0 backend/core/js/ckfinder/plugins/fileeditor/codemirror/mode/php/php.js
  117. +325 −0 backend/core/js/ckfinder/plugins/fileeditor/codemirror/mode/xml/xml.js
  118. +76 −80 backend/core/js/ckfinder/plugins/fileeditor/plugin.js
  119. +569 −516 backend/core/js/ckfinder/plugins/imageresize/plugin.js
  120. BIN backend/core/js/ckfinder/plugins/zip/images/zip.gif
  121. +945 −0 backend/core/js/ckfinder/plugins/zip/plugin.php
  122. +9 −9 backend/core/js/ckfinder/skins/kama/app.css
  123. +3 −3 backend/core/js/ckfinder/skins/kama/host.css
  124. BIN backend/core/js/ckfinder/skins/kama/images/toolbar/maximize.gif
  125. +2 −2 backend/core/js/ckfinder/skins/kama/uipanel.css
  126. +15 −0 backend/core/js/ckfinder/skins/v1/app.css
  127. +8 −0 backend/core/js/ckfinder/skins/v1/host.css
  128. BIN backend/core/js/ckfinder/skins/v1/images/ckffolder.gif
  129. BIN backend/core/js/ckfinder/skins/v1/images/ckffolderopened.gif
  130. BIN backend/core/js/ckfinder/skins/v1/images/ckfminus.gif
  131. BIN backend/core/js/ckfinder/skins/v1/images/ckfnothumb.gif
  132. BIN backend/core/js/ckfinder/skins/v1/images/ckfplus.gif
  133. BIN backend/core/js/ckfinder/skins/v1/images/dialog_sides.gif
  134. BIN backend/core/js/ckfinder/skins/v1/images/dialog_sides.png
  135. BIN backend/core/js/ckfinder/skins/v1/images/dialog_sides_rtl.png
  136. BIN backend/core/js/ckfinder/skins/v1/images/icons.png
  137. BIN backend/core/js/ckfinder/skins/v1/images/icons/16/ai.gif
  138. BIN backend/core/js/ckfinder/skins/v1/images/icons/16/avi.gif
  139. BIN backend/core/js/ckfinder/skins/v1/images/icons/16/bmp.gif
  140. BIN backend/core/js/ckfinder/skins/v1/images/icons/16/cs.gif
  141. BIN backend/core/js/ckfinder/skins/v1/images/icons/16/default.icon.gif
  142. BIN backend/core/js/ckfinder/skins/v1/images/icons/16/dll.gif
  143. BIN backend/core/js/ckfinder/skins/v1/images/icons/16/doc.gif
  144. BIN backend/core/js/ckfinder/skins/v1/images/icons/16/docx.gif
  145. BIN backend/core/js/ckfinder/skins/v1/images/icons/16/exe.gif
  146. BIN backend/core/js/ckfinder/skins/v1/images/icons/16/fla.gif
  147. BIN backend/core/js/ckfinder/skins/v1/images/icons/16/gif.gif
  148. BIN backend/core/js/ckfinder/skins/v1/images/icons/16/jpg.gif
  149. BIN backend/core/js/ckfinder/skins/v1/images/icons/16/js.gif
  150. BIN backend/core/js/ckfinder/skins/v1/images/icons/16/mdb.gif
  151. BIN backend/core/js/ckfinder/skins/v1/images/icons/16/mp3.gif
  152. BIN backend/core/js/ckfinder/skins/v1/images/icons/16/pdf.gif
  153. BIN backend/core/js/ckfinder/skins/v1/images/icons/16/ppt.gif
  154. BIN backend/core/js/ckfinder/skins/v1/images/icons/16/pptx.gif
  155. BIN backend/core/js/ckfinder/skins/v1/images/icons/16/rdp.gif
  156. BIN backend/core/js/ckfinder/skins/v1/images/icons/16/swf.gif
  157. BIN backend/core/js/ckfinder/skins/v1/images/icons/16/swt.gif
  158. BIN backend/core/js/ckfinder/skins/v1/images/icons/16/txt.gif
  159. BIN backend/core/js/ckfinder/skins/v1/images/icons/16/vsd.gif
  160. BIN backend/core/js/ckfinder/skins/v1/images/icons/16/xls.gif
  161. BIN backend/core/js/ckfinder/skins/v1/images/icons/16/xlsx.gif
  162. BIN backend/core/js/ckfinder/skins/v1/images/icons/16/xml.gif
  163. BIN backend/core/js/ckfinder/skins/v1/images/icons/16/zip.gif
  164. BIN backend/core/js/ckfinder/skins/v1/images/icons/32/ai.gif
  165. BIN backend/core/js/ckfinder/skins/v1/images/icons/32/avi.gif
  166. BIN backend/core/js/ckfinder/skins/v1/images/icons/32/bmp.gif
  167. BIN backend/core/js/ckfinder/skins/v1/images/icons/32/cs.gif
  168. BIN backend/core/js/ckfinder/skins/v1/images/icons/32/default.icon.gif
  169. BIN backend/core/js/ckfinder/skins/v1/images/icons/32/dll.gif
  170. BIN backend/core/js/ckfinder/skins/v1/images/icons/32/doc.gif
  171. BIN backend/core/js/ckfinder/skins/v1/images/icons/32/docx.gif
  172. BIN backend/core/js/ckfinder/skins/v1/images/icons/32/exe.gif
  173. BIN backend/core/js/ckfinder/skins/v1/images/icons/32/fla.gif
  174. BIN backend/core/js/ckfinder/skins/v1/images/icons/32/gif.gif
  175. BIN backend/core/js/ckfinder/skins/v1/images/icons/32/jpg.gif
  176. BIN backend/core/js/ckfinder/skins/v1/images/icons/32/js.gif
  177. BIN backend/core/js/ckfinder/skins/v1/images/icons/32/mdb.gif
  178. BIN backend/core/js/ckfinder/skins/v1/images/icons/32/mp3.gif
  179. BIN backend/core/js/ckfinder/skins/v1/images/icons/32/pdf.gif
  180. BIN backend/core/js/ckfinder/skins/v1/images/icons/32/ppt.gif
  181. BIN backend/core/js/ckfinder/skins/v1/images/icons/32/pptx.gif
  182. BIN backend/core/js/ckfinder/skins/v1/images/icons/32/rdp.gif
  183. BIN backend/core/js/ckfinder/skins/v1/images/icons/32/swf.gif
  184. BIN backend/core/js/ckfinder/skins/v1/images/icons/32/swt.gif
  185. BIN backend/core/js/ckfinder/skins/v1/images/icons/32/txt.gif
  186. BIN backend/core/js/ckfinder/skins/v1/images/icons/32/vsd.gif
  187. BIN backend/core/js/ckfinder/skins/v1/images/icons/32/xls.gif
  188. BIN backend/core/js/ckfinder/skins/v1/images/icons/32/xlsx.gif
  189. BIN backend/core/js/ckfinder/skins/v1/images/icons/32/xml.gif
  190. BIN backend/core/js/ckfinder/skins/v1/images/icons/32/zip.gif
  191. BIN backend/core/js/ckfinder/skins/v1/images/loaders/16x16.gif
  192. BIN backend/core/js/ckfinder/skins/v1/images/loaders/32x32.gif
  193. BIN backend/core/js/ckfinder/skins/v1/images/spacer.gif
  194. BIN backend/core/js/ckfinder/skins/v1/images/sprites.png
  195. BIN backend/core/js/ckfinder/skins/v1/images/sprites_ie6.png
  196. BIN backend/core/js/ckfinder/skins/v1/images/toolbar/add.gif
  197. BIN backend/core/js/ckfinder/skins/v1/images/toolbar/clear_basket.gif
  198. BIN backend/core/js/ckfinder/skins/v1/images/toolbar/delete.gif
  199. BIN backend/core/js/ckfinder/skins/v1/images/toolbar/download.gif
  200. BIN backend/core/js/ckfinder/skins/v1/images/toolbar/help.gif
  201. BIN backend/core/js/ckfinder/skins/v1/images/toolbar/maximize.gif
  202. BIN backend/core/js/ckfinder/skins/v1/images/toolbar/refresh.gif
  203. BIN backend/core/js/ckfinder/skins/v1/images/toolbar/settings.gif
  204. BIN backend/core/js/ckfinder/skins/v1/images/toolbar/view.gif
  205. BIN backend/core/js/ckfinder/skins/v1/images/toolbar_start.gif
  206. +7 −0 backend/core/js/ckfinder/skins/v1/richcombo.css
  207. +6 −0 backend/core/js/ckfinder/skins/v1/skin.js
  208. +8 −0 backend/core/js/ckfinder/skins/v1/uipanel.css
  209. +238 −233 backend/core/js/highcharts.js
  210. 0 backend/core/js/jquery/jquery.ui.js
  211. +18 −19 backend/modules/blog/engine/api.php
  212. 0 frontend/core/js/jquery/jquery.ui.js
  213. +1 −1 tools/check_code
View
6 CHANGELOG.md
@@ -1,9 +1,15 @@
3.4.4 (xxxx-xx-xx)
--
+Improvements:
+
+* Core: Upgraded Highcharts to 2.3.0
+* Core: Upgraded CKFinder to 2.3.0
+
Bugfixes:
* Analytics: all calls now require an API key as is described in the migration to Gdata v2.4 on https://developers.google.com/analytics/resources/articles/gdata-migration-guide.
+
3.4.3 (2012-08-28)
--
Improvements:
View
31 backend/core/js/ckfinder/changelog.txt
@@ -3,6 +3,37 @@ CKFinder Changelog
http://ckfinder.com
Copyright (C) 2007-2012, CKSource - Frederico Knabben. All rights reserved.
+### Version 2.3
+- Added the new Maximize plugin.
+- Multiple file selection: copying / moving / deleting / selecting multiple files is now possible.
+- When no other selection function defined, double clicking a file will now execute the View command.
+- File editor plugin was upgraded to use CodeMirror 2. C# support was added.
+- It is now possible to select a file on startup by using the config.startupPath configuration.
+- Added a new configuration option, config.sidebarWidth, to change the initial width of the sidebar (where the folders pane is located) with ease.
+- The name of the file is now displayed when hovering over a file.
+- Added a new API method, api.addFolderDropMenuOption, to add new options to the menu that opens once files are dropped into a folder.
+- Added an option for plugins to specify if a toolbar button should be disabled when basket is empty.
+- Added new translation: Catalan.
+- Updated translations: Hebrew.
+- Fixed: Thumbnails of custom sizes are now displayed correctly at the files list.
+- Fixed: Files from the right resource type will be shown at the second opening of CKFinder via CKEditor.
+- Fixed: Impossible to set height of CKFinder when using SetupCKEditor().
+- Fixed: Extension is now uneditable in the ImageResize dialog window.
+- Fixed: Hitting F5 and CTRL+R inside a CKFinder popup will not close the window.
+- Fixed: IE will not show an error on the console when opening Developer Tools when inside the popup.
+- Fixed: The "onbeforeunload" event of the host document will now be preserved.
+- Fixed: The "Resize" dialog window looks better on Webkit.
+- Fixed: The thumbnail inside the "Resize" dialog window is now limited in size.
+- Fixed: An hidden CKFinder instance will now have correct height when shown.
+- Fixed: The rememberLastFolder configuration now works when opening CKFinder as a popup.
+- Fixed: In forced IE7 compatibility mode, IE8 did not display dialogs correctly.
+- Fixed: It is now possible to use a callback for the Basket's context menu and toolbar labels, as well as custom language strings.
+- Fixed: Layout may appear broken after upload.
+- Fixed: IE 10: Compatibility with latest beta version.
+- Fixed: Thumbnails were left in the old location when files were moved.
+[PHP] - Added a new Zip plugin, that can create and extract zip archives and allows to download a folder or multiple files as a zip package.
+[PHP] - Dropped support for PHP 4.x.
+
### Version 2.2.2
- Fixed: The new Chrome 20 is again causing issues with finder.popup(). The new fix should work for all future versions of Chrome.
View
14 backend/core/js/ckfinder/ckfinder.html
@@ -16,13 +16,13 @@
}
</style>
</head>
-<body>
+<body class="CKFinderFrameWindow">
<div id="ckfinder"></div>
<script type="text/javascript">
+//<![CDATA[
(function()
{
- var config = {
- };
+ var config = {};
var get = CKFinder.tools.getUrlParam;
var getBool = function( v )
{
@@ -40,12 +40,11 @@
var win = window.opener || window;
try
{
- while ( (!win.CKFinder || !win.CKFinder._.instanceConfig[tmp]) && win != window.top )
+ while ( ( !win.CKFinder || !win.CKFinder._.instanceConfig[ tmp ] ) && win != window.top )
win = win.parent;
- if ( win.CKFinder._.instanceConfig[tmp] ) {
- config = win.CKFinder._.instanceConfig[tmp];
- }
+ if ( win.CKFinder._.instanceConfig[ tmp ] )
+ config = CKFINDER.tools.extend( {}, win.CKFinder._.instanceConfig[ tmp ] );
}
catch(e) {}
}
@@ -138,6 +137,7 @@
var ckfinder = new CKFinder( config );
ckfinder.replace( 'ckfinder', config );
})();
+//]]>
</script>
</body>
</html>
View
4 backend/core/js/ckfinder/ckfinder.js
2 additions, 2 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
5 backend/core/js/ckfinder/ckfinder.php
@@ -11,7 +11,4 @@
* this file is part of the Source Code of CKFinder.
*/
-if ( version_compare( phpversion(), '5', '<' ) )
- require_once 'core/ckfinder_php4.php' ;
-else
- require_once 'core/ckfinder_php5.php' ;
+require_once 'core/ckfinder_php5.php' ;
View
8 backend/core/js/ckfinder/ckfinder_v1.js
@@ -0,0 +1,8 @@
+/*
+Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+(function(){window.CKFinder=function(a,b,c,d){var e=this;e.BasePath=a||CKFinder.DEFAULT_BASEPATH;e.Width=b||'100%';e.Height=c||400;e.SelectFunction=d||null;e.SelectFunctionData=null;e.SelectThumbnailFunction=d||null;e.SelectThumbnailFunctionData=null;e.DisableThumbnailSelection=false;e.ClassName='CKFinderFrame';e.StartupPath=null;e.StartupFolderExpanded=false;e.RememberLastFolder=true;e.ResourceType=null;e.Id=null;e.Skin=null;};CKFinder.DEFAULT_BASEPATH='/ckfinder/';CKFinder.ConnectorLanguage='php';CKFinder._={instanceConfig:[]};(function(){function a(b){var c=1;while(CKFinder._.instanceConfig[c])c++;CKFinder._.instanceConfig[c]=b;return c;};CKFinder.prototype={Create:function(){document.write(this.CreateHtml());},CreateHtml:function(){var d=this;var b=d.ClassName;if(b&&b.length>0)b=' class="'+b+'"';var c=d.Id;if(c&&c.length>0)c=' id="'+c+'"';return '<iframe src="'+d._BuildUrl()+'" width="'+d.Width+'" '+'height="'+d.Height+'"'+b+c+' frameborder="0" scrolling="no"></iframe>';},Popup:function(b,c){b=b||'80%';c=c||'70%';if(typeof b=='string'&&b.length>1&&b.substr(b.length-1,1)=='%')b=parseInt(window.screen.width*parseInt(b,10)/100,10);if(typeof c=='string'&&c.length>1&&c.substr(c.length-1,1)=='%')c=parseInt(window.screen.height*parseInt(c,10)/100,10);if(b<200)b=200;if(c<200)c=200;var d=parseInt((window.screen.height-c)/2,10),e=parseInt((window.screen.width-b)/2,10),f='location=no,menubar=no,toolbar=no,dependent=yes,minimizable=no,modal=yes,alwaysRaised=yes,resizable=yes,width='+b+',height='+c+',top='+d+',left='+e,g=window.open('','CKFinderPopup',f,true);if(!g)return false;var h=this._BuildUrl().replace(/&amp;/g,'&');try{g.moveTo(e,d);g.resizeTo(b,c);g.focus();g.location.href=h;}catch(i){g=window.open(h,'CKFinderPopup',f,true);}return true;},_BuildUrl:function(b){var e=this;b=b||e.BasePath;var c='';if(!b||b.length===0)b=CKFinder.DEFAULT_BASEPATH;if(b.substr(b.length-1,1)!='/')b+='/';b+='ckfinder.html';var d;if(e.SelectFunction){d=e.SelectFunction;if(typeof d=='function')d=d.toString().match(/function ([^(]+)/)[1];c+='?action=js&amp;func='+d;}if(e.Skin){c+=c?'&amp;':'?';c+='skin='+encodeURIComponent(e.Skin);}if(e.SelectFunctionData){c+=c?'&amp;':'?';c+='data='+encodeURIComponent(e.SelectFunctionData);}if(e.ResourceType){c+=c?'&amp;':'?';c+='type='+encodeURIComponent(e.ResourceType);}if(e.DisableThumbnailSelection){c+=c?'&amp;':'?';c+='dts=1';}else if(e.SelectThumbnailFunction||e.SelectFunction){d=e.SelectThumbnailFunction||e.SelectFunction;if(typeof d=='function')d=d.toString().match(/function ([^(]+)/)[1];
+c+=c?'&amp;':'?';c+='thumbFunc='+d;if(e.SelectThumbnailFunctionData)c+='&amp;tdata='+encodeURIComponent(e.SelectThumbnailFunctionData);else if(!e.SelectThumbnailFunction&&e.SelectFunctionData)c+='&amp;tdata='+encodeURIComponent(e.SelectFunctionData);}if(e.StartupPath){c+=c?'&amp;':'?';c+='start='+encodeURIComponent(e.StartupPath+(e.StartupFolderExpanded?':1':':0'));}if(e.RememberLastFolder!==undefined&&!e.RememberLastFolder){c+=c?'&amp;':'?';c+='rlf=0';}if(e.Id){c+=c?'&amp;':'?';c+='id='+encodeURIComponent(e.Id);}return b+c;}};CKFinder.Create=function(b,c,d,e){var f;if(b!==null&&typeof b=='object'){f=new CKFinder();for(var g in b)f[g]=b[g];}else f=new CKFinder(b,c,d,e);f.Create();};CKFinder.Popup=function(b,c,d,e){var f,g;if(b!==null&&typeof b=='object'){g=a(b);f=new CKFinder();for(var h in b)f[h]=b[h];}else f=new CKFinder(b,c,d,e);f.Popup(c,d);};CKFinder.SetupFCKeditor=function(b,c,d,e){var f,g;if(c!==null&&typeof c=='object'){g=a(c);f=new CKFinder();for(var h in c){f[h]=c[h];if(h=='Width'){var i=f[h]||800;if(typeof i=='string'&&i.length>1&&i.substr(i.length-1,1)=='%')i=parseInt(window.screen.width*parseInt(i,10)/100,10);b.Config.LinkBrowserWindowWidth=i;b.Config.ImageBrowserWindowWidth=i;b.Config.FlashBrowserWindowWidth=i;}else if(h=='Height'){var j=f[h]||600;if(typeof j=='string'&&j.length>1&&j.substr(j.length-1,1)=='%')j=parseInt(window.screen.height*parseInt(j,10)/100,10);b.Config.LinkBrowserWindowHeight=j;b.Config.ImageBrowserWindowHeight=j;b.Config.FlashBrowserWindowHeight=j;}}}else f=new CKFinder(c);var k=f.BasePath;if(k.substr(0,1)!='/'&&k.indexOf('://')==-1)k=document.location.pathname.substring(0,document.location.pathname.lastIndexOf('/')+1)+k;k=f._BuildUrl(k);var l=k.indexOf('?')!==-1?'&':'?';if(g){k+=l+'configId='+g;l='&';}b.Config.LinkBrowserURL=k;b.Config.ImageBrowserURL=k+l+'type='+(d||'Images');b.Config.FlashBrowserURL=k+l+'type='+(e||'Flash');var m=k.substring(0,1+k.lastIndexOf('/'));b.Config.LinkUploadURL=m+'core/connector/'+CKFinder.ConnectorLanguage+'/connector.'+CKFinder.ConnectorLanguage+'?command=QuickUpload&type=Files';b.Config.ImageUploadURL=m+'core/connector/'+CKFinder.ConnectorLanguage+'/connector.'+CKFinder.ConnectorLanguage+'?command=QuickUpload&type='+(d||'Images');b.Config.FlashUploadURL=m+'core/connector/'+CKFinder.ConnectorLanguage+'/connector.'+CKFinder.ConnectorLanguage+'?command=QuickUpload&type='+(e||'Flash');};CKFinder.SetupCKEditor=function(b,c,d,e){if(b===null){for(var f in CKEDITOR.instances)CKFinder.SetupCKEditor(CKEDITOR.instances[f],c,d,e);
+CKEDITOR.on('instanceCreated',function(o){CKFinder.SetupCKEditor(o.editor,c,d,e);});return;}var g,h;if(c!==null&&typeof c=='object'){h=a(c);g=new CKFinder();for(var i in c){g[i]=c[i];if(i=='Width'){var j=g[i]||800;if(typeof j=='string'&&j.length>1&&j.substr(j.length-1,1)=='%')j=parseInt(window.screen.width*parseInt(j,10)/100,10);b.config.filebrowserWindowWidth=j;}else if(i=='Height'){var k=g[i]||600;if(typeof k=='string'&&k.length>1&&k.substr(k.length-1,1)=='%')k=parseInt(window.screen.height*parseInt(k,10)/100,10);b.config.filebrowserWindowHeight=k;}}}else g=new CKFinder(c);var l=g.BasePath;if(l.substr(0,1)!='/'&&l.indexOf('://')==-1)l=document.location.pathname.substring(0,document.location.pathname.lastIndexOf('/')+1)+l;l=g._BuildUrl(l);var m=l.indexOf('?')!==-1?'&':'?';if(h){l+=m+'configId='+h;m='&';}b.config.filebrowserBrowseUrl=l;b.config.filebrowserImageBrowseUrl=l+m+'type='+(d||'Images');b.config.filebrowserFlashBrowseUrl=l+m+'type='+(e||'Flash');var n=l.substring(0,1+l.lastIndexOf('/'));b.config.filebrowserUploadUrl=n+'core/connector/'+CKFinder.ConnectorLanguage+'/connector.'+CKFinder.ConnectorLanguage+'?command=QuickUpload&type=Files';b.config.filebrowserImageUploadUrl=n+'core/connector/'+CKFinder.ConnectorLanguage+'/connector.'+CKFinder.ConnectorLanguage+'?command=QuickUpload&type='+(d||'Images');b.config.filebrowserFlashUploadUrl=n+'core/connector/'+CKFinder.ConnectorLanguage+'/connector.'+CKFinder.ConnectorLanguage+'?command=QuickUpload&type='+(e||'Flash');};})();})();
View
22 backend/core/js/ckfinder/config.php
@@ -95,8 +95,8 @@ function CheckAuthentication()
// set the maximum size of uploaded images. If an uploaded image is larger, it gets scaled down proportionally. Set to 0 to disable this feature.
$config['Images'] = array(
- 'maxWidth' => BackendModel::getModuleSetting('core', 'ckfinder_image_max_width'),
- 'maxHeight' => BackendModel::getModuleSetting('core', 'ckfinder_image_max_height'),
+ 'maxWidth' => BackendModel::getModuleSetting('core', 'ckfinder_image_max_width'),
+ 'maxHeight' => BackendModel::getModuleSetting('core', 'ckfinder_image_max_height'),
'quality' => 100
);
@@ -125,12 +125,12 @@ function CheckAuthentication()
'role' => '*',
'resourceType' => '*',
'folder' => '/',
-
+
'folderView' => true,
'folderCreate' => true,
'folderRename' => true,
'folderDelete' => true,
-
+
'fileView' => true,
'fileUpload' => true,
'fileRename' => true,
@@ -260,9 +260,23 @@ function CheckAuthentication()
*/
$config['ForceAscii'] = false;
+/*
+Send files using X-Sendfile module
+Mod X-Sendfile (or similar) is avalible on Apache2, Nginx, Cherokee, Lighttpd
+
+Enabling X-Sendfile option can potentially cause security issue.
+ - server path to the file may be send to the browser with X-Sendfile header
+ - if server is not configured properly files will be send with 0 length
+
+For more complex configuration options visit our Developer's Guide
+ http://docs.cksource.com/CKFinder_2.x/Developers_Guide/PHP
+*/
+$config['XSendfile'] = false;
+
include_once "plugins/imageresize/plugin.php";
include_once "plugins/fileeditor/plugin.php";
+include_once "plugins/zip/plugin.php";
$config['plugin_imageresize']['smallThumb'] = '90x90';
$config['plugin_imageresize']['mediumThumb'] = '120x120';
View
16 backend/core/js/ckfinder/core/connector/php/constants.php
@@ -34,6 +34,7 @@
define('CKFINDER_CONNECTOR_ERROR_INVALID_EXTENSION',105);
define('CKFINDER_CONNECTOR_ERROR_INVALID_REQUEST',109);
define('CKFINDER_CONNECTOR_ERROR_UNKNOWN',110);
+define('CKFINDER_CONNECTOR_ERROR_CREATED_FILE_TOO_BIG',111);
define('CKFINDER_CONNECTOR_ERROR_ALREADY_EXIST',115);
define('CKFINDER_CONNECTOR_ERROR_FOLDER_NOT_FOUND',116);
define('CKFINDER_CONNECTOR_ERROR_FILE_NOT_FOUND',117);
@@ -44,9 +45,11 @@
define('CKFINDER_CONNECTOR_ERROR_UPLOADED_CORRUPT',204);
define('CKFINDER_CONNECTOR_ERROR_UPLOADED_NO_TMP_DIR',205);
define('CKFINDER_CONNECTOR_ERROR_UPLOADED_WRONG_HTML_FILE',206);
+define('CKFINDER_CONNECTOR_ERROR_UPLOADED_INVALID_NAME_RENAMED', 207);
define('CKFINDER_CONNECTOR_ERROR_MOVE_FAILED',300);
define('CKFINDER_CONNECTOR_ERROR_COPY_FAILED',301);
-define('CKFINDER_CONNECTOR_ERROR_UPLOADED_INVALID_NAME_RENAMED', 207);
+define('CKFINDER_CONNECTOR_ERROR_DELETE_FAILED',302);
+define('CKFINDER_CONNECTOR_ERROR_ZIP_FAILED',303);
define('CKFINDER_CONNECTOR_ERROR_CONNECTOR_DISABLED',500);
define('CKFINDER_CONNECTOR_ERROR_THUMBNAILS_DISABLED',501);
@@ -57,18 +60,11 @@
if (version_compare(phpversion(), '6', '>=')) {
define('CKFINDER_CONNECTOR_PHP_MODE', 6);
}
-else if (version_compare(phpversion(), '5', '>=')) {
- define('CKFINDER_CONNECTOR_PHP_MODE', 5);
-}
else {
- define('CKFINDER_CONNECTOR_PHP_MODE', 4);
+ define('CKFINDER_CONNECTOR_PHP_MODE', 5);
}
-if (CKFINDER_CONNECTOR_PHP_MODE == 4) {
- define('CKFINDER_CONNECTOR_LIB_DIR', "./php4");
-} else {
- define('CKFINDER_CONNECTOR_LIB_DIR', "./php5");
-}
+define('CKFINDER_CONNECTOR_LIB_DIR', "./php5");
define('CKFINDER_CHARS', '123456789ABCDEFGHJKLMNPQRSTUVWXYZ');
define('CKFINDER_REGEX_IMAGES_EXT', '/\.(jpg|gif|png|bmp|jpeg)$/i');
View
1 backend/core/js/ckfinder/core/connector/php/lang/bg.php
@@ -16,6 +16,7 @@
'105' => 'Невалидно файлово разширение.',
'109' => 'Невалидна заявка.',
'110' => 'Неизвестна грешка.',
+ '111' => 'It was not possible to complete the request due to resulting file size.',
'115' => 'Файл или папка със същото име вече съществува.',
'116' => 'Папката не е намерена, опреснете и опитайте отново.',
'117' => 'Файлът не е намерен, опреснете и опитайте отново.',
View
36 backend/core/js/ckfinder/core/connector/php/lang/ca.php
@@ -0,0 +1,36 @@
+<?php
+// Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
+// For licensing, see LICENSE.html or http://ckfinder.com/license
+
+// Defines the object for the Catalan language.
+
+$GLOBALS['CKFLang'] = array (
+ 'ErrorUnknown' => 'No ha estat possible completar la solicitut. (Error %1)',
+ 'Errors' => array (
+ '10' => 'Ordre incorrecte.',
+ '11' => 'El tipus de recurs no ha estat especificat a la solicitut.',
+ '12' => 'El tipus de recurs solicitat no és vàlid.',
+ '102' => 'Nom de fitxer o carpeta no vàlids.',
+ '103' => 'No s\'ha pogut completar la solicitut degut a les restriccions d\'autorització.',
+ '104' => 'No s\'ha pogut completar la solicitut degut a les restriccions en el sistema de fitxers.',
+ '105' => 'La extensió del fitxer no es vàlida.',
+ '109' => 'Petició invàlida.',
+ '110' => 'Error desconegut.',
+ '111' => 'It was not possible to complete the request due to resulting file size.',
+ '115' => 'Ja existeix un fitxer o carpeta amb aquest nom.',
+ '116' => 'No s\'ha trobat la carpeta. Si us plau, actualitzi i torni-ho a provar.',
+ '117' => 'No s\'ha trobat el fitxer. Si us plau, actualitzi i torni-ho a provar.',
+ '118' => 'Les rutes origen i destí són iguals.',
+ '201' => 'Ja existeix un fitxer amb aquest nom. El fitxer pujat ha estat renombrat com a "%1".',
+ '202' => 'Fitxer invàlid.',
+ '203' => 'Fitxer invàlid. El pes és massa gran.',
+ '204' => 'El fitxer pujat està corrupte.',
+ '205' => 'La carpeta temporal no està disponible en el servidor per poder realitzar pujades.',
+ '206' => 'La pujada s\'ha cancel·lat per raons de seguretat. El fitxer conté codi HTML.',
+ '207' => 'El fitxer pujat ha estat renombrat com a "%1".',
+ '300' => 'Ha fallat el moure el(s) fitxer(s).',
+ '301' => 'Ha fallat el copiar el(s) fitxer(s).',
+ '500' => 'El navegador de fitxers està deshabilitat per raons de seguretat. Si us plau, contacti amb l\'administrador del sistema i comprovi el fitxer de configuració de CKFinder.',
+ '501' => 'El suport per a icones està deshabilitat.',
+ )
+);
View
1 backend/core/js/ckfinder/core/connector/php/lang/cs.php
@@ -16,6 +16,7 @@
'105' => 'Neplatná přípona souboru.',
'109' => 'Neplatný požadavek.',
'110' => 'Neznámá chyba.',
+ '111' => 'It was not possible to complete the request due to resulting file size.',
'115' => 'Soubor nebo složka se stejným názvem již existuje.',
'116' => 'Složka nenalezena, prosím obnovte a zkuste znovu.',
'117' => 'Soubor nenalezen, prosím obnovte seznam souborů a zkuste znovu.',
View
1 backend/core/js/ckfinder/core/connector/php/lang/cy.php
@@ -16,6 +16,7 @@
'105' => 'Estyniad ffeil annilys.',
'109' => 'Cais annilys.',
'110' => 'Gwall anhysbys.',
+ '111' => 'It was not possible to complete the request due to resulting file size.',
'115' => 'Mae ffeil neu ffolder gyda\'r un enw yn bodoli yn barod.',
'116' => 'Methu â darganfod y ffolder. Adfywiwch a cheisio eto.',
'117' => 'Methu â darganfod y ffeil. Adfywiwch y rhestr ffeiliau a cheisio eto.',
View
1 backend/core/js/ckfinder/core/connector/php/lang/da.php
@@ -16,6 +16,7 @@
'105' => 'Ugyldig filtype.',
'109' => 'Ugyldig anmodning.',
'110' => 'Ukendt fejl.',
+ '111' => 'It was not possible to complete the request due to resulting file size.',
'115' => 'En fil eller mappe med det samme navn eksisterer allerede.',
'116' => 'Mappen blev ikke fundet. Opdatér listen eller prøv igen.',
'117' => 'Filen blev ikke fundet. Opdatér listen eller prøv igen.',
View
1 backend/core/js/ckfinder/core/connector/php/lang/de.php
@@ -16,6 +16,7 @@
'105' => 'Invalid file extension.',
'109' => 'Unbekannte Anfrage.',
'110' => 'Unbekannter Fehler.',
+ '111' => 'It was not possible to complete the request due to resulting file size.',
'115' => 'Es existiert bereits eine Datei oder ein Ordner mit dem gleichen Namen.',
'116' => 'Verzeichnis nicht gefunden. Bitte aktualisieren Sie die Anzeige und versuchen es noch einmal.',
'117' => 'Datei nicht gefunden. Bitte aktualisieren Sie die Dateiliste und versuchen es noch einmal.',
View
1 backend/core/js/ckfinder/core/connector/php/lang/el.php
@@ -16,6 +16,7 @@
'105' => 'Λανθασμένη επέκταση αρχείου.',
'109' => 'Λανθασμένη ενέργεια.',
'110' => 'Άγνωστο λάθος.',
+ '111' => 'It was not possible to complete the request due to resulting file size.',
'115' => 'Το αρχείο ή φάκελος υπάρχει ήδη.',
'116' => 'Ο φάκελος δεν βρέθηκε. Παρακαλούμε ανανεώστε τη σελίδα και προσπαθήστε ξανά.',
'117' => 'Το αρχείο δεν βρέθηκε. Παρακαλούμε ανανεώστε τη σελίδα και προσπαθήστε ξανά.',
View
1 backend/core/js/ckfinder/core/connector/php/lang/en.php
@@ -16,6 +16,7 @@
'105' => 'Invalid file extension.',
'109' => 'Invalid request.',
'110' => 'Unknown error.',
+ '111' => 'It was not possible to complete the request due to resulting file size.',
'115' => 'A file or folder with the same name already exists.',
'116' => 'Folder not found. Please refresh and try again.',
'117' => 'File not found. Please refresh the files list and try again.',
View
1 backend/core/js/ckfinder/core/connector/php/lang/eo.php
@@ -16,6 +16,7 @@
'105' => 'Nevalida dosiernoma finaĵo.',
'109' => 'Nevalida peto.',
'110' => 'Nekonata eraro.',
+ '111' => 'It was not possible to complete the request due to resulting file size.',
'115' => 'Dosiero aŭ dosierujo kun tiu nomo jam ekzistas.',
'116' => 'Tiu dosierujo ne ekzistas. Bonvolu aktualigi kaj reprovi.',
'117' => 'Tiu dosiero ne ekzistas. Bonvolu aktualigi kaj reprovi.',
View
1 backend/core/js/ckfinder/core/connector/php/lang/es-mx.php
@@ -16,6 +16,7 @@
'105' => 'La extensión del archivo no es válida.',
'109' => 'Petición inválida.',
'110' => 'Error desconocido.',
+ '111' => 'It was not possible to complete the request due to resulting file size.',
'115' => 'Ya existe un archivo o carpeta con ese nombre.',
'116' => 'No se ha encontrado la carpeta. Por favor, actualice y pruebe de nuevo.',
'117' => 'No se ha encontrado el archivo. Por favor, actualice la lista de archivos y pruebe de nuevo.',
View
1 backend/core/js/ckfinder/core/connector/php/lang/es.php
@@ -16,6 +16,7 @@
'105' => 'La extensión del archivo no es válida.',
'109' => 'Petición inválida.',
'110' => 'Error desconocido.',
+ '111' => 'It was not possible to complete the request due to resulting file size.',
'115' => 'Ya existe un fichero o carpeta con ese nombre.',
'116' => 'No se ha encontrado la carpeta. Por favor, actualice y pruebe de nuevo.',
'117' => 'No se ha encontrado el fichero. Por favor, actualice la lista de ficheros y pruebe de nuevo.',
View
1 backend/core/js/ckfinder/core/connector/php/lang/et.php
@@ -16,6 +16,7 @@
'105' => 'Sobimatu faililaiend.',
'109' => 'Vigane päring.',
'110' => 'Tundmatu viga.',
+ '111' => 'It was not possible to complete the request due to resulting file size.',
'115' => 'Sellenimeline fail või kaust on juba olemas.',
'116' => 'Kausta ei leitud. Palun värskenda lehte ja proovi uuesti.',
'117' => 'Faili ei leitud. Palun värskenda lehte ja proovi uuesti.',
View
1 backend/core/js/ckfinder/core/connector/php/lang/fa.php
@@ -16,6 +16,7 @@
'105' => 'پسوند فایل نامعتبر است.',
'109' => 'درخواست نامعتبر است.',
'110' => 'خطای ناشناخته.',
+ '111' => 'It was not possible to complete the request due to resulting file size.',
'115' => 'فایل یا پوشه ای با این نام وجود دارد',
'116' => 'پوشه یافت نشد. لطفا بروزرسانی کرده و مجددا تلاش کنید.',
'117' => 'فایل یافت نشد. لطفا فهرست فایلها را بروزرسانی کرده و مجددا تلاش کنید.',
View
1 backend/core/js/ckfinder/core/connector/php/lang/fi.php
@@ -16,6 +16,7 @@
'105' => 'Virheellinen tiedostotarkenne.',
'109' => 'Virheellinen pyyntö.',
'110' => 'Tuntematon virhe.',
+ '111' => 'It was not possible to complete the request due to resulting file size.',
'115' => 'Samanniminen tiedosto tai kansio on jo olemassa.',
'116' => 'Kansiota ei löydy. Yritä uudelleen kansiopäivityksen jälkeen.',
'117' => 'Tiedostoa ei löydy. Yritä uudelleen kansiopäivityksen jälkeen.',
View
1 backend/core/js/ckfinder/core/connector/php/lang/fr.php
@@ -16,6 +16,7 @@
'105' => 'Extension de fichier invalide.',
'109' => 'Demande invalide.',
'110' => 'Erreur inconnue.',
+ '111' => 'It was not possible to complete the request due to resulting file size.',
'115' => 'Un fichier ou un dossier avec ce nom existe déjà.',
'116' => 'Ce dossier n\'existe pas. Veuillez rafraîchir la page et réessayer.',
'117' => 'Ce fichier n\'existe pas. Veuillez rafraîchir la page et réessayer.',
View
1 backend/core/js/ckfinder/core/connector/php/lang/gu.php
@@ -16,6 +16,7 @@
'105' => 'ફાઈલ એક્ષટેનસન માન્ય નથી.',
'109' => 'ઇનવેલીડ રીક્વેસ્ટ.',
'110' => 'અન્નોન એરર.',
+ '111' => 'It was not possible to complete the request due to resulting file size.',
'115' => 'એજ નામ વાળું ફાઈલ અથવા ફોલ્ડર છે.',
'116' => 'ફોલ્ડર નથી. રીફ્રેશ દબાવી ફરી પ્રયત્ન કરો.',
'117' => 'ફાઈલ નથી. રીફ્રેશ દબાવી ફરી પ્રયત્ન કરો..',
View
1 backend/core/js/ckfinder/core/connector/php/lang/he.php
@@ -16,6 +16,7 @@
'105' => 'סיומת הקובץ לא תקינה.',
'109' => 'בקשה לא תקינה.',
'110' => 'שגיאה לא ידועה.',
+ '111' => 'לא ניתן היה להשלים את הבקשה בשל הגודל החריג של הקובץ הנוצר.',
'115' => 'כבר קיים/ת קובץ או תיקיה באותו השם.',
'116' => 'התיקיה לא נמצאה. נא לרענן ולנסות שוב.',
'117' => 'הקובץ לא נמצא. נא לרענן ולנסות שוב.',
View
1 backend/core/js/ckfinder/core/connector/php/lang/hi.php
@@ -16,6 +16,7 @@
'105' => 'फाएल एक्स्त्न्सं गलत है.',
'109' => 'इन्वेलीड रिक्वेस्ट.',
'110' => 'अननोन एरर.',
+ '111' => 'It was not possible to complete the request due to resulting file size.',
'115' => 'सेम नाम का फाएल या फोल्डर मोजूद है.',
'116' => 'फोल्डर नही मिला. रिफ्रेस करके वापिस प्रयत्न करे.',
'117' => 'फाएल नही मिला. फाएल लिस्टको रिफ्रेस करके वापिस प्रयत्न करे.',
View
1 backend/core/js/ckfinder/core/connector/php/lang/hr.php
@@ -16,6 +16,7 @@
'105' => 'Nedozvoljena vrsta datoteke.',
'109' => 'Nedozvoljen zahtjev.',
'110' => 'Nepoznata greška.',
+ '111' => 'It was not possible to complete the request due to resulting file size.',
'115' => 'Datoteka ili direktorij s istim nazivom već postoji.',
'116' => 'Direktorij nije pronađen. Osvježite stranicu i pokušajte ponovo.',
'117' => 'Datoteka nije pronađena. Osvježite listu datoteka i pokušajte ponovo.',
View
1 backend/core/js/ckfinder/core/connector/php/lang/hu.php
@@ -16,6 +16,7 @@
'105' => 'Érvénytelen fájl kiterjesztés.',
'109' => 'Érvénytelen kérés.',
'110' => 'Ismeretlen hiba.',
+ '111' => 'It was not possible to complete the request due to resulting file size.',
'115' => 'A fálj vagy mappa már létezik ezen a néven.',
'116' => 'Mappa nem található. Kérjük frissítsen és próbálja újra.',
'117' => 'Fájl nem található. Kérjük frissítsen és próbálja újra.',
View
1 backend/core/js/ckfinder/core/connector/php/lang/it.php
@@ -16,6 +16,7 @@
'105' => 'L\'estensione del file non è valida.',
'109' => 'Richiesta invalida.',
'110' => 'Errore sconosciuto.',
+ '111' => 'It was not possible to complete the request due to resulting file size.',
'115' => 'Un file o cartella con lo stesso nome è già esistente.',
'116' => 'Cartella non trovata. Prego aggiornare e riprovare.',
'117' => 'File non trovato. Prego aggirnare la lista dei file e riprovare.',
View
1 backend/core/js/ckfinder/core/connector/php/lang/ja.php
@@ -16,6 +16,7 @@
'105' => '拡張子が正しくありません。',
'109' => '不正なリクエストです。',
'110' => '不明なエラーが発生しました。',
+ '111' => 'It was not possible to complete the request due to resulting file size.',
'115' => '同じ名前のファイル/フォルダがすでに存在しています。',
'116' => 'フォルダが見つかりませんでした。ページを更新して再度お試し下さい。',
'117' => 'ファイルが見つかりませんでした。ページを更新して再度お試し下さい。',
View
1 backend/core/js/ckfinder/core/connector/php/lang/lt.php
@@ -16,6 +16,7 @@
'105' => 'Netinkamas failo plėtinys.',
'109' => 'Netinkama užklausa.',
'110' => 'Nežinoma klaida.',
+ '111' => 'It was not possible to complete the request due to resulting file size.',
'115' => 'Failas arba segtuvas su tuo pačiu pavadinimu jau yra.',
'116' => 'Segtuvas nerastas. Pabandykite atnaujinti.',
'117' => 'Failas nerastas. Pabandykite atnaujinti failų sąrašą.',
View
1 backend/core/js/ckfinder/core/connector/php/lang/lv.php
@@ -16,6 +16,7 @@
'105' => 'Neatļauts faila paplašinājums.',
'109' => 'Nederīgs pieprasījums.',
'110' => 'Nezināma kļūda.',
+ '111' => 'It was not possible to complete the request due to resulting file size.',
'115' => 'Fails vai mape ar šādu nosaukumu jau pastāv.',
'116' => 'Mape nav atrasta. Lūdzu pārlādējiet šo logu un mēģiniet vēlreiz.',
'117' => 'Fails nav atrasts. Lūdzu pārlādējiet failu sarakstu un mēģiniet vēlreiz.',
View
1 backend/core/js/ckfinder/core/connector/php/lang/nb.php
@@ -16,6 +16,7 @@
'105' => 'Ugyldig filtype.',
'109' => 'Ugyldig forespørsel.',
'110' => 'Ukjent feil.',
+ '111' => 'It was not possible to complete the request due to resulting file size.',
'115' => 'Det finnes allerede en fil eller mappe med dette navnet.',
'116' => 'Kunne ikke finne mappen. Oppdater vinduet og prøv igjen.',
'117' => 'Kunne ikke finne filen. Oppdater vinduet og prøv igjen.',
View
1 backend/core/js/ckfinder/core/connector/php/lang/nl.php
@@ -16,6 +16,7 @@
'105' => 'Ongeldige bestandsextensie.',
'109' => 'Ongeldige aanvraag.',
'110' => 'Onbekende fout.',
+ '111' => 'It was not possible to complete the request due to resulting file size.',
'115' => 'Er bestaat al een bestand of map met deze naam.',
'116' => 'Map niet gevonden, vernieuw de mappenlijst of kies een andere map.',
'117' => 'Bestand niet gevonden, vernieuw de mappenlijst of kies een andere map.',
View
1 backend/core/js/ckfinder/core/connector/php/lang/nn.php
@@ -16,6 +16,7 @@
'105' => 'Ugyldig filtype.',
'109' => 'Ugyldig forespørsel.',
'110' => 'Ukjent feil.',
+ '111' => 'It was not possible to complete the request due to resulting file size.',
'115' => 'Det finnes allerede en fil eller mappe med dette navnet.',
'116' => 'Kunne ikke finne mappen. Oppdater vinduet og prøv igjen.',
'117' => 'Kunne ikke finne filen. Oppdater vinduet og prøv igjen.',
View
1 backend/core/js/ckfinder/core/connector/php/lang/no.php
@@ -16,6 +16,7 @@
'105' => 'Ugyldig filtype.',
'109' => 'Ugyldig forespørsel.',
'110' => 'Ukjent feil.',
+ '111' => 'It was not possible to complete the request due to resulting file size.',
'115' => 'Det finnes allerede en fil eller mappe med dette navnet.',
'116' => 'Kunne ikke finne mappen. Oppdater vinduet og prøv igjen.',
'117' => 'Kunne ikke finne filen. Oppdater vinduet og prøv igjen.',
View
1 backend/core/js/ckfinder/core/connector/php/lang/pl.php
@@ -16,6 +16,7 @@
'105' => 'Nieprawidłowe rozszerzenie.',
'109' => 'Nieprawiłowe żądanie.',
'110' => 'Niezidentyfikowany błąd.',
+ '111' => 'Wykonanie operacji nie powiodło się z powodu zbyt dużego rozmiaru pliku wynikowego.',
'115' => 'Plik lub folder o podanej nazwie już istnieje.',
'116' => 'Nie znaleziono folderu. Odśwież panel i spróbuj ponownie.',
'117' => 'Nie znaleziono pliku. Odśwież listę plików i spróbuj ponownie.',
View
1 backend/core/js/ckfinder/core/connector/php/lang/pt-br.php
@@ -16,6 +16,7 @@
'105' => 'Extensão de arquivo inválida.',
'109' => 'Solicitação inválida.',
'110' => 'Erro desconhecido.',
+ '111' => 'It was not possible to complete the request due to resulting file size.',
'115' => 'Uma arquivo ou pasta já existe com esse nome.',
'116' => 'Pasta não encontrada. Atualize e tente novamente.',
'117' => 'Arquivo não encontrado. Atualize a lista de arquivos e tente novamente.',
View
1 backend/core/js/ckfinder/core/connector/php/lang/ro.php
@@ -16,6 +16,7 @@
'105' => 'Extensie fișier invalidă.',
'109' => 'Cerere invalidă.',
'110' => 'Eroare necunoscută.',
+ '111' => 'It was not possible to complete the request due to resulting file size.',
'115' => 'Există deja un fișier sau un dosar cu același nume.',
'116' => 'Dosar negăsit. Te rog împrospătează și încearcă din nou.',
'117' => 'Fișier negăsit. Te rog împrospătează lista de fișiere și încearcă din nou.',
View
1 backend/core/js/ckfinder/core/connector/php/lang/ru.php
@@ -16,6 +16,7 @@
'105' => 'Неверное расширение файла.',
'109' => 'Неверный запрос.',
'110' => 'Неизвестная ошибка.',
+ '111' => 'It was not possible to complete the request due to resulting file size.',
'115' => 'Файл или папка с таким именем уже существует.',
'116' => 'Папка не найдена. Пожалуйста, обновите вид папок и попробуйте еще раз.',
'117' => 'Файл не найден. Пожалуйста, обновите список файлов и попробуйте еще раз.',
View
1 backend/core/js/ckfinder/core/connector/php/lang/sk.php
@@ -16,6 +16,7 @@
'105' => 'Neplatná prípona súboru.',
'109' => 'Neplatná požiadavka.',
'110' => 'Neidentifikovaná chyba.',
+ '111' => 'It was not possible to complete the request due to resulting file size.',
'115' => 'Zadaný súbor alebo adresár už existuje.',
'116' => 'Adresár nebol nájdený. Aktualizujte obsah adresára (Znovunačítať) a skúste znovu.',
'117' => 'Súbor nebol nájdený. Aktualizujte obsah adresára (Znovunačítať) a skúste znovu.',
View
1 backend/core/js/ckfinder/core/connector/php/lang/sl.php
@@ -16,6 +16,7 @@
'105' => 'Napačna končnica datoteke.',
'109' => 'Napačna zahteva.',
'110' => 'Neznana napaka.',
+ '111' => 'It was not possible to complete the request due to resulting file size.',
'115' => 'Datoteka ali mapa s tem imenom že obstaja.',
'116' => 'Mapa ni najdena. Prosimo osvežite okno in poskusite znova.',
'117' => 'Datoteka ni najdena. Prosimo osvežite seznam datotek in poskusite znova.',
View
1 backend/core/js/ckfinder/core/connector/php/lang/sv.php
@@ -16,6 +16,7 @@
'105' => 'Ogiltig filändelse.',
'109' => 'Ogiltig begäran.',
'110' => 'Okänt fel.',
+ '111' => 'It was not possible to complete the request due to resulting file size.',
'115' => 'En fil eller mapp med aktuellt namn finns redan.',
'116' => 'Mappen kunde inte hittas. Var god uppdatera sidan och försök igen.',
'117' => 'Filen kunde inte hittas. Var god uppdatera sidan och försök igen.',
View
1 backend/core/js/ckfinder/core/connector/php/lang/tr.php
@@ -16,6 +16,7 @@
'105' => 'Geçersiz dosya uzantısı.',
'109' => 'Geçersiz istek.',
'110' => 'Bilinmeyen hata.',
+ '111' => 'It was not possible to complete the request due to resulting file size.',
'115' => 'Aynı isimde bir dosya ya da klasör zaten var.',
'116' => 'Klasör bulunamadı. Lütfen yenileyin ve tekrar deneyin.',
'117' => 'Dosya bulunamadı. Lütfen dosya listesini yenileyin ve tekrar deneyin.',
View
1 backend/core/js/ckfinder/core/connector/php/lang/vi.php
@@ -16,6 +16,7 @@
'105' => 'Phần mở rộng tập tin không hợp lệ.',
'109' => 'Yêu cầu không hợp lệ.',
'110' => 'Lỗi không xác định.',
+ '111' => 'It was not possible to complete the request due to resulting file size.',
'115' => 'Tập tin hoặc thư mục cùng tên đã tồn tại.',
'116' => 'Không thấy thư mục. Hãy làm tươi và thử lại.',
'117' => 'Không thấy tập tin. Hãy làm tươi và thử lại.',
View
1 backend/core/js/ckfinder/core/connector/php/lang/zh-cn.php
@@ -16,6 +16,7 @@
'105' => '无效的扩展名.',
'109' => '无效请求.',
'110' => '未知错误.',
+ '111' => 'It was not possible to complete the request due to resulting file size.',
'115' => '存在重名的文件或文件夹.',
'116' => '文件夹不存在. 请刷新后再试.',
'117' => '文件不存在. 请刷新列表后再试.',
View
1 backend/core/js/ckfinder/core/connector/php/lang/zh-tw.php
@@ -16,6 +16,7 @@
'105' => '無法上傳:不合法的副檔名 !',
'109' => '不合法的請求 !',
'110' => '不明錯誤 !',
+ '111' => 'It was not possible to complete the request due to resulting file size.',
'115' => '檔案或目錄名稱重複 !',
'116' => '找不到目錄 ! 請先重新整理 , 然後再試一次 !',
'117' => '找不到檔案 ! 請先重新整理 , 然後再試一次 !',
View
99 backend/core/js/ckfinder/core/connector/php/php5/CommandHandler/DeleteFile.php
@@ -1,99 +0,0 @@
-<?php
-/*
- * CKFinder
- * ========
- * http://ckfinder.com
- * Copyright (C) 2007-2012, CKSource - Frederico Knabben. All rights reserved.
- *
- * The software, this file and its contents are subject to the CKFinder
- * License. Please read the license.txt file before using, installing, copying,
- * modifying or distribute this file or part of its contents. The contents of
- * this file is part of the Source Code of CKFinder.
- */
-if (!defined('IN_CKFINDER')) exit;
-
-/**
- * @package CKFinder
- * @subpackage CommandHandlers
- * @copyright CKSource - Frederico Knabben
- */
-
-/**
- * Include base XML command handler
- */
-require_once CKFINDER_CONNECTOR_LIB_DIR . "/CommandHandler/XmlCommandHandlerBase.php";
-
-/**
- * Handle DeleteFile command
- *
- * @package CKFinder
- * @subpackage CommandHandlers
- * @copyright CKSource - Frederico Knabben
- */
-class CKFinder_Connector_CommandHandler_DeleteFile extends CKFinder_Connector_CommandHandler_XmlCommandHandlerBase
-{
- /**
- * Command name
- *
- * @access private
- * @var string
- */
- private $command = "DeleteFile";
-
-
- /**
- * handle request and build XML
- * @access protected
- *
- */
- protected function buildXml()
- {
- if (empty($_POST['CKFinderCommand']) || $_POST['CKFinderCommand'] != 'true') {
- $this->_errorHandler->throwError(CKFINDER_CONNECTOR_ERROR_INVALID_REQUEST);
- }
-
- if (!$this->_currentFolder->checkAcl(CKFINDER_CONNECTOR_ACL_FILE_DELETE)) {
- $this->_errorHandler->throwError(CKFINDER_CONNECTOR_ERROR_UNAUTHORIZED);
- }
-
- if (!isset($_GET["FileName"])) {
- $this->_errorHandler->throwError(CKFINDER_CONNECTOR_ERROR_INVALID_NAME);
- }
-
- $fileName = CKFinder_Connector_Utils_FileSystem::convertToFilesystemEncoding($_GET["FileName"]);
- $_resourceTypeInfo = $this->_currentFolder->getResourceTypeConfig();
-
- if (!CKFinder_Connector_Utils_FileSystem::checkFileName($fileName) || $_resourceTypeInfo->checkIsHiddenFile($fileName)) {
- $this->_errorHandler->throwError(CKFINDER_CONNECTOR_ERROR_INVALID_REQUEST);
- }
-
- if (!$_resourceTypeInfo->checkExtension($fileName, false)) {
- $this->_errorHandler->throwError(CKFINDER_CONNECTOR_ERROR_INVALID_REQUEST);
- }
-
- $filePath = CKFinder_Connector_Utils_FileSystem::combinePaths($this->_currentFolder->getServerPath(), $fileName);
-
- $bDeleted = false;
-
- if (!file_exists($filePath)) {
- $this->_errorHandler->throwError(CKFINDER_CONNECTOR_ERROR_FILE_NOT_FOUND);
- }
-
- if (!@unlink($filePath)) {
- $this->_errorHandler->throwError(CKFINDER_CONNECTOR_ERROR_ACCESS_DENIED);
- } else {
- $bDeleted = true;
- }
-
- if ($bDeleted) {
- $thumbPath = CKFinder_Connector_Utils_FileSystem::combinePaths($this->_currentFolder->getThumbsServerPath(), $fileName);
-
- @unlink($thumbPath);
-
- $oDeleteFileNode = new Ckfinder_Connector_Utils_XmlNode("DeletedFile");
- $this->_connectorNode->addChild($oDeleteFileNode);
-
- $oDeleteFileNode->addAttribute("name", $fileName);
- }
- }
-}
View
162 backend/core/js/ckfinder/core/connector/php/php5/CommandHandler/DeleteFiles.php
@@ -0,0 +1,162 @@
+<?php
+/*
+ * CKFinder
+* ========
+* http://ckfinder.com
+* Copyright (C) 2007-2012, CKSource - Frederico Knabben. All rights reserved.
+*
+* The software, this file and its contents are subject to the CKFinder
+* License. Please read the license.txt file before using, installing, copying,
+* modifying or distribute this file or part of its contents. The contents of
+* this file is part of the Source Code of CKFinder.
+*/
+if (!defined('IN_CKFINDER')) exit;
+
+/**
+ * @package CKFinder
+ * @subpackage CommandHandlers
+ * @copyright CKSource - Frederico Knabben
+ */
+
+/**
+ * Include base XML command handler
+ */
+require_once CKFINDER_CONNECTOR_LIB_DIR . "/CommandHandler/XmlCommandHandlerBase.php";
+
+/**
+ * Handle DeleteFiles command
+ *
+ * @package CKFinder
+ * @subpackage CommandHandlers
+ * @copyright CKSource - Frederico Knabben
+ */
+class CKFinder_Connector_CommandHandler_DeleteFiles extends CKFinder_Connector_CommandHandler_XmlCommandHandlerBase
+{
+ /**
+ * Command name
+ *
+ * @access private
+ * @var string
+ */
+ private $command = "DeleteFiles";
+
+
+ /**
+ * handle request and build XML
+ * @access protected
+ *
+ */
+ protected function buildXml()
+ {
+ if (empty($_POST['CKFinderCommand']) || $_POST['CKFinderCommand'] != 'true') {
+ $this->_errorHandler->throwError(CKFINDER_CONNECTOR_ERROR_INVALID_REQUEST);
+ }
+
+ if (!$this->_currentFolder->checkAcl(CKFINDER_CONNECTOR_ACL_FILE_DELETE)) {
+ $this->_errorHandler->throwError(CKFINDER_CONNECTOR_ERROR_UNAUTHORIZED);
+ }
+
+ $oErrorsNode = new CKFinder_Connector_Utils_XmlNode("Errors");
+ $errorCode = CKFINDER_CONNECTOR_ERROR_NONE;
+ $deleted = 0;
+ $oDeleteFilesNode = new Ckfinder_Connector_Utils_XmlNode("DeleteFiles");
+
+ $currentResourceTypeConfig = $this->_currentFolder->getResourceTypeConfig();
+ $_config = & CKFinder_Connector_Core_Factory::getInstance("Core_Config");
+ $_aclConfig = $_config->getAccessControlConfig();
+ $aclMasks = array();
+ $_resourceTypeConfig = array();
+ $checkedPaths = array();
+
+ if (!empty($_POST['files']) && is_array($_POST['files'])) {
+ foreach ($_POST['files'] as $arr) {
+ if (empty($arr['name'])) {
+ continue;
+ }
+ if (!isset($arr['type'], $arr['folder'])) {
+ $this->_errorHandler->throwError(CKFINDER_CONNECTOR_ERROR_INVALID_REQUEST);
+ }
+
+ // file name
+ $name = CKFinder_Connector_Utils_FileSystem::convertToFilesystemEncoding($arr['name']);
+ // resource type
+ $type = $arr['type'];
+ // client path
+ $path = CKFinder_Connector_Utils_FileSystem::convertToFilesystemEncoding($arr['folder']);
+
+ if (!isset($_resourceTypeConfig[$type])) {
+ $_resourceTypeConfig[$type] = $_config->getResourceTypeConfig($type);
+ }
+
+ if (is_null($_resourceTypeConfig[$type]) || !CKFinder_Connector_Utils_FileSystem::checkFileName($name) || preg_match(CKFINDER_REGEX_INVALID_PATH, $path)) {
+ $this->_errorHandler->throwError(CKFINDER_CONNECTOR_ERROR_INVALID_REQUEST);
+ }
+
+ if (!$_resourceTypeConfig[$type]->checkExtension($name, false)) {
+ $this->_errorHandler->throwError(CKFINDER_CONNECTOR_ERROR_INVALID_REQUEST);
+ }
+
+ if (empty($checkedPaths[$path])) {
+ $checkedPaths[$path] = true;
+
+ if ($_resourceTypeConfig[$type]->checkIsHiddenPath($path)) {
+ $this->_errorHandler->throwError(CKFINDER_CONNECTOR_ERROR_INVALID_REQUEST);
+ }
+ }
+
+ if ($currentResourceTypeConfig->checkIsHiddenFile($name)) {
+ $this->_errorHandler->throwError(CKFINDER_CONNECTOR_ERROR_INVALID_REQUEST);
+ }
+
+ if (!isset($aclMasks[$type."@".$path])) {
+ $aclMasks[$type."@".$path] = $_aclConfig->getComputedMask($type, $path);
+ }
+
+ $isAuthorized = (($aclMasks[$type."@".$path] & CKFINDER_CONNECTOR_ACL_FILE_DELETE) == CKFINDER_CONNECTOR_ACL_FILE_DELETE);
+ if (!$isAuthorized) {
+ $this->_errorHandler->throwError(CKFINDER_CONNECTOR_ERROR_UNAUTHORIZED);
+ }
+
+ $filePath = $_resourceTypeConfig[$type]->getDirectory().$path.$name;
+
+ if (!file_exists($filePath) || !is_file($filePath) ) {
+ $errorCode = CKFINDER_CONNECTOR_ERROR_FILE_NOT_FOUND;
+ $this->appendErrorNode($oErrorsNode, $errorCode, $name, $type, $path);
+ continue;
+ }
+
+ if ( !CKFinder_Connector_Utils_FileSystem::unlink($filePath) ){
+ $errorCode = CKFINDER_CONNECTOR_ERROR_ACCESS_DENIED;
+ $this->appendErrorNode($oErrorsNode, $errorCode, $name, $type, $path);
+ continue;
+ } else {
+ $deleted++;
+
+ $thumbPath = CKFinder_Connector_Utils_FileSystem::combinePaths($this->_currentFolder->getThumbsServerPath(), $name);
+
+ @unlink($thumbPath);
+ }
+ }
+ }
+
+ $this->_connectorNode->addChild($oDeleteFilesNode);
+ if ($errorCode != CKFINDER_CONNECTOR_ERROR_NONE) {
+ $this->_connectorNode->addChild($oErrorsNode);
+ }
+ $oDeleteFilesNode->addAttribute("deleted", $deleted);
+
+ if ($errorCode != CKFINDER_CONNECTOR_ERROR_NONE) {
+ $this->_errorHandler->throwError(CKFINDER_CONNECTOR_ERROR_DELETE_FAILED);
+ }
+ }
+
+ private function appendErrorNode($oErrorsNode, $errorCode, $name, $type, $path)
+ {
+ $oErrorNode = new CKFinder_Connector_Utils_XmlNode("Error");
+ $oErrorNode->addAttribute("code", $errorCode);
+ $oErrorNode->addAttribute("name", CKFinder_Connector_Utils_FileSystem::convertToConnectorEncoding($name));
+ $oErrorNode->addAttribute("type", $type);
+ $oErrorNode->addAttribute("folder", $path);
+ $oErrorsNode->addChild($oErrorNode);
+ }
+}
View
2 backend/core/js/ckfinder/core/connector/php/php5/CommandHandler/DownloadFile.php
@@ -88,7 +88,7 @@ public function sendResponse()
header("Content-Disposition: attachment; filename=\"" . $encodedName. "\"");
}
header("Content-Length: " . filesize($filePath));
- CKFinder_Connector_Utils_FileSystem::readfileChunked($filePath);
+ CKFinder_Connector_Utils_FileSystem::sendFile($filePath);
exit;
}
}
View
9 backend/core/js/ckfinder/core/connector/php/php5/CommandHandler/FileUpload.php
@@ -55,13 +55,8 @@ public function sendResponse()
}
$sUnsafeFileName = CKFinder_Connector_Utils_FileSystem::convertToFilesystemEncoding(CKFinder_Connector_Utils_Misc::mbBasename($uploadedFile['name']));
- $sFileName = str_replace(array(":", "*", "?", "|", "/"), "_", $sUnsafeFileName);
- if ($_config->getDisallowUnsafeCharacters()) {
- $sFileName = str_replace(";", "_", $sFileName);
- }
- if ($_config->forceAscii()) {
- $sFileName = CKFinder_Connector_Utils_FileSystem::convertToAscii($sFileName);
- }
+ $sFileName = CKFinder_Connector_Utils_FileSystem::secureFileName($sUnsafeFileName);
+
if ($sFileName != $sUnsafeFileName) {
$iErrorNumber = CKFINDER_CONNECTOR_ERROR_UPLOADED_INVALID_NAME_RENAMED;
}
View
5 backend/core/js/ckfinder/core/connector/php/php5/CommandHandler/GetFolders.php
@@ -82,7 +82,8 @@ protected function buildXml()
$i=0;
foreach ($files as $file) {
$oAcl = $_config->getAccessControlConfig();
- $aclMask = $oAcl->getComputedMask($this->_currentFolder->getResourceTypeName(), $this->_currentFolder->getClientPath() . $file . "/");
+ $folderPath = $this->_currentFolder->getClientPath() . $file . "/";
+ $aclMask = $oAcl->getComputedMask($this->_currentFolder->getResourceTypeName(), $folderPath);
if (($aclMask & CKFINDER_CONNECTOR_ACL_FOLDER_VIEW) != CKFINDER_CONNECTOR_ACL_FOLDER_VIEW) {
continue;
@@ -95,7 +96,7 @@ protected function buildXml()
$oFolderNode[$i] = new Ckfinder_Connector_Utils_XmlNode("Folder");
$oFoldersNode->addChild($oFolderNode[$i]);
$oFolderNode[$i]->addAttribute("name", CKFinder_Connector_Utils_FileSystem::convertToConnectorEncoding($file));
- $oFolderNode[$i]->addAttribute("hasChildren", CKFinder_Connector_Utils_FileSystem::hasChildren($_sServerDir . $file) ? "true" : "false");
+ $oFolderNode[$i]->addAttribute("hasChildren", CKFinder_Connector_Utils_FileSystem::hasChildren($folderPath, $resourceTypeInfo) ? "true" : "false");
$oFolderNode[$i]->addAttribute("acl", $aclMask);
$i++;
View
6 backend/core/js/ckfinder/core/connector/php/php5/CommandHandler/Init.php
@@ -89,6 +89,8 @@ protected function buildXml()
if ($_thumbnailsEnabled) {
$_oConnInfo->addAttribute("thumbsUrl", $_thumbnailsConfig->getUrl());
$_oConnInfo->addAttribute("thumbsDirectAccess", $_thumbnailsConfig->getDirectAccess() ? "true" : "false" );
+ $_oConnInfo->addAttribute("thumbsWidth", $_thumbnailsConfig->getMaxWidth());
+ $_oConnInfo->addAttribute("thumbsHeight", $_thumbnailsConfig->getMaxHeight());
}
$_imagesConfig = $_config->getImagesConfig();
$_oConnInfo->addAttribute("imgWidth", $_imagesConfig->getMaxWidth());
@@ -148,8 +150,8 @@ protected function buildXml()
$_oResourceType[$i]->addAttribute("url", $_oTypeInfo->getUrl());
$_oResourceType[$i]->addAttribute("allowedExtensions", implode(",", $_oTypeInfo->getAllowedExtensions()));
$_oResourceType[$i]->addAttribute("deniedExtensions", implode(",", $_oTypeInfo->getDeniedExtensions()));
- $_oResourceType[$i]->addAttribute("hash", substr(md5($_oTypeInfo->getDirectory()), 0, 16));
- $_oResourceType[$i]->addAttribute("hasChildren", CKFinder_Connector_Utils_FileSystem::hasChildren($_oTypeInfo->getDirectory()) ? "true" : "false");
+ $_oResourceType[$i]->addAttribute("hash", $_oTypeInfo->getHash());
+ $_oResourceType[$i]->addAttribute("hasChildren", CKFinder_Connector_Utils_FileSystem::hasChildren('/', $_oTypeInfo) ? "true" : "false");
$_oResourceType[$i]->addAttribute("acl", $_aclMask);
$maxSize = $_oTypeInfo->getMaxSize();
if ($phpMaxSize) {
View
7 backend/core/js/ckfinder/core/connector/php/php5/CommandHandler/MoveFiles.php
@@ -57,6 +57,7 @@ protected function buildXml()
$currentResourceTypeConfig = $this->_currentFolder->getResourceTypeConfig();
$_config =& CKFinder_Connector_Core_Factory::getInstance("Core_Config");
$_aclConfig = $_config->getAccessControlConfig();
+ $_thumbnailsConfig = $_config->getThumbnailsConfig();
$aclMasks = array();
$_resourceTypeConfig = array();
@@ -172,6 +173,9 @@ protected function buildXml()
}
}
+ $_thumbsServerPath = CKFinder_Connector_Utils_FileSystem::combinePaths($_thumbnailsConfig->getDirectory(), $_config->getResourceTypeConfig($type)->getName());
+ $thumbPath = CKFinder_Connector_Utils_FileSystem::combinePaths($_thumbsServerPath, $path.$name);
+
//$overwrite
// finally, no errors so far, we may attempt to copy a file
// protection against copying files to itself
@@ -195,6 +199,7 @@ protected function buildXml()
continue;
}
else {
+ CKFinder_Connector_Utils_FileSystem::unlink($thumbPath);
$moved++;
}
}
@@ -221,6 +226,7 @@ protected function buildXml()
continue;
}
else {
+ CKFinder_Connector_Utils_FileSystem::unlink($thumbPath);
$moved++;
}
}
@@ -237,6 +243,7 @@ protected function buildXml()
continue;
}
else {
+ CKFinder_Connector_Utils_FileSystem::unlink($thumbPath);
$moved++;
}
}
View
4 backend/core/js/ckfinder/core/connector/php/php5/CommandHandler/RenameFolder.php
@@ -84,9 +84,9 @@ protected function buildXml()
}
//let's calculate new folder name
- $newFolderPath = dirname($oldFolderPath).DIRECTORY_SEPARATOR.$newFolderName.DIRECTORY_SEPARATOR;
+ $newFolderPath = dirname($oldFolderPath).'/'.$newFolderName.'/';
- if (file_exists(rtrim($newFolderPath, DIRECTORY_SEPARATOR))) {
+ if (file_exists(rtrim($newFolderPath, '/'))) {
$this->_errorHandler->throwError(CKFINDER_CONNECTOR_ERROR_ALREADY_EXIST);
}
View
63 backend/core/js/ckfinder/core/connector/php/php5/Core/Config.php
@@ -185,6 +185,24 @@ class CKFinder_Connector_Core_Config
* @access private
*/
private $_forceAscii = false;
+ /**
+ * Temporary directory
+ *
+ * @var string
+ * @access private
+ */
+ private $_tempDirectory = '';
+ /**
+ * If set to true send files using X-Sendfile server module
+ * @var bool $_xsendfile
+ */
+ private $_xsendfile = false;
+ /**
+ * Additional Nginx X-Sendfile configuration
+ *
+ * @var array $_xsendfileNginx Configuration for location => root
+ */
+ private $_xsendfileNginx = array();
function __construct()
{
@@ -531,6 +549,15 @@ private function loadValues()
$this->_defaultResourceTypes = explode(",", $_defaultResourceTypes);
}
}
+ if (isset($GLOBALS['config']['TempDirectory'])) {
+ $this->_tempDirectory = $GLOBALS['config']['TempDirectory'];
+ }
+ if (isset($GLOBALS['config']['XSendfile'])) {
+ $this->_xsendfile = CKFinder_Connector_Utils_Misc::booleanValue($GLOBALS['config']['XSendfile']);
+ }
+ if (isset($GLOBALS['config']['XSendfileNginx'])) {
+ $this->_xsendfileNginx = (array)$GLOBALS['config']['XSendfileNginx'];
+ }
}
/**
@@ -554,4 +581,40 @@ public function getResourceTypeNames()
return $_names;
}
+
+ /**
+ * Get temporary directory
+ * @access public
+ * @return string
+ */
+ public function getTempDirectory()
+ {
+ return $this->_tempDirectory;
+ }
+
+ /**
+ * Get X-Sendfile option
+ */
+ public function getXSendfile(){
+ return $this->_xsendfile;
+ }
+
+ /**
+ * Get the dditional Nginx X-Sendfile configuration (location => root)
+ */
+ public function getXSendfileNginx(){
+ $xsendfileNginx = array();
+ foreach ( $this->_xsendfileNginx as $location => $root ){
+ $root = (string)$root;
+ $location = rtrim((string)$location,'/').'/';
+ if ( substr($root,-1,1) != '/' && substr($root,-1,1) != '\\') {
+ // root and location paths are concatenated
+ // @see http://wiki.nginx.org/XSendfile
+ $root = CKFinder_Connector_Utils_FileSystem::combinePaths(rtrim($root,'/'),$location);
+ }
+ $xsendfileNginx[$location] = $root;
+ }
+ return $xsendfileNginx;
+ }
+
}
View
2 backend/core/js/ckfinder/core/connector/php/php5/Core/Connector.php
@@ -87,7 +87,7 @@ public function executeCommand($command)
case 'CopyFiles':
case 'CreateFolder':
- case 'DeleteFile':
+ case 'DeleteFiles':
case 'DeleteFolder':
case 'GetFiles':
case 'GetFolders':
View
10 backend/core/js/ckfinder/core/connector/php/php5/Core/ResourceTypeConfig.php
@@ -356,4 +356,14 @@ public function checkSingleExtension($extension)
return true;
}
+
+ /**
+ * Generate hash for current resource type
+ *
+ * @access public
+ * @return string 16 digit hash
+ */
+ public function getHash(){
+ return substr(md5($this->getDirectory()), 0, 16);
+ }
}
View
188 backend/core/js/ckfinder/core/connector/php/php5/Utils/FileSystem.php
@@ -47,7 +47,7 @@ public static function combinePaths($path1, $path2)
if (strlen($path1)) {
$_lastCharP1 = substr($path1, -1, 1);
if ($_lastCharP1 != "/" && $_lastCharP1 != "\\") {
- $path1 .= DIRECTORY_SEPARATOR;
+ $path1 .= '/';
}
}
}
@@ -59,7 +59,7 @@ public static function combinePaths($path1, $path2)
}
$_lastCharP1 = substr($path1, -1, 1);
if ($_lastCharP1 != "/" && $_lastCharP1 != "\\" && $_firstCharP2 != "/" && $_firstCharP2 != "\\") {
- $path1 .= DIRECTORY_SEPARATOR;
+ $path1 .= '/';
}
}
else {
@@ -120,6 +120,25 @@ public static function checkFolderName($folderName)
}
/**
+ * Check whether $path contains valid folders names
+ *
+ * @static
+ * @access public
+ * @param string $path
+ */
+ public static function checkFolderPath($path){
+ $path = substr($path,strpos($path,'/')+1);
+ $path = explode('/',trim($path,'/'));
+ foreach ( $path as $dir ){
+ if ( !empty($dir) && !CKFinder_Connector_Utils_FileSystem::checkFolderName($dir) ){
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ /**
* Unlink file/folder
*
* @static
@@ -299,6 +318,29 @@ public static function convertToAscii($str)
}
/**
+ * Secure file name from unsafe characters
+ *
+ * @param string $fileName
+ * @access public
+ * @static
+ * @return string $fileName
+ */
+ public static function secureFileName($fileName)
+ {
+ $_config =& CKFinder_Connector_Core_Factory::getInstance("Core_Config");
+ $fileName = str_replace(array(":", "*", "?", "|", "/"), "_", $fileName);
+ if ( $_config->getDisallowUnsafeCharacters() )
+ {
+ $fileName = str_replace(";", "_", $fileName);
+ }
+ if ($_config->forceAscii())
+ {
+ $fileName = CKFinder_Connector_Utils_FileSystem::convertToAscii($fileName);
+ }
+ return $fileName;
+ }
+
+ /**
* Convert file name from UTF-8 to system encoding
*
* @static
@@ -553,11 +595,14 @@ public static function isImageValid($filePath, $extension)
*
* @access public
* @static
- * @param string $serverPath
+ * @param string $clientPath client path (with trailing slash)
+ * @param object $_resourceType resource type configuration
* @return boolean
*/
- public static function hasChildren($serverPath)
+ public static function hasChildren($clientPath, $_resourceType)
{
+ $serverPath = CKFinder_Connector_Utils_FileSystem::combinePaths($_resourceType->getDirectory(), $clientPath);
+
if (!is_dir($serverPath) || (false === $fh = @opendir($serverPath))) {
return false;
}
@@ -566,8 +611,18 @@ public static function hasChildren($serverPath)
while (false !== ($filename = readdir($fh))) {
if ($filename == '.' || $filename == '..') {
continue;
- } else if (is_dir($serverPath . DIRECTORY_SEPARATOR . $filename)) {
+ } else if (is_dir($serverPath . $filename)) {
//we have found valid directory
+ $_config =& CKFinder_Connector_Core_Factory::getInstance("Core_Config");
+ $_acl = $_config->getAccessControlConfig();
+ $_aclMask = $_acl->getComputedMask($_resourceType->getName(), $clientPath . $filename);
+ if ( ($_aclMask & CKFINDER_CONNECTOR_ACL_FOLDER_VIEW) != CKFINDER_CONNECTOR_ACL_FOLDER_VIEW ) {
+ continue;
+ }
+ if ($_resourceType->checkIsHiddenFolder($filename)) {
+ continue;
+ }
+
$hasChildren = true;
break;
}
@@ -577,4 +632,127 @@ public static function hasChildren($serverPath)
return $hasChildren;
}
+
+ /**
+ * Retruns temp directory
+ *
+ * @access public
+ * @static
+ * @return string
+ */
+ public static function getTmpDir()
+ {
+ $_config = & CKFinder_Connector_Core_Factory::getInstance("Core_Config");
+ $tmpDir = $_config->getTempDirectory();
+ if ( $tmpDir )
+ {
+ return $tmpDir;
+ }
+ if ( !function_exists('sys_get_temp_dir')) {
+ function sys_get_temp_dir() {
+ if( $temp=getenv('TMP') ){
+ return $temp;
+ }
+ if( $temp=getenv('TEMP') ) {
+ return $temp;
+ }
+ if( $temp=getenv('TMPDIR') ) {
+ return $temp;
+ }
+ $temp = tempnam(__FILE__,'');
+ if ( file_exists($temp) ){
+ unlink($temp);
+ return dirname($temp);
+ }
+ return null;
+ }
+ }
+ return sys_get_temp_dir();
+ }
+
+ /**
+ * Check if given directory is empty
+ *
+ * @param string $dirname
+ * @access public
+ * @static
+ * @return bool
+ */
+ public static function isEmptyDir($dirname)
+ {
+ $files = scandir($dirname);
+ if ( $files && count($files) > 2)
+ {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Autorename file if previous name is already taken
+ *
+ * @param string $filePath
+ * @param string $fileName
+ * @param string $sFileNameOrginal
+ */
+ public static function autoRename( $filePath, $fileName, $sFileNameOrginal )
+ {
+ $iCounter = 0;
+ while (true)
+ {
+ $sFilePath = CKFinder_Connector_Utils_FileSystem::combinePaths($filePath, $fileName);
+ if ( file_exists($sFilePath) ){
+ $iCounter++;
+ $fileName = CKFinder_Connector_Utils_FileSystem::getFileNameWithoutExtension($sFileNameOrginal) . "(" . $iCounter . ")" . "." .CKFinder_Connector_Utils_FileSystem::getExtension($sFileNameOrginal);
+ }
+ else
+ {
+ break;
+ }
+ }
+ return $fileName;
+ }
+
+ /**
+ * Send file to browser
+ * Selects the method depending on the XSendfile setting
+ * @param string $filePath
+ */
+ public static function sendFile( $filePath ){
+ $config =& CKFinder_Connector_Core_Factory::getInstance("Core_Config");
+ if ( $config->getXSendfile() ){
+ CKFinder_Connector_Utils_FileSystem::sendWithXSendfile($filePath);
+ } else {
+ CKFinder_Connector_Utils_FileSystem::readfileChunked($filePath);
+ }
+ }
+
+ /**
+ * Send files using X-Sendfile server module
+ *