typo 5.0.2 → 5.0.3.98

Sign up to get free protection for your applications and to get access to all the features.
Files changed (1342) hide show
  1. data/CHANGES-5.0.4 +33 -0
  2. data/MAINTAINERS +4 -8
  3. data/README +10 -8
  4. data/{README.SIDEBARS → SIDEBARS} +0 -0
  5. data/app/apis/blogger_service.rb +2 -3
  6. data/app/apis/meta_weblog_service.rb +6 -7
  7. data/app/apis/movable_type_service.rb +6 -6
  8. data/app/controllers/accounts_controller.rb +9 -9
  9. data/app/controllers/admin/base_controller.rb +3 -22
  10. data/app/controllers/admin/blacklist_controller.rb +4 -4
  11. data/app/controllers/admin/cache_controller.rb +0 -9
  12. data/app/controllers/admin/categories_controller.rb +4 -8
  13. data/app/controllers/admin/comments_controller.rb +4 -4
  14. data/app/controllers/admin/content_controller.rb +44 -44
  15. data/app/controllers/admin/dashboard_controller.rb +8 -0
  16. data/app/controllers/admin/feedback_controller.rb +1 -2
  17. data/app/controllers/admin/pages_controller.rb +49 -24
  18. data/app/controllers/admin/resources_controller.rb +5 -5
  19. data/app/controllers/admin/settings_controller.rb +7 -0
  20. data/app/controllers/admin/sidebar_controller.rb +5 -8
  21. data/app/controllers/admin/tags_controller.rb +43 -0
  22. data/app/controllers/admin/themes_controller.rb +1 -0
  23. data/app/controllers/admin/trackbacks_controller.rb +4 -13
  24. data/app/controllers/admin/users_controller.rb +7 -13
  25. data/app/controllers/application.rb +2 -24
  26. data/app/controllers/articles_controller.rb +28 -23
  27. data/app/controllers/comments_controller.rb +4 -6
  28. data/app/controllers/content_controller.rb +1 -4
  29. data/app/controllers/feedback_controller.rb +12 -2
  30. data/app/controllers/grouping_controller.rb +7 -1
  31. data/app/controllers/redirect_controller.rb +6 -0
  32. data/app/controllers/theme_controller.rb +2 -3
  33. data/app/controllers/trackbacks_controller.rb +4 -6
  34. data/app/controllers/xml_controller.rb +1 -1
  35. data/app/helpers/admin/base_helper.rb +58 -9
  36. data/app/helpers/admin/content_helper.rb +7 -0
  37. data/app/helpers/admin/pages_helper.rb +21 -0
  38. data/app/helpers/admin/settings_helper.rb +1 -1
  39. data/app/helpers/application_helper.rb +11 -9
  40. data/app/helpers/content_helper.rb +5 -14
  41. data/app/helpers/sidebar_helper.rb +1 -1
  42. data/app/models/article.rb +81 -68
  43. data/app/models/blog.rb +14 -44
  44. data/app/models/blog_sweeper.rb +30 -10
  45. data/app/models/category.rb +1 -1
  46. data/app/models/comment.rb +0 -7
  47. data/app/models/content.rb +40 -18
  48. data/app/models/feedback.rb +8 -0
  49. data/app/models/notification_mailer.rb +8 -1
  50. data/app/models/page.rb +5 -0
  51. data/app/models/page_cache.rb +22 -7
  52. data/app/models/profile.rb +10 -0
  53. data/app/models/right.rb +4 -0
  54. data/app/models/sidebar.rb +10 -3
  55. data/app/models/tag.rb +20 -8
  56. data/app/models/trackback.rb +1 -1
  57. data/app/models/url_policy.rb +179 -0
  58. data/app/models/user.rb +30 -0
  59. data/app/views/accounts/login.html.erb +1 -1
  60. data/app/views/accounts/logout.html.erb +1 -1
  61. data/app/views/accounts/signup.html.erb +1 -1
  62. data/app/views/admin/blacklist/_blacklist_patterns.html.erb +2 -2
  63. data/app/views/admin/blacklist/_form.html.erb +13 -14
  64. data/app/views/admin/blacklist/_quick_post.html.erb +4 -13
  65. data/app/views/admin/blacklist/edit.html.erb +8 -11
  66. data/app/views/admin/blacklist/index.html.erb +10 -0
  67. data/app/views/admin/categories/_categories.html.erb +8 -8
  68. data/app/views/admin/categories/_form.html.erb +8 -3
  69. data/app/views/admin/categories/_quick_post.html.erb +1 -1
  70. data/app/views/admin/categories/edit.html.erb +3 -7
  71. data/app/views/admin/categories/index.html.erb +15 -0
  72. data/app/views/admin/comments/_form.html.erb +19 -18
  73. data/app/views/admin/comments/edit.html.erb +3 -7
  74. data/app/views/admin/comments/index.html.erb +30 -0
  75. data/app/views/admin/comments/show.html.erb +24 -8
  76. data/app/views/admin/content/_articles.html.erb +31 -10
  77. data/app/views/admin/content/_attachment.html.erb +18 -2
  78. data/app/views/admin/content/_form.html.erb +76 -86
  79. data/app/views/admin/content/_pages.html.erb +3 -3
  80. data/app/views/admin/content/edit.html.erb +2 -9
  81. data/app/views/admin/content/index.html.erb +17 -0
  82. data/app/views/admin/content/new.html.erb +1 -4
  83. data/app/views/admin/content/show.html.erb +2 -23
  84. data/app/views/admin/dashboard/_comments.html.erb +17 -0
  85. data/app/views/admin/dashboard/_overview.html.erb +4 -0
  86. data/app/views/admin/dashboard/_popular.html.erb +12 -0
  87. data/app/views/admin/dashboard/_posts.html.erb +15 -0
  88. data/app/views/admin/dashboard/_sysinfo.html.erb +13 -0
  89. data/app/views/admin/dashboard/_welcome.html.erb +3 -0
  90. data/app/views/admin/dashboard/index.html.erb +13 -57
  91. data/app/views/admin/feedback/index.html.erb +41 -0
  92. data/app/views/admin/pages/_form.html.erb +31 -35
  93. data/app/views/admin/pages/_pages.html.erb +48 -23
  94. data/app/views/admin/pages/edit.html.erb +3 -8
  95. data/app/views/admin/pages/index.html.erb +6 -0
  96. data/app/views/admin/pages/new.html.erb +2 -5
  97. data/app/views/admin/pages/show.html.erb +2 -12
  98. data/app/views/admin/resources/_resources.html.erb +6 -5
  99. data/app/views/admin/resources/index.html.erb +12 -0
  100. data/app/views/admin/settings/feedback.html.erb +1 -19
  101. data/app/views/admin/settings/index.html.erb +3 -23
  102. data/app/views/admin/settings/podcast.html.erb +1 -10
  103. data/app/views/admin/settings/read.html.erb +1 -10
  104. data/app/views/admin/settings/spam.html.erb +1 -10
  105. data/app/views/admin/settings/write.html.erb +2 -14
  106. data/app/views/admin/shared/_edit.html.erb +1 -4
  107. data/app/views/admin/sidebar/index.html.erb +11 -8
  108. data/app/views/admin/tags/_form.html.erb +4 -0
  109. data/app/views/admin/tags/_tags.html.erb +19 -0
  110. data/app/views/admin/tags/destroy.html.erb +11 -0
  111. data/app/views/admin/tags/edit.html.erb +13 -0
  112. data/app/views/admin/tags/index.html.erb +12 -0
  113. data/app/views/admin/textfilters/edit.html.erb +3 -5
  114. data/app/views/admin/textfilters/index.html.erb +12 -0
  115. data/app/views/admin/textfilters/macro_help.html.erb +1 -1
  116. data/app/views/admin/textfilters/new.html.erb +2 -8
  117. data/app/views/admin/textfilters/show.html.erb +1 -6
  118. data/app/views/admin/textfilters/show_help.html.erb +1 -5
  119. data/app/views/admin/themes/index.html.erb +19 -15
  120. data/app/views/admin/trackbacks/edit.html.erb +1 -4
  121. data/app/views/admin/trackbacks/index.html.erb +22 -0
  122. data/app/views/admin/users/_form.html.erb +0 -10
  123. data/app/views/admin/users/edit.html.erb +3 -6
  124. data/app/views/admin/users/index.html.erb +29 -0
  125. data/app/views/admin/users/new.html.erb +1 -4
  126. data/app/views/articles/_atom_feed.atom.builder +1 -1
  127. data/app/views/articles/archives.html.erb +2 -2
  128. data/app/views/articles/groupings.html.erb +1 -1
  129. data/app/views/layouts/administration.html.erb +44 -51
  130. data/app/views/notification_mailer/_mail_footer.html.erb +1 -1
  131. data/app/views/notification_mailer/article.html.erb +1 -1
  132. data/app/views/notification_mailer/comment.html.erb +1 -1
  133. data/app/views/notification_mailer/notif_user.html.erb +12 -0
  134. data/app/views/xml/_googlesitemap_item_category.googlesitemap.builder +1 -1
  135. data/config/environment.rb +0 -1
  136. data/config/environments/development.rb +5 -0
  137. data/config/initializers/access_rules.rb +110 -0
  138. data/config/initializers/active_record_hacks.rb +17 -0
  139. data/config/initializers/benchmark_hacks.rb +9 -0
  140. data/config/routes.rb +36 -15
  141. data/db/converters/README +2 -2
  142. data/db/migrate/004_add_sidebars.rb +8 -9
  143. data/db/migrate/067_remove_blog_ids.rb +22 -0
  144. data/db/migrate/068_fix_grants.rb +113 -0
  145. data/db/migrate/069_add_modules_to_profile.rb +18 -0
  146. data/db/schema.mysql-v3.sql +3 -217
  147. data/db/schema.mysql.sql +3 -217
  148. data/db/schema.postgresql.sql +3 -217
  149. data/db/schema.rb +32 -29
  150. data/db/schema.sqlite.sql +3 -217
  151. data/db/schema.sqlserver.sql +3 -231
  152. data/db/schema_version +1 -1
  153. data/lang/de_DE.rb +6 -9
  154. data/lang/en_US.rb +3 -0
  155. data/lang/es_MX.rb +556 -0
  156. data/lang/fr_FR.rb +171 -45
  157. data/lang/it_IT.rb +566 -0
  158. data/lang/ja_JP.rb +553 -0
  159. data/lang/pl_PL.rb +553 -0
  160. data/lang/ro_RO.rb +6 -10
  161. data/lib/sidebars/plugin.rb +1 -3
  162. data/lib/stateful.rb +6 -2
  163. data/lib/tasks/release.rake +3 -8
  164. data/lib/typo_version.rb +1 -1
  165. data/public/.DS_Store +0 -0
  166. data/public/.htaccess +1 -1
  167. data/public/images/admin/arrow_comment_group.gif +0 -0
  168. data/public/images/admin/typologo.gif +0 -0
  169. data/public/javascripts/controls.js +484 -354
  170. data/public/javascripts/dragdrop.js +88 -58
  171. data/public/javascripts/effects.js +396 -364
  172. data/public/javascripts/fckcustom.js +27 -0
  173. data/public/javascripts/fckeditor/editor/_source/classes/fckcontextmenu.js +209 -0
  174. data/public/javascripts/fckeditor/editor/_source/classes/fckdataprocessor.js +119 -0
  175. data/public/javascripts/fckeditor/editor/_source/classes/fckdocumentfragment_gecko.js +46 -0
  176. data/public/javascripts/fckeditor/editor/_source/classes/fckdocumentfragment_ie.js +58 -0
  177. data/public/javascripts/fckeditor/editor/_source/classes/fckdomrange.js +808 -0
  178. data/public/javascripts/fckeditor/editor/_source/classes/fckdomrange_gecko.js +103 -0
  179. data/public/javascripts/fckeditor/editor/_source/classes/fckdomrange_ie.js +198 -0
  180. data/public/javascripts/fckeditor/editor/_source/classes/fckdomrangeiterator.js +306 -0
  181. data/public/javascripts/fckeditor/editor/_source/classes/fckeditingarea.js +344 -0
  182. data/public/javascripts/fckeditor/editor/_source/classes/fckelementpath.js +70 -0
  183. data/public/javascripts/fckeditor/editor/_source/classes/fckenterkey.js +629 -0
  184. data/public/javascripts/fckeditor/editor/_source/classes/fckevents.js +66 -0
  185. data/public/javascripts/fckeditor/editor/_source/classes/fckicon.js +103 -0
  186. data/public/javascripts/fckeditor/editor/_source/classes/fckiecleanup.js +68 -0
  187. data/public/javascripts/fckeditor/editor/_source/classes/fckimagepreloader.js +64 -0
  188. data/public/javascripts/fckeditor/editor/_source/classes/fckkeystrokehandler.js +141 -0
  189. data/public/javascripts/fckeditor/editor/_source/classes/fckmenublock.js +150 -0
  190. data/public/javascripts/fckeditor/editor/_source/classes/fckmenublockpanel.js +54 -0
  191. data/public/javascripts/fckeditor/editor/_source/classes/fckmenuitem.js +160 -0
  192. data/public/javascripts/fckeditor/editor/_source/classes/fckpanel.js +338 -0
  193. data/public/javascripts/fckeditor/editor/_source/classes/fckplugin.js +56 -0
  194. data/public/javascripts/fckeditor/editor/_source/classes/fckspecialcombo.js +377 -0
  195. data/public/javascripts/fckeditor/editor/_source/classes/fckstyle.js +1280 -0
  196. data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbar.js +103 -0
  197. data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbarbreak_gecko.js +36 -0
  198. data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbarbreak_ie.js +38 -0
  199. data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbarbutton.js +76 -0
  200. data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbarbuttonui.js +194 -0
  201. data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbarfontformatcombo.js +139 -0
  202. data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbarfontscombo.js +98 -0
  203. data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbarfontsizecombo.js +76 -0
  204. data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbarpanelbutton.js +92 -0
  205. data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbarspecialcombo.js +143 -0
  206. data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbarstylecombo.js +200 -0
  207. data/public/javascripts/fckeditor/editor/_source/classes/fckw3crange.js +447 -0
  208. data/public/javascripts/fckeditor/editor/_source/classes/fckxml.js +108 -0
  209. data/public/javascripts/fckeditor/editor/_source/classes/fckxml_gecko.js +87 -0
  210. data/public/javascripts/fckeditor/editor/_source/classes/fckxml_ie.js +88 -0
  211. data/public/javascripts/fckeditor/editor/_source/commandclasses/fck_othercommands.js +462 -0
  212. data/public/javascripts/fckeditor/editor/_source/commandclasses/fckblockquotecommand.js +194 -0
  213. data/public/javascripts/fckeditor/editor/_source/commandclasses/fckcorestylecommand.js +59 -0
  214. data/public/javascripts/fckeditor/editor/_source/commandclasses/fckfitwindow.js +180 -0
  215. data/public/javascripts/fckeditor/editor/_source/commandclasses/fckindentcommands.js +280 -0
  216. data/public/javascripts/fckeditor/editor/_source/commandclasses/fckjustifycommands.js +173 -0
  217. data/public/javascripts/fckeditor/editor/_source/commandclasses/fcklistcommands.js +382 -0
  218. data/public/javascripts/fckeditor/editor/_source/commandclasses/fcknamedcommand.js +37 -0
  219. data/public/javascripts/fckeditor/editor/_source/commandclasses/fckpasteplaintextcommand.js +38 -0
  220. data/public/javascripts/fckeditor/editor/_source/commandclasses/fckpastewordcommand.js +40 -0
  221. data/public/javascripts/fckeditor/editor/_source/commandclasses/fckremoveformatcommand.js +45 -0
  222. data/public/javascripts/fckeditor/editor/_source/commandclasses/fckshowblocks.js +76 -0
  223. data/public/javascripts/fckeditor/editor/_source/commandclasses/fckspellcheckcommand_gecko.js +39 -0
  224. data/public/javascripts/fckeditor/editor/_source/commandclasses/fckspellcheckcommand_ie.js +67 -0
  225. data/public/javascripts/fckeditor/editor/_source/commandclasses/fckstylecommand.js +60 -0
  226. data/public/javascripts/fckeditor/editor/_source/commandclasses/fcktablecommand.js +106 -0
  227. data/public/javascripts/fckeditor/editor/_source/commandclasses/fcktextcolorcommand.js +183 -0
  228. data/public/javascripts/fckeditor/editor/_source/fckconstants.js +56 -0
  229. data/public/javascripts/fckeditor/editor/_source/fckeditorapi.js +168 -0
  230. data/public/javascripts/fckeditor/editor/_source/fckjscoreextensions.js +166 -0
  231. data/public/javascripts/fckeditor/editor/_source/fckscriptloader.js +122 -0
  232. data/public/javascripts/fckeditor/editor/_source/internals/fck.js +1065 -0
  233. data/public/javascripts/fckeditor/editor/_source/internals/fck_contextmenu.js +325 -0
  234. data/public/javascripts/fckeditor/editor/_source/internals/fck_gecko.js +458 -0
  235. data/public/javascripts/fckeditor/editor/_source/internals/fck_ie.js +420 -0
  236. data/public/javascripts/fckeditor/editor/_source/internals/fckbrowserinfo.js +59 -0
  237. data/public/javascripts/fckeditor/editor/_source/internals/fckcodeformatter.js +100 -0
  238. data/public/javascripts/fckeditor/editor/_source/internals/fckcommands.js +167 -0
  239. data/public/javascripts/fckeditor/editor/_source/internals/fckconfig.js +239 -0
  240. data/public/javascripts/fckeditor/editor/_source/internals/fckdebug.js +56 -0
  241. data/public/javascripts/fckeditor/editor/_source/internals/fckdialog.js +38 -0
  242. data/public/javascripts/fckeditor/editor/_source/internals/fckdialog_gecko.js +103 -0
  243. data/public/javascripts/fckeditor/editor/_source/internals/fckdialog_ie.js +48 -0
  244. data/public/javascripts/fckeditor/editor/_source/internals/fckdocumentprocessor.js +225 -0
  245. data/public/javascripts/fckeditor/editor/_source/internals/fckdomtools.js +884 -0
  246. data/public/javascripts/fckeditor/editor/_source/internals/fcklanguagemanager.js +162 -0
  247. data/public/javascripts/fckeditor/editor/_source/internals/fcklisthandler.js +152 -0
  248. data/public/javascripts/fckeditor/editor/_source/internals/fcklistslib.js +60 -0
  249. data/public/javascripts/fckeditor/editor/_source/internals/fckplugins.js +46 -0
  250. data/public/javascripts/fckeditor/editor/_source/internals/fckregexlib.js +96 -0
  251. data/public/javascripts/fckeditor/editor/_source/internals/fckselection.js +42 -0
  252. data/public/javascripts/fckeditor/editor/_source/internals/fckselection_gecko.js +211 -0
  253. data/public/javascripts/fckeditor/editor/_source/internals/fckselection_ie.js +201 -0
  254. data/public/javascripts/fckeditor/editor/_source/internals/fckstyles.js +372 -0
  255. data/public/javascripts/fckeditor/editor/_source/internals/fcktablehandler.js +858 -0
  256. data/public/javascripts/fckeditor/editor/_source/internals/fcktablehandler_gecko.js +56 -0
  257. data/public/javascripts/fckeditor/editor/_source/internals/fcktablehandler_ie.js +64 -0
  258. data/public/javascripts/fckeditor/editor/_source/internals/fcktoolbaritems.js +123 -0
  259. data/public/javascripts/fckeditor/editor/_source/internals/fcktoolbarset.js +373 -0
  260. data/public/javascripts/fckeditor/editor/_source/internals/fcktools.js +581 -0
  261. data/public/javascripts/fckeditor/editor/_source/internals/fcktools_gecko.js +270 -0
  262. data/public/javascripts/fckeditor/editor/_source/internals/fcktools_ie.js +227 -0
  263. data/public/javascripts/fckeditor/editor/_source/internals/fckundo.js +220 -0
  264. data/public/javascripts/fckeditor/editor/_source/internals/fckurlparams.js +39 -0
  265. data/public/javascripts/fckeditor/editor/_source/internals/fckxhtml.js +460 -0
  266. data/public/javascripts/fckeditor/editor/_source/internals/fckxhtml_gecko.js +105 -0
  267. data/public/javascripts/fckeditor/editor/_source/internals/fckxhtml_ie.js +208 -0
  268. data/public/javascripts/fckeditor/editor/_source/internals/fckxhtmlentities.js +354 -0
  269. data/public/javascripts/fckeditor/editor/css/behaviors/disablehandles.htc +15 -0
  270. data/public/javascripts/fckeditor/editor/css/behaviors/showtableborders.htc +36 -0
  271. data/public/javascripts/fckeditor/editor/css/fck_editorarea.css +91 -0
  272. data/public/javascripts/fckeditor/editor/css/fck_internal.css +182 -0
  273. data/public/javascripts/fckeditor/editor/css/fck_showtableborders_gecko.css +42 -0
  274. data/public/javascripts/fckeditor/editor/css/images/block_address.png +0 -0
  275. data/public/javascripts/fckeditor/editor/css/images/block_blockquote.png +0 -0
  276. data/public/javascripts/fckeditor/editor/css/images/block_div.png +0 -0
  277. data/public/javascripts/fckeditor/editor/css/images/block_h1.png +0 -0
  278. data/public/javascripts/fckeditor/editor/css/images/block_h2.png +0 -0
  279. data/public/javascripts/fckeditor/editor/css/images/block_h3.png +0 -0
  280. data/public/javascripts/fckeditor/editor/css/images/block_h4.png +0 -0
  281. data/public/javascripts/fckeditor/editor/css/images/block_h5.png +0 -0
  282. data/public/javascripts/fckeditor/editor/css/images/block_h6.png +0 -0
  283. data/public/javascripts/fckeditor/editor/css/images/block_p.png +0 -0
  284. data/public/javascripts/fckeditor/editor/css/images/block_pre.png +0 -0
  285. data/public/javascripts/fckeditor/editor/css/images/fck_anchor.gif +0 -0
  286. data/public/javascripts/fckeditor/editor/css/images/fck_flashlogo.gif +0 -0
  287. data/public/javascripts/fckeditor/editor/css/images/fck_hiddenfield.gif +0 -0
  288. data/public/javascripts/fckeditor/editor/css/images/fck_pagebreak.gif +0 -0
  289. data/public/javascripts/fckeditor/editor/dialog/common/fck_dialog_common.css +78 -0
  290. data/public/javascripts/fckeditor/editor/dialog/common/fck_dialog_common.js +165 -0
  291. data/public/javascripts/fckeditor/editor/dialog/common/images/locked.gif +0 -0
  292. data/public/javascripts/fckeditor/editor/dialog/common/images/reset.gif +0 -0
  293. data/public/javascripts/fckeditor/editor/dialog/common/images/unlocked.gif +0 -0
  294. data/public/javascripts/fckeditor/editor/dialog/fck_about.html +155 -0
  295. data/public/javascripts/fckeditor/editor/dialog/fck_about/logo_fckeditor.gif +0 -0
  296. data/public/javascripts/fckeditor/editor/dialog/fck_about/logo_fredck.gif +0 -0
  297. data/public/javascripts/fckeditor/editor/dialog/fck_anchor.html +207 -0
  298. data/public/javascripts/fckeditor/editor/dialog/fck_button.html +109 -0
  299. data/public/javascripts/fckeditor/editor/dialog/fck_checkbox.html +109 -0
  300. data/public/javascripts/fckeditor/editor/dialog/fck_colorselector.html +171 -0
  301. data/public/javascripts/fckeditor/editor/dialog/fck_docprops.html +600 -0
  302. data/public/javascripts/fckeditor/editor/dialog/fck_docprops/fck_document_preview.html +113 -0
  303. data/public/javascripts/fckeditor/editor/dialog/fck_find.html +173 -0
  304. data/public/javascripts/fckeditor/editor/dialog/fck_flash.html +146 -0
  305. data/public/javascripts/fckeditor/editor/dialog/fck_flash/fck_flash.js +285 -0
  306. data/public/javascripts/fckeditor/editor/dialog/fck_flash/fck_flash_preview.html +46 -0
  307. data/public/javascripts/fckeditor/editor/dialog/fck_form.html +106 -0
  308. data/public/javascripts/fckeditor/editor/dialog/fck_hiddenfield.html +118 -0
  309. data/public/javascripts/fckeditor/editor/dialog/fck_image.html +252 -0
  310. data/public/javascripts/fckeditor/editor/dialog/fck_image/fck_image.js +492 -0
  311. data/public/javascripts/fckeditor/editor/dialog/fck_image/fck_image_preview.html +66 -0
  312. data/public/javascripts/fckeditor/editor/dialog/fck_link.html +293 -0
  313. data/public/javascripts/fckeditor/editor/dialog/fck_link/fck_link.js +715 -0
  314. data/public/javascripts/fckeditor/editor/dialog/fck_listprop.html +116 -0
  315. data/public/javascripts/fckeditor/editor/dialog/fck_paste.html +340 -0
  316. data/public/javascripts/fckeditor/editor/dialog/fck_radiobutton.html +109 -0
  317. data/public/javascripts/fckeditor/editor/dialog/fck_replace.html +452 -0
  318. data/public/javascripts/fckeditor/editor/dialog/fck_select.html +177 -0
  319. data/public/javascripts/fckeditor/editor/dialog/fck_select/fck_select.js +194 -0
  320. data/public/javascripts/fckeditor/editor/dialog/fck_smiley.html +106 -0
  321. data/public/javascripts/fckeditor/editor/dialog/fck_source.html +65 -0
  322. data/public/javascripts/fckeditor/editor/dialog/fck_specialchar.html +118 -0
  323. data/public/javascripts/fckeditor/editor/dialog/fck_spellerpages.html +64 -0
  324. data/{spec/fixtures/notifications.yml → public/javascripts/fckeditor/editor/dialog/fck_spellerpages/spellerpages/blank.html} +0 -0
  325. data/public/javascripts/fckeditor/editor/dialog/fck_spellerpages/spellerpages/controlWindow.js +87 -0
  326. data/public/javascripts/fckeditor/editor/dialog/fck_spellerpages/spellerpages/controls.html +153 -0
  327. data/public/javascripts/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.cfm +146 -0
  328. data/public/javascripts/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.php +196 -0
  329. data/public/javascripts/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.pl +180 -0
  330. data/public/javascripts/fckeditor/editor/dialog/fck_spellerpages/spellerpages/spellChecker.js +462 -0
  331. data/public/javascripts/fckeditor/editor/dialog/fck_spellerpages/spellerpages/spellchecker.html +71 -0
  332. data/public/javascripts/fckeditor/editor/dialog/fck_spellerpages/spellerpages/spellerStyle.css +49 -0
  333. data/public/javascripts/fckeditor/editor/dialog/fck_spellerpages/spellerpages/wordWindow.js +272 -0
  334. data/public/javascripts/fckeditor/editor/dialog/fck_table.html +293 -0
  335. data/public/javascripts/fckeditor/editor/dialog/fck_tablecell.html +255 -0
  336. data/public/javascripts/fckeditor/editor/dialog/fck_template.html +242 -0
  337. data/public/javascripts/fckeditor/editor/dialog/fck_template/images/template1.gif +0 -0
  338. data/public/javascripts/fckeditor/editor/dialog/fck_template/images/template2.gif +0 -0
  339. data/public/javascripts/fckeditor/editor/dialog/fck_template/images/template3.gif +0 -0
  340. data/public/javascripts/fckeditor/editor/dialog/fck_textarea.html +95 -0
  341. data/public/javascripts/fckeditor/editor/dialog/fck_textfield.html +140 -0
  342. data/public/javascripts/fckeditor/editor/dtd/fck_dtd_test.html +43 -0
  343. data/public/javascripts/fckeditor/editor/dtd/fck_xhtml10strict.js +116 -0
  344. data/public/javascripts/fckeditor/editor/dtd/fck_xhtml10transitional.js +140 -0
  345. data/public/javascripts/fckeditor/editor/fckdebug.html +153 -0
  346. data/public/javascripts/fckeditor/editor/fckdialog.html +336 -0
  347. data/public/javascripts/fckeditor/editor/fckeditor.html +228 -0
  348. data/public/javascripts/fckeditor/editor/fckeditor.original.html +331 -0
  349. data/public/javascripts/fckeditor/editor/filemanager/browser/default/browser.css +89 -0
  350. data/public/javascripts/fckeditor/editor/filemanager/browser/default/browser.html +163 -0
  351. data/public/javascripts/fckeditor/editor/filemanager/browser/default/frmactualfolder.html +67 -0
  352. data/public/javascripts/fckeditor/editor/filemanager/browser/default/frmcreatefolder.html +113 -0
  353. data/public/javascripts/fckeditor/editor/filemanager/browser/default/frmfolders.html +196 -0
  354. data/public/javascripts/fckeditor/editor/filemanager/browser/default/frmresourceslist.html +167 -0
  355. data/public/javascripts/fckeditor/editor/filemanager/browser/default/frmresourcetype.html +65 -0
  356. data/public/javascripts/fckeditor/editor/filemanager/browser/default/frmupload.html +114 -0
  357. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/ButtonArrow.gif +0 -0
  358. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/Folder.gif +0 -0
  359. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/Folder32.gif +0 -0
  360. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/FolderOpened.gif +0 -0
  361. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/FolderOpened32.gif +0 -0
  362. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/FolderUp.gif +0 -0
  363. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/32/ai.gif +0 -0
  364. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/32/avi.gif +0 -0
  365. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/32/bmp.gif +0 -0
  366. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/32/cs.gif +0 -0
  367. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/32/default.icon.gif +0 -0
  368. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/32/dll.gif +0 -0
  369. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/32/doc.gif +0 -0
  370. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/32/exe.gif +0 -0
  371. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/32/fla.gif +0 -0
  372. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/32/gif.gif +0 -0
  373. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/32/htm.gif +0 -0
  374. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/32/html.gif +0 -0
  375. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/32/jpg.gif +0 -0
  376. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/32/js.gif +0 -0
  377. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/32/mdb.gif +0 -0
  378. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/32/mp3.gif +0 -0
  379. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/32/pdf.gif +0 -0
  380. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/32/png.gif +0 -0
  381. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/32/ppt.gif +0 -0
  382. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/32/rdp.gif +0 -0
  383. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/32/swf.gif +0 -0
  384. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/32/swt.gif +0 -0
  385. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/32/txt.gif +0 -0
  386. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/32/vsd.gif +0 -0
  387. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/32/xls.gif +0 -0
  388. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/32/xml.gif +0 -0
  389. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/32/zip.gif +0 -0
  390. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/ai.gif +0 -0
  391. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/avi.gif +0 -0
  392. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/bmp.gif +0 -0
  393. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/cs.gif +0 -0
  394. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/default.icon.gif +0 -0
  395. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/dll.gif +0 -0
  396. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/doc.gif +0 -0
  397. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/exe.gif +0 -0
  398. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/fla.gif +0 -0
  399. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/gif.gif +0 -0
  400. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/htm.gif +0 -0
  401. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/html.gif +0 -0
  402. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/jpg.gif +0 -0
  403. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/js.gif +0 -0
  404. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/mdb.gif +0 -0
  405. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/mp3.gif +0 -0
  406. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/pdf.gif +0 -0
  407. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/png.gif +0 -0
  408. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/ppt.gif +0 -0
  409. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/rdp.gif +0 -0
  410. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/swf.gif +0 -0
  411. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/swt.gif +0 -0
  412. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/txt.gif +0 -0
  413. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/vsd.gif +0 -0
  414. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/xls.gif +0 -0
  415. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/xml.gif +0 -0
  416. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/icons/zip.gif +0 -0
  417. data/public/javascripts/fckeditor/editor/filemanager/browser/default/images/spacer.gif +0 -0
  418. data/public/javascripts/fckeditor/editor/filemanager/browser/default/js/common.js +55 -0
  419. data/public/javascripts/fckeditor/editor/filemanager/browser/default/js/fckxml.js +129 -0
  420. data/public/javascripts/fckeditor/editor/filemanager/connectors/asp/basexml.asp +62 -0
  421. data/public/javascripts/fckeditor/editor/filemanager/connectors/asp/class_upload.asp +353 -0
  422. data/public/javascripts/fckeditor/editor/filemanager/connectors/asp/commands.asp +198 -0
  423. data/public/javascripts/fckeditor/editor/filemanager/connectors/asp/config.asp +128 -0
  424. data/public/javascripts/fckeditor/editor/filemanager/connectors/asp/connector.asp +88 -0
  425. data/public/javascripts/fckeditor/editor/filemanager/connectors/asp/io.asp +222 -0
  426. data/public/javascripts/fckeditor/editor/filemanager/connectors/asp/upload.asp +61 -0
  427. data/public/javascripts/fckeditor/editor/filemanager/connectors/asp/util.asp +55 -0
  428. data/public/javascripts/fckeditor/editor/filemanager/connectors/aspx/connector.aspx +30 -0
  429. data/public/javascripts/fckeditor/editor/filemanager/connectors/aspx/upload.aspx +30 -0
  430. data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/ImageObject.cfc +273 -0
  431. data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/cf5_connector.cfm +315 -0
  432. data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/cf5_upload.cfm +296 -0
  433. data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/cf_basexml.cfm +68 -0
  434. data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/cf_commands.cfm +225 -0
  435. data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/cf_connector.cfm +89 -0
  436. data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/cf_io.cfm +288 -0
  437. data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/cf_upload.cfm +68 -0
  438. data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/cf_util.cfm +132 -0
  439. data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/config.cfm +183 -0
  440. data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/connector.cfm +31 -0
  441. data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/image.cfc +1325 -0
  442. data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/upload.cfm +31 -0
  443. data/public/javascripts/fckeditor/editor/filemanager/connectors/lasso/config.lasso +65 -0
  444. data/public/javascripts/fckeditor/editor/filemanager/connectors/lasso/connector.lasso +257 -0
  445. data/public/javascripts/fckeditor/editor/filemanager/connectors/lasso/upload.lasso +157 -0
  446. data/public/javascripts/fckeditor/editor/filemanager/connectors/perl/basexml.pl +63 -0
  447. data/public/javascripts/fckeditor/editor/filemanager/connectors/perl/commands.pl +168 -0
  448. data/public/javascripts/fckeditor/editor/filemanager/connectors/perl/connector.cgi +137 -0
  449. data/public/javascripts/fckeditor/editor/filemanager/connectors/perl/io.pl +131 -0
  450. data/public/javascripts/fckeditor/editor/filemanager/connectors/perl/upload.cgi +118 -0
  451. data/public/javascripts/fckeditor/editor/filemanager/connectors/perl/upload_fck.pl +667 -0
  452. data/public/javascripts/fckeditor/editor/filemanager/connectors/perl/util.pl +68 -0
  453. data/public/javascripts/fckeditor/editor/filemanager/connectors/php/basexml.php +93 -0
  454. data/public/javascripts/fckeditor/editor/filemanager/connectors/php/commands.php +245 -0
  455. data/public/javascripts/fckeditor/editor/filemanager/connectors/php/config.php +140 -0
  456. data/public/javascripts/fckeditor/editor/filemanager/connectors/php/connector.php +87 -0
  457. data/public/javascripts/fckeditor/editor/filemanager/connectors/php/io.php +272 -0
  458. data/public/javascripts/fckeditor/editor/filemanager/connectors/php/phpcompat.php +17 -0
  459. data/public/javascripts/fckeditor/editor/filemanager/connectors/php/upload.php +59 -0
  460. data/public/javascripts/fckeditor/editor/filemanager/connectors/php/util.php +185 -0
  461. data/public/javascripts/fckeditor/editor/filemanager/connectors/py/config.py +135 -0
  462. data/public/javascripts/fckeditor/editor/filemanager/connectors/py/connector.py +118 -0
  463. data/public/javascripts/fckeditor/editor/filemanager/connectors/py/fckcommands.py +181 -0
  464. data/public/javascripts/fckeditor/editor/filemanager/connectors/py/fckconnector.py +90 -0
  465. data/public/javascripts/fckeditor/editor/filemanager/connectors/py/fckoutput.py +111 -0
  466. data/public/javascripts/fckeditor/editor/filemanager/connectors/py/fckutil.py +127 -0
  467. data/public/javascripts/fckeditor/editor/filemanager/connectors/py/htaccess.txt +23 -0
  468. data/public/javascripts/fckeditor/editor/filemanager/connectors/py/upload.py +88 -0
  469. data/public/javascripts/fckeditor/editor/filemanager/connectors/py/wsgi.py +58 -0
  470. data/public/javascripts/fckeditor/editor/filemanager/connectors/py/zope.py +189 -0
  471. data/public/javascripts/fckeditor/editor/filemanager/connectors/test.html +177 -0
  472. data/public/javascripts/fckeditor/editor/filemanager/connectors/uploadtest.html +149 -0
  473. data/public/javascripts/fckeditor/editor/images/anchor.gif +0 -0
  474. data/public/javascripts/fckeditor/editor/images/arrow_ltr.gif +0 -0
  475. data/public/javascripts/fckeditor/editor/images/arrow_rtl.gif +0 -0
  476. data/public/javascripts/fckeditor/editor/images/smiley/msn/angel_smile.gif +0 -0
  477. data/public/javascripts/fckeditor/editor/images/smiley/msn/angry_smile.gif +0 -0
  478. data/public/javascripts/fckeditor/editor/images/smiley/msn/broken_heart.gif +0 -0
  479. data/public/javascripts/fckeditor/editor/images/smiley/msn/cake.gif +0 -0
  480. data/public/javascripts/fckeditor/editor/images/smiley/msn/confused_smile.gif +0 -0
  481. data/public/javascripts/fckeditor/editor/images/smiley/msn/cry_smile.gif +0 -0
  482. data/public/javascripts/fckeditor/editor/images/smiley/msn/devil_smile.gif +0 -0
  483. data/public/javascripts/fckeditor/editor/images/smiley/msn/embaressed_smile.gif +0 -0
  484. data/public/javascripts/fckeditor/editor/images/smiley/msn/envelope.gif +0 -0
  485. data/public/javascripts/fckeditor/editor/images/smiley/msn/heart.gif +0 -0
  486. data/public/javascripts/fckeditor/editor/images/smiley/msn/kiss.gif +0 -0
  487. data/public/javascripts/fckeditor/editor/images/smiley/msn/lightbulb.gif +0 -0
  488. data/public/javascripts/fckeditor/editor/images/smiley/msn/omg_smile.gif +0 -0
  489. data/public/javascripts/fckeditor/editor/images/smiley/msn/regular_smile.gif +0 -0
  490. data/public/javascripts/fckeditor/editor/images/smiley/msn/sad_smile.gif +0 -0
  491. data/public/javascripts/fckeditor/editor/images/smiley/msn/shades_smile.gif +0 -0
  492. data/public/javascripts/fckeditor/editor/images/smiley/msn/teeth_smile.gif +0 -0
  493. data/public/javascripts/fckeditor/editor/images/smiley/msn/thumbs_down.gif +0 -0
  494. data/public/javascripts/fckeditor/editor/images/smiley/msn/thumbs_up.gif +0 -0
  495. data/public/javascripts/fckeditor/editor/images/smiley/msn/tounge_smile.gif +0 -0
  496. data/public/javascripts/fckeditor/editor/images/smiley/msn/whatchutalkingabout_smile.gif +0 -0
  497. data/public/javascripts/fckeditor/editor/images/smiley/msn/wink_smile.gif +0 -0
  498. data/{test/mocks/themes/standard_issue → public/javascripts/fckeditor/editor}/images/spacer.gif +0 -0
  499. data/public/javascripts/fckeditor/editor/js/fckeditorcode_gecko.js +108 -0
  500. data/public/javascripts/fckeditor/editor/js/fckeditorcode_ie.js +109 -0
  501. data/public/javascripts/fckeditor/editor/lang/_translationstatus.txt +76 -0
  502. data/public/javascripts/fckeditor/editor/lang/af.js +516 -0
  503. data/public/javascripts/fckeditor/editor/lang/ar.js +516 -0
  504. data/public/javascripts/fckeditor/editor/lang/bg.js +516 -0
  505. data/public/javascripts/fckeditor/editor/lang/bn.js +516 -0
  506. data/public/javascripts/fckeditor/editor/lang/bs.js +516 -0
  507. data/public/javascripts/fckeditor/editor/lang/ca.js +516 -0
  508. data/public/javascripts/fckeditor/editor/lang/cs.js +516 -0
  509. data/public/javascripts/fckeditor/editor/lang/da.js +516 -0
  510. data/public/javascripts/fckeditor/editor/lang/de.js +516 -0
  511. data/public/javascripts/fckeditor/editor/lang/el.js +516 -0
  512. data/public/javascripts/fckeditor/editor/lang/en-au.js +516 -0
  513. data/public/javascripts/fckeditor/editor/lang/en-ca.js +516 -0
  514. data/public/javascripts/fckeditor/editor/lang/en-uk.js +516 -0
  515. data/public/javascripts/fckeditor/editor/lang/en.js +516 -0
  516. data/public/javascripts/fckeditor/editor/lang/eo.js +516 -0
  517. data/public/javascripts/fckeditor/editor/lang/es.js +516 -0
  518. data/public/javascripts/fckeditor/editor/lang/et.js +516 -0
  519. data/public/javascripts/fckeditor/editor/lang/eu.js +517 -0
  520. data/public/javascripts/fckeditor/editor/lang/fa.js +516 -0
  521. data/public/javascripts/fckeditor/editor/lang/fi.js +516 -0
  522. data/public/javascripts/fckeditor/editor/lang/fo.js +516 -0
  523. data/public/javascripts/fckeditor/editor/lang/fr.js +516 -0
  524. data/public/javascripts/fckeditor/editor/lang/gl.js +516 -0
  525. data/public/javascripts/fckeditor/editor/lang/he.js +516 -0
  526. data/public/javascripts/fckeditor/editor/lang/hi.js +516 -0
  527. data/public/javascripts/fckeditor/editor/lang/hr.js +516 -0
  528. data/public/javascripts/fckeditor/editor/lang/hu.js +516 -0
  529. data/public/javascripts/fckeditor/editor/lang/it.js +516 -0
  530. data/public/javascripts/fckeditor/editor/lang/ja.js +516 -0
  531. data/public/javascripts/fckeditor/editor/lang/km.js +516 -0
  532. data/public/javascripts/fckeditor/editor/lang/ko.js +516 -0
  533. data/public/javascripts/fckeditor/editor/lang/lt.js +516 -0
  534. data/public/javascripts/fckeditor/editor/lang/lv.js +516 -0
  535. data/public/javascripts/fckeditor/editor/lang/mn.js +516 -0
  536. data/public/javascripts/fckeditor/editor/lang/ms.js +516 -0
  537. data/public/javascripts/fckeditor/editor/lang/nb.js +516 -0
  538. data/public/javascripts/fckeditor/editor/lang/nl.js +516 -0
  539. data/public/javascripts/fckeditor/editor/lang/no.js +516 -0
  540. data/public/javascripts/fckeditor/editor/lang/pl.js +516 -0
  541. data/public/javascripts/fckeditor/editor/lang/pt-br.js +516 -0
  542. data/public/javascripts/fckeditor/editor/lang/pt.js +516 -0
  543. data/public/javascripts/fckeditor/editor/lang/ro.js +516 -0
  544. data/public/javascripts/fckeditor/editor/lang/ru.js +516 -0
  545. data/public/javascripts/fckeditor/editor/lang/sk.js +516 -0
  546. data/public/javascripts/fckeditor/editor/lang/sl.js +516 -0
  547. data/public/javascripts/fckeditor/editor/lang/sr-latn.js +516 -0
  548. data/public/javascripts/fckeditor/editor/lang/sr.js +516 -0
  549. data/public/javascripts/fckeditor/editor/lang/sv.js +516 -0
  550. data/public/javascripts/fckeditor/editor/lang/th.js +516 -0
  551. data/public/javascripts/fckeditor/editor/lang/tr.js +516 -0
  552. data/public/javascripts/fckeditor/editor/lang/uk.js +516 -0
  553. data/public/javascripts/fckeditor/editor/lang/vi.js +516 -0
  554. data/public/javascripts/fckeditor/editor/lang/zh-cn.js +516 -0
  555. data/public/javascripts/fckeditor/editor/lang/zh.js +516 -0
  556. data/public/javascripts/fckeditor/editor/plugins/autogrow/fckplugin.js +92 -0
  557. data/public/javascripts/fckeditor/editor/plugins/bbcode/_sample/sample.config.js +26 -0
  558. data/public/javascripts/fckeditor/editor/plugins/bbcode/_sample/sample.html +67 -0
  559. data/public/javascripts/fckeditor/editor/plugins/bbcode/fckplugin.js +123 -0
  560. data/public/javascripts/fckeditor/editor/plugins/dragresizetable/fckplugin.js +503 -0
  561. data/public/javascripts/fckeditor/editor/plugins/placeholder/fck_placeholder.html +100 -0
  562. data/public/javascripts/fckeditor/editor/plugins/placeholder/fckplugin.js +187 -0
  563. data/public/javascripts/fckeditor/editor/plugins/placeholder/lang/de.js +27 -0
  564. data/public/javascripts/fckeditor/editor/plugins/placeholder/lang/en.js +27 -0
  565. data/public/javascripts/fckeditor/editor/plugins/placeholder/lang/fr.js +27 -0
  566. data/public/javascripts/fckeditor/editor/plugins/placeholder/lang/it.js +27 -0
  567. data/public/javascripts/fckeditor/editor/plugins/placeholder/lang/pl.js +27 -0
  568. data/public/javascripts/fckeditor/editor/plugins/placeholder/placeholder.gif +0 -0
  569. data/public/javascripts/fckeditor/editor/plugins/simplecommands/fckplugin.js +29 -0
  570. data/public/javascripts/fckeditor/editor/plugins/tablecommands/fckplugin.js +33 -0
  571. data/public/javascripts/fckeditor/editor/skins/_fckviewstrips.html +121 -0
  572. data/public/javascripts/fckeditor/editor/skins/default/fck_dialog.css +139 -0
  573. data/public/javascripts/fckeditor/editor/skins/default/fck_editor.css +464 -0
  574. data/public/javascripts/fckeditor/editor/skins/default/fck_strip.gif +0 -0
  575. data/public/javascripts/fckeditor/editor/skins/default/images/toolbar.arrowright.gif +0 -0
  576. data/public/javascripts/fckeditor/editor/skins/default/images/toolbar.buttonarrow.gif +0 -0
  577. data/public/javascripts/fckeditor/editor/skins/default/images/toolbar.collapse.gif +0 -0
  578. data/{themes/standard_issue/images/spacer.gif → public/javascripts/fckeditor/editor/skins/default/images/toolbar.end.gif} +0 -0
  579. data/public/javascripts/fckeditor/editor/skins/default/images/toolbar.expand.gif +0 -0
  580. data/public/javascripts/fckeditor/editor/skins/default/images/toolbar.separator.gif +0 -0
  581. data/public/javascripts/fckeditor/editor/skins/default/images/toolbar.start.gif +0 -0
  582. data/public/javascripts/fckeditor/editor/skins/office2003/fck_dialog.css +140 -0
  583. data/public/javascripts/fckeditor/editor/skins/office2003/fck_editor.css +476 -0
  584. data/public/javascripts/fckeditor/editor/skins/office2003/fck_strip.gif +0 -0
  585. data/public/javascripts/fckeditor/editor/skins/office2003/images/toolbar.arrowright.gif +0 -0
  586. data/public/javascripts/fckeditor/editor/skins/office2003/images/toolbar.bg.gif +0 -0
  587. data/public/javascripts/fckeditor/editor/skins/office2003/images/toolbar.buttonarrow.gif +0 -0
  588. data/public/javascripts/fckeditor/editor/skins/office2003/images/toolbar.collapse.gif +0 -0
  589. data/public/javascripts/fckeditor/editor/skins/office2003/images/toolbar.end.gif +0 -0
  590. data/public/javascripts/fckeditor/editor/skins/office2003/images/toolbar.expand.gif +0 -0
  591. data/public/javascripts/fckeditor/editor/skins/office2003/images/toolbar.separator.gif +0 -0
  592. data/public/javascripts/fckeditor/editor/skins/office2003/images/toolbar.start.gif +0 -0
  593. data/public/javascripts/fckeditor/editor/skins/silver/fck_dialog.css +143 -0
  594. data/public/javascripts/fckeditor/editor/skins/silver/fck_editor.css +473 -0
  595. data/public/javascripts/fckeditor/editor/skins/silver/fck_strip.gif +0 -0
  596. data/public/javascripts/fckeditor/editor/skins/silver/images/toolbar.arrowright.gif +0 -0
  597. data/public/javascripts/fckeditor/editor/skins/silver/images/toolbar.buttonarrow.gif +0 -0
  598. data/public/javascripts/fckeditor/editor/skins/silver/images/toolbar.buttonbg.gif +0 -0
  599. data/public/javascripts/fckeditor/editor/skins/silver/images/toolbar.collapse.gif +0 -0
  600. data/public/javascripts/fckeditor/editor/skins/silver/images/toolbar.end.gif +0 -0
  601. data/public/javascripts/fckeditor/editor/skins/silver/images/toolbar.expand.gif +0 -0
  602. data/public/javascripts/fckeditor/editor/skins/silver/images/toolbar.separator.gif +0 -0
  603. data/public/javascripts/fckeditor/editor/skins/silver/images/toolbar.start.gif +0 -0
  604. data/public/javascripts/fckeditor/fckconfig.js +306 -0
  605. data/public/javascripts/fckeditor/fckeditor.afp +161 -0
  606. data/public/javascripts/fckeditor/fckeditor.asp +235 -0
  607. data/public/javascripts/fckeditor/fckeditor.cfc +273 -0
  608. data/public/javascripts/fckeditor/fckeditor.cfm +210 -0
  609. data/public/javascripts/fckeditor/fckeditor.js +212 -0
  610. data/public/javascripts/fckeditor/fckeditor.lasso +112 -0
  611. data/public/javascripts/fckeditor/fckeditor.py +162 -0
  612. data/public/javascripts/fckeditor/fckpackager.xml +262 -0
  613. data/public/javascripts/fckeditor/fckstyles.xml +114 -0
  614. data/public/javascripts/fckeditor/fcktemplates.xml +103 -0
  615. data/public/javascripts/fckeditor/license.txt +1247 -0
  616. data/public/javascripts/lang/default.js +21 -0
  617. data/public/javascripts/lang/fr_FR.js +21 -0
  618. data/public/javascripts/lightbox.js +169 -315
  619. data/public/javascripts/prototype.js +2817 -1107
  620. data/public/javascripts/typo.js +51 -11
  621. data/public/stylesheets/administration.css +170 -94
  622. data/public/stylesheets/lightbox.css +59 -19
  623. data/public/stylesheets/typo_code.css +62 -0
  624. data/public/stylesheets/user-styles.css +16 -0
  625. data/spec/controllers/accounts_controller_spec.rb +2 -7
  626. data/spec/controllers/admin/article_preview_spec.rb +20 -0
  627. data/spec/controllers/admin/blacklist_controller_spec.rb +59 -0
  628. data/spec/controllers/admin/categories_controller_spec.rb +97 -0
  629. data/spec/controllers/admin/comments_controller_spec.rb +74 -0
  630. data/spec/controllers/admin/content_controller_spec.rb +212 -0
  631. data/spec/controllers/admin/feedback_controller_spec.rb +45 -0
  632. data/spec/controllers/admin/pages_controller_spec.rb +83 -0
  633. data/spec/controllers/admin/profiles_controller_spec.rb +13 -0
  634. data/spec/controllers/admin/resources_controller_spec.rb +46 -0
  635. data/spec/controllers/admin/settings_controller_spec.rb +22 -0
  636. data/spec/controllers/admin/textfilters_controller_spec.rb +24 -0
  637. data/spec/controllers/admin/themes_controller_spec.rb +30 -0
  638. data/spec/controllers/admin/trackbacks_controller_spec.rb +57 -0
  639. data/spec/controllers/admin/users_controller_spec.rb +65 -0
  640. data/spec/controllers/articles_controller_spec.rb +4 -8
  641. data/spec/controllers/authors_controller_spec.rb +2 -2
  642. data/spec/controllers/backend_controller_spec.rb +318 -0
  643. data/spec/controllers/categories_controller_spec.rb +2 -2
  644. data/spec/controllers/comments_controller_spec.rb +8 -20
  645. data/spec/controllers/redirect_controller_spec.rb +35 -0
  646. data/spec/controllers/tags_controller_spec.rb +2 -2
  647. data/spec/controllers/textfilter_controller_spec.rb +264 -0
  648. data/spec/controllers/theme_controller_spec.rb +43 -0
  649. data/spec/controllers/xml_controller_spec.rb +232 -0
  650. data/spec/models/article_closing_spec.rb +38 -0
  651. data/spec/models/article_spec.rb +285 -9
  652. data/spec/models/blacklist_pattern_spec.rb +12 -0
  653. data/spec/models/blog_spec.rb +10 -4
  654. data/spec/models/cache_support_spec.rb +0 -4
  655. data/spec/models/category_spec.rb +1 -5
  656. data/spec/models/comment_spec.rb +186 -0
  657. data/spec/models/configuration_spec.rb +7 -9
  658. data/spec/models/content_state/feedback_states_spec.rb +64 -0
  659. data/spec/models/notification_spec.rb +8 -0
  660. data/spec/models/page_spec.rb +2 -10
  661. data/spec/models/ping_pinger_spec.rb +33 -0
  662. data/spec/models/ping_spec.rb +2 -9
  663. data/spec/models/resource_spec.rb +0 -2
  664. data/spec/models/route_cache_spec.rb +11 -0
  665. data/spec/models/sidebar_spec.rb +7 -0
  666. data/spec/models/tag_spec.rb +19 -8
  667. data/spec/models/theme_spec.rb +6 -7
  668. data/spec/models/trackback_spec.rb +1 -1
  669. data/spec/models/trigger_spec.rb +0 -2
  670. data/spec/models/typo_deprecated_spec.rb +18 -0
  671. data/spec/models/url_policy_spec.rb +65 -0
  672. data/spec/models/user_spec.rb +9 -4
  673. data/spec/spec.opts +2 -5
  674. data/spec/spec_helper.rb +5 -2
  675. data/spec/views/comments/html_sanitization_spec.rb +0 -14
  676. data/test/fixtures/blacklist_patterns.yml +1 -3
  677. data/test/fixtures/blogs.yml +2 -44
  678. data/test/fixtures/categories.yml +0 -6
  679. data/test/fixtures/categorizations.yml +17 -17
  680. data/test/fixtures/contents.yml +15 -53
  681. data/test/fixtures/feedback.yml +11 -31
  682. data/test/fixtures/profiles.yml +9 -0
  683. data/test/fixtures/redirects.yml +0 -3
  684. data/test/fixtures/resources.yml +3 -6
  685. data/test/fixtures/sidebars.yml +0 -2
  686. data/test/fixtures/tags.yml +3 -6
  687. data/test/fixtures/text_filters.yml +1 -6
  688. data/test/fixtures/users.yml +0 -10
  689. data/test/mocks/themes/typographic/.DS_Store +0 -0
  690. data/test/mocks/themes/typographic/about.markdown +7 -0
  691. data/test/mocks/themes/typographic/images/Thumbs.db +0 -0
  692. data/test/mocks/themes/typographic/images/accept.png +0 -0
  693. data/test/mocks/themes/typographic/images/accept50.png +0 -0
  694. data/test/mocks/themes/typographic/images/bg_body.jpg +0 -0
  695. data/test/mocks/themes/typographic/images/bg_white.png +0 -0
  696. data/test/mocks/themes/typographic/images/bg_wrapper.jpg +0 -0
  697. data/test/mocks/themes/typographic/images/bullet_bottom.png +0 -0
  698. data/test/mocks/themes/typographic/images/bullet_right.png +0 -0
  699. data/test/mocks/themes/typographic/images/email_open.png +0 -0
  700. data/test/mocks/themes/typographic/images/email_open50.png +0 -0
  701. data/test/mocks/themes/typographic/images/meta.png +0 -0
  702. data/test/mocks/themes/typographic/images/page_edit.png +0 -0
  703. data/test/mocks/themes/typographic/images/page_edit50.png +0 -0
  704. data/test/mocks/themes/typographic/images/tag.png +0 -0
  705. data/test/mocks/themes/typographic/images/user.png +0 -0
  706. data/test/mocks/themes/typographic/images/user50.png +0 -0
  707. data/test/mocks/themes/typographic/images/world_link.png +0 -0
  708. data/test/mocks/themes/typographic/images/world_link50.png +0 -0
  709. data/test/mocks/themes/typographic/layouts/default.html.erb +42 -0
  710. data/test/mocks/themes/typographic/preview.png +0 -0
  711. data/test/mocks/themes/typographic/stylesheets/colors.css +51 -0
  712. data/test/mocks/themes/typographic/stylesheets/layout.css +346 -0
  713. data/test/mocks/themes/typographic/stylesheets/reset.css +5 -0
  714. data/test/mocks/themes/typographic/stylesheets/style.css +36 -0
  715. data/test/mocks/themes/typographic/views/articles/_article.html.erb +41 -0
  716. data/test/mocks/themes/typographic/views/articles/_comment.html.erb +14 -0
  717. data/test/mocks/themes/typographic/views/articles/_comment_form.html.erb +48 -0
  718. data/test/mocks/themes/typographic/views/articles/_comment_list.html.erb +7 -0
  719. data/test/mocks/themes/typographic/views/articles/_trackback.html.erb +9 -0
  720. data/test/mocks/themes/typographic/views/articles/comment_preview.html.erb +10 -0
  721. data/test/mocks/themes/typographic/views/articles/index.html.erb +5 -0
  722. data/test/mocks/themes/typographic/views/articles/read.html.erb +42 -0
  723. data/test/mocks/themes/typographic/views/shared/_search.html.erb +17 -0
  724. data/test/mocks/themes/typographic/views/theme/static_view_test.html.erb +1 -0
  725. data/test/test_helper.rb +4 -0
  726. data/themes/scribbish/layouts/default.html.erb +4 -2
  727. data/themes/scribbish/stylesheets/content.css +1 -0
  728. data/themes/scribbish/views/articles/_article.html.erb +6 -6
  729. data/themes/scribbish/views/articles/_comment.html.erb +1 -1
  730. data/themes/scribbish/views/articles/_comment_form.html.erb +10 -10
  731. data/themes/scribbish/views/articles/_comment_list.html.erb +1 -1
  732. data/themes/scribbish/views/articles/_trackback.html.erb +1 -1
  733. data/themes/scribbish/views/articles/comment_preview.html.erb +1 -1
  734. data/themes/scribbish/views/articles/index.html.erb +1 -1
  735. data/themes/scribbish/views/articles/read.html.erb +4 -4
  736. data/themes/scribbish/views/shared/_search.html.erb +1 -1
  737. data/themes/typographic/.DS_Store +0 -0
  738. data/themes/typographic/about.markdown +7 -0
  739. data/themes/typographic/images/accept.png +0 -0
  740. data/themes/typographic/images/accept50.png +0 -0
  741. data/themes/typographic/images/bg_body.jpg +0 -0
  742. data/themes/typographic/images/bg_white.png +0 -0
  743. data/themes/typographic/images/bg_wrapper.jpg +0 -0
  744. data/themes/typographic/images/bullet_bottom.png +0 -0
  745. data/themes/typographic/images/bullet_right.png +0 -0
  746. data/themes/typographic/images/email_open.png +0 -0
  747. data/themes/typographic/images/email_open50.png +0 -0
  748. data/themes/typographic/images/meta.png +0 -0
  749. data/themes/typographic/images/page_edit.png +0 -0
  750. data/themes/typographic/images/page_edit50.png +0 -0
  751. data/themes/typographic/images/tag.png +0 -0
  752. data/themes/typographic/images/user.png +0 -0
  753. data/themes/typographic/images/user50.png +0 -0
  754. data/themes/typographic/images/world_link.png +0 -0
  755. data/themes/typographic/images/world_link50.png +0 -0
  756. data/themes/typographic/layouts/default.html.erb +42 -0
  757. data/themes/typographic/preview.png +0 -0
  758. data/themes/typographic/stylesheets/colors.css +51 -0
  759. data/themes/typographic/stylesheets/layout.css +346 -0
  760. data/themes/typographic/stylesheets/reset.css +5 -0
  761. data/themes/typographic/stylesheets/style.css +36 -0
  762. data/themes/typographic/views/articles/_article.html.erb +41 -0
  763. data/themes/typographic/views/articles/_comment.html.erb +14 -0
  764. data/themes/typographic/views/articles/_comment_form.html.erb +48 -0
  765. data/themes/typographic/views/articles/_comment_list.html.erb +7 -0
  766. data/themes/typographic/views/articles/_trackback.html.erb +9 -0
  767. data/themes/typographic/views/articles/comment_preview.html.erb +10 -0
  768. data/themes/typographic/views/articles/index.html.erb +5 -0
  769. data/themes/typographic/views/articles/read.html.erb +42 -0
  770. data/themes/typographic/views/shared/_search.html.erb +17 -0
  771. data/themes/typographic/views/theme/static_view_test.html.erb +1 -0
  772. data/themes/typographic2/.DS_Store +0 -0
  773. data/themes/typographic2/about.markdown +7 -0
  774. data/themes/typographic2/images/Thumbs.db +0 -0
  775. data/themes/typographic2/images/accept.png +0 -0
  776. data/themes/typographic2/images/accept50.png +0 -0
  777. data/themes/typographic2/images/bg_body.jpg +0 -0
  778. data/themes/typographic2/images/bg_white.png +0 -0
  779. data/themes/typographic2/images/bg_wrapper.jpg +0 -0
  780. data/themes/typographic2/images/bullet_bottom.png +0 -0
  781. data/themes/typographic2/images/bullet_right.png +0 -0
  782. data/themes/typographic2/images/email_open.png +0 -0
  783. data/themes/typographic2/images/email_open50.png +0 -0
  784. data/themes/typographic2/images/meta.png +0 -0
  785. data/themes/typographic2/images/page_edit.png +0 -0
  786. data/themes/typographic2/images/page_edit50.png +0 -0
  787. data/themes/typographic2/images/tag.png +0 -0
  788. data/themes/typographic2/images/user.png +0 -0
  789. data/themes/typographic2/images/user50.png +0 -0
  790. data/themes/typographic2/images/world_link.png +0 -0
  791. data/themes/typographic2/images/world_link50.png +0 -0
  792. data/themes/typographic2/layouts/default.html.erb +42 -0
  793. data/themes/typographic2/preview.png +0 -0
  794. data/themes/typographic2/stylesheets/colors.css +51 -0
  795. data/themes/typographic2/stylesheets/layout.css +346 -0
  796. data/themes/typographic2/stylesheets/reset.css +5 -0
  797. data/themes/typographic2/stylesheets/style.css +36 -0
  798. data/themes/typographic2/views/articles/_article.html.erb +41 -0
  799. data/themes/typographic2/views/articles/_comment.html.erb +14 -0
  800. data/themes/typographic2/views/articles/_comment_form.html.erb +48 -0
  801. data/themes/typographic2/views/articles/_comment_list.html.erb +7 -0
  802. data/themes/typographic2/views/articles/_trackback.html.erb +9 -0
  803. data/themes/typographic2/views/articles/comment_preview.html.erb +10 -0
  804. data/themes/typographic2/views/articles/index.html.erb +5 -0
  805. data/themes/typographic2/views/articles/read.html.erb +42 -0
  806. data/themes/typographic2/views/shared/_search.html.erb +17 -0
  807. data/themes/{standard_issue → typographic2}/views/theme/static_view_test.html.erb +0 -0
  808. data/vendor/plugins/archives_sidebar/lib/archives_sidebar.rb +1 -1
  809. data/vendor/plugins/auto_complete/README +23 -0
  810. data/vendor/plugins/auto_complete/Rakefile +22 -0
  811. data/vendor/plugins/auto_complete/init.rb +2 -0
  812. data/vendor/plugins/auto_complete/lib/auto_complete.rb +47 -0
  813. data/vendor/plugins/auto_complete/lib/auto_complete_macros_helper.rb +143 -0
  814. data/vendor/plugins/auto_complete/test/auto_complete_test.rb +67 -0
  815. data/vendor/plugins/datestamped_resources/lib/datestamped_resources.rb +2 -1
  816. data/vendor/plugins/fckeditor/CHANGELOG +3 -0
  817. data/vendor/plugins/fckeditor/README +125 -0
  818. data/vendor/plugins/fckeditor/Rakefile +72 -0
  819. data/vendor/plugins/fckeditor/app/controllers/fckeditor_controller.rb +158 -0
  820. data/vendor/plugins/fckeditor/app/helpers/fckeditor_helper.rb +4 -0
  821. data/vendor/plugins/fckeditor/app/views/fckeditor/spell_check.rhtml +52 -0
  822. data/vendor/plugins/fckeditor/init.rb +35 -0
  823. data/vendor/plugins/fckeditor/install.rb +12 -0
  824. data/vendor/plugins/fckeditor/lib/fckeditor.rb +101 -0
  825. data/vendor/plugins/fckeditor/lib/fckeditor_file_utils.rb +81 -0
  826. data/vendor/plugins/fckeditor/lib/fckeditor_spell_check.rb +43 -0
  827. data/vendor/plugins/fckeditor/lib/fckeditor_version.rb +9 -0
  828. data/vendor/plugins/fckeditor/tasks/fckeditor_tasks.rake +97 -0
  829. data/vendor/plugins/rspec/.autotest +3 -0
  830. data/vendor/plugins/rspec/CHANGES +33 -1
  831. data/vendor/plugins/rspec/README +2 -3
  832. data/vendor/plugins/rspec/Rakefile +7 -5
  833. data/vendor/plugins/rspec/bin/spec +1 -0
  834. data/vendor/plugins/rspec/examples/pure/helper_method_example.rb +9 -6
  835. data/vendor/plugins/rspec/failing_examples/README.txt +7 -0
  836. data/vendor/plugins/rspec/failing_examples/failing_autogenerated_docstrings_example.rb +19 -0
  837. data/vendor/plugins/rspec/lib/autotest/rspec.rb +36 -56
  838. data/vendor/plugins/rspec/lib/spec.rb +0 -7
  839. data/vendor/plugins/rspec/lib/spec/example/example_group_methods.rb +10 -4
  840. data/vendor/plugins/rspec/lib/spec/example/example_methods.rb +13 -8
  841. data/vendor/plugins/rspec/lib/spec/interop/test.rb +3 -1
  842. data/vendor/plugins/rspec/lib/spec/interop/test/unit/ui/console/testrunner.rb +1 -0
  843. data/vendor/plugins/rspec/lib/spec/matchers.rb +1 -7
  844. data/vendor/plugins/rspec/lib/spec/matchers/be.rb +3 -2
  845. data/vendor/plugins/rspec/lib/spec/matchers/have.rb +3 -0
  846. data/vendor/plugins/rspec/lib/spec/matchers/raise_error.rb +19 -15
  847. data/vendor/plugins/rspec/lib/spec/mocks/message_expectation.rb +10 -3
  848. data/vendor/plugins/rspec/lib/spec/runner.rb +14 -0
  849. data/vendor/plugins/rspec/lib/spec/runner/formatter/story/html_formatter.rb +6 -2
  850. data/vendor/plugins/rspec/lib/spec/runner/formatter/story/plain_text_formatter.rb +15 -7
  851. data/vendor/plugins/rspec/lib/spec/runner/option_parser.rb +5 -33
  852. data/vendor/plugins/rspec/lib/spec/runner/options.rb +51 -18
  853. data/vendor/plugins/rspec/lib/spec/runner/spec_parser.rb +49 -31
  854. data/vendor/plugins/rspec/lib/spec/story/extensions.rb +2 -0
  855. data/vendor/plugins/rspec/lib/spec/story/extensions/regexp.rb +9 -0
  856. data/vendor/plugins/rspec/lib/spec/story/extensions/string.rb +9 -0
  857. data/vendor/plugins/rspec/lib/spec/story/runner.rb +0 -2
  858. data/vendor/plugins/rspec/lib/spec/story/runner/story_parser.rb +8 -8
  859. data/vendor/plugins/rspec/lib/spec/story/runner/story_runner.rb +2 -1
  860. data/vendor/plugins/rspec/lib/spec/story/step.rb +18 -8
  861. data/vendor/plugins/rspec/lib/spec/story/world.rb +1 -0
  862. data/vendor/plugins/rspec/lib/spec/version.rb +22 -22
  863. data/vendor/plugins/rspec/pre_commit/lib/pre_commit.rb +4 -0
  864. data/vendor/plugins/rspec/pre_commit/lib/pre_commit/core.rb +50 -0
  865. data/vendor/plugins/rspec/pre_commit/lib/pre_commit/pre_commit.rb +54 -0
  866. data/vendor/plugins/rspec/pre_commit/lib/pre_commit/rspec.rb +111 -0
  867. data/vendor/plugins/rspec/pre_commit/lib/pre_commit/rspec_on_rails.rb +313 -0
  868. data/vendor/plugins/rspec/pre_commit/spec/pre_commit/pre_commit_spec.rb +15 -0
  869. data/vendor/plugins/rspec/pre_commit/spec/pre_commit/rspec_on_rails_spec.rb +36 -0
  870. data/vendor/plugins/rspec/pre_commit/spec/spec_helper.rb +3 -0
  871. data/vendor/plugins/rspec/pre_commit/spec/spec_suite.rb +11 -0
  872. data/vendor/plugins/rspec/report.html +4358 -0
  873. data/vendor/plugins/rspec/spec/README.jruby +1 -0
  874. data/vendor/plugins/rspec/spec/autotest/rspec_spec.rb +15 -84
  875. data/vendor/plugins/rspec/spec/autotest_helper.rb +2 -1
  876. data/vendor/plugins/rspec/spec/autotest_matchers.rb +47 -0
  877. data/vendor/plugins/rspec/spec/rspec_suite.rb +1 -1
  878. data/vendor/plugins/rspec/{spec.opts → spec/spec.opts} +0 -0
  879. data/vendor/plugins/rspec/spec/spec/example/example_group_methods_spec.rb +11 -2
  880. data/vendor/plugins/rspec/spec/spec/example/example_methods_spec.rb +70 -41
  881. data/vendor/plugins/rspec/spec/spec/interop/test/unit/resources/spec_that_fails.rb +10 -0
  882. data/vendor/plugins/rspec/spec/spec/interop/test/unit/resources/spec_that_passes.rb +10 -0
  883. data/vendor/plugins/rspec/spec/spec/interop/test/unit/resources/spec_with_errors.rb +10 -0
  884. data/vendor/plugins/rspec/spec/spec/interop/test/unit/resources/test_case_that_fails.rb +10 -0
  885. data/vendor/plugins/rspec/spec/spec/interop/test/unit/resources/test_case_that_passes.rb +10 -0
  886. data/vendor/plugins/rspec/spec/spec/interop/test/unit/resources/test_case_with_errors.rb +10 -0
  887. data/vendor/plugins/rspec/spec/spec/interop/test/unit/resources/testsuite_adapter_spec_with_test_unit.rb +38 -0
  888. data/vendor/plugins/rspec/spec/spec/interop/test/unit/spec_spec.rb +45 -0
  889. data/vendor/plugins/rspec/spec/spec/interop/test/unit/test_unit_spec_helper.rb +1 -1
  890. data/vendor/plugins/rspec/spec/spec/interop/test/unit/testcase_spec.rb +40 -5
  891. data/vendor/plugins/rspec/spec/spec/interop/test/unit/testsuite_adapter_spec.rb +2 -2
  892. data/vendor/plugins/rspec/spec/spec/matchers/have_spec.rb +19 -0
  893. data/vendor/plugins/rspec/spec/spec/matchers/match_spec.rb +3 -3
  894. data/vendor/plugins/rspec/spec/spec/matchers/raise_error_spec.rb +7 -1
  895. data/vendor/plugins/rspec/spec/spec/mocks/bug_report_10263.rb +1 -1
  896. data/vendor/plugins/rspec/spec/spec/runner/command_line_spec.rb +3 -2
  897. data/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatted-1.8.6-jruby.html +381 -0
  898. data/vendor/plugins/rspec/spec/spec/runner/formatter/story/html_formatter_spec.rb +5 -0
  899. data/vendor/plugins/rspec/spec/spec/runner/formatter/story/plain_text_formatter_spec.rb +97 -51
  900. data/vendor/plugins/rspec/spec/spec/runner/option_parser_spec.rb +50 -49
  901. data/vendor/plugins/rspec/spec/spec/runner/options_spec.rb +72 -2
  902. data/vendor/plugins/rspec/spec/spec/runner/resources/a_bar.rb +0 -0
  903. data/vendor/plugins/rspec/spec/spec/runner/resources/a_foo.rb +0 -0
  904. data/vendor/plugins/rspec/spec/spec/runner/resources/a_spec.rb +1 -0
  905. data/vendor/plugins/rspec/spec/spec/runner/spec_parser/spec_parser_fixture.rb +70 -0
  906. data/vendor/plugins/rspec/spec/spec/runner/spec_parser_spec.rb +31 -76
  907. data/vendor/plugins/rspec/spec/spec/spec_classes.rb +7 -0
  908. data/vendor/plugins/rspec/spec/spec/story/runner/story_runner_spec.rb +37 -0
  909. data/vendor/plugins/rspec/spec/spec/story/step_spec.rb +53 -0
  910. data/vendor/plugins/rspec/spec/spec/story/world_spec.rb +7 -0
  911. data/vendor/plugins/rspec/stories/example_groups/autogenerated_docstrings +27 -8
  912. data/vendor/plugins/rspec/stories/example_groups/output +5 -0
  913. data/vendor/plugins/rspec/stories/interop/test_case_with_should_methods +1 -1
  914. data/vendor/plugins/rspec/stories/resources/stories/failing_story.rb +15 -0
  915. data/vendor/plugins/rspec_on_rails/generators/rspec/templates/spec.opts +0 -1
  916. data/vendor/plugins/rspec_on_rails/generators/rspec_controller/rspec_controller_generator.rb +1 -2
  917. data/vendor/plugins/rspec_on_rails/generators/rspec_scaffold/rspec_scaffold_generator.rb +1 -3
  918. data/vendor/plugins/rspec_on_rails/lib/autotest/discover.rb +1 -0
  919. data/vendor/plugins/rspec_on_rails/lib/autotest/rails_rspec.rb +47 -47
  920. data/vendor/plugins/rspec_on_rails/lib/spec/rails/example/controller_example_group.rb +14 -4
  921. data/vendor/plugins/rspec_on_rails/lib/spec/rails/example/functional_example_group.rb +4 -4
  922. data/vendor/plugins/rspec_on_rails/lib/spec/rails/example/helper_example_group.rb +0 -1
  923. data/vendor/plugins/rspec_on_rails/lib/spec/rails/example/rails_example_group.rb +8 -0
  924. data/vendor/plugins/rspec_on_rails/lib/spec/rails/example/view_example_group.rb +4 -5
  925. data/vendor/plugins/rspec_on_rails/lib/spec/rails/matchers/have_text.rb +2 -2
  926. data/vendor/plugins/rspec_on_rails/lib/spec/rails/matchers/render_template.rb +4 -0
  927. data/vendor/plugins/rspec_on_rails/lib/spec/rails/version.rb +23 -23
  928. data/vendor/plugins/rspec_on_rails/spec/rails/autotest/mappings_spec.rb +14 -17
  929. data/vendor/plugins/rspec_on_rails/spec/rails/example/controller_spec_spec.rb +13 -0
  930. data/vendor/plugins/rspec_on_rails/spec/rails/example/view_spec_spec.rb +15 -1
  931. data/vendor/plugins/rspec_on_rails/spec/rails/extensions/action_view_base_spec.rb +37 -26
  932. data/vendor/plugins/rspec_on_rails/spec/rails/matchers/have_text_spec.rb +62 -0
  933. data/vendor/plugins/rspec_on_rails/spec/rails/matchers/render_spec.rb +73 -36
  934. data/vendor/plugins/rspec_on_rails/spec_resources/controllers/controller_spec_controller.rb +9 -1
  935. data/vendor/plugins/rspec_on_rails/spec_resources/controllers/render_spec_controller.rb +4 -0
  936. data/vendor/plugins/rspec_on_rails/stories/all.rb +4 -0
  937. data/vendor/plugins/rspec_on_rails/tasks/rspec.rake +10 -8
  938. data/vendor/plugins/static_sidebar/lib/static_sidebar.rb +4 -8
  939. data/vendor/plugins/typo_converter/README +71 -0
  940. data/vendor/plugins/typo_converter/Rakefile +22 -0
  941. data/vendor/plugins/typo_converter/init.rb +8 -0
  942. data/vendor/plugins/typo_converter/lib/converters/base.rb +249 -0
  943. data/vendor/plugins/typo_converter/lib/converters/dotclear.rb +98 -0
  944. data/vendor/plugins/typo_converter/lib/converters/dotclear/category.rb +7 -0
  945. data/vendor/plugins/typo_converter/lib/converters/dotclear/comment.rb +8 -0
  946. data/vendor/plugins/typo_converter/lib/converters/dotclear/post.rb +9 -0
  947. data/vendor/plugins/typo_converter/lib/converters/dotclear/user.rb +8 -0
  948. data/vendor/plugins/typo_converter/lib/converters/dotclear_2.rb +122 -0
  949. data/vendor/plugins/typo_converter/lib/converters/dotclear_2/category.rb +11 -0
  950. data/vendor/plugins/typo_converter/lib/converters/dotclear_2/comment.rb +13 -0
  951. data/vendor/plugins/typo_converter/lib/converters/dotclear_2/post.rb +15 -0
  952. data/vendor/plugins/typo_converter/lib/converters/dotclear_2/tag.rb +13 -0
  953. data/vendor/plugins/typo_converter/lib/converters/dotclear_2/user.rb +13 -0
  954. data/vendor/plugins/typo_converter/lib/converters/wp25.rb +128 -0
  955. data/vendor/plugins/typo_converter/lib/converters/wp25/comment.rb +12 -0
  956. data/vendor/plugins/typo_converter/lib/converters/wp25/post.rb +37 -0
  957. data/vendor/plugins/typo_converter/lib/converters/wp25/term.rb +11 -0
  958. data/vendor/plugins/typo_converter/lib/converters/wp25/term_relationship.rb +13 -0
  959. data/vendor/plugins/typo_converter/lib/converters/wp25/term_taxonomy.rb +19 -0
  960. data/vendor/plugins/typo_converter/lib/converters/wp25/user.rb +12 -0
  961. data/vendor/plugins/typo_converter/tasks/typo_converters_tasks.rake +4 -0
  962. data/vendor/plugins/typo_login_system/init.rb +2 -0
  963. data/vendor/plugins/typo_login_system/lib/access_control.rb +159 -0
  964. data/vendor/plugins/typo_login_system/lib/login_system.rb +90 -0
  965. data/vendor/plugins/xml_sidebar/lib/xml_sidebar.rb +1 -1
  966. metadata +823 -527
  967. data/CHANGES-5.0 +0 -82
  968. data/TODO.MULTIUSERS +0 -45
  969. data/app/views/admin/advanced/index.html.erb +0 -20
  970. data/app/views/admin/blacklist/list.html.erb +0 -13
  971. data/app/views/admin/cache/list.html.erb +0 -8
  972. data/app/views/admin/categories/list.html.erb +0 -18
  973. data/app/views/admin/categories/show.html.erb +0 -37
  974. data/app/views/admin/comments/comments.html.erb +0 -4
  975. data/app/views/admin/comments/list.html.erb +0 -37
  976. data/app/views/admin/comments/new.html.erb +0 -19
  977. data/app/views/admin/content/_show_categories.html.erb +0 -9
  978. data/app/views/admin/content/list.html.erb +0 -21
  979. data/app/views/admin/content/preview.html.erb +0 -10
  980. data/app/views/admin/feedback/list.html.erb +0 -48
  981. data/app/views/admin/pages/list.html.erb +0 -12
  982. data/app/views/admin/pages/preview.html.erb +0 -1
  983. data/app/views/admin/resources/list.html.erb +0 -17
  984. data/app/views/admin/textfilters/list.html.erb +0 -16
  985. data/app/views/admin/trackbacks/list.html.erb +0 -31
  986. data/app/views/admin/trackbacks/new.html.erb +0 -15
  987. data/app/views/admin/users/list.html.erb +0 -32
  988. data/app/views/admin/users/show.html.erb +0 -23
  989. data/app/views/layouts/minimal.html.erb +0 -145
  990. data/db/converters/wordpress.rb +0 -187
  991. data/db/converters/wordpress2.rb +0 -291
  992. data/lib/jabber_notify.rb +0 -37
  993. data/lib/login_system.rb +0 -85
  994. data/lib/tasks/rcov.rake +0 -38
  995. data/public/images/admin/bgdivider.gif +0 -0
  996. data/public/images/admin/bgoff2.png +0 -0
  997. data/public/images/admin/bgon.png +0 -0
  998. data/public/images/admin/foot.jpg +0 -0
  999. data/public/images/admin/table-header-last.png +0 -0
  1000. data/public/images/admin/table-header.png +0 -0
  1001. data/public/images/admin/top.gif +0 -0
  1002. data/public/images/admin/typo.gif +0 -0
  1003. data/public/images/admin/typologo.png +0 -0
  1004. data/public/images/bracket.gif +0 -0
  1005. data/public/images/header.jpg +0 -0
  1006. data/public/images/loading.gif +0 -0
  1007. data/public/javascripts/tiny_mce/langs/en.js +0 -154
  1008. data/public/javascripts/tiny_mce/license.txt +0 -504
  1009. data/public/javascripts/tiny_mce/plugins/advimage/css/advimage.css +0 -13
  1010. data/public/javascripts/tiny_mce/plugins/advimage/editor_plugin.js +0 -1
  1011. data/public/javascripts/tiny_mce/plugins/advimage/editor_plugin_src.js +0 -49
  1012. data/public/javascripts/tiny_mce/plugins/advimage/image.htm +0 -237
  1013. data/public/javascripts/tiny_mce/plugins/advimage/img/sample.gif +0 -0
  1014. data/public/javascripts/tiny_mce/plugins/advimage/js/image.js +0 -403
  1015. data/public/javascripts/tiny_mce/plugins/advimage/langs/en_dlg.js +0 -43
  1016. data/public/javascripts/tiny_mce/plugins/advlink/css/advlink.css +0 -8
  1017. data/public/javascripts/tiny_mce/plugins/advlink/editor_plugin.js +0 -1
  1018. data/public/javascripts/tiny_mce/plugins/advlink/editor_plugin_src.js +0 -58
  1019. data/public/javascripts/tiny_mce/plugins/advlink/js/advlink.js +0 -551
  1020. data/public/javascripts/tiny_mce/plugins/advlink/langs/en_dlg.js +0 -52
  1021. data/public/javascripts/tiny_mce/plugins/advlink/link.htm +0 -339
  1022. data/public/javascripts/tiny_mce/plugins/autosave/editor_plugin.js +0 -1
  1023. data/public/javascripts/tiny_mce/plugins/autosave/editor_plugin_src.js +0 -51
  1024. data/public/javascripts/tiny_mce/plugins/contextmenu/editor_plugin.js +0 -1
  1025. data/public/javascripts/tiny_mce/plugins/contextmenu/editor_plugin_src.js +0 -84
  1026. data/public/javascripts/tiny_mce/plugins/emotions/editor_plugin.js +0 -1
  1027. data/public/javascripts/tiny_mce/plugins/emotions/editor_plugin_src.js +0 -40
  1028. data/public/javascripts/tiny_mce/plugins/emotions/emotions.htm +0 -41
  1029. data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-cool.gif +0 -0
  1030. data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-cry.gif +0 -0
  1031. data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-embarassed.gif +0 -0
  1032. data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-foot-in-mouth.gif +0 -0
  1033. data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-frown.gif +0 -0
  1034. data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-innocent.gif +0 -0
  1035. data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-kiss.gif +0 -0
  1036. data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-laughing.gif +0 -0
  1037. data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-money-mouth.gif +0 -0
  1038. data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-sealed.gif +0 -0
  1039. data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-smile.gif +0 -0
  1040. data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-surprised.gif +0 -0
  1041. data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-tongue-out.gif +0 -0
  1042. data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-undecided.gif +0 -0
  1043. data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-wink.gif +0 -0
  1044. data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-yell.gif +0 -0
  1045. data/public/javascripts/tiny_mce/plugins/emotions/js/emotions.js +0 -22
  1046. data/public/javascripts/tiny_mce/plugins/emotions/langs/en_dlg.js +0 -20
  1047. data/public/javascripts/tiny_mce/plugins/media/css/content.css +0 -6
  1048. data/public/javascripts/tiny_mce/plugins/media/css/media.css +0 -68
  1049. data/public/javascripts/tiny_mce/plugins/media/editor_plugin.js +0 -1
  1050. data/public/javascripts/tiny_mce/plugins/media/editor_plugin_src.js +0 -323
  1051. data/public/javascripts/tiny_mce/plugins/media/img/flash.gif +0 -0
  1052. data/public/javascripts/tiny_mce/plugins/media/img/flv_player.swf +0 -0
  1053. data/public/javascripts/tiny_mce/plugins/media/img/quicktime.gif +0 -0
  1054. data/public/javascripts/tiny_mce/plugins/media/img/realmedia.gif +0 -0
  1055. data/public/javascripts/tiny_mce/plugins/media/img/shockwave.gif +0 -0
  1056. data/public/javascripts/tiny_mce/plugins/media/img/trans.gif +0 -0
  1057. data/public/javascripts/tiny_mce/plugins/media/img/windowsmedia.gif +0 -0
  1058. data/public/javascripts/tiny_mce/plugins/media/js/embed.js +0 -73
  1059. data/public/javascripts/tiny_mce/plugins/media/js/media.js +0 -616
  1060. data/public/javascripts/tiny_mce/plugins/media/langs/en_dlg.js +0 -103
  1061. data/public/javascripts/tiny_mce/plugins/media/media.htm +0 -823
  1062. data/public/javascripts/tiny_mce/plugins/nonbreaking/editor_plugin.js +0 -1
  1063. data/public/javascripts/tiny_mce/plugins/nonbreaking/editor_plugin_src.js +0 -50
  1064. data/public/javascripts/tiny_mce/plugins/paste/blank.htm +0 -22
  1065. data/public/javascripts/tiny_mce/plugins/paste/css/blank.css +0 -14
  1066. data/public/javascripts/tiny_mce/plugins/paste/css/pasteword.css +0 -3
  1067. data/public/javascripts/tiny_mce/plugins/paste/editor_plugin.js +0 -1
  1068. data/public/javascripts/tiny_mce/plugins/paste/editor_plugin_src.js +0 -382
  1069. data/public/javascripts/tiny_mce/plugins/paste/js/pastetext.js +0 -42
  1070. data/public/javascripts/tiny_mce/plugins/paste/js/pasteword.js +0 -56
  1071. data/public/javascripts/tiny_mce/plugins/paste/langs/en_dlg.js +0 -5
  1072. data/public/javascripts/tiny_mce/plugins/paste/pastetext.htm +0 -34
  1073. data/public/javascripts/tiny_mce/plugins/paste/pasteword.htm +0 -29
  1074. data/public/javascripts/tiny_mce/plugins/safari/blank.htm +0 -1
  1075. data/public/javascripts/tiny_mce/plugins/safari/editor_plugin.js +0 -1
  1076. data/public/javascripts/tiny_mce/plugins/safari/editor_plugin_src.js +0 -401
  1077. data/public/javascripts/tiny_mce/plugins/save/editor_plugin.js +0 -1
  1078. data/public/javascripts/tiny_mce/plugins/save/editor_plugin_src.js +0 -103
  1079. data/public/javascripts/tiny_mce/themes/advanced/about.htm +0 -56
  1080. data/public/javascripts/tiny_mce/themes/advanced/anchor.htm +0 -32
  1081. data/public/javascripts/tiny_mce/themes/advanced/charmap.htm +0 -53
  1082. data/public/javascripts/tiny_mce/themes/advanced/color_picker.htm +0 -74
  1083. data/public/javascripts/tiny_mce/themes/advanced/editor_template.js +0 -1
  1084. data/public/javascripts/tiny_mce/themes/advanced/editor_template_src.js +0 -990
  1085. data/public/javascripts/tiny_mce/themes/advanced/image.htm +0 -86
  1086. data/public/javascripts/tiny_mce/themes/advanced/img/colorpicker.jpg +0 -0
  1087. data/public/javascripts/tiny_mce/themes/advanced/img/icons.gif +0 -0
  1088. data/public/javascripts/tiny_mce/themes/advanced/js/about.js +0 -76
  1089. data/public/javascripts/tiny_mce/themes/advanced/js/anchor.js +0 -30
  1090. data/public/javascripts/tiny_mce/themes/advanced/js/charmap.js +0 -327
  1091. data/public/javascripts/tiny_mce/themes/advanced/js/color_picker.js +0 -245
  1092. data/public/javascripts/tiny_mce/themes/advanced/js/image.js +0 -232
  1093. data/public/javascripts/tiny_mce/themes/advanced/js/link.js +0 -110
  1094. data/public/javascripts/tiny_mce/themes/advanced/js/source_editor.js +0 -62
  1095. data/public/javascripts/tiny_mce/themes/advanced/langs/en.js +0 -62
  1096. data/public/javascripts/tiny_mce/themes/advanced/langs/en_dlg.js +0 -51
  1097. data/public/javascripts/tiny_mce/themes/advanced/link.htm +0 -64
  1098. data/public/javascripts/tiny_mce/themes/advanced/skins/default/content.css +0 -18
  1099. data/public/javascripts/tiny_mce/themes/advanced/skins/default/dialog.css +0 -111
  1100. data/public/javascripts/tiny_mce/themes/advanced/skins/default/img/buttons.png +0 -0
  1101. data/public/javascripts/tiny_mce/themes/advanced/skins/default/img/items.gif +0 -0
  1102. data/public/javascripts/tiny_mce/themes/advanced/skins/default/img/menu_arrow.gif +0 -0
  1103. data/public/javascripts/tiny_mce/themes/advanced/skins/default/img/menu_check.gif +0 -0
  1104. data/public/javascripts/tiny_mce/themes/advanced/skins/default/img/progress.gif +0 -0
  1105. data/public/javascripts/tiny_mce/themes/advanced/skins/default/img/tabs.gif +0 -0
  1106. data/public/javascripts/tiny_mce/themes/advanced/skins/default/ui.css +0 -193
  1107. data/public/javascripts/tiny_mce/themes/advanced/skins/o2k7/content.css +0 -18
  1108. data/public/javascripts/tiny_mce/themes/advanced/skins/o2k7/dialog.css +0 -111
  1109. data/public/javascripts/tiny_mce/themes/advanced/skins/o2k7/img/button_bg.png +0 -0
  1110. data/public/javascripts/tiny_mce/themes/advanced/skins/o2k7/ui.css +0 -193
  1111. data/public/javascripts/tiny_mce/themes/advanced/source_editor.htm +0 -32
  1112. data/public/javascripts/tiny_mce/themes/simple/editor_template.js +0 -1
  1113. data/public/javascripts/tiny_mce/themes/simple/editor_template_src.js +0 -85
  1114. data/public/javascripts/tiny_mce/themes/simple/img/icons.gif +0 -0
  1115. data/public/javascripts/tiny_mce/themes/simple/langs/en.js +0 -11
  1116. data/public/javascripts/tiny_mce/themes/simple/skins/default/content.css +0 -25
  1117. data/public/javascripts/tiny_mce/themes/simple/skins/default/ui.css +0 -32
  1118. data/public/javascripts/tiny_mce/themes/simple/skins/o2k7/content.css +0 -17
  1119. data/public/javascripts/tiny_mce/themes/simple/skins/o2k7/img/button_bg.png +0 -0
  1120. data/public/javascripts/tiny_mce/themes/simple/skins/o2k7/ui.css +0 -35
  1121. data/public/javascripts/tiny_mce/tiny_mce.js +0 -1
  1122. data/public/javascripts/tiny_mce/tiny_mce_popup.js +0 -221
  1123. data/public/javascripts/tiny_mce/tiny_mce_src.js +0 -8803
  1124. data/public/javascripts/tiny_mce/utils/editable_selects.js +0 -61
  1125. data/public/javascripts/tiny_mce/utils/form_utils.js +0 -193
  1126. data/public/javascripts/tiny_mce/utils/mclayer.js +0 -210
  1127. data/public/javascripts/tiny_mce/utils/mctabs.js +0 -74
  1128. data/public/javascripts/tiny_mce/utils/validate.js +0 -219
  1129. data/public/stylesheets/minimal.css +0 -143
  1130. data/spec/fixtures/blacklist_patterns.yml +0 -10
  1131. data/spec/fixtures/blogs.yml +0 -77
  1132. data/spec/fixtures/categories.yml +0 -35
  1133. data/spec/fixtures/categorizations.yml +0 -31
  1134. data/spec/fixtures/contents.yml +0 -205
  1135. data/spec/fixtures/feedback.yml +0 -159
  1136. data/spec/fixtures/page_caches.yml +0 -7
  1137. data/spec/fixtures/profiles.yml +0 -11
  1138. data/spec/fixtures/redirects.yml +0 -13
  1139. data/spec/fixtures/resources.yml +0 -24
  1140. data/spec/fixtures/sidebars.yml +0 -12
  1141. data/spec/fixtures/tags.yml +0 -10
  1142. data/spec/fixtures/text_filters.yml +0 -42
  1143. data/spec/fixtures/triggers.yml +0 -1
  1144. data/spec/fixtures/users.yml +0 -56
  1145. data/spec/helpers/comments_helper_spec.rb +0 -11
  1146. data/test/fixtures/articles_tags.yml +0 -19
  1147. data/test/functional/accounts_controller_test.rb +0 -78
  1148. data/test/functional/admin/article_preview_test.rb +0 -82
  1149. data/test/functional/admin/blacklist_controller_test.rb +0 -63
  1150. data/test/functional/admin/categories_controller_test.rb +0 -106
  1151. data/test/functional/admin/comments_controller_test.rb +0 -78
  1152. data/test/functional/admin/content_controller_test.rb +0 -232
  1153. data/test/functional/admin/feedback_controller_test.rb +0 -59
  1154. data/test/functional/admin/pages_controller_test.rb +0 -88
  1155. data/test/functional/admin/profiles_controller_test.rb +0 -18
  1156. data/test/functional/admin/resources_controller_test.rb +0 -49
  1157. data/test/functional/admin/settings_controller_test.rb +0 -26
  1158. data/test/functional/admin/textfilters_controller_test.rb +0 -29
  1159. data/test/functional/admin/themes_controller_test.rb +0 -34
  1160. data/test/functional/admin/trackbacks_controller_test.rb +0 -76
  1161. data/test/functional/admin/users_controller_test.rb +0 -78
  1162. data/test/functional/articles_controller_test.rb +0 -263
  1163. data/test/functional/backend_controller_test.rb +0 -287
  1164. data/test/functional/redirect_controller_test.rb +0 -40
  1165. data/test/functional/textfilter_controller_test.rb +0 -273
  1166. data/test/functional/theme_controller_test.rb +0 -45
  1167. data/test/functional/xml_controller_test.rb +0 -235
  1168. data/test/mocks/themes/standard_issue/about.markdown +0 -5
  1169. data/test/mocks/themes/standard_issue/images/img01.gif +0 -0
  1170. data/test/mocks/themes/standard_issue/images/img02.gif +0 -0
  1171. data/test/mocks/themes/standard_issue/images/img03.gif +0 -0
  1172. data/test/mocks/themes/standard_issue/images/img04.jpg +0 -0
  1173. data/test/mocks/themes/standard_issue/images/img05.gif +0 -0
  1174. data/test/mocks/themes/standard_issue/images/img06.gif +0 -0
  1175. data/test/mocks/themes/standard_issue/images/img07.gif +0 -0
  1176. data/test/mocks/themes/standard_issue/images/img08.gif +0 -0
  1177. data/test/mocks/themes/standard_issue/images/img09.gif +0 -0
  1178. data/test/mocks/themes/standard_issue/images/img10.gif +0 -0
  1179. data/test/mocks/themes/standard_issue/images/spinner.gif +0 -0
  1180. data/test/mocks/themes/standard_issue/layouts/default.html.erb +0 -61
  1181. data/test/mocks/themes/standard_issue/preview.png +0 -0
  1182. data/test/mocks/themes/standard_issue/stylesheets/application.css +0 -461
  1183. data/test/mocks/themes/standard_issue/views/articles/_article.html.erb +0 -32
  1184. data/test/mocks/themes/standard_issue/views/articles/_comment.html.erb +0 -12
  1185. data/test/mocks/themes/standard_issue/views/articles/_comment_form.html.erb +0 -48
  1186. data/test/mocks/themes/standard_issue/views/articles/_comment_list.html.erb +0 -7
  1187. data/test/mocks/themes/standard_issue/views/articles/_trackback.html.erb +0 -9
  1188. data/test/mocks/themes/standard_issue/views/articles/comment_preview.html.erb +0 -10
  1189. data/test/mocks/themes/standard_issue/views/articles/index.html.erb +0 -5
  1190. data/test/mocks/themes/standard_issue/views/articles/read.html.erb +0 -42
  1191. data/test/mocks/themes/standard_issue/views/shared/_search.html.erb +0 -17
  1192. data/test/mocks/themes/standard_issue/views/theme/static_view_test.rhtml +0 -1
  1193. data/test/unit/amazon_sidebar_test.rb +0 -36
  1194. data/test/unit/article_closing_test.rb +0 -40
  1195. data/test/unit/article_test.rb +0 -304
  1196. data/test/unit/assumptions_tests.rb +0 -54
  1197. data/test/unit/blacklist_pattern_test.rb +0 -14
  1198. data/test/unit/blog_test.rb +0 -52
  1199. data/test/unit/cache_support_test.rb +0 -62
  1200. data/test/unit/category_test.rb +0 -42
  1201. data/test/unit/comment_test.rb +0 -188
  1202. data/test/unit/configuration_test.rb +0 -21
  1203. data/test/unit/content_state/feedback_states_test.rb +0 -67
  1204. data/test/unit/metafragment_test.rb +0 -63
  1205. data/test/unit/notification_mailer_test.rb +0 -55
  1206. data/test/unit/notification_test.rb +0 -10
  1207. data/test/unit/page_test.rb +0 -45
  1208. data/test/unit/ping_pinger_test.rb +0 -30
  1209. data/test/unit/ping_test.rb +0 -127
  1210. data/test/unit/redirect_test.rb +0 -19
  1211. data/test/unit/resource_test.rb +0 -71
  1212. data/test/unit/route_cache_test.rb +0 -11
  1213. data/test/unit/sidebar_test.rb +0 -9
  1214. data/test/unit/static_sidebar_test.rb +0 -19
  1215. data/test/unit/tag_test.rb +0 -71
  1216. data/test/unit/text_filter_test.rb +0 -126
  1217. data/test/unit/theme_test.rb +0 -44
  1218. data/test/unit/trackback_test.rb +0 -22
  1219. data/test/unit/trigger_test.rb +0 -40
  1220. data/test/unit/typo_deprecated_test.rb +0 -22
  1221. data/test/unit/user_test.rb +0 -111
  1222. data/themes/dirtylicious/about.markdown +0 -3
  1223. data/themes/dirtylicious/images/body.jpg +0 -0
  1224. data/themes/dirtylicious/images/container.jpg +0 -0
  1225. data/themes/dirtylicious/images/gravatar.gif +0 -0
  1226. data/themes/dirtylicious/images/header.jpg +0 -0
  1227. data/themes/dirtylicious/images/li.gif +0 -0
  1228. data/themes/dirtylicious/images/main.gif +0 -0
  1229. data/themes/dirtylicious/images/nav.gif +0 -0
  1230. data/themes/dirtylicious/images/quote.gif +0 -0
  1231. data/themes/dirtylicious/images/spinner.gif +0 -0
  1232. data/themes/dirtylicious/layouts/default.html.erb +0 -60
  1233. data/themes/dirtylicious/preview.png +0 -0
  1234. data/themes/dirtylicious/stylesheets/application.css +0 -327
  1235. data/themes/dirtylicious/views/articles/_article.html.erb +0 -33
  1236. data/themes/dirtylicious/views/articles/_comment.html.erb +0 -14
  1237. data/themes/dirtylicious/views/articles/_comment_form.html.erb +0 -37
  1238. data/themes/dirtylicious/views/articles/_comment_list.html.erb +0 -7
  1239. data/themes/dirtylicious/views/articles/_trackback.html.erb +0 -9
  1240. data/themes/dirtylicious/views/articles/comment_preview.html.erb +0 -10
  1241. data/themes/dirtylicious/views/articles/index.html.erb +0 -5
  1242. data/themes/dirtylicious/views/articles/read.html.erb +0 -42
  1243. data/themes/dirtylicious/views/shared/_search.html.erb +0 -16
  1244. data/themes/standard_issue/about.markdown +0 -5
  1245. data/themes/standard_issue/images/img01.gif +0 -0
  1246. data/themes/standard_issue/images/img02.gif +0 -0
  1247. data/themes/standard_issue/images/img03.gif +0 -0
  1248. data/themes/standard_issue/images/img04.jpg +0 -0
  1249. data/themes/standard_issue/images/img05.gif +0 -0
  1250. data/themes/standard_issue/images/img06.gif +0 -0
  1251. data/themes/standard_issue/images/img07.gif +0 -0
  1252. data/themes/standard_issue/images/img08.gif +0 -0
  1253. data/themes/standard_issue/images/img09.gif +0 -0
  1254. data/themes/standard_issue/images/img10.gif +0 -0
  1255. data/themes/standard_issue/images/spinner.gif +0 -0
  1256. data/themes/standard_issue/layouts/default.html.erb +0 -59
  1257. data/themes/standard_issue/preview.png +0 -0
  1258. data/themes/standard_issue/stylesheets/application.css +0 -461
  1259. data/themes/standard_issue/views/articles/_article.html.erb +0 -32
  1260. data/themes/standard_issue/views/articles/_comment.html.erb +0 -12
  1261. data/themes/standard_issue/views/articles/_comment_form.html.erb +0 -48
  1262. data/themes/standard_issue/views/articles/_comment_list.html.erb +0 -7
  1263. data/themes/standard_issue/views/articles/_trackback.html.erb +0 -9
  1264. data/themes/standard_issue/views/articles/comment_preview.html.erb +0 -10
  1265. data/themes/standard_issue/views/articles/index.html.erb +0 -5
  1266. data/themes/standard_issue/views/articles/read.html.erb +0 -42
  1267. data/themes/standard_issue/views/shared/_search.html.erb +0 -17
  1268. data/vendor/jabber4r/CHANGES +0 -8
  1269. data/vendor/jabber4r/LICENSE.txt +0 -12
  1270. data/vendor/jabber4r/README +0 -180
  1271. data/vendor/jabber4r/Rakefile.rb +0 -143
  1272. data/vendor/jabber4r/lib/jabber4r/jabber4r.rb +0 -22
  1273. data/vendor/jabber4r/lib/jabber4r/jid.rb +0 -93
  1274. data/vendor/jabber4r/lib/jabber4r/protocol.rb +0 -1384
  1275. data/vendor/jabber4r/lib/jabber4r/rexml_1.8_patch.rb +0 -16
  1276. data/vendor/jabber4r/lib/jabber4r/roster.rb +0 -322
  1277. data/vendor/jabber4r/lib/jabber4r/session.rb +0 -615
  1278. data/vendor/jabber4r/lib/jabber4r/vcard.rb +0 -42
  1279. data/vendor/plugins/haml/MIT-LICENSE +0 -20
  1280. data/vendor/plugins/haml/REFERENCE +0 -662
  1281. data/vendor/plugins/haml/Rakefile +0 -171
  1282. data/vendor/plugins/haml/VERSION +0 -1
  1283. data/vendor/plugins/haml/bin/haml +0 -18
  1284. data/vendor/plugins/haml/init.rb +0 -3
  1285. data/vendor/plugins/haml/lib/haml/buffer.rb +0 -224
  1286. data/vendor/plugins/haml/lib/haml/engine.rb +0 -557
  1287. data/vendor/plugins/haml/lib/haml/helpers.rb +0 -220
  1288. data/vendor/plugins/haml/lib/haml/helpers/action_view_mods.rb +0 -54
  1289. data/vendor/plugins/haml/lib/haml/template.rb +0 -138
  1290. data/vendor/plugins/haml/test/benchmark.rb +0 -62
  1291. data/vendor/plugins/haml/test/engine_test.rb +0 -93
  1292. data/vendor/plugins/haml/test/helper_test.rb +0 -105
  1293. data/vendor/plugins/haml/test/mocks/article.rb +0 -6
  1294. data/vendor/plugins/haml/test/profile.rb +0 -45
  1295. data/vendor/plugins/haml/test/results/content_for_layout.xhtml +0 -16
  1296. data/vendor/plugins/haml/test/results/eval_suppressed.xhtml +0 -2
  1297. data/vendor/plugins/haml/test/results/helpers.xhtml +0 -50
  1298. data/vendor/plugins/haml/test/results/helpful.xhtml +0 -5
  1299. data/vendor/plugins/haml/test/results/just_stuff.xhtml +0 -38
  1300. data/vendor/plugins/haml/test/results/list.xhtml +0 -12
  1301. data/vendor/plugins/haml/test/results/original_engine.xhtml +0 -24
  1302. data/vendor/plugins/haml/test/results/partials.xhtml +0 -20
  1303. data/vendor/plugins/haml/test/results/silent_script.xhtml +0 -74
  1304. data/vendor/plugins/haml/test/results/standard.xhtml +0 -42
  1305. data/vendor/plugins/haml/test/results/tag_parsing.xhtml +0 -28
  1306. data/vendor/plugins/haml/test/results/very_basic.xhtml +0 -7
  1307. data/vendor/plugins/haml/test/results/whitespace_handling.xhtml +0 -51
  1308. data/vendor/plugins/haml/test/rhtml/standard.rhtml +0 -51
  1309. data/vendor/plugins/haml/test/runner.rb +0 -15
  1310. data/vendor/plugins/haml/test/template_test.rb +0 -137
  1311. data/vendor/plugins/haml/test/templates/_partial.haml +0 -7
  1312. data/vendor/plugins/haml/test/templates/_text_area.haml +0 -3
  1313. data/vendor/plugins/haml/test/templates/content_for_layout.haml +0 -10
  1314. data/vendor/plugins/haml/test/templates/eval_suppressed.haml +0 -5
  1315. data/vendor/plugins/haml/test/templates/helpers.haml +0 -39
  1316. data/vendor/plugins/haml/test/templates/helpful.haml +0 -6
  1317. data/vendor/plugins/haml/test/templates/just_stuff.haml +0 -34
  1318. data/vendor/plugins/haml/test/templates/list.haml +0 -12
  1319. data/vendor/plugins/haml/test/templates/original_engine.haml +0 -17
  1320. data/vendor/plugins/haml/test/templates/partialize.haml +0 -1
  1321. data/vendor/plugins/haml/test/templates/partials.haml +0 -12
  1322. data/vendor/plugins/haml/test/templates/silent_script.haml +0 -40
  1323. data/vendor/plugins/haml/test/templates/standard.haml +0 -40
  1324. data/vendor/plugins/haml/test/templates/tag_parsing.haml +0 -24
  1325. data/vendor/plugins/haml/test/templates/very_basic.haml +0 -4
  1326. data/vendor/plugins/haml/test/templates/whitespace_handling.haml +0 -66
  1327. data/vendor/plugins/rspec/spec/spec/interop/test/unit/testcase_spec_with_test_unit.rb +0 -20
  1328. data/vendor/plugins/rspec/spec/spec/interop/test/unit/testsuite_adapter_spec_with_test_unit.rb +0 -34
  1329. data/vendor/plugins/rspec_on_rails/generators/helpers/rails_identifier.rb +0 -16
  1330. data/vendor/plugins/tiny_mce/README +0 -10
  1331. data/vendor/plugins/tiny_mce/Rakefile +0 -22
  1332. data/vendor/plugins/tiny_mce/TODO +0 -2
  1333. data/vendor/plugins/tiny_mce/changelog +0 -1017
  1334. data/vendor/plugins/tiny_mce/init.rb +0 -3
  1335. data/vendor/plugins/tiny_mce/install.rb +0 -1
  1336. data/vendor/plugins/tiny_mce/lib/tiny_mce.rb +0 -36
  1337. data/vendor/plugins/tiny_mce/lib/tiny_mce_helper.rb +0 -48
  1338. data/vendor/plugins/tiny_mce/tasks/tiny_mce.rake +0 -40
  1339. data/vendor/plugins/tiny_mce/test/helper_testcase.rb +0 -38
  1340. data/vendor/plugins/tiny_mce/test/tiny_mce_helper_test.rb +0 -67
  1341. data/vendor/plugins/tiny_mce/test/tiny_mce_test.rb +0 -85
  1342. data/vendor/plugins/tiny_mce/tiny_mce_options.yml +0 -121
@@ -0,0 +1,68 @@
1
+ <cfsetting enablecfoutputonly="yes" showdebugoutput="no">
2
+ <!---
3
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
4
+ * Copyright (C) 2003-2007 Frederico Caldeira Knabben
5
+ *
6
+ * == BEGIN LICENSE ==
7
+ *
8
+ * Licensed under the terms of any of the following licenses at your
9
+ * choice:
10
+ *
11
+ * - GNU General Public License Version 2 or later (the "GPL")
12
+ * http://www.gnu.org/licenses/gpl.html
13
+ *
14
+ * - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
15
+ * http://www.gnu.org/licenses/lgpl.html
16
+ *
17
+ * - Mozilla Public License Version 1.1 or later (the "MPL")
18
+ * http://www.mozilla.org/MPL/MPL-1.1.html
19
+ *
20
+ * == END LICENSE ==
21
+ *
22
+ * File Browser connector for ColdFusion (MX 6.0 and above).
23
+ * (based on the original CF connector by Hendrik Kramer - hk@lwd.de)
24
+ --->
25
+
26
+ <cfparam name="url.type" default="File">
27
+ <cfparam name="url.currentFolder" default="/">
28
+
29
+ <!--- note: no serverPath url parameter - see config.cfm if you need to set the serverPath manually --->
30
+
31
+ <cfinclude template="config.cfm">
32
+ <cfinclude template="cf_util.cfm">
33
+ <cfinclude template="cf_io.cfm">
34
+ <cfinclude template="cf_commands.cfm">
35
+
36
+ <cfset REQUEST.Config = Config>
37
+ <cfif find( "/", getBaseTemplatePath() ) >
38
+ <cfset REQUEST.Fs = "/">
39
+ <cfelse>
40
+ <cfset REQUEST.Fs = "\">
41
+ </cfif>
42
+
43
+ <cfif not Config.Enabled>
44
+ <cfset SendUploadResults( '1', '', '', 'This file uploader is disabled. Please check the "editor/filemanager/connectors/cfm/config.cfm" file' )>
45
+ </cfif>
46
+
47
+ <cfset sCommand = 'QuickUpload'>
48
+ <cfset sType = "File">
49
+
50
+ <cfif isDefined( "URL.Type" )>
51
+ <cfset sType = URL.Type>
52
+ </cfif>
53
+
54
+ <cfset sCurrentFolder = GetCurrentFolder()>
55
+
56
+ <!--- Is enabled the upload? --->
57
+ <cfif not IsAllowedCommand( sCommand )>
58
+ <cfset SendUploadResults( "1", "", "", "The """ & sCommand & """ command isn't allowed" )>
59
+ </cfif>
60
+
61
+ <!--- Check if it is an allowed type. --->
62
+ <cfif not IsAllowedType( sType )>
63
+ <cfset SendUploadResults( "1", "", "", "Invalid type specified" ) >
64
+ </cfif>
65
+
66
+ <cfset FileUpload( sType, sCurrentFolder, sCommand )>
67
+
68
+
@@ -0,0 +1,132 @@
1
+ <cfsetting enablecfoutputonly="Yes">
2
+ <!---
3
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
4
+ * Copyright (C) 2003-2007 Frederico Caldeira Knabben
5
+ *
6
+ * == BEGIN LICENSE ==
7
+ *
8
+ * Licensed under the terms of any of the following licenses at your
9
+ * choice:
10
+ *
11
+ * - GNU General Public License Version 2 or later (the "GPL")
12
+ * http://www.gnu.org/licenses/gpl.html
13
+ *
14
+ * - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
15
+ * http://www.gnu.org/licenses/lgpl.html
16
+ *
17
+ * - Mozilla Public License Version 1.1 or later (the "MPL")
18
+ * http://www.mozilla.org/MPL/MPL-1.1.html
19
+ *
20
+ * == END LICENSE ==
21
+ *
22
+ * This file include generic functions used by the ColdFusion Connector (MX 6.0 and above).
23
+ --->
24
+
25
+ <cffunction name="RemoveFromStart" output="false" returntype="String">
26
+ <cfargument name="sourceString" type="String">
27
+ <cfargument name="charToRemove" type="String">
28
+
29
+ <cfif left(ARGUMENTS.sourceString, 1) eq ARGUMENTS.charToRemove>
30
+ <cfreturn mid( ARGUMENTS.sourceString, 2, len(ARGUMENTS.sourceString) -1 )>
31
+ </cfif>
32
+
33
+ <cfreturn ARGUMENTS.sourceString>
34
+ </cffunction>
35
+
36
+ <cffunction name="RemoveFromEnd" output="false" returntype="String">
37
+ <cfargument name="sourceString" type="String">
38
+ <cfargument name="charToRemove" type="String">
39
+
40
+ <cfif right(ARGUMENTS.sourceString, 1) eq ARGUMENTS.charToRemove>
41
+ <cfreturn mid( ARGUMENTS.sourceString, 1, len(ARGUMENTS.sourceString) -1 )>
42
+ </cfif>
43
+
44
+ <cfreturn ARGUMENTS.sourceString>
45
+ </cffunction>
46
+
47
+ <!---
48
+ Check file content.
49
+ Currently this function validates only image files.
50
+ Returns false if file is invalid.
51
+ detectionLevel:
52
+ 0 = none
53
+ 1 = check image size for images,
54
+ 2 = use DetectHtml for images
55
+ ---->
56
+ <cffunction name="IsImageValid" returntype="boolean" output="true">
57
+ <cfargument name="filePath" required="true" type="String">
58
+ <cfargument name="extension" required="true" type="String">
59
+
60
+ <cfset var imageCFC = "">
61
+ <cfset var imageInfo = "">
62
+
63
+ <cfif not ListFindNoCase("gif,jpeg,jpg,png,swf,psd,bmp,iff,tiff,tif,swc,jpc,jp2,jpx,jb2,xmb,wbmp", ARGUMENTS.extension)>
64
+ <cfreturn true>
65
+ </cfif>
66
+
67
+ <cftry>
68
+ <cfif REQUEST.CFVersion gte 8>
69
+ <cfset objImage = ImageRead(ARGUMENTS.filePath) >
70
+ <cfset imageInfo = ImageInfo(objImage)>
71
+ <!--- <cfimage action="info" source="#ARGUMENTS.filePath#" structName="imageInfo" /> --->
72
+ <cfelse>
73
+ <cfset imageCFC = createObject("component", "image")>
74
+ <cfset imageInfo = imageCFC.getImageInfo("", ARGUMENTS.filePath)>
75
+ </cfif>
76
+
77
+ <cfif imageInfo.height lte 0 or imageInfo.width lte 0>
78
+ <cfreturn false>
79
+ </cfif>
80
+ <cfcatch type="any">
81
+ <cfreturn false>
82
+ </cfcatch>
83
+ </cftry>
84
+
85
+ <cfreturn true>
86
+ </cffunction>
87
+
88
+ <!---
89
+ Detect HTML in the first KB to prevent against potential security issue with
90
+ IE/Safari/Opera file type auto detection bug.
91
+ Returns true if file contain insecure HTML code at the beginning.
92
+ --->
93
+ <cffunction name="DetectHtml" output="false" returntype="boolean">
94
+ <cfargument name="filePath" required="true" type="String">
95
+
96
+ <cfset var tags = "<body,<head,<html,<img,<pre,<script,<table,<title">
97
+ <cfset var chunk = lcase( Trim( BinaryFileRead( ARGUMENTS.filePath, 1024 ) ) )>
98
+
99
+ <cfif not Len(chunk)>
100
+ <cfreturn false>
101
+ </cfif>
102
+
103
+ <cfif refind('<!doctype\W*x?html', chunk)>
104
+ <cfreturn true>
105
+ </cfif>
106
+
107
+ <cfloop index = "tag" list = "#tags#">
108
+ <cfif find( tag, chunk )>
109
+ <cfreturn true>
110
+ </cfif>
111
+ </cfloop>
112
+
113
+ <!--- type = javascript --->
114
+ <cfif refind('type\s*=\s*[''"]?\s*(?:\w*/)?(?:ecma|java)', chunk)>
115
+ <cfreturn true>
116
+ </cfif> >
117
+
118
+ <!--- href = javascript --->
119
+ <!--- src = javascript --->
120
+ <!--- data = javascript --->
121
+ <cfif refind('(?:href|src|data)\s*=\s*[\''"]?\s*(?:ecma|java)script:', chunk)>
122
+ <cfreturn true>
123
+ </cfif>
124
+
125
+ <!--- url(javascript --->
126
+ <cfif refind('url\s*\(\s*[\''"]?\s*(?:ecma|java)script:', chunk)>
127
+ <cfreturn true>
128
+ </cfif>
129
+
130
+ <cfreturn false>
131
+ </cffunction>
132
+
@@ -0,0 +1,183 @@
1
+ <cfsetting enablecfoutputonly="Yes">
2
+ <!---
3
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
4
+ * Copyright (C) 2003-2007 Frederico Caldeira Knabben
5
+ *
6
+ * == BEGIN LICENSE ==
7
+ *
8
+ * Licensed under the terms of any of the following licenses at your
9
+ * choice:
10
+ *
11
+ * - GNU General Public License Version 2 or later (the "GPL")
12
+ * http://www.gnu.org/licenses/gpl.html
13
+ *
14
+ * - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
15
+ * http://www.gnu.org/licenses/lgpl.html
16
+ *
17
+ * - Mozilla Public License Version 1.1 or later (the "MPL")
18
+ * http://www.mozilla.org/MPL/MPL-1.1.html
19
+ *
20
+ * == END LICENSE ==
21
+ *
22
+ * Configuration file for the ColdFusion Connector (all versions).
23
+ --->
24
+
25
+ <cfscript>
26
+ Config = StructNew() ;
27
+
28
+ // SECURITY: You must explicitly enable this "connector". (Set enabled to "true")
29
+ Config.Enabled = true ;
30
+
31
+ // Path to uploaded files relative to the document root.
32
+ Config.UserFilesPath = "/userfiles/" ;
33
+
34
+ // Use this to force the server path if FCKeditor is not running directly off
35
+ // the root of the application or the FCKeditor directory in the URL is a virtual directory
36
+ // or a symbolic link / junction
37
+ // Example: C:\inetpub\wwwroot\myDocs\
38
+ Config.ServerPath = "" ;
39
+
40
+ // Due to security issues with Apache modules, it is reccomended to leave the
41
+ // following setting enabled.
42
+ Config.ForceSingleExtension = true ;
43
+
44
+ // Perform additional checks for image files - if set to true, validate image size
45
+ // (This feature works in MX 6.0 and above)
46
+ Config.SecureImageUploads = true;
47
+
48
+ // What the user can do with this connector
49
+ Config.ConfigAllowedCommands = "QuickUpload,FileUpload,GetFolders,GetFoldersAndFiles,CreateFolder" ;
50
+
51
+ //Allowed Resource Types
52
+ Config.ConfigAllowedTypes = "File,Image,Flash,Media" ;
53
+
54
+ // For security, HTML is allowed in the first Kb of data for files having the
55
+ // following extensions only.
56
+ // (This feature works in MX 6.0 and above))
57
+ Config.HtmlExtensions = "html,htm,xml,xsd,txt,js" ;
58
+
59
+
60
+ // Configuration settings for each Resource Type
61
+ //
62
+ // - AllowedExtensions: the possible extensions that can be allowed.
63
+ // If it is empty then any file type can be uploaded.
64
+ // - DeniedExtensions: The extensions that won't be allowed.
65
+ // If it is empty then no restrictions are done here.
66
+ //
67
+ // For a file to be uploaded it has to fullfil both the AllowedExtensions
68
+ // and DeniedExtensions (that's it: not being denied) conditions.
69
+ //
70
+ // - FileTypesPath: the virtual folder relative to the document root where
71
+ // these resources will be located.
72
+ // Attention: It must start and end with a slash: '/'
73
+ //
74
+ // - FileTypesAbsolutePath: the physical path to the above folder. It must be
75
+ // an absolute path.
76
+ // If it's an empty string then it will be autocalculated.
77
+ // Usefull if you are using a virtual directory, symbolic link or alias.
78
+ // Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.
79
+ // Attention: The above 'FileTypesPath' must point to the same directory.
80
+ // Attention: It must end with a slash: '/'
81
+ //
82
+ //
83
+ // - QuickUploadPath: the virtual folder relative to the document root where
84
+ // these resources will be uploaded using the Upload tab in the resources
85
+ // dialogs.
86
+ // Attention: It must start and end with a slash: '/'
87
+ //
88
+ // - QuickUploadAbsolutePath: the physical path to the above folder. It must be
89
+ // an absolute path.
90
+ // If it's an empty string then it will be autocalculated.
91
+ // Usefull if you are using a virtual directory, symbolic link or alias.
92
+ // Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.
93
+ // Attention: The above 'QuickUploadPath' must point to the same directory.
94
+ // Attention: It must end with a slash: '/'
95
+
96
+ Config.AllowedExtensions = StructNew() ;
97
+ Config.DeniedExtensions = StructNew() ;
98
+ Config.FileTypesPath = StructNew() ;
99
+ Config.FileTypesAbsolutePath = StructNew() ;
100
+ Config.QuickUploadPath = StructNew() ;
101
+ Config.QuickUploadAbsolutePath = StructNew() ;
102
+
103
+ Config.AllowedExtensions["File"] = "7z,aiff,asf,avi,bmp,csv,doc,fla,flv,gif,gz,gzip,jpeg,jpg,mid,mov,mp3,mp4,mpc,mpeg,mpg,ods,odt,pdf,png,ppt,pxd,qt,ram,rar,rm,rmi,rmvb,rtf,sdc,sitd,swf,sxc,sxw,tar,tgz,tif,tiff,txt,vsd,wav,wma,wmv,xls,xml,zip" ;
104
+ Config.DeniedExtensions["File"] = "" ;
105
+ Config.FileTypesPath["File"] = Config.UserFilesPath & 'file/' ;
106
+ Config.FileTypesAbsolutePath["File"] = iif( Config.ServerPath eq "", de(""), de(Config.ServerPath & 'file/') ) ;
107
+ Config.QuickUploadPath["File"] = Config.FileTypesPath["File"] ;
108
+ Config.QuickUploadAbsolutePath["File"] = Config.FileTypesAbsolutePath["File"] ;
109
+
110
+ Config.AllowedExtensions["Image"] = "bmp,gif,jpeg,jpg,png,psd,tif,tiff" ;
111
+ Config.DeniedExtensions["Image"] = "" ;
112
+ Config.FileTypesPath["Image"] = Config.UserFilesPath & 'image/' ;
113
+ Config.FileTypesAbsolutePath["Image"] = iif( Config.ServerPath eq "", de(""), de(Config.ServerPath & 'image/') ) ;
114
+ Config.QuickUploadPath["Image"] = Config.FileTypesPath["Image"] ;
115
+ Config.QuickUploadAbsolutePath["Image"] = Config.FileTypesAbsolutePath["Image"] ;
116
+
117
+ Config.AllowedExtensions["Flash"] = "swf,fla" ;
118
+ Config.DeniedExtensions["Flash"] = "" ;
119
+ Config.FileTypesPath["Flash"] = Config.UserFilesPath & 'flash/' ;
120
+ Config.FileTypesAbsolutePath["Flash"] = iif( Config.ServerPath eq "", de(""), de(Config.ServerPath & 'flash/') ) ;
121
+ Config.QuickUploadPath["Flash"] = Config.FileTypesPath["Flash"] ;
122
+ Config.QuickUploadAbsolutePath["Flash"] = Config.FileTypesAbsolutePath["Flash"] ;
123
+
124
+ Config.AllowedExtensions["Media"] = "aiff,asf,avi,bmp,fla,flv,gif,jpeg,jpg,mid,mov,mp3,mp4,mpc,mpeg,mpg,png,qt,ram,rm,rmi,rmvb,swf,tif,tiff,wav,wma,wmv" ;
125
+ Config.DeniedExtensions["Media"] = "" ;
126
+ Config.FileTypesPath["Media"] = Config.UserFilesPath & 'media/' ;
127
+ Config.FileTypesAbsolutePath["Media"] = iif( Config.ServerPath eq "", de(""), de(Config.ServerPath & 'media/') ) ;
128
+ Config.QuickUploadPath["Media"] = Config.FileTypesPath["Media"] ;
129
+ Config.QuickUploadAbsolutePath["Media"] = Config.FileTypesAbsolutePath["Media"] ;
130
+ </cfscript>
131
+
132
+ <cftry>
133
+ <!--- code to maintain backwards compatibility with previous version of cfm connector --->
134
+ <cfif isDefined("application.userFilesPath")>
135
+
136
+ <cflock scope="application" type="readonly" timeout="5">
137
+ <cfset config.userFilesPath = application.userFilesPath>
138
+ </cflock>
139
+
140
+ <cfelseif isDefined("server.userFilesPath")>
141
+
142
+ <cflock scope="server" type="readonly" timeout="5">
143
+ <cfset config.userFilesPath = server.userFilesPath>
144
+ </cflock>
145
+
146
+ </cfif>
147
+
148
+ <!--- look for config struct in application and server scopes --->
149
+ <cfif isDefined("application.FCKeditor") and isStruct(application.FCKeditor)>
150
+
151
+ <cflock scope="application" type="readonly" timeout="5">
152
+ <cfset variables.FCKeditor = duplicate(application.FCKeditor)>
153
+ </cflock>
154
+
155
+ <cfelseif isDefined("server.FCKeditor") and isStruct(server.FCKeditor)>
156
+
157
+ <cflock scope="server" type="readonly" timeout="5">
158
+ <cfset variables.FCKeditor = duplicate(server.FCKeditor)>
159
+ </cflock>
160
+
161
+ </cfif>
162
+ <!--- catch potential "The requested scope application has not been enabled" exception --->
163
+ <cfcatch type="any">
164
+ </cfcatch>
165
+ </cftry>
166
+
167
+ <cfif isDefined("FCKeditor")>
168
+
169
+ <!--- copy key values from external to local config (i.e. override default config as required) --->
170
+ <cfscript>
171
+ function structCopyKeys(stFrom, stTo) {
172
+ for ( key in stFrom ) {
173
+ if ( isStruct(stFrom[key]) ) {
174
+ structCopyKeys(stFrom[key],stTo[key]);
175
+ } else {
176
+ stTo[key] = stFrom[key];
177
+ }
178
+ }
179
+ }
180
+ structCopyKeys(FCKeditor, config);
181
+ </cfscript>
182
+
183
+ </cfif>
@@ -0,0 +1,31 @@
1
+ <cfsetting enablecfoutputonly="Yes">
2
+ <!---
3
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
4
+ * Copyright (C) 2003-2007 Frederico Caldeira Knabben
5
+ *
6
+ * == BEGIN LICENSE ==
7
+ *
8
+ * Licensed under the terms of any of the following licenses at your
9
+ * choice:
10
+ *
11
+ * - GNU General Public License Version 2 or later (the "GPL")
12
+ * http://www.gnu.org/licenses/gpl.html
13
+ *
14
+ * - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
15
+ * http://www.gnu.org/licenses/lgpl.html
16
+ *
17
+ * - Mozilla Public License Version 1.1 or later (the "MPL")
18
+ * http://www.mozilla.org/MPL/MPL-1.1.html
19
+ *
20
+ * == END LICENSE ==
21
+ *
22
+ * File Browser connector for ColdFusion (all versions).
23
+ *
24
+ --->
25
+
26
+ <cfset REQUEST.CFVersion = Left( SERVER.COLDFUSION.PRODUCTVERSION, Find( ",", SERVER.COLDFUSION.PRODUCTVERSION ) - 1 )>
27
+ <cfif REQUEST.CFVersion lte 5>
28
+ <cfinclude template="cf5_connector.cfm">
29
+ <cfelse>
30
+ <cfinclude template="cf_connector.cfm">
31
+ </cfif>
@@ -0,0 +1,1325 @@
1
+ <!---
2
+ image.cfc v2.19, written by Rick Root (rick@webworksllc.com)
3
+ Derivative of work originally done originally by James Dew.
4
+
5
+ Related Web Sites:
6
+ - http://www.opensourcecf.com/imagecfc (home page)
7
+ - http://www.cfopen.org/projects/imagecfc (project page)
8
+
9
+ LICENSE
10
+ -------
11
+ Copyright (c) 2007, Rick Root <rick@webworksllc.com>
12
+ All rights reserved.
13
+
14
+ Redistribution and use in source and binary forms, with or
15
+ without modification, are permitted provided that the
16
+ following conditions are met:
17
+
18
+ - Redistributions of source code must retain the above
19
+ copyright notice, this list of conditions and the
20
+ following disclaimer.
21
+ - Redistributions in binary form must reproduce the above
22
+ copyright notice, this list of conditions and the
23
+ following disclaimer in the documentation and/or other
24
+ materials provided with the distribution.
25
+ - Neither the name of the Webworks, LLC. nor the names of
26
+ its contributors may be used to endorse or promote products
27
+ derived from this software without specific prior written
28
+ permission.
29
+
30
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
31
+ CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
32
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
33
+ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
34
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
35
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
36
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
37
+ BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
38
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
39
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
40
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
41
+ OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
42
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
43
+
44
+ ============================================================
45
+ This is a derivative work. Following is the original
46
+ Copyright notice.
47
+ ============================================================
48
+
49
+ Copyright (c) 2004 James F. Dew <jdew@yggdrasil.ca>
50
+
51
+ Permission to use, copy, modify, and distribute this software for any
52
+ purpose with or without fee is hereby granted, provided that the above
53
+ copyright notice and this permission notice appear in all copies.
54
+
55
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
56
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
57
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
58
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
59
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
60
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
61
+ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
62
+ --->
63
+ <!---
64
+ SPECIAL NOTE FOR HEADLESS SYSTEMS
65
+ ---------------------------------
66
+ If you get a "cannot connect to X11 server" when running certain
67
+ parts of this component under Bluedragon (Linux), you must
68
+ add "-Djava.awt.headless=true" to the java startup line in
69
+ <bluedragon>/bin/StartBluedragon.sh. This isssue is discussed
70
+ in the Bluedragon Installation Guide section 3.8.1 for
71
+ Bluedragon 6.2.1.
72
+
73
+ Bluedragon may also report a ClassNotFound exception when trying
74
+ to instantiate the java.awt.image.BufferedImage class. This is
75
+ most likely the same issue.
76
+
77
+ If you get "This graphics environment can be used only in the
78
+ software emulation mode" when calling certain parts of this
79
+ component under Coldfusion MX, you should refer to Technote
80
+ ID #18747: http://www.macromedia.com/go/tn_18747
81
+ --->
82
+
83
+ <cfcomponent displayname="Image">
84
+
85
+ <cfset variables.throwOnError = "Yes">
86
+ <cfset variables.defaultJpegCompression = "90">
87
+ <cfset variables.interpolation = "bicubic">
88
+ <cfset variables.textAntiAliasing = "Yes">
89
+ <cfset variables.tempDirectory = "#expandPath(".")#">
90
+
91
+ <cfset variables.javanulls = "no">
92
+ <cftry>
93
+ <cfset nullvalue = javacast("null","")>
94
+ <cfset variables.javanulls = "yes">
95
+ <cfcatch type="any">
96
+ <cfset variables.javanulls = "no">
97
+ <!--- javacast null not supported, so filters won't work --->
98
+ </cfcatch>
99
+ </cftry>
100
+ <!---
101
+ <cfif javanulls>
102
+ <cfset variables.blurFilter = createObject("component","blurFilter")>
103
+ <cfset variables.sharpenFilter = createObject("component","sharpenFilter")>
104
+ <cfset variables.posterizeFilter = createObject("component","posterizeFilter")>
105
+ </cfif>
106
+ --->
107
+
108
+ <cfset variables.Math = createobject("java", "java.lang.Math")>
109
+ <cfset variables.arrObj = createobject("java", "java.lang.reflect.Array")>
110
+ <cfset variables.floatClass = createobject("java", "java.lang.Float").TYPE>
111
+ <cfset variables.intClass = createobject("java", "java.lang.Integer").TYPE>
112
+ <cfset variables.shortClass = createobject("java", "java.lang.Short").TYPE>
113
+
114
+ <cffunction name="getImageInfo" access="public" output="true" returntype="struct" hint="Rotate an image (+/-)90, (+/-)180, or (+/-)270 degrees.">
115
+ <cfargument name="objImage" required="yes" type="Any">
116
+ <cfargument name="inputFile" required="yes" type="string">
117
+
118
+ <cfset var retVal = StructNew()>
119
+ <cfset var loadImage = StructNew()>
120
+ <cfset var img = "">
121
+
122
+ <cfset retVal.errorCode = 0>
123
+ <cfset retVal.errorMessage = "">
124
+
125
+ <cfif inputFile neq "">
126
+ <cfset loadImage = readImage(inputFile, "NO")>
127
+ <cfif loadImage.errorCode is 0>
128
+ <cfset img = loadImage.img>
129
+ <cfelse>
130
+ <cfset retVal = throw(loadImage.errorMessage)>
131
+ <cfreturn retVal>
132
+ </cfif>
133
+ <cfset retVal.metaData = getImageMetadata(loadImage.inFile)>
134
+ <cfelse>
135
+ <cfset img = objImage>
136
+ <cfset retVal.metadata = getImageMetadata("")>
137
+ </cfif>
138
+ <cftry>
139
+ <cfset retVal.width = img.getWidth()>
140
+ <cfset retVal.height = img.getHeight()>
141
+ <cfset retVal.colorModel = img.getColorModel().toString()>
142
+ <cfset retVal.colorspace = img.getColorModel().getColorSpace().toString()>
143
+ <cfset retVal.objColorModel = img.getColorModel()>
144
+ <cfset retVal.objColorspace = img.getColorModel().getColorSpace()>
145
+ <cfset retVal.sampleModel = img.getSampleModel().toString()>
146
+ <cfset retVal.imageType = img.getType()>
147
+ <cfset retVal.misc = img.toString()>
148
+ <cfset retVal.canModify = true>
149
+ <cfreturn retVal>
150
+ <cfcatch type="any">
151
+ <cfset retVal = throw( "#cfcatch.message#: #cfcatch.detail#")>
152
+ <cfreturn retVal>
153
+ </cfcatch>
154
+ </cftry>
155
+ </cffunction>
156
+
157
+ <cffunction name="getImageMetadata" access="private" output="false" returntype="query">
158
+ <cfargument name="inFile" required="yes" type="Any"><!--- java.io.File --->
159
+
160
+ <cfset var retQry = queryNew("dirName,tagName,tagValue")>
161
+ <cfset var paths = arrayNew(1)>
162
+ <cfset var loader = "">
163
+ <cfset var JpegMetadatareader = "">
164
+ <cfset var myMetadata = "">
165
+ <cfset var directories = "">
166
+ <cfset var currentDirectory = "">
167
+ <cfset var tags = "">
168
+ <cfset var currentTag = "">
169
+ <cfset var tagName = "">
170
+
171
+ <cftry>
172
+ <cfscript>
173
+ paths = arrayNew(1);
174
+ paths[1] = expandPath("metadata-extractor-2.3.1.jar");
175
+ loader = createObject("component", "javaloader.JavaLoader").init(paths);
176
+
177
+ //at this stage we only have access to the class, but we don't have an instance
178
+ JpegMetadataReader = loader.create("com.drew.imaging.jpeg.JpegMetadataReader");
179
+
180
+ myMetaData = JpegMetadataReader.readMetadata(inFile);
181
+ directories = myMetaData.getDirectoryIterator();
182
+ while (directories.hasNext()) {
183
+ currentDirectory = directories.next();
184
+ tags = currentDirectory.getTagIterator();
185
+ while (tags.hasNext()) {
186
+ currentTag = tags.next();
187
+ if (currentTag.getTagName() DOES NOT CONTAIN "Unknown") { //leave out the junk data
188
+ queryAddRow(retQry);
189
+ querySetCell(retQry,"dirName",replace(currentTag.getDirectoryName(),' ','_','ALL'));
190
+ tagName = replace(currentTag.getTagName(),' ','','ALL');
191
+ tagName = replace(tagName,'/','','ALL');
192
+ querySetCell(retQry,"tagName",tagName);
193
+ querySetCell(retQry,"tagValue",currentTag.getDescription());
194
+ }
195
+ }
196
+ }
197
+ return retQry;
198
+ </cfscript>
199
+ <cfcatch type="any">
200
+ <cfreturn retQry />
201
+ </cfcatch>
202
+ </cftry>
203
+ </cffunction>
204
+
205
+ <cffunction name="flipHorizontal" access="public" output="true" returntype="struct" hint="Flip an image horizontally.">
206
+ <cfargument name="objImage" required="yes" type="Any">
207
+ <cfargument name="inputFile" required="yes" type="string">
208
+ <cfargument name="outputFile" required="yes" type="string">
209
+ <cfargument name="jpegCompression" required="no" type="numeric" default="#variables.defaultJpegCompression#">
210
+
211
+ <cfreturn flipflop(objImage, inputFile, outputFile, "horizontal", jpegCompression)>
212
+ </cffunction>
213
+
214
+ <cffunction name="flipVertical" access="public" output="true" returntype="struct" hint="Flop an image vertically.">
215
+ <cfargument name="objImage" required="yes" type="Any">
216
+ <cfargument name="inputFile" required="yes" type="string">
217
+ <cfargument name="outputFile" required="yes" type="string">
218
+ <cfargument name="jpegCompression" required="no" type="numeric" default="#variables.defaultJpegCompression#">
219
+
220
+ <cfreturn flipflop(objImage, inputFile, outputFile, "vertical", jpegCompression)>
221
+ </cffunction>
222
+
223
+ <cffunction name="scaleWidth" access="public" output="true" returntype="struct" hint="Scale an image to a specific width.">
224
+ <cfargument name="objImage" required="yes" type="Any">
225
+ <cfargument name="inputFile" required="yes" type="string">
226
+ <cfargument name="outputFile" required="yes" type="string">
227
+ <cfargument name="newWidth" required="yes" type="numeric">
228
+ <cfargument name="jpegCompression" required="no" type="numeric" default="#variables.defaultJpegCompression#">
229
+
230
+ <cfreturn resize(objImage, inputFile, outputFile, newWidth, 0, "false", "false", jpegCompression)>
231
+ </cffunction>
232
+
233
+ <cffunction name="scaleHeight" access="public" output="true" returntype="struct" hint="Scale an image to a specific height.">
234
+ <cfargument name="objImage" required="yes" type="Any">
235
+ <cfargument name="inputFile" required="yes" type="string">
236
+ <cfargument name="outputFile" required="yes" type="string">
237
+ <cfargument name="newHeight" required="yes" type="numeric">
238
+ <cfargument name="jpegCompression" required="no" type="numeric" default="#variables.defaultJpegCompression#">
239
+
240
+ <cfreturn resize(objImage, inputFile, outputFile, 0, newHeight, "false", "false", jpegCompression)>
241
+ </cffunction>
242
+
243
+ <cffunction name="resize" access="public" output="true" returntype="struct" hint="Resize an image to a specific width and height.">
244
+ <cfargument name="objImage" required="yes" type="Any">
245
+ <cfargument name="inputFile" required="yes" type="string">
246
+ <cfargument name="outputFile" required="yes" type="string">
247
+ <cfargument name="newWidth" required="yes" type="numeric">
248
+ <cfargument name="newHeight" required="yes" type="numeric">
249
+ <cfargument name="preserveAspect" required="no" type="boolean" default="FALSE">
250
+ <cfargument name="cropToExact" required="no" type="boolean" default="FALSE">
251
+ <cfargument name="jpegCompression" required="no" type="numeric" default="#variables.defaultJpegCompression#">
252
+
253
+ <cfset var retVal = StructNew()>
254
+ <cfset var loadImage = StructNew()>
255
+ <cfset var saveImage = StructNew()>
256
+ <cfset var at = "">
257
+ <cfset var op = "">
258
+ <cfset var w = "">
259
+ <cfset var h = "">
260
+ <cfset var scale = 1>
261
+ <cfset var scaleX = 1>
262
+ <cfset var scaleY = 1>
263
+ <cfset var resizedImage = "">
264
+ <cfset var rh = getRenderingHints()>
265
+ <cfset var specifiedWidth = arguments.newWidth>
266
+ <cfset var specifiedHeight = arguments.newHeight>
267
+ <cfset var imgInfo = "">
268
+ <cfset var img = "">
269
+ <cfset var cropImageResult = "">
270
+ <cfset var cropOffsetX = "">
271
+ <cfset var cropOffsetY = "">
272
+
273
+ <cfset retVal.errorCode = 0>
274
+ <cfset retVal.errorMessage = "">
275
+
276
+ <cfif inputFile neq "">
277
+ <cfset loadImage = readImage(inputFile, "NO")>
278
+ <cfif loadImage.errorCode is 0>
279
+ <cfset img = loadImage.img>
280
+ <cfelse>
281
+ <cfset retVal = throw(loadImage.errorMessage)>
282
+ <cfreturn retVal>
283
+ </cfif>
284
+ <cfelse>
285
+ <cfset img = objImage>
286
+ </cfif>
287
+ <cfif img.getType() eq 0>
288
+ <cfset img = convertImageObject(img,img.TYPE_3BYTE_BGR)>
289
+ </cfif>
290
+ <cfscript>
291
+ resizedImage = CreateObject("java", "java.awt.image.BufferedImage");
292
+ at = CreateObject("java", "java.awt.geom.AffineTransform");
293
+ op = CreateObject("java", "java.awt.image.AffineTransformOp");
294
+
295
+ w = img.getWidth();
296
+ h = img.getHeight();
297
+
298
+ if (preserveAspect and cropToExact and newHeight gt 0 and newWidth gt 0)
299
+ {
300
+ if (w / h gt newWidth / newHeight){
301
+ newWidth = 0;
302
+ } else if (w / h lt newWidth / newHeight){
303
+ newHeight = 0;
304
+ }
305
+ } else if (preserveAspect and newHeight gt 0 and newWidth gt 0) {
306
+ if (w / h gt newWidth / newHeight){
307
+ newHeight = 0;
308
+ } else if (w / h lt newWidth / newHeight){
309
+ newWidth = 0;
310
+ }
311
+ }
312
+ if (newWidth gt 0 and newHeight eq 0) {
313
+ scale = newWidth / w;
314
+ w = newWidth;
315
+ h = round(h*scale);
316
+ } else if (newHeight gt 0 and newWidth eq 0) {
317
+ scale = newHeight / h;
318
+ h = newHeight;
319
+ w = round(w*scale);
320
+ } else if (newHeight gt 0 and newWidth gt 0) {
321
+ w = newWidth;
322
+ h = newHeight;
323
+ } else {
324
+ retVal = throw( retVal.errorMessage);
325
+ return retVal;
326
+ }
327
+ resizedImage.init(javacast("int",w),javacast("int",h),img.getType());
328
+
329
+ w = w / img.getWidth();
330
+ h = h / img.getHeight();
331
+
332
+
333
+
334
+ op.init(at.getScaleInstance(javacast("double",w),javacast("double",h)), rh);
335
+ // resizedImage = op.createCompatibleDestImage(img, img.getColorModel());
336
+ op.filter(img, resizedImage);
337
+
338
+ imgInfo = getimageinfo(resizedImage, "");
339
+ if (imgInfo.errorCode gt 0)
340
+ {
341
+ return imgInfo;
342
+ }
343
+
344
+ cropOffsetX = max( Int( (imgInfo.width/2) - (newWidth/2) ), 0 );
345
+ cropOffsetY = max( Int( (imgInfo.height/2) - (newHeight/2) ), 0 );
346
+ // There is a chance that the image is exactly the correct
347
+ // width and height and don't need to be cropped
348
+ if
349
+ (
350
+ preserveAspect and cropToExact
351
+ and
352
+ (imgInfo.width IS NOT specifiedWidth OR imgInfo.height IS NOT specifiedHeight)
353
+ )
354
+ {
355
+ // Get the correct offset to get the center of the image
356
+ cropOffsetX = max( Int( (imgInfo.width/2) - (specifiedWidth/2) ), 0 );
357
+ cropOffsetY = max( Int( (imgInfo.height/2) - (specifiedHeight/2) ), 0 );
358
+
359
+ cropImageResult = crop( resizedImage, "", "", cropOffsetX, cropOffsetY, specifiedWidth, specifiedHeight );
360
+ if ( cropImageResult.errorCode GT 0)
361
+ {
362
+ return cropImageResult;
363
+ } else {
364
+ resizedImage = cropImageResult.img;
365
+ }
366
+ }
367
+ if (outputFile eq "")
368
+ {
369
+ retVal.img = resizedImage;
370
+ return retVal;
371
+ } else {
372
+ saveImage = writeImage(outputFile, resizedImage, jpegCompression);
373
+ if (saveImage.errorCode gt 0)
374
+ {
375
+ return saveImage;
376
+ } else {
377
+ return retVal;
378
+ }
379
+ }
380
+ </cfscript>
381
+ </cffunction>
382
+
383
+ <cffunction name="crop" access="public" output="true" returntype="struct" hint="Crop an image.">
384
+ <cfargument name="objImage" required="yes" type="Any">
385
+ <cfargument name="inputFile" required="yes" type="string">
386
+ <cfargument name="outputFile" required="yes" type="string">
387
+ <cfargument name="fromX" required="yes" type="numeric">
388
+ <cfargument name="fromY" required="yes" type="numeric">
389
+ <cfargument name="newWidth" required="yes" type="numeric">
390
+ <cfargument name="newHeight" required="yes" type="numeric">
391
+ <cfargument name="jpegCompression" required="no" type="numeric" default="#variables.defaultJpegCompression#">
392
+
393
+ <cfset var retVal = StructNew()>
394
+ <cfset var loadImage = StructNew()>
395
+ <cfset var saveImage = StructNew()>
396
+ <cfset var croppedImage = "">
397
+ <cfset var rh = getRenderingHints()>
398
+ <cfset var img = "">
399
+
400
+ <cfset retVal.errorCode = 0>
401
+ <cfset retVal.errorMessage = "">
402
+
403
+ <cfif inputFile neq "">
404
+ <cfset loadImage = readImage(inputFile, "NO")>
405
+ <cfif loadImage.errorCode is 0>
406
+ <cfset img = loadImage.img>
407
+ <cfelse>
408
+ <cfset retVal = throw(loadImage.errorMessage)>
409
+ <cfreturn retVal>
410
+ </cfif>
411
+ <cfelse>
412
+ <cfset img = objImage>
413
+ </cfif>
414
+ <cfif img.getType() eq 0>
415
+ <cfset img = convertImageObject(img,img.TYPE_3BYTE_BGR)>
416
+ </cfif>
417
+ <cfscript>
418
+ if (fromX + newWidth gt img.getWidth()
419
+ OR
420
+ fromY + newHeight gt img.getHeight()
421
+ )
422
+ {
423
+ retval = throw( "The cropped image dimensions go beyond the original image dimensions.");
424
+ return retVal;
425
+ }
426
+ croppedImage = img.getSubimage(javaCast("int", fromX), javaCast("int", fromY), javaCast("int", newWidth), javaCast("int", newHeight) );
427
+ if (outputFile eq "")
428
+ {
429
+ retVal.img = croppedImage;
430
+ return retVal;
431
+ } else {
432
+ saveImage = writeImage(outputFile, croppedImage, jpegCompression);
433
+ if (saveImage.errorCode gt 0)
434
+ {
435
+ return saveImage;
436
+ } else {
437
+ return retVal;
438
+ }
439
+ }
440
+ </cfscript>
441
+ </cffunction>
442
+
443
+ <cffunction name="rotate" access="public" output="true" returntype="struct" hint="Rotate an image (+/-)90, (+/-)180, or (+/-)270 degrees.">
444
+ <cfargument name="objImage" required="yes" type="Any">
445
+ <cfargument name="inputFile" required="yes" type="string">
446
+ <cfargument name="outputFile" required="yes" type="string">
447
+ <cfargument name="degrees" required="yes" type="numeric">
448
+ <cfargument name="jpegCompression" required="no" type="numeric" default="#variables.defaultJpegCompression#">
449
+
450
+ <cfset var retVal = StructNew()>
451
+ <cfset var img = "">
452
+ <cfset var loadImage = StructNew()>
453
+ <cfset var saveImage = StructNew()>
454
+ <cfset var at = "">
455
+ <cfset var op = "">
456
+ <cfset var w = 0>
457
+ <cfset var h = 0>
458
+ <cfset var iw = 0>
459
+ <cfset var ih = 0>
460
+ <cfset var x = 0>
461
+ <cfset var y = 0>
462
+ <cfset var rotatedImage = "">
463
+ <cfset var rh = getRenderingHints()>
464
+
465
+ <cfset retVal.errorCode = 0>
466
+ <cfset retVal.errorMessage = "">
467
+
468
+ <cfif inputFile neq "">
469
+ <cfset loadImage = readImage(inputFile, "NO")>
470
+ <cfif loadImage.errorCode is 0>
471
+ <cfset img = loadImage.img>
472
+ <cfelse>
473
+ <cfset retVal = throw(loadImage.errorMessage)>
474
+ <cfreturn retVal>
475
+ </cfif>
476
+ <cfelse>
477
+ <cfset img = objImage>
478
+ </cfif>
479
+ <cfif img.getType() eq 0>
480
+ <cfset img = convertImageObject(img,img.TYPE_3BYTE_BGR)>
481
+ </cfif>
482
+ <cfif ListFind("-270,-180,-90,90,180,270",degrees) is 0>
483
+ <cfset retVal = throw( "At this time, image.cfc only supports rotating images in 90 degree increments.")>
484
+ <cfreturn retVal>
485
+ </cfif>
486
+
487
+ <cfscript>
488
+ rotatedImage = CreateObject("java", "java.awt.image.BufferedImage");
489
+ at = CreateObject("java", "java.awt.geom.AffineTransform");
490
+ op = CreateObject("java", "java.awt.image.AffineTransformOp");
491
+
492
+ iw = img.getWidth(); h = iw;
493
+ ih = img.getHeight(); w = ih;
494
+
495
+ if(arguments.degrees eq 180) { w = iw; h = ih; }
496
+
497
+ x = (w/2)-(iw/2);
498
+ y = (h/2)-(ih/2);
499
+
500
+ rotatedImage.init(javacast("int",w),javacast("int",h),img.getType());
501
+
502
+ at.rotate(arguments.degrees * 0.0174532925,w/2,h/2);
503
+ at.translate(x,y);
504
+ op.init(at, rh);
505
+
506
+ op.filter(img, rotatedImage);
507
+
508
+ if (outputFile eq "")
509
+ {
510
+ retVal.img = rotatedImage;
511
+ return retVal;
512
+ } else {
513
+ saveImage = writeImage(outputFile, rotatedImage, jpegCompression);
514
+ if (saveImage.errorCode gt 0)
515
+ {
516
+ return saveImage;
517
+ } else {
518
+ return retVal;
519
+ }
520
+ }
521
+ </cfscript>
522
+ </cffunction>
523
+
524
+ <cffunction name="convert" access="public" output="true" returntype="struct" hint="Convert an image from one format to another.">
525
+ <cfargument name="objImage" required="yes" type="Any">
526
+ <cfargument name="inputFile" required="yes" type="string">
527
+ <cfargument name="outputFile" required="yes" type="string">
528
+ <cfargument name="jpegCompression" required="no" type="numeric" default="#variables.defaultJpegCompression#">
529
+
530
+ <cfset var retVal = StructNew()>
531
+ <cfset var loadImage = StructNew()>
532
+ <cfset var saveImage = StructNew()>
533
+ <cfset var img = "">
534
+
535
+ <cfset retVal.errorCode = 0>
536
+ <cfset retVal.errorMessage = "">
537
+
538
+ <cfif inputFile neq "">
539
+ <cfset loadImage = readImage(inputFile, "NO")>
540
+ <cfif loadImage.errorCode is 0>
541
+ <cfset img = loadImage.img>
542
+ <cfelse>
543
+ <cfset retVal = throw(loadImage.errorMessage)>
544
+ <cfreturn retVal>
545
+ </cfif>
546
+ <cfelse>
547
+ <cfset img = objImage>
548
+ </cfif>
549
+
550
+ <cfscript>
551
+ if (outputFile eq "")
552
+ {
553
+ retVal = throw( "The convert method requires a valid output filename.");
554
+ return retVal;
555
+ } else {
556
+ saveImage = writeImage(outputFile, img, jpegCompression);
557
+ if (saveImage.errorCode gt 0)
558
+ {
559
+ return saveImage;
560
+ } else {
561
+ return retVal;
562
+ }
563
+ }
564
+ </cfscript>
565
+ </cffunction>
566
+
567
+ <cffunction name="setOption" access="public" output="true" returnType="void" hint="Sets values for allowed CFC options.">
568
+ <cfargument name="key" type="string" required="yes">
569
+ <cfargument name="val" type="string" required="yes">
570
+
571
+ <cfset var validKeys = "interpolation,textantialiasing,throwonerror,defaultJpegCompression">
572
+ <cfset arguments.key = lcase(trim(arguments.key))>
573
+ <cfset arguments.val = lcase(trim(arguments.val))>
574
+ <cfif listFind(validKeys, arguments.key) gt 0>
575
+ <cfset variables[arguments.key] = arguments.val>
576
+ </cfif>
577
+ </cffunction>
578
+
579
+ <cffunction name="getOption" access="public" output="true" returnType="any" hint="Returns the current value for the specified CFC option.">
580
+ <cfargument name="key" type="string" required="yes">
581
+
582
+ <cfset var validKeys = "interpolation,textantialiasing,throwonerror,defaultJpegCompression">
583
+ <cfset arguments.key = lcase(trim(arguments.key))>
584
+ <cfif listFindNoCase(validKeys, arguments.key) gt 0>
585
+ <cfreturn variables[arguments.key]>
586
+ <cfelse>
587
+ <cfreturn "">
588
+ </cfif>
589
+ </cffunction>
590
+
591
+ <cffunction name="getRenderingHints" access="private" output="true" returnType="any" hint="Internal method controls various aspects of rendering quality.">
592
+ <cfset var rh = CreateObject("java","java.awt.RenderingHints")>
593
+ <cfset var initMap = CreateObject("java","java.util.HashMap")>
594
+ <cfset initMap.init()>
595
+ <cfset rh.init(initMap)>
596
+ <cfset rh.put(rh.KEY_ALPHA_INTERPOLATION, rh.VALUE_ALPHA_INTERPOLATION_QUALITY)> <!--- QUALITY, SPEED, DEFAULT --->
597
+ <cfset rh.put(rh.KEY_ANTIALIASING, rh.VALUE_ANTIALIAS_ON)> <!--- ON, OFF, DEFAULT --->
598
+ <cfset rh.put(rh.KEY_COLOR_RENDERING, rh.VALUE_COLOR_RENDER_QUALITY)> <!--- QUALITY, SPEED, DEFAULT --->
599
+ <cfset rh.put(rh.KEY_DITHERING, rh.VALUE_DITHER_DEFAULT)> <!--- DISABLE, ENABLE, DEFAULT --->
600
+ <cfset rh.put(rh.KEY_RENDERING, rh.VALUE_RENDER_QUALITY)> <!--- QUALITY, SPEED, DEFAULT --->
601
+ <cfset rh.put(rh.KEY_FRACTIONALMETRICS, rh.VALUE_FRACTIONALMETRICS_DEFAULT)> <!--- DISABLE, ENABLE, DEFAULT --->
602
+ <cfset rh.put(rh.KEY_STROKE_CONTROL, rh.VALUE_STROKE_DEFAULT)>
603
+
604
+ <cfif variables.textAntiAliasing>
605
+ <cfset rh.put(rh.KEY_TEXT_ANTIALIASING, rh.VALUE_TEXT_ANTIALIAS_ON)>
606
+ <cfelse>
607
+ <cfset rh.put(rh.KEY_TEXT_ANTIALIASING, rh.VALUE_TEXT_ANTIALIAS_OFF)>
608
+ </cfif>
609
+
610
+ <cfif variables.interpolation eq "nearest_neighbor">
611
+ <cfset rh.put(rh.KEY_INTERPOLATION, rh.VALUE_INTERPOLATION_NEAREST_NEIGHBOR)>
612
+ <cfelseif variables.interpolation eq "bilinear">
613
+ <cfset rh.put(rh.KEY_INTERPOLATION, rh.VALUE_INTERPOLATION_BILINEAR)>
614
+ <cfelse>
615
+ <cfset rh.put(rh.KEY_INTERPOLATION, rh.VALUE_INTERPOLATION_BICUBIC)>
616
+ </cfif>
617
+
618
+ <cfreturn rh>
619
+ </cffunction>
620
+
621
+ <cffunction name="readImage" access="public" output="true" returntype="struct" hint="Reads an image from a local file. Requires an absolute path.">
622
+ <cfargument name="source" required="yes" type="string">
623
+ <cfargument name="forModification" required="no" type="boolean" default="yes">
624
+
625
+ <cfif isURL(source)>
626
+ <cfreturn readImageFromURL(source, forModification)>
627
+ <cfelse>
628
+ <cfreturn readImageFromFile(source, forModification)>
629
+ </cfif>
630
+ </cffunction>
631
+
632
+ <cffunction name="readImageFromFile" access="private" output="true" returntype="struct" hint="Reads an image from a local file. Requires an absolute path.">
633
+ <cfargument name="inputFile" required="yes" type="string">
634
+ <cfargument name="forModification" required="no" type="boolean" default="yes">
635
+
636
+ <cfset var retVal = StructNew()>
637
+ <cfset var img = "">
638
+ <cfset var inFile = "">
639
+ <cfset var filename = getFileFromPath(inputFile)>
640
+ <cfset var extension = lcase(listLast(inputFile,"."))>
641
+ <cfset var imageIO = CreateObject("java", "javax.imageio.ImageIO")>
642
+ <cfset var validExtensionsToRead = ArrayToList(imageIO.getReaderFormatNames())>
643
+
644
+ <cfset retVal.errorCode = 0>
645
+ <cfset retVal.errorMessage = "">
646
+
647
+ <cfif not fileExists(arguments.inputFile)>
648
+ <cfset retVal = throw("The specified file #Chr(34)##arguments.inputFile##Chr(34)# could not be found.")>
649
+ <cfreturn retVal>
650
+ <cfelseif listLen(filename,".") lt 2>
651
+ <cfset retVal = throw("Sorry, image files without extensions cannot be manipulated.")>
652
+ <cfreturn retVal>
653
+ <cfelseif listFindNoCase(validExtensionsToRead, extension) is 0>
654
+ <cfset retVal = throw("Java is unable to read #extension# files.")>
655
+ <cfreturn retVal>
656
+ <cfelseif NOT fileExists(arguments.inputFile)>
657
+ <cfset retVal = throw("The specified input file does not exist.")>
658
+ <cfreturn retVal>
659
+ <cfelse>
660
+ <cfset img = CreateObject("java", "java.awt.image.BufferedImage")>
661
+ <cfset inFile = CreateObject("java", "java.io.File")>
662
+ <cfset inFile.init(arguments.inputFile)>
663
+ <cfif NOT inFile.canRead()>
664
+ <cfset retVal = throw("Unable to open source file #Chr(34)##arguments.inputFile##Chr(34)#.")>
665
+ <cfreturn retVal>
666
+ <cfelse>
667
+ <cftry>
668
+ <cfset img = imageIO.read(inFile)>
669
+ <cfcatch type="any">
670
+ <cfset retval = throw("An error occurred attempting to read the specified image. #cfcatch.message# - #cfcatch.detail#")>
671
+ <cfreturn retVal>
672
+ </cfcatch>
673
+ </cftry>
674
+ <cfset retVal.img = img>
675
+ <cfset retVal.inFile = inFile>
676
+ <cfreturn retVal>
677
+ </cfif>
678
+ </cfif>
679
+ </cffunction>
680
+
681
+ <cffunction name="readImageFromURL" access="private" output="true" returntype="struct" hint="Read an image from a URL. Requires an absolute URL.">
682
+ <cfargument name="inputURL" required="yes" type="string">
683
+ <cfargument name="forModification" required="no" type="boolean" default="yes">
684
+
685
+ <cfset var retVal = StructNew()>
686
+ <cfset var img = CreateObject("java", "java.awt.image.BufferedImage")>
687
+ <cfset var inURL = CreateObject("java", "java.net.URL")>
688
+ <cfset var imageIO = CreateObject("java", "javax.imageio.ImageIO")>
689
+
690
+ <cfset retVal.errorCode = 0>
691
+ <cfset retVal.errorMessage = "">
692
+
693
+
694
+ <cfset inURL.init(arguments.inputURL)>
695
+ <cftry>
696
+ <cfset img = imageIO.read(inURL)>
697
+ <cfcatch type="any">
698
+ <cfset retval = throw("An error occurred attempting to read the specified image. #cfcatch.message# - #cfcatch.detail#")>
699
+ <cfreturn retVal>
700
+ </cfcatch>
701
+ </cftry>
702
+ <cfset retVal.img = img>
703
+ <cfreturn retVal>
704
+ </cffunction>
705
+
706
+ <cffunction name="writeImage" access="public" output="true" returntype="struct" hint="Write an image to disk.">
707
+ <cfargument name="outputFile" required="yes" type="string">
708
+ <cfargument name="img" required="yes" type="any">
709
+ <cfargument name="jpegCompression" required="no" type="numeric" default="#variables.defaultJpegCompression#">
710
+
711
+ <cfset var retVal = StructNew()>
712
+ <cfset var outFile = "">
713
+ <cfset var filename = getFileFromPath(outputFile)>
714
+ <cfset var extension = lcase(listLast(filename,"."))>
715
+ <cfset var imageIO = CreateObject("java", "javax.imageio.ImageIO")>
716
+ <cfset var validExtensionsToWrite = ArrayToList(imageIO.getWriterFormatNames())>
717
+ <!--- used for jpeg output method --->
718
+ <cfset var out = "">
719
+ <cfset var fos = "">
720
+ <cfset var JPEGCodec = "">
721
+ <cfset var encoder = "">
722
+ <cfset var param = "">
723
+ <cfset var quality = javacast("float", jpegCompression/100)>
724
+ <cfset var tempOutputFile = "#variables.tempDirectory#\#createUUID()#.#extension#">
725
+
726
+ <cfset retVal.errorCode = 0>
727
+ <cfset retVal.errorMessage = "">
728
+
729
+ <cfif listFindNoCase(validExtensionsToWrite, extension) eq 0>
730
+ <cfset throw("Java is unable to write #extension# files. Valid formats include: #validExtensionsToWrite#")>
731
+ </cfif>
732
+
733
+ <cfif extension neq "jpg" and extension neq "jpeg">
734
+ <!---
735
+ Simple output method for non jpeg images
736
+ --->
737
+ <cfset outFile = CreateObject("java", "java.io.File")>
738
+ <cfset outFile.init(tempOutputFile)>
739
+ <cfset imageIO.write(img, extension, outFile)>
740
+ <cfelse>
741
+ <cfscript>
742
+ /*
743
+ JPEG output method handles compression
744
+ */
745
+ out = createObject("java", "java.io.BufferedOutputStream");
746
+ fos = createObject("java", "java.io.FileOutputStream");
747
+ fos.init(tempOutputFile);
748
+ out.init(fos);
749
+ JPEGCodec = createObject("java", "com.sun.image.codec.jpeg.JPEGCodec");
750
+ encoder = JPEGCodec.createJPEGEncoder(out);
751
+ param = encoder.getDefaultJPEGEncodeParam(img);
752
+ param.setQuality(quality, false);
753
+ encoder.setJPEGEncodeParam(param);
754
+ encoder.encode(img);
755
+ out.close();
756
+ </cfscript>
757
+ </cfif>
758
+ <!--- move file to its final destination --->
759
+ <cffile action="MOVE" source="#tempOutputFile#" destination="#arguments.outputFile#">
760
+ <cfreturn retVal>
761
+ </cffunction>
762
+
763
+ <cffunction name="flipflop" access="private" output="true" returntype="struct" hint="Internal method used for flipping and flopping images.">
764
+ <cfargument name="objImage" required="yes" type="Any">
765
+ <cfargument name="inputFile" required="yes" type="string">
766
+ <cfargument name="outputFile" required="yes" type="string">
767
+ <cfargument name="direction" required="yes" type="string"><!--- horizontal or vertical --->
768
+ <cfargument name="jpegCompression" required="no" type="numeric" default="#variables.defaultJpegCompression#">
769
+
770
+ <cfset var retVal = StructNew()>
771
+ <cfset var loadImage = StructNew()>
772
+ <cfset var saveImage = StructNew()>
773
+ <cfset var flippedImage = "">
774
+ <cfset var rh = getRenderingHints()>
775
+ <cfset var img = "">
776
+
777
+ <cfset retVal.errorCode = 0>
778
+ <cfset retVal.errorMessage = "">
779
+
780
+ <cfif inputFile neq "">
781
+ <cfset loadImage = readImage(inputFile, "NO")>
782
+ <cfif loadImage.errorCode is 0>
783
+ <cfset img = loadImage.img>
784
+ <cfelse>
785
+ <cfset retVal = throw(loadImage.errorMessage)>
786
+ <cfreturn retVal>
787
+ </cfif>
788
+ <cfelse>
789
+ <cfset img = objImage>
790
+ </cfif>
791
+ <cfif img.getType() eq 0>
792
+ <cfset img = convertImageObject(img,img.TYPE_3BYTE_BGR)>
793
+ </cfif>
794
+ <cfscript>
795
+ flippedImage = CreateObject("java", "java.awt.image.BufferedImage");
796
+ at = CreateObject("java", "java.awt.geom.AffineTransform");
797
+ op = CreateObject("java", "java.awt.image.AffineTransformOp");
798
+
799
+ flippedImage.init(img.getWidth(), img.getHeight(), img.getType());
800
+
801
+ if (direction eq "horizontal") {
802
+ at = at.getScaleInstance(-1, 1);
803
+ at.translate(-img.getWidth(), 0);
804
+ } else {
805
+ at = at.getScaleInstance(1,-1);
806
+ at.translate(0, -img.getHeight());
807
+ }
808
+ op.init(at, rh);
809
+ op.filter(img, flippedImage);
810
+
811
+ if (outputFile eq "")
812
+ {
813
+ retVal.img = flippedImage;
814
+ return retVal;
815
+ } else {
816
+ saveImage = writeImage(outputFile, flippedImage, jpegCompression);
817
+ if (saveImage.errorCode gt 0)
818
+ {
819
+ return saveImage;
820
+ } else {
821
+ return retVal;
822
+ }
823
+ }
824
+ </cfscript>
825
+ </cffunction>
826
+
827
+
828
+
829
+ <cffunction name="filterFastBlur" access="public" output="true" returntype="struct" hint="Internal method used for flipping and flopping images.">
830
+ <cfargument name="objImage" required="yes" type="Any">
831
+ <cfargument name="inputFile" required="yes" type="string">
832
+ <cfargument name="outputFile" required="yes" type="string">
833
+ <cfargument name="blurAmount" required="yes" type="numeric">
834
+ <cfargument name="iterations" required="yes" type="numeric">
835
+ <cfargument name="jpegCompression" required="no" type="numeric" default="#variables.defaultJpegCompression#">
836
+
837
+ <cfset var retVal = StructNew()>
838
+ <cfset var loadImage = StructNew()>
839
+ <cfset var saveImage = StructNew()>
840
+ <cfset var srcImage = "">
841
+ <cfset var destImage = "">
842
+ <cfset var rh = getRenderingHints()>
843
+
844
+ <cfset retVal.errorCode = 0>
845
+ <cfset retVal.errorMessage = "">
846
+
847
+ <cfif NOT variables.javanulls>
848
+ <cfset throw("Sorry, but the blur filter is not supported on this platform.")>
849
+ </cfif>
850
+ <cfif inputFile neq "">
851
+ <cfset loadImage = readImage(inputFile, "NO")>
852
+ <cfif loadImage.errorCode is 0>
853
+ <cfset srcImage = loadImage.img>
854
+ <cfelse>
855
+ <cfset retVal = throw(loadImage.errorMessage)>
856
+ <cfreturn retVal>
857
+ </cfif>
858
+ <cfelse>
859
+ <cfset srcImage = objImage>
860
+ </cfif>
861
+ <cfif srcImage.getType() eq 0>
862
+ <cfset srcImage = convertImageObject(srcImage,srcImage.TYPE_3BYTE_BGR)>
863
+ </cfif>
864
+
865
+ <cfscript>
866
+
867
+ // initialize the blur filter
868
+ variables.blurFilter.init(arguments.blurAmount);
869
+ // move the source image into the destination image
870
+ // so we can repeatedly blur it.
871
+ destImage = srcImage;
872
+
873
+ for (i=1; i lte iterations; i=i+1)
874
+ {
875
+ // do the blur i times
876
+ destImage = variables.blurFilter.filter(destImage);
877
+ }
878
+
879
+
880
+ if (outputFile eq "")
881
+ {
882
+ // return the image object
883
+ retVal.img = destImage;
884
+ return retVal;
885
+ } else {
886
+ // write the image object to the specified file.
887
+ saveImage = writeImage(outputFile, destImage, jpegCompression);
888
+ if (saveImage.errorCode gt 0)
889
+ {
890
+ return saveImage;
891
+ } else {
892
+ return retVal;
893
+ }
894
+ }
895
+ </cfscript>
896
+ </cffunction>
897
+
898
+ <cffunction name="filterSharpen" access="public" output="true" returntype="struct" hint="Internal method used for flipping and flopping images.">
899
+ <cfargument name="objImage" required="yes" type="Any">
900
+ <cfargument name="inputFile" required="yes" type="string">
901
+ <cfargument name="outputFile" required="yes" type="string">
902
+ <cfargument name="jpegCompression" required="no" type="numeric" default="#variables.defaultJpegCompression#">
903
+
904
+ <cfset var retVal = StructNew()>
905
+ <cfset var loadImage = StructNew()>
906
+ <cfset var saveImage = StructNew()>
907
+ <cfset var srcImage = "">
908
+ <cfset var destImage = "">
909
+ <cfset var rh = getRenderingHints()>
910
+
911
+ <cfset retVal.errorCode = 0>
912
+ <cfset retVal.errorMessage = "">
913
+
914
+ <cfif NOT variables.javanulls>
915
+ <cfset throw("Sorry, but the blur filter is not supported on this platform.")>
916
+ </cfif>
917
+
918
+ <cfif inputFile neq "">
919
+ <cfset loadImage = readImage(inputFile, "NO")>
920
+ <cfif loadImage.errorCode is 0>
921
+ <cfset srcImage = loadImage.img>
922
+ <cfelse>
923
+ <cfset retVal = throw(loadImage.errorMessage)>
924
+ <cfreturn retVal>
925
+ </cfif>
926
+ <cfelse>
927
+ <cfset srcImage = objImage>
928
+ </cfif>
929
+ <cfif srcImage.getType() eq 0>
930
+ <cfset srcImage = convertImageObject(srcImage,srcImage.TYPE_3BYTE_BGR)>
931
+ </cfif>
932
+
933
+ <cfscript>
934
+ // initialize the sharpen filter
935
+ variables.sharpenFilter.init();
936
+
937
+ destImage = variables.sharpenFilter.filter(srcImage);
938
+
939
+
940
+ if (outputFile eq "")
941
+ {
942
+ // return the image object
943
+ retVal.img = destImage;
944
+ return retVal;
945
+ } else {
946
+ // write the image object to the specified file.
947
+ saveImage = writeImage(outputFile, destImage, jpegCompression);
948
+ if (saveImage.errorCode gt 0)
949
+ {
950
+ return saveImage;
951
+ } else {
952
+ return retVal;
953
+ }
954
+ }
955
+ </cfscript>
956
+ </cffunction>
957
+
958
+
959
+ <cffunction name="filterPosterize" access="public" output="true" returntype="struct" hint="Internal method used for flipping and flopping images.">
960
+ <cfargument name="objImage" required="yes" type="Any">
961
+ <cfargument name="inputFile" required="yes" type="string">
962
+ <cfargument name="outputFile" required="yes" type="string">
963
+ <cfargument name="amount" required="yes" type="string">
964
+ <cfargument name="jpegCompression" required="no" type="numeric" default="#variables.defaultJpegCompression#">
965
+
966
+ <cfset var retVal = StructNew()>
967
+ <cfset var loadImage = StructNew()>
968
+ <cfset var saveImage = StructNew()>
969
+ <cfset var srcImage = "">
970
+ <cfset var destImage = "">
971
+ <cfset var rh = getRenderingHints()>
972
+
973
+ <cfset retVal.errorCode = 0>
974
+ <cfset retVal.errorMessage = "">
975
+
976
+ <cfif NOT variables.javanulls>
977
+ <cfset throw("Sorry, but the blur filter is not supported on this platform.")>
978
+ </cfif>
979
+
980
+ <cfif inputFile neq "">
981
+ <cfset loadImage = readImage(inputFile, "NO")>
982
+ <cfif loadImage.errorCode is 0>
983
+ <cfset srcImage = loadImage.img>
984
+ <cfelse>
985
+ <cfset retVal = throw(loadImage.errorMessage)>
986
+ <cfreturn retVal>
987
+ </cfif>
988
+ <cfelse>
989
+ <cfset srcImage = objImage>
990
+ </cfif>
991
+ <cfif srcImage.getType() eq 0>
992
+ <cfset srcImage = convertImageObject(srcImage,srcImage.TYPE_3BYTE_BGR)>
993
+ </cfif>
994
+ <cfif srcImage.getType() neq 5>
995
+ <cfset throw("ImageCFC cannot posterize this image type (#srcImage.getType()#)")>
996
+ </cfif>
997
+ <cfscript>
998
+ // initialize the posterize filter
999
+ variables.posterizeFilter.init(arguments.amount);
1000
+
1001
+ destImage = variables.posterizeFilter.filter(srcImage);
1002
+
1003
+
1004
+ if (outputFile eq "")
1005
+ {
1006
+ // return the image object
1007
+ retVal.img = destImage;
1008
+ return retVal;
1009
+ } else {
1010
+ // write the image object to the specified file.
1011
+ saveImage = writeImage(outputFile, destImage, jpegCompression);
1012
+ if (saveImage.errorCode gt 0)
1013
+ {
1014
+ return saveImage;
1015
+ } else {
1016
+ return retVal;
1017
+ }
1018
+ }
1019
+ </cfscript>
1020
+ </cffunction>
1021
+
1022
+
1023
+ <cffunction name="addText" access="public" output="true" returntype="struct" hint="Add text to an image.">
1024
+ <cfargument name="objImage" required="yes" type="Any">
1025
+ <cfargument name="inputFile" required="yes" type="string">
1026
+ <cfargument name="outputFile" required="yes" type="string">
1027
+ <cfargument name="x" required="yes" type="numeric">
1028
+ <cfargument name="y" required="yes" type="numeric">
1029
+ <cfargument name="fontDetails" required="yes" type="struct">
1030
+ <cfargument name="content" required="yes" type="String">
1031
+ <cfargument name="jpegCompression" required="no" type="numeric" default="#variables.defaultJpegCompression#">
1032
+
1033
+ <cfset var retVal = StructNew()>
1034
+ <cfset var loadImage = StructNew()>
1035
+ <cfset var img = "">
1036
+ <cfset var saveImage = StructNew()>
1037
+ <cfset var g2d = "">
1038
+ <cfset var bgImage = "">
1039
+ <cfset var fontImage = "">
1040
+ <cfset var overlayImage = "">
1041
+ <cfset var Color = "">
1042
+ <cfset var font = "">
1043
+ <cfset var font_stream = "">
1044
+ <cfset var ac = "">
1045
+ <cfset var rgb = "">
1046
+
1047
+ <cfset retVal.errorCode = 0>
1048
+ <cfset retVal.errorMessage = "">
1049
+
1050
+ <cfparam name="arguments.fontDetails.size" default="12">
1051
+ <cfparam name="arguments.fontDetails.color" default="black">
1052
+ <cfparam name="arguments.fontDetails.fontFile" default="">
1053
+ <cfparam name="arguments.fontDetails.fontName" default="serif">
1054
+
1055
+ <cfif arguments.fontDetails.fontFile neq "" and not fileExists(arguments.fontDetails.fontFile)>
1056
+ <cfset retVal = throw("The specified font file #Chr(34)##arguments.inputFile##Chr(34)# could not be found on the server.")>
1057
+ <cfreturn retVal>
1058
+ </cfif>
1059
+ <cftry>
1060
+ <cfset rgb = getRGB(arguments.fontDetails.color)>
1061
+ <cfcatch type="any">
1062
+ <cfset retVal = throw("Invalid color #Chr(34)##arguments.fontDetails.color##Chr(34)#")>
1063
+ <cfreturn retVal>
1064
+ </cfcatch>
1065
+ </cftry>
1066
+ <cfif inputFile neq "">
1067
+ <cfset loadImage = readImage(inputFile, "NO")>
1068
+ <cfif loadImage.errorCode is 0>
1069
+ <cfset img = loadImage.img>
1070
+ <cfelse>
1071
+ <cfset retVal = throw(loadImage.errorMessage)>
1072
+ <cfreturn retVal>
1073
+ </cfif>
1074
+ <cfelse>
1075
+ <cfset img = objImage>
1076
+ </cfif>
1077
+ <cfif img.getType() eq 0>
1078
+ <cfset img = convertImageObject(img,img.TYPE_3BYTE_BGR)>
1079
+ </cfif>
1080
+ <cfscript>
1081
+ // load objects
1082
+ bgImage = CreateObject("java", "java.awt.image.BufferedImage");
1083
+ fontImage = CreateObject("java", "java.awt.image.BufferedImage");
1084
+ overlayImage = CreateObject("java", "java.awt.image.BufferedImage");
1085
+ Color = CreateObject("java","java.awt.Color");
1086
+ font = createObject("java","java.awt.Font");
1087
+ font_stream = createObject("java","java.io.FileInputStream");
1088
+ ac = CreateObject("Java", "java.awt.AlphaComposite");
1089
+
1090
+ // set up basic needs
1091
+ fontColor = Color.init(javacast("int", rgb.red), javacast("int", rgb.green), javacast("int", rgb.blue));
1092
+
1093
+ if (fontDetails.fontFile neq "")
1094
+ {
1095
+ font_stream.init(arguments.fontDetails.fontFile);
1096
+ font = font.createFont(font.TRUETYPE_FONT, font_stream);
1097
+ font = font.deriveFont(javacast("float",arguments.fontDetails.size));
1098
+ } else {
1099
+ font.init(fontDetails.fontName, evaluate(fontDetails.style), fontDetails.size);
1100
+ }
1101
+ // get font metrics using a 1x1 bufferedImage
1102
+ fontImage.init(1,1,img.getType());
1103
+ g2 = fontImage.createGraphics();
1104
+ g2.setRenderingHints(getRenderingHints());
1105
+ fc = g2.getFontRenderContext();
1106
+ bounds = font.getStringBounds(content,fc);
1107
+
1108
+ g2 = img.createGraphics();
1109
+ g2.setRenderingHints(getRenderingHints());
1110
+ g2.setFont(font);
1111
+ g2.setColor(fontColor);
1112
+ // in case you want to change the alpha
1113
+ // g2.setComposite(ac.getInstance(ac.SRC_OVER, 0.50));
1114
+
1115
+ // the location (arguments.fontDetails.size+y) doesn't really work
1116
+ // the way I want it to.
1117
+ g2.drawString(content,javacast("int",x),javacast("int",arguments.fontDetails.size+y));
1118
+
1119
+ if (outputFile eq "")
1120
+ {
1121
+ retVal.img = img;
1122
+ return retVal;
1123
+ } else {
1124
+ saveImage = writeImage(outputFile, img, jpegCompression);
1125
+ if (saveImage.errorCode gt 0)
1126
+ {
1127
+ return saveImage;
1128
+ } else {
1129
+ return retVal;
1130
+ }
1131
+ }
1132
+ </cfscript>
1133
+ </cffunction>
1134
+
1135
+ <cffunction name="watermark" access="public" output="false">
1136
+ <cfargument name="objImage1" required="yes" type="Any">
1137
+ <cfargument name="objImage2" required="yes" type="Any">
1138
+ <cfargument name="inputFile1" required="yes" type="string">
1139
+ <cfargument name="inputFile2" required="yes" type="string">
1140
+ <cfargument name="alpha" required="yes" type="numeric">
1141
+ <cfargument name="placeAtX" required="yes" type="numeric">
1142
+ <cfargument name="placeAtY" required="yes" type="numeric">
1143
+ <cfargument name="outputFile" required="yes" type="string">
1144
+ <cfargument name="jpegCompression" required="no" type="numeric" default="#variables.defaultJpegCompression#">
1145
+
1146
+ <cfset var retVal = StructNew()>
1147
+ <cfset var loadImage = StructNew()>
1148
+ <cfset var originalImage = "">
1149
+ <cfset var wmImage = "">
1150
+ <cfset var saveImage = StructNew()>
1151
+ <cfset var ac = "">
1152
+ <cfset var rh = getRenderingHints()>
1153
+
1154
+ <cfset retVal.errorCode = 0>
1155
+ <cfset retVal.errorMessage = "">
1156
+
1157
+ <cfif inputFile1 neq "">
1158
+ <cfset loadImage = readImage(inputFile1, "NO")>
1159
+ <cfif loadImage.errorCode is 0>
1160
+ <cfset originalImage = loadImage.img>
1161
+ <cfelse>
1162
+ <cfset retVal = throw(loadImage.errorMessage)>
1163
+ <cfreturn retVal>
1164
+ </cfif>
1165
+ <cfelse>
1166
+ <cfset originalImage = objImage1>
1167
+ </cfif>
1168
+ <cfif originalImage.getType() eq 0>
1169
+ <cfset originalImage = convertImageObject(originalImage,originalImage.TYPE_3BYTE_BGR)>
1170
+ </cfif>
1171
+
1172
+ <cfif inputFile2 neq "">
1173
+ <cfset loadImage = readImage(inputFile2, "NO")>
1174
+ <cfif loadImage.errorCode is 0>
1175
+ <cfset wmImage = loadImage.img>
1176
+ <cfelse>
1177
+ <cfset retVal = throw(loadImage.errorMessage)>
1178
+ <cfreturn retVal>
1179
+ </cfif>
1180
+ <cfelse>
1181
+ <cfset wmImage = objImage2>
1182
+ </cfif>
1183
+ <cfif wmImage.getType() eq 0>
1184
+ <cfset wmImage = convertImageObject(wmImage,wmImage.TYPE_3BYTE_BGR)>
1185
+ </cfif>
1186
+
1187
+
1188
+ <cfscript>
1189
+ at = CreateObject("java", "java.awt.geom.AffineTransform");
1190
+ op = CreateObject("java", "java.awt.image.AffineTransformOp");
1191
+ ac = CreateObject("Java", "java.awt.AlphaComposite");
1192
+ gfx = originalImage.getGraphics();
1193
+ gfx.setComposite(ac.getInstance(ac.SRC_OVER, alpha));
1194
+
1195
+ at.init();
1196
+ // op.init(at,op.TYPE_BILINEAR);
1197
+ op.init(at, rh);
1198
+
1199
+ gfx.drawImage(wmImage, op, javaCast("int",arguments.placeAtX), javacast("int", arguments.placeAtY));
1200
+
1201
+ gfx.dispose();
1202
+
1203
+ if (outputFile eq "")
1204
+ {
1205
+ retVal.img = originalImage;
1206
+ return retVal;
1207
+ } else {
1208
+ saveImage = writeImage(outputFile, originalImage, jpegCompression);
1209
+ if (saveImage.errorCode gt 0)
1210
+ {
1211
+ return saveImage;
1212
+ } else {
1213
+ return retVal;
1214
+ }
1215
+ }
1216
+ </cfscript>
1217
+ </cffunction>
1218
+
1219
+ <cffunction name="isURL" access="private" output="false" returnType="boolean">
1220
+ <cfargument name="stringToCheck" required="yes" type="string">
1221
+ <cfif REFindNoCase("^(((https?:)\/\/))[-[:alnum:]\?%,\.\/&##!@:=\+~_]+[A-Za-z0-9\/]$",stringToCheck) NEQ 0>
1222
+ <cfreturn true>
1223
+ <cfelse>
1224
+ <cfreturn false>
1225
+ </cfif>
1226
+ </cffunction>
1227
+
1228
+ <!--- function returns RGB values in a structure for hex or the 16
1229
+ HTML named colors --->
1230
+ <cffunction name="getRGB" access="private" output="true" returnType="struct">
1231
+ <cfargument name="color" type="string" required="yes">
1232
+
1233
+ <cfset var retVal = structNew()>
1234
+ <cfset var cnt = 0>
1235
+ <cfset var namedColors = "aqua,black,blue,fuchsia,gray,green,lime,maroon,navy,olive,purple,red,silver,teal,white,yellow">
1236
+ <cfset var namedColorsHexValues = "00ffff,000000,0000ff,ff00ff,808080,008000,00ff00,800000,000080,808080,ff0000,c0c0c0,008080,ffffff,ffff00">
1237
+
1238
+ <cfset retVal.red = 0>
1239
+ <cfset retVal.green = 0>
1240
+ <cfset retVal.blue = 0>
1241
+
1242
+ <cfset arguments.color = trim(arguments.color)>
1243
+ <cfif len(arguments.color) is 0>
1244
+ <cfreturn retVal>
1245
+ <cfelseif listFind(namedColors, arguments.color) gt 0>
1246
+ <cfset arguments.color = listGetAt(namedColorsHexValues, listFind(namedColors, arguments.color))>
1247
+ </cfif>
1248
+ <cfif left(arguments.color,1) eq "##">
1249
+ <cfset arguments.color = right(arguments.color,len(arguments.color)-1)>
1250
+ </cfif>
1251
+ <cfif len(arguments.color) neq 6>
1252
+ <cfreturn retVal>
1253
+ <cfelse>
1254
+ <cftry>
1255
+ <cfset retVal.red = InputBaseN(mid(arguments.color,1,2),16)>
1256
+ <cfset retVal.green = InputBaseN(mid(arguments.color,3,2),16)>
1257
+ <cfset retVal.blue = InputBaseN(mid(arguments.color,5,2),16)>
1258
+ <cfcatch type="any">
1259
+ <cfset retVal.red = 0>
1260
+ <cfset retVal.green = 0>
1261
+ <cfset retVal.blue = 0>
1262
+ <cfreturn retVal>
1263
+ </cfcatch>
1264
+ </cftry>
1265
+ </cfif>
1266
+ <cfreturn retVal>
1267
+ </cffunction>
1268
+
1269
+ <cffunction name="throw" access="private" output="false" returnType="struct">
1270
+ <cfargument name="detail" type="string" required="yes">
1271
+ <cfargument name="force" type="boolean" required="no" default="no">
1272
+
1273
+ <cfset var retVal = StructNew()>
1274
+
1275
+ <cfif variables.throwOnError or arguments.force>
1276
+ <cfthrow detail="#arguments.detail#" message="#arguments.detail#">
1277
+ <cfelse>
1278
+ <cfset retVal.errorCode = 1>
1279
+ <cfset retVal.errorMessage = arguments.detail>
1280
+ <cfreturn retVal>
1281
+ </cfif>
1282
+ </cffunction>
1283
+
1284
+ <cffunction name="debugDump" access="private">
1285
+ <cfdump var="#arguments#"><cfabort>
1286
+ </cffunction>
1287
+
1288
+ <cffunction name="convertImageObject" access="private" output="false" returnType="any">
1289
+ <cfargument name="bImage" type="Any" required="yes">
1290
+ <cfargument name="type" type="numeric" required="yes">
1291
+
1292
+ <cfscript>
1293
+ // convert the image to a specified BufferedImage type and return it
1294
+
1295
+ var width = bImage.getWidth();
1296
+ var height = bImage.getHeight();
1297
+ var newImage = createObject("java","java.awt.image.BufferedImage").init(javacast("int",width), javacast("int",height), javacast("int",type));
1298
+ // int[] rgbArray = new int[width*height];
1299
+ var rgbArray = variables.arrObj.newInstance(variables.intClass, javacast("int",width*height));
1300
+
1301
+ bImage.getRGB(
1302
+ javacast("int",0),
1303
+ javacast("int",0),
1304
+ javacast("int",width),
1305
+ javacast("int",height),
1306
+ rgbArray,
1307
+ javacast("int",0),
1308
+ javacast("int",width)
1309
+ );
1310
+ newImage.setRGB(
1311
+ javacast("int",0),
1312
+ javacast("int",0),
1313
+ javacast("int",width),
1314
+ javacast("int",height),
1315
+ rgbArray,
1316
+ javacast("int",0),
1317
+ javacast("int",width)
1318
+ );
1319
+ return newImage;
1320
+ </cfscript>
1321
+
1322
+ </cffunction>
1323
+
1324
+ </cfcomponent>
1325
+