typo 5.0.3.98.1 → 5.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES-5.1 +54 -0
- data/app/apis/meta_weblog_service.rb +7 -6
- data/app/controllers/accounts_controller.rb +2 -1
- data/app/controllers/admin/content_controller.rb +45 -3
- data/app/controllers/admin/pages_controller.rb +1 -1
- data/app/controllers/admin/textfilters_controller.rb +4 -4
- data/app/controllers/admin/users_controller.rb +14 -2
- data/app/controllers/application.rb +4 -1
- data/app/controllers/articles_controller.rb +1 -3
- data/app/controllers/backend_controller.rb +2 -0
- data/app/controllers/comments_controller.rb +6 -0
- data/app/helpers/admin/base_helper.rb +24 -26
- data/app/helpers/admin/feedback_helper.rb +0 -20
- data/app/helpers/application_helper.rb +1 -0
- data/app/models/article.rb +2 -0
- data/app/models/blog.rb +1 -0
- data/app/models/blog_sweeper.rb +8 -9
- data/app/models/page_cache.rb +1 -0
- data/app/models/tag.rb +2 -2
- data/app/models/user.rb +5 -1
- data/app/views/admin/blacklist/destroy.html.erb +1 -1
- data/app/views/admin/categories/destroy.html.erb +1 -1
- data/app/views/admin/comments/destroy.html.erb +1 -1
- data/app/views/admin/content/_articles.html.erb +4 -4
- data/app/views/admin/content/_attachment.html.erb +6 -7
- data/app/views/admin/content/_drafts.html.erb +6 -0
- data/app/views/admin/content/_form.html.erb +47 -34
- data/app/views/admin/content/destroy.html.erb +1 -1
- data/app/views/admin/content/edit.html.erb +1 -1
- data/app/views/admin/content/index.html.erb +1 -6
- data/app/views/admin/content/new.html.erb +1 -1
- data/app/views/admin/pages/_form.html.erb +4 -3
- data/app/views/admin/pages/_pages.html.erb +3 -3
- data/app/views/admin/pages/destroy.html.erb +1 -1
- data/app/views/admin/resources/destroy.html.erb +1 -1
- data/app/views/admin/settings/index.html.erb +10 -0
- data/app/views/admin/shared/_edit.html.erb +1 -6
- data/app/views/admin/textfilters/destroy.html.erb +3 -0
- data/app/views/admin/textfilters/edit.html.erb +3 -1
- data/app/views/admin/textfilters/index.html.erb +1 -1
- data/app/views/admin/textfilters/new.html.erb +3 -1
- data/app/views/admin/trackbacks/show.html.erb +1 -1
- data/app/views/admin/users/destroy.html.erb +1 -1
- data/app/views/admin/users/edit.html.erb +1 -5
- data/app/views/admin/users/index.html.erb +1 -1
- data/app/views/articles/_comment_failed.html.erb +3 -0
- data/config/initializers/access_rules.rb +3 -3
- data/db/migrate/070_add_users_to_non_admins.rb +17 -0
- data/installer/rails_installer_defaults.yml +1 -1
- data/lib/tasks/release.rake +3 -3
- data/lib/typo_version.rb +1 -1
- data/public/images/admin/cancel.png +0 -0
- data/public/images/admin/checked.png +0 -0
- data/public/images/admin/delete.png +0 -0
- data/public/images/admin/edit.png +0 -0
- data/public/images/admin/show.png +0 -0
- data/public/javascripts/controls.js +2 -0
- data/public/javascripts/dragdrop.js +2 -0
- data/public/javascripts/effects.js +6 -4
- data/public/javascripts/fckeditor/editor/_source/classes/fckcontextmenu.js +13 -8
- data/public/javascripts/fckeditor/editor/_source/classes/fckdataprocessor.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/classes/fckdocumentfragment_gecko.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/classes/fckdocumentfragment_ie.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/classes/fckdomrange.js +189 -79
- data/public/javascripts/fckeditor/editor/_source/classes/fckdomrange_gecko.js +4 -3
- data/public/javascripts/fckeditor/editor/_source/classes/fckdomrange_ie.js +16 -15
- data/public/javascripts/fckeditor/editor/_source/classes/fckdomrangeiterator.js +30 -9
- data/public/javascripts/fckeditor/editor/_source/classes/fckeditingarea.js +108 -90
- data/public/javascripts/fckeditor/editor/_source/classes/fckelementpath.js +22 -3
- data/public/javascripts/fckeditor/editor/_source/classes/fckenterkey.js +76 -38
- data/public/javascripts/fckeditor/editor/_source/classes/fckevents.js +7 -2
- data/public/javascripts/fckeditor/editor/_source/classes/fckhtmliterator.js +142 -0
- data/public/javascripts/fckeditor/editor/_source/classes/fckicon.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/classes/fckiecleanup.js +1 -1
- data/public/javascripts/fckeditor/editor/_source/classes/fckimagepreloader.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/classes/fckkeystrokehandler.js +3 -3
- data/public/javascripts/fckeditor/editor/_source/classes/fckmenublock.js +8 -5
- data/public/javascripts/fckeditor/editor/_source/classes/fckmenublockpanel.js +3 -3
- data/public/javascripts/fckeditor/editor/_source/classes/fckmenuitem.js +6 -5
- data/public/javascripts/fckeditor/editor/_source/classes/fckpanel.js +85 -38
- data/public/javascripts/fckeditor/editor/_source/classes/fckplugin.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/classes/fckspecialcombo.js +7 -8
- data/public/javascripts/fckeditor/editor/_source/classes/fckstyle.js +180 -17
- data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbar.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbarbreak_gecko.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbarbreak_ie.js +1 -1
- data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbarbutton.js +9 -4
- data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbarbuttonui.js +5 -1
- data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbarfontformatcombo.js +3 -3
- data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbarfontscombo.js +1 -1
- data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbarfontsizecombo.js +1 -1
- data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbarpanelbutton.js +15 -4
- data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbarspecialcombo.js +5 -2
- data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbarstylecombo.js +13 -13
- data/public/javascripts/fckeditor/editor/_source/classes/fckw3crange.js +17 -13
- data/public/javascripts/fckeditor/editor/_source/classes/fckxml.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/classes/fckxml_gecko.js +28 -13
- data/public/javascripts/fckeditor/editor/_source/classes/fckxml_ie.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/commandclasses/fck_othercommands.js +75 -19
- data/public/javascripts/fckeditor/editor/_source/commandclasses/fckblockquotecommand.js +64 -8
- data/public/javascripts/fckeditor/editor/_source/commandclasses/fckcorestylecommand.js +3 -1
- data/public/javascripts/fckeditor/editor/_source/commandclasses/fckfitwindow.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/commandclasses/fckindentcommands.js +5 -3
- data/public/javascripts/fckeditor/editor/_source/commandclasses/fckjustifycommands.js +6 -6
- data/public/javascripts/fckeditor/editor/_source/commandclasses/fcklistcommands.js +4 -4
- data/public/javascripts/fckeditor/editor/_source/commandclasses/fcknamedcommand.js +3 -1
- data/public/javascripts/fckeditor/editor/_source/commandclasses/fckpasteplaintextcommand.js +3 -1
- data/public/javascripts/fckeditor/editor/_source/commandclasses/fckpastewordcommand.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/commandclasses/fckremoveformatcommand.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/commandclasses/fckshowblocks.js +7 -9
- data/public/javascripts/fckeditor/editor/_source/commandclasses/fckspellcheckcommand_gecko.js +4 -2
- data/public/javascripts/fckeditor/editor/_source/commandclasses/fckspellcheckcommand_ie.js +4 -2
- data/public/javascripts/fckeditor/editor/_source/commandclasses/fckstylecommand.js +3 -3
- data/public/javascripts/fckeditor/editor/_source/commandclasses/fcktablecommand.js +4 -4
- data/public/javascripts/fckeditor/editor/_source/commandclasses/fcktextcolorcommand.js +28 -10
- data/public/javascripts/fckeditor/editor/_source/fckconstants.js +1 -1
- data/public/javascripts/fckeditor/editor/_source/fckeditorapi.js +21 -13
- data/public/javascripts/fckeditor/editor/_source/fckjscoreextensions.js +5 -5
- data/public/javascripts/fckeditor/editor/_source/fckscriptloader.js +4 -4
- data/public/javascripts/fckeditor/editor/_source/internals/fck.js +148 -38
- data/public/javascripts/fckeditor/editor/_source/internals/fck_contextmenu.js +4 -4
- data/public/javascripts/fckeditor/editor/_source/internals/fck_gecko.js +45 -47
- data/public/javascripts/fckeditor/editor/_source/internals/fck_ie.js +50 -17
- data/public/javascripts/fckeditor/editor/_source/internals/fckbrowserinfo.js +4 -2
- data/public/javascripts/fckeditor/editor/_source/internals/fckcodeformatter.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/internals/fckcommands.js +28 -28
- data/public/javascripts/fckeditor/editor/_source/internals/fckconfig.js +12 -13
- data/public/javascripts/fckeditor/editor/_source/internals/fckdebug.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/internals/fckdialog.js +211 -15
- data/public/javascripts/fckeditor/editor/_source/internals/fckdocumentprocessor.js +63 -39
- data/public/javascripts/fckeditor/editor/_source/internals/fckdomtools.js +177 -37
- data/public/javascripts/fckeditor/editor/_source/internals/fcklanguagemanager.js +2 -1
- data/public/javascripts/fckeditor/editor/_source/internals/fcklisthandler.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/internals/fcklistslib.js +5 -2
- data/public/javascripts/fckeditor/editor/_source/internals/fckplugins.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/internals/fckregexlib.js +5 -2
- data/public/javascripts/fckeditor/editor/_source/internals/fckselection.js +3 -3
- data/public/javascripts/fckeditor/editor/_source/internals/fckselection_gecko.js +36 -27
- data/public/javascripts/fckeditor/editor/_source/internals/fckselection_ie.js +91 -17
- data/public/javascripts/fckeditor/editor/_source/internals/fckstyles.js +22 -13
- data/public/javascripts/fckeditor/editor/_source/internals/fcktablehandler.js +15 -15
- data/public/javascripts/fckeditor/editor/_source/internals/fcktablehandler_gecko.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/internals/fcktablehandler_ie.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/internals/fcktoolbaritems.js +1 -1
- data/public/javascripts/fckeditor/editor/_source/internals/fcktoolbarset.js +32 -6
- data/public/javascripts/fckeditor/editor/_source/internals/fcktools.js +181 -22
- data/public/javascripts/fckeditor/editor/_source/internals/fcktools_gecko.js +19 -7
- data/public/javascripts/fckeditor/editor/_source/internals/fcktools_ie.js +8 -2
- data/public/javascripts/fckeditor/editor/_source/internals/fckundo.js +8 -5
- data/public/javascripts/fckeditor/editor/_source/internals/fckurlparams.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/internals/fckxhtml.js +116 -61
- data/public/javascripts/fckeditor/editor/_source/internals/fckxhtml_gecko.js +6 -10
- data/public/javascripts/fckeditor/editor/_source/internals/fckxhtml_ie.js +51 -56
- data/public/javascripts/fckeditor/editor/_source/internals/fckxhtmlentities.js +1 -1
- data/public/javascripts/fckeditor/editor/css/fck_editorarea.css +3 -2
- data/public/javascripts/fckeditor/editor/css/fck_internal.css +19 -2
- data/public/javascripts/fckeditor/editor/css/fck_showtableborders_gecko.css +8 -1
- data/public/javascripts/fckeditor/editor/css/images/fck_plugin.gif +0 -0
- data/public/javascripts/fckeditor/editor/dialog/common/fck_dialog_common.css +8 -1
- data/public/javascripts/fckeditor/editor/dialog/common/fck_dialog_common.js +199 -26
- data/public/javascripts/fckeditor/editor/dialog/fck_about.html +20 -14
- data/public/javascripts/fckeditor/editor/dialog/fck_about/sponsors/spellchecker_net.gif +0 -0
- data/public/javascripts/fckeditor/editor/dialog/fck_anchor.html +15 -10
- data/public/javascripts/fckeditor/editor/dialog/fck_button.html +9 -14
- data/public/javascripts/fckeditor/editor/dialog/fck_checkbox.html +8 -13
- data/public/javascripts/fckeditor/editor/dialog/fck_colorselector.html +4 -3
- data/public/javascripts/fckeditor/editor/dialog/fck_docprops.html +6 -6
- data/public/javascripts/fckeditor/editor/dialog/fck_docprops/fck_document_preview.html +1 -1
- data/public/javascripts/fckeditor/editor/dialog/fck_flash.html +9 -3
- data/public/javascripts/fckeditor/editor/dialog/fck_flash/fck_flash.js +18 -11
- data/public/javascripts/fckeditor/editor/dialog/fck_flash/fck_flash_preview.html +7 -3
- data/public/javascripts/fckeditor/editor/dialog/fck_form.html +7 -4
- data/public/javascripts/fckeditor/editor/dialog/fck_hiddenfield.html +12 -15
- data/public/javascripts/fckeditor/editor/dialog/fck_image.html +9 -3
- data/public/javascripts/fckeditor/editor/dialog/fck_image/fck_image.js +24 -12
- data/public/javascripts/fckeditor/editor/dialog/fck_image/fck_image_preview.html +24 -18
- data/public/javascripts/fckeditor/editor/dialog/fck_link.html +1 -1
- data/public/javascripts/fckeditor/editor/dialog/fck_link/fck_link.js +41 -20
- data/public/javascripts/fckeditor/editor/dialog/fck_listprop.html +8 -4
- data/public/javascripts/fckeditor/editor/dialog/fck_paste.html +53 -54
- data/public/javascripts/fckeditor/editor/dialog/fck_radiobutton.html +8 -13
- data/public/javascripts/fckeditor/editor/dialog/fck_replace.html +157 -79
- data/public/javascripts/fckeditor/editor/dialog/fck_select.html +14 -11
- data/public/javascripts/fckeditor/editor/dialog/fck_select/fck_select.js +2 -2
- data/public/javascripts/fckeditor/editor/dialog/fck_smiley.html +9 -4
- data/public/javascripts/fckeditor/editor/dialog/fck_source.html +5 -2
- data/public/javascripts/fckeditor/editor/dialog/fck_specialchar.html +9 -6
- data/public/javascripts/fckeditor/editor/dialog/fck_spellerpages.html +2 -1
- data/public/javascripts/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.cfm +3 -1
- data/public/javascripts/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.php +5 -2
- data/public/javascripts/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.pl +2 -1
- data/public/javascripts/fckeditor/editor/dialog/fck_spellerpages/spellerpages/spellChecker.js +0 -1
- data/public/javascripts/fckeditor/editor/dialog/fck_spellerpages/spellerpages/spellerStyle.css +1 -1
- data/public/javascripts/fckeditor/editor/dialog/fck_table.html +10 -5
- data/public/javascripts/fckeditor/editor/dialog/fck_tablecell.html +8 -6
- data/public/javascripts/fckeditor/editor/dialog/fck_template.html +1 -1
- data/public/javascripts/fckeditor/editor/dialog/fck_textarea.html +10 -11
- data/public/javascripts/fckeditor/editor/dialog/fck_textfield.html +10 -14
- data/public/javascripts/fckeditor/editor/dtd/fck_dtd_test.html +0 -2
- data/public/javascripts/fckeditor/editor/dtd/fck_xhtml10strict.js +2 -2
- data/public/javascripts/fckeditor/editor/dtd/fck_xhtml10transitional.js +3 -3
- data/public/javascripts/fckeditor/editor/fckdebug.html +1 -1
- data/public/javascripts/fckeditor/editor/fckdialog.html +660 -213
- data/public/javascripts/fckeditor/editor/fckeditor.html +66 -16
- data/public/javascripts/fckeditor/editor/fckeditor.original.html +70 -16
- data/public/javascripts/fckeditor/editor/filemanager/browser/default/browser.css +2 -2
- data/public/javascripts/fckeditor/editor/filemanager/browser/default/browser.html +37 -2
- data/public/javascripts/fckeditor/editor/filemanager/browser/default/frmactualfolder.html +33 -1
- data/public/javascripts/fckeditor/editor/filemanager/browser/default/frmcreatefolder.html +1 -1
- data/public/javascripts/fckeditor/editor/filemanager/browser/default/frmfolders.html +2 -1
- data/public/javascripts/fckeditor/editor/filemanager/browser/default/frmresourceslist.html +3 -2
- data/public/javascripts/fckeditor/editor/filemanager/browser/default/frmresourcetype.html +1 -1
- data/public/javascripts/fckeditor/editor/filemanager/browser/default/frmupload.html +2 -1
- data/public/javascripts/fckeditor/editor/filemanager/browser/default/js/common.js +34 -2
- data/public/javascripts/fckeditor/editor/filemanager/browser/default/js/fckxml.js +3 -3
- data/public/javascripts/fckeditor/editor/filemanager/connectors/aspx/connector.aspx +5 -3
- data/public/javascripts/fckeditor/editor/filemanager/connectors/aspx/upload.aspx +5 -3
- data/public/javascripts/fckeditor/editor/filemanager/connectors/perl/basexml.pl +1 -1
- data/public/javascripts/fckeditor/editor/filemanager/connectors/perl/commands.pl +50 -4
- data/public/javascripts/fckeditor/editor/filemanager/connectors/perl/connector.cgi +2 -3
- data/public/javascripts/fckeditor/editor/filemanager/connectors/perl/io.pl +14 -4
- data/public/javascripts/fckeditor/editor/filemanager/connectors/perl/upload.cgi +2 -3
- data/public/javascripts/fckeditor/editor/filemanager/connectors/perl/upload_fck.pl +23 -4
- data/public/javascripts/fckeditor/editor/filemanager/connectors/perl/util.pl +1 -1
- data/public/javascripts/fckeditor/editor/filemanager/connectors/py/config.py +43 -32
- data/public/javascripts/fckeditor/editor/filemanager/connectors/py/connector.py +16 -16
- data/public/javascripts/fckeditor/editor/filemanager/connectors/py/fckcommands.py +26 -9
- data/public/javascripts/fckeditor/editor/filemanager/connectors/py/fckconnector.py +2 -2
- data/public/javascripts/fckeditor/editor/filemanager/connectors/py/fckoutput.py +40 -9
- data/public/javascripts/fckeditor/editor/filemanager/connectors/py/fckutil.py +20 -21
- data/public/javascripts/fckeditor/editor/filemanager/connectors/py/htaccess.txt +2 -2
- data/public/javascripts/fckeditor/editor/filemanager/connectors/py/upload.py +13 -13
- data/public/javascripts/fckeditor/editor/filemanager/connectors/py/wsgi.py +3 -3
- data/public/javascripts/fckeditor/editor/filemanager/connectors/py/zope.py +4 -5
- data/public/javascripts/fckeditor/editor/filemanager/connectors/test.html +34 -1
- data/public/javascripts/fckeditor/editor/filemanager/connectors/uploadtest.html +47 -4
- data/public/javascripts/fckeditor/editor/js/fckadobeair.js +176 -0
- data/public/javascripts/fckeditor/editor/js/fckeditorcode_gecko.js +77 -77
- data/public/javascripts/fckeditor/editor/js/fckeditorcode_ie.js +74 -74
- data/public/javascripts/fckeditor/editor/lang/_translationstatus.txt +55 -54
- data/public/javascripts/fckeditor/editor/lang/af.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/ar.js +16 -17
- data/public/javascripts/fckeditor/editor/lang/bg.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/bn.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/bs.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/ca.js +27 -28
- data/public/javascripts/fckeditor/editor/lang/cs.js +18 -19
- data/public/javascripts/fckeditor/editor/lang/da.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/de.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/el.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/en-au.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/en-ca.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/en-uk.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/en.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/eo.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/es.js +34 -35
- data/public/javascripts/fckeditor/editor/lang/et.js +32 -33
- data/public/javascripts/fckeditor/editor/lang/eu.js +32 -33
- data/public/javascripts/fckeditor/editor/lang/fa.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/fi.js +15 -16
- data/public/javascripts/fckeditor/editor/lang/fo.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/fr-ca.js +515 -0
- data/public/javascripts/fckeditor/editor/lang/fr.js +5 -6
- data/public/javascripts/fckeditor/editor/lang/gl.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/he.js +15 -16
- data/public/javascripts/fckeditor/editor/lang/hi.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/hr.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/hu.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/it.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/ja.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/km.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/ko.js +25 -26
- data/public/javascripts/fckeditor/editor/lang/lt.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/lv.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/mn.js +199 -200
- data/public/javascripts/fckeditor/editor/lang/ms.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/nb.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/nl.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/no.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/pl.js +51 -52
- data/public/javascripts/fckeditor/editor/lang/pt-br.js +16 -17
- data/public/javascripts/fckeditor/editor/lang/pt.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/ro.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/ru.js +31 -32
- data/public/javascripts/fckeditor/editor/lang/sk.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/sl.js +39 -40
- data/public/javascripts/fckeditor/editor/lang/sr-latn.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/sr.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/sv.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/th.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/tr.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/uk.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/vi.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/zh-cn.js +2 -3
- data/public/javascripts/fckeditor/editor/lang/zh.js +1 -2
- data/public/javascripts/fckeditor/editor/plugins/autogrow/fckplugin.js +9 -2
- data/public/javascripts/fckeditor/editor/plugins/bbcode/_sample/sample.config.js +1 -1
- data/public/javascripts/fckeditor/editor/plugins/bbcode/_sample/sample.html +1 -1
- data/public/javascripts/fckeditor/editor/plugins/bbcode/fckplugin.js +2 -2
- data/public/javascripts/fckeditor/editor/plugins/dragresizetable/fckplugin.js +35 -11
- data/public/javascripts/fckeditor/editor/plugins/placeholder/fck_placeholder.html +10 -5
- data/public/javascripts/fckeditor/editor/plugins/placeholder/fckplugin.js +3 -3
- data/public/javascripts/fckeditor/editor/plugins/placeholder/lang/de.js +2 -2
- data/public/javascripts/fckeditor/editor/plugins/placeholder/lang/en.js +2 -2
- data/public/javascripts/fckeditor/editor/{filemanager/connectors/cfm/upload.cfm → plugins/placeholder/lang/es.js} +9 -13
- data/public/javascripts/fckeditor/editor/plugins/placeholder/lang/fr.js +1 -1
- data/public/javascripts/fckeditor/editor/plugins/placeholder/lang/it.js +1 -1
- data/public/javascripts/fckeditor/editor/plugins/placeholder/lang/pl.js +2 -2
- data/public/javascripts/fckeditor/editor/plugins/simplecommands/fckplugin.js +1 -1
- data/public/javascripts/fckeditor/editor/plugins/tablecommands/fckplugin.js +1 -1
- data/public/javascripts/fckeditor/editor/skins/_fckviewstrips.html +1 -1
- data/public/javascripts/fckeditor/editor/skins/default/fck_dialog.css +271 -8
- data/public/javascripts/fckeditor/editor/skins/default/fck_editor.css +2 -2
- data/public/javascripts/fckeditor/editor/skins/office2003/fck_dialog.css +270 -8
- data/public/javascripts/fckeditor/editor/skins/office2003/fck_editor.css +2 -2
- data/public/javascripts/fckeditor/editor/skins/silver/fck_dialog.css +270 -11
- data/public/javascripts/fckeditor/editor/skins/silver/fck_editor.css +2 -2
- data/public/javascripts/fckeditor/fckconfig.js +58 -55
- data/public/javascripts/fckeditor/fckeditor.js +99 -8
- data/public/javascripts/fckeditor/fckeditor.py +2 -4
- data/public/javascripts/fckeditor/fckpackager.xml +12 -12
- data/public/javascripts/fckeditor/fckstyles.xml +2 -5
- data/public/javascripts/fckeditor/fcktemplates.xml +1 -1
- data/public/javascripts/fckeditor/license.txt +1 -2
- data/public/javascripts/prototype.js +46 -101
- data/public/javascripts/scriptaculous.js +28 -17
- data/public/stylesheets/administration.css +5 -1
- data/themes/dirtylicious/about.markdown +3 -0
- data/themes/dirtylicious/images/body.jpg +0 -0
- data/themes/dirtylicious/images/container.jpg +0 -0
- data/themes/dirtylicious/images/gravatar.gif +0 -0
- data/themes/dirtylicious/images/header.jpg +0 -0
- data/themes/dirtylicious/images/li.gif +0 -0
- data/themes/dirtylicious/images/main.gif +0 -0
- data/themes/dirtylicious/images/nav.gif +0 -0
- data/themes/dirtylicious/images/quote.gif +0 -0
- data/themes/dirtylicious/images/spinner.gif +0 -0
- data/themes/dirtylicious/layouts/default.html.erb +60 -0
- data/themes/dirtylicious/preview.png +0 -0
- data/themes/dirtylicious/stylesheets/application.css +327 -0
- data/themes/dirtylicious/views/articles/_article.html.erb +33 -0
- data/themes/dirtylicious/views/articles/_comment.html.erb +14 -0
- data/themes/dirtylicious/views/articles/_comment_form.html.erb +37 -0
- data/themes/dirtylicious/views/articles/_comment_list.html.erb +7 -0
- data/themes/dirtylicious/views/articles/_trackback.html.erb +9 -0
- data/themes/dirtylicious/views/articles/comment_preview.html.erb +10 -0
- data/themes/dirtylicious/views/articles/index.html.erb +5 -0
- data/themes/dirtylicious/views/articles/read.html.erb +42 -0
- data/themes/dirtylicious/views/shared/_search.html.erb +16 -0
- data/themes/standard_issue/about.markdown +5 -0
- data/themes/standard_issue/images/img01.gif +0 -0
- data/themes/standard_issue/images/img02.gif +0 -0
- data/themes/standard_issue/images/img03.gif +0 -0
- data/themes/standard_issue/images/img04.jpg +0 -0
- data/themes/standard_issue/images/img05.gif +0 -0
- data/themes/standard_issue/images/img06.gif +0 -0
- data/themes/standard_issue/images/img07.gif +0 -0
- data/themes/standard_issue/images/img08.gif +0 -0
- data/themes/standard_issue/images/img09.gif +0 -0
- data/themes/standard_issue/images/img10.gif +0 -0
- data/themes/standard_issue/images/spacer.gif +0 -0
- data/themes/standard_issue/images/spinner.gif +0 -0
- data/themes/standard_issue/layouts/default.html.erb +59 -0
- data/themes/standard_issue/preview.png +0 -0
- data/themes/standard_issue/stylesheets/application.css +461 -0
- data/themes/standard_issue/views/articles/_article.html.erb +37 -0
- data/themes/standard_issue/views/articles/_comment.html.erb +12 -0
- data/themes/standard_issue/views/articles/_comment_form.html.erb +48 -0
- data/themes/standard_issue/views/articles/_comment_list.html.erb +7 -0
- data/themes/standard_issue/views/articles/_trackback.html.erb +9 -0
- data/themes/standard_issue/views/articles/comment_preview.html.erb +10 -0
- data/themes/standard_issue/views/articles/index.html.erb +5 -0
- data/themes/standard_issue/views/articles/read.html.erb +42 -0
- data/themes/standard_issue/views/shared/_search.html.erb +17 -0
- data/themes/standard_issue/views/theme/static_view_test.html.erb +1 -0
- data/themes/typographic/images/accept.gif +0 -0
- data/themes/typographic/images/accept50.gif +0 -0
- data/themes/typographic/images/bg_white.gif +0 -0
- data/themes/typographic/images/bg_wrapper.gif +0 -0
- data/themes/typographic/images/bullet_bottom.gif +0 -0
- data/themes/typographic/images/bullet_right.gif +0 -0
- data/themes/typographic/images/email_open.gif +0 -0
- data/themes/typographic/images/email_open50.gif +0 -0
- data/themes/typographic/images/meta.gif +0 -0
- data/themes/typographic/images/page_edit.gif +0 -0
- data/themes/typographic/images/page_edit50.gif +0 -0
- data/themes/typographic/images/spinner.gif +0 -0
- data/themes/typographic/images/tag.gif +0 -0
- data/themes/typographic/images/user.gif +0 -0
- data/themes/typographic/images/user50.gif +0 -0
- data/themes/typographic/images/world_link.gif +0 -0
- data/themes/typographic/images/world_link50.gif +0 -0
- data/themes/typographic/layouts/default.html.erb +5 -2
- data/themes/typographic/stylesheets/ie6.css +86 -0
- data/themes/typographic/views/articles/_article.html.erb +2 -2
- data/vendor/plugins/fckeditor/README +0 -7
- data/vendor/plugins/fckeditor/app/helpers/fckeditor_helper.rb +1 -3
- data/vendor/plugins/fckeditor/lib/fckeditor_version.rb +2 -2
- data/vendor/plugins/fckeditor/tasks/fckeditor_tasks.rake +1 -1
- data/vendor/plugins/fckeditor/test/fckeditor_test.rb +8 -0
- metadata +98 -66
- data/CHANGES-5.0.4 +0 -33
- data/SIDEBARS +0 -39
- data/app/views/admin/content/_quick_post.html.erb +0 -20
- data/db/schema.rb +0 -224
- data/public/.DS_Store +0 -0
- data/public/javascripts/fckeditor/editor/filemanager/connectors/asp/basexml.asp +0 -62
- data/public/javascripts/fckeditor/editor/filemanager/connectors/asp/class_upload.asp +0 -353
- data/public/javascripts/fckeditor/editor/filemanager/connectors/asp/commands.asp +0 -198
- data/public/javascripts/fckeditor/editor/filemanager/connectors/asp/config.asp +0 -128
- data/public/javascripts/fckeditor/editor/filemanager/connectors/asp/connector.asp +0 -88
- data/public/javascripts/fckeditor/editor/filemanager/connectors/asp/io.asp +0 -222
- data/public/javascripts/fckeditor/editor/filemanager/connectors/asp/upload.asp +0 -61
- data/public/javascripts/fckeditor/editor/filemanager/connectors/asp/util.asp +0 -55
- data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/ImageObject.cfc +0 -273
- data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/cf5_connector.cfm +0 -315
- data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/cf5_upload.cfm +0 -296
- data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/cf_basexml.cfm +0 -68
- data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/cf_commands.cfm +0 -225
- data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/cf_connector.cfm +0 -89
- data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/cf_io.cfm +0 -288
- data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/cf_upload.cfm +0 -68
- data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/cf_util.cfm +0 -132
- data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/config.cfm +0 -183
- data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/connector.cfm +0 -31
- data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/image.cfc +0 -1325
- data/public/javascripts/fckeditor/editor/filemanager/connectors/lasso/config.lasso +0 -65
- data/public/javascripts/fckeditor/editor/filemanager/connectors/lasso/connector.lasso +0 -257
- data/public/javascripts/fckeditor/editor/filemanager/connectors/lasso/upload.lasso +0 -157
- data/public/javascripts/fckeditor/editor/filemanager/connectors/php/basexml.php +0 -93
- data/public/javascripts/fckeditor/editor/filemanager/connectors/php/commands.php +0 -245
- data/public/javascripts/fckeditor/editor/filemanager/connectors/php/config.php +0 -140
- data/public/javascripts/fckeditor/editor/filemanager/connectors/php/connector.php +0 -87
- data/public/javascripts/fckeditor/editor/filemanager/connectors/php/io.php +0 -272
- data/public/javascripts/fckeditor/editor/filemanager/connectors/php/phpcompat.php +0 -17
- data/public/javascripts/fckeditor/editor/filemanager/connectors/php/upload.php +0 -59
- data/public/javascripts/fckeditor/editor/filemanager/connectors/php/util.php +0 -185
- data/public/javascripts/fckeditor/fckeditor.afp +0 -161
- data/public/javascripts/fckeditor/fckeditor.asp +0 -235
- data/public/javascripts/fckeditor/fckeditor.cfc +0 -273
- data/public/javascripts/fckeditor/fckeditor.cfm +0 -210
- data/public/javascripts/fckeditor/fckeditor.lasso +0 -112
- data/test/mocks/themes/typographic/.DS_Store +0 -0
- data/themes/typographic/.DS_Store +0 -0
- data/vendor/plugins/audioscrobbler_sidebar/MAINTAINERS +0 -26
- data/vendor/plugins/audioscrobbler_sidebar/MIT-LICENSE +0 -21
- data/vendor/plugins/audioscrobbler_sidebar/README +0 -27
- data/vendor/plugins/audioscrobbler_sidebar/Rakefile +0 -22
- data/vendor/plugins/audioscrobbler_sidebar/init.rb +0 -5
- data/vendor/plugins/audioscrobbler_sidebar/lib/audioscrobbler.rb +0 -54
- data/vendor/plugins/audioscrobbler_sidebar/lib/audioscrobbler_sidebar.rb +0 -13
- data/vendor/plugins/audioscrobbler_sidebar/test/audioscrobbler_sidebar_test.rb +0 -8
- data/vendor/plugins/audioscrobbler_sidebar/views/content.rhtml +0 -10
@@ -1,61 +0,0 @@
|
|
1
|
-
<%@ CodePage=65001 Language="VBScript"%>
|
2
|
-
<%
|
3
|
-
Option Explicit
|
4
|
-
Response.Buffer = True
|
5
|
-
%>
|
6
|
-
<%
|
7
|
-
' FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
8
|
-
' Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
9
|
-
'
|
10
|
-
' == BEGIN LICENSE ==
|
11
|
-
'
|
12
|
-
' Licensed under the terms of any of the following licenses at your
|
13
|
-
' choice:
|
14
|
-
'
|
15
|
-
' - GNU General Public License Version 2 or later (the "GPL")
|
16
|
-
' http://www.gnu.org/licenses/gpl.html
|
17
|
-
'
|
18
|
-
' - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
19
|
-
' http://www.gnu.org/licenses/lgpl.html
|
20
|
-
'
|
21
|
-
' - Mozilla Public License Version 1.1 or later (the "MPL")
|
22
|
-
' http://www.mozilla.org/MPL/MPL-1.1.html
|
23
|
-
'
|
24
|
-
' == END LICENSE ==
|
25
|
-
'
|
26
|
-
' This is the "File Uploader" for ASP.
|
27
|
-
%>
|
28
|
-
<!--#include file="config.asp"-->
|
29
|
-
<!--#include file="util.asp"-->
|
30
|
-
<!--#include file="io.asp"-->
|
31
|
-
<!--#include file="commands.asp"-->
|
32
|
-
<!--#include file="class_upload.asp"-->
|
33
|
-
<%
|
34
|
-
|
35
|
-
' Check if this uploader has been enabled.
|
36
|
-
If ( ConfigIsEnabled = False ) Then
|
37
|
-
SendUploadResults "1", "", "", "This file uploader is disabled. Please check the ""editor/filemanager/connectors/asp/config.asp"" file"
|
38
|
-
End If
|
39
|
-
|
40
|
-
Dim sCommand, sResourceType, sCurrentFolder
|
41
|
-
|
42
|
-
sCommand = "QuickUpload"
|
43
|
-
|
44
|
-
sResourceType = Request.QueryString("Type")
|
45
|
-
If ( sResourceType = "" ) Then sResourceType = "File"
|
46
|
-
|
47
|
-
sCurrentFolder = GetCurrentFolder()
|
48
|
-
|
49
|
-
' Is Upload enabled?
|
50
|
-
if ( Not IsAllowedCommand( sCommand ) ) then
|
51
|
-
SendUploadResults "1", "", "", "The """ & sCommand & """ command isn't allowed"
|
52
|
-
end if
|
53
|
-
|
54
|
-
' Check if it is an allowed resource type.
|
55
|
-
if ( Not IsAllowedType( sResourceType ) ) Then
|
56
|
-
SendUploadResults "1", "", "", "The " & sResourceType & " resource type isn't allowed"
|
57
|
-
end if
|
58
|
-
|
59
|
-
FileUpload sResourceType, sCurrentFolder, sCommand
|
60
|
-
|
61
|
-
%>
|
@@ -1,55 +0,0 @@
|
|
1
|
-
<%
|
2
|
-
' FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
3
|
-
' Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
4
|
-
'
|
5
|
-
' == BEGIN LICENSE ==
|
6
|
-
'
|
7
|
-
' Licensed under the terms of any of the following licenses at your
|
8
|
-
' choice:
|
9
|
-
'
|
10
|
-
' - GNU General Public License Version 2 or later (the "GPL")
|
11
|
-
' http://www.gnu.org/licenses/gpl.html
|
12
|
-
'
|
13
|
-
' - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
14
|
-
' http://www.gnu.org/licenses/lgpl.html
|
15
|
-
'
|
16
|
-
' - Mozilla Public License Version 1.1 or later (the "MPL")
|
17
|
-
' http://www.mozilla.org/MPL/MPL-1.1.html
|
18
|
-
'
|
19
|
-
' == END LICENSE ==
|
20
|
-
'
|
21
|
-
' This file include generic functions used by the ASP Connector.
|
22
|
-
%>
|
23
|
-
<%
|
24
|
-
Function RemoveFromStart( sourceString, charToRemove )
|
25
|
-
Dim oRegex
|
26
|
-
Set oRegex = New RegExp
|
27
|
-
oRegex.Pattern = "^" & charToRemove & "+"
|
28
|
-
|
29
|
-
RemoveFromStart = oRegex.Replace( sourceString, "" )
|
30
|
-
End Function
|
31
|
-
|
32
|
-
Function RemoveFromEnd( sourceString, charToRemove )
|
33
|
-
Dim oRegex
|
34
|
-
Set oRegex = New RegExp
|
35
|
-
oRegex.Pattern = charToRemove & "+$"
|
36
|
-
|
37
|
-
RemoveFromEnd = oRegex.Replace( sourceString, "" )
|
38
|
-
End Function
|
39
|
-
|
40
|
-
Function ConvertToXmlAttribute( value )
|
41
|
-
ConvertToXmlAttribute = Replace( value, "&", "&" )
|
42
|
-
End Function
|
43
|
-
|
44
|
-
Function InArray( value, sourceArray )
|
45
|
-
Dim i
|
46
|
-
For i = 0 to UBound( sourceArray )
|
47
|
-
If sourceArray(i) = value Then
|
48
|
-
InArray = True
|
49
|
-
Exit Function
|
50
|
-
End If
|
51
|
-
Next
|
52
|
-
InArray = False
|
53
|
-
End Function
|
54
|
-
|
55
|
-
%>
|
@@ -1,273 +0,0 @@
|
|
1
|
-
<cfcomponent name="ImageObject">
|
2
|
-
<!---
|
3
|
-
ImageObject.cfc written by Rick Root (rick@webworksllc.com)
|
4
|
-
|
5
|
-
Related Web Sites:
|
6
|
-
- http://www.opensourcecf.com/imagecfc (home page)
|
7
|
-
|
8
|
-
|
9
|
-
This is an object oriented interface to the original
|
10
|
-
ImageCFC.
|
11
|
-
|
12
|
-
Example Code:
|
13
|
-
|
14
|
-
io = createObject("component","ImageObject");
|
15
|
-
io.setOption("defaultJpegCompression",95);
|
16
|
-
io.init("#ExpandPath(".")#/emily.jpg");
|
17
|
-
io.scaleWidth(500);
|
18
|
-
io.save("#ExpandPath(".")#/imagex1.jpg");
|
19
|
-
|
20
|
-
io.flipHorizontal();
|
21
|
-
io.save("#ExpandPath(".")#/imagex2.jpg");
|
22
|
-
io.revert();
|
23
|
-
io.filterFastBlur(2,5);
|
24
|
-
io.save("#ExpandPath(".")#/imagex3.jpg");
|
25
|
-
io.revert();
|
26
|
-
io.filterPosterize(32);
|
27
|
-
io.save("#ExpandPath(".")#/imagex4.jpg");
|
28
|
-
|
29
|
-
|
30
|
-
LICENSE
|
31
|
-
-------
|
32
|
-
Copyright (c) 2006, Rick Root <rick@webworksllc.com>
|
33
|
-
All rights reserved.
|
34
|
-
|
35
|
-
Redistribution and use in source and binary forms, with or
|
36
|
-
without modification, are permitted provided that the
|
37
|
-
following conditions are met:
|
38
|
-
|
39
|
-
- Redistributions of source code must retain the above
|
40
|
-
copyright notice, this list of conditions and the
|
41
|
-
following disclaimer.
|
42
|
-
- Redistributions in binary form must reproduce the above
|
43
|
-
copyright notice, this list of conditions and the
|
44
|
-
following disclaimer in the documentation and/or other
|
45
|
-
materials provided with the distribution.
|
46
|
-
- Neither the name of the Webworks, LLC. nor the names of
|
47
|
-
its contributors may be used to endorse or promote products
|
48
|
-
derived from this software without specific prior written
|
49
|
-
permission.
|
50
|
-
|
51
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
52
|
-
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
53
|
-
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
54
|
-
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
55
|
-
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
56
|
-
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
57
|
-
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
58
|
-
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
59
|
-
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
60
|
-
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
61
|
-
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
62
|
-
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
63
|
-
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
64
|
-
--->
|
65
|
-
|
66
|
-
<cfset variables.img = "">
|
67
|
-
<cfset variables.revertimg = "">
|
68
|
-
<cfset variables.imageCFC = createObject("component","image")>
|
69
|
-
<cfset variables.imageInfo = structNew()>
|
70
|
-
<cfset variables.imageInfo.width = 0>
|
71
|
-
<cfset variables.imageInfo.height = 0>
|
72
|
-
<cfset variables.imageInfo.colorModel = "">
|
73
|
-
<cfset variables.imageInfo.colorspace = "">
|
74
|
-
<cfset variables.imageInfo.objColorModel = "">
|
75
|
-
<cfset variables.imageInfo.objColorspace = "">
|
76
|
-
<cfset variables.imageInfo.sampleModel = "">
|
77
|
-
<cfset variables.imageInfo.imageType = 0>
|
78
|
-
<cfset variables.imageInfo.misc = "">
|
79
|
-
<cfset variables.imageInfo.canModify = false>
|
80
|
-
<cfset variables.imageCFC.setOption("throwonerror",true)>
|
81
|
-
|
82
|
-
<!---
|
83
|
-
|
84
|
-
init(filename) Initialize object from a file.
|
85
|
-
init(width, height) Initialize with a blank image
|
86
|
-
init(bufferedImage) Initiailize with an existing object
|
87
|
-
--->
|
88
|
-
<cffunction name="init" access="public" output="false" returnType="void">
|
89
|
-
<cfargument name="arg1" type="any" required="yes">
|
90
|
-
<cfargument name="arg2" type="any" required="no">
|
91
|
-
|
92
|
-
<cfif isDefined("arg2") and isNumeric(arg1) and isNumeric(arg2)>
|
93
|
-
<cfset arg1 = javacast("int",int(arg1))>
|
94
|
-
<cfset arg2 = javacast("int",int(arg2))>
|
95
|
-
<cfset variables.img = createObject("java","java.awt.image.BufferedImage")>
|
96
|
-
<cfset variables.img.init(arg1,arg2,variables.img.TYPE_INT_RGB)>
|
97
|
-
<cfelseif arg1.getClass().getName() eq "java.awt.image.BufferedImage">
|
98
|
-
<cfset variables.img = arg1>
|
99
|
-
<cfelseif isSimpleValue(arg1) and len(arg1) gt 0>
|
100
|
-
<cfset imageResults = variables.imageCFC.readImage(arg1, "no")>
|
101
|
-
<cfset variables.img = imageResults.img>
|
102
|
-
<cfelse>
|
103
|
-
<cfthrow message="Object Instantiation Error" detail="You have attempted to initialize ooimage.cfc with invalid arguments. Please consult the documentation for correct initialization arguments.">
|
104
|
-
</cfif>
|
105
|
-
<cfif variables.revertimg eq "">
|
106
|
-
<cfset variables.revertimg = variables.img>
|
107
|
-
</cfif>
|
108
|
-
<cfset variables.imageInfo = imageCFC.getImageInfo(variables.img,"")>
|
109
|
-
<cfreturn>
|
110
|
-
</cffunction>
|
111
|
-
|
112
|
-
<cffunction name="flipHorizontal" access="public" output="true" returnType="void" hint="Flip an image horizontally.">
|
113
|
-
<cfset var imageResults = imageCFC.flipHorizontal(variables.img,"","")>
|
114
|
-
<cfset variables.revertimg = variables.img>
|
115
|
-
<cfset variables.img = imageResults.img>
|
116
|
-
<cfset variables.imageInfo = imageCFC.getImageInfo(variables.img,"")>
|
117
|
-
</cffunction>
|
118
|
-
|
119
|
-
<cffunction name="getImageInfo" access="public" output="true" returntype="struct" hint="Returns image information.">
|
120
|
-
<cfreturn variables.imageInfo>
|
121
|
-
</cffunction>
|
122
|
-
<cffunction name="getImageObject" access="public" output="true" returntype="struct" hint="Returns a java Buffered Image Object.">
|
123
|
-
<cfreturn variables.img>
|
124
|
-
</cffunction>
|
125
|
-
|
126
|
-
<cffunction name="flipVertical" access="public" output="true" returntype="void" hint="Flop an image vertically.">
|
127
|
-
<cfset var imageResults = imageCFC.flipVertical(variables.img,"","")>
|
128
|
-
<cfset variables.revertimg = variables.img>
|
129
|
-
<cfset variables.img = imageResults.img>
|
130
|
-
<cfset variables.imageInfo = imageCFC.getImageInfo(variables.img,"")>
|
131
|
-
</cffunction>
|
132
|
-
|
133
|
-
<cffunction name="scaleWidth" access="public" output="true" returntype="void" hint="Scale an image to a specific width.">
|
134
|
-
<cfargument name="newWidth" required="yes" type="numeric">
|
135
|
-
<cfset var imageResults = imageCFC.scaleWidth(variables.img,"","", newWidth)>
|
136
|
-
<cfset variables.revertimg = variables.img>
|
137
|
-
<cfset variables.img = imageResults.img>
|
138
|
-
<cfset variables.imageInfo = imageCFC.getImageInfo(variables.img,"")>
|
139
|
-
|
140
|
-
</cffunction>
|
141
|
-
|
142
|
-
<cffunction name="scaleHeight" access="public" output="true" returntype="void" hint="Scale an image to a specific height.">
|
143
|
-
<cfargument name="newHeight" required="yes" type="numeric">
|
144
|
-
<cfset var imageResults = imageCFC.scaleHeight(variables.img,"","", newHeight)>
|
145
|
-
<cfset variables.revertimg = variables.img>
|
146
|
-
<cfset variables.img = imageResults.img>
|
147
|
-
<cfset variables.imageInfo = imageCFC.getImageInfo(variables.img,"")>
|
148
|
-
</cffunction>
|
149
|
-
|
150
|
-
<cffunction name="resize" access="public" output="true" returntype="void" hint="Resize an image to a specific width and height.">
|
151
|
-
<cfargument name="newWidth" required="yes" type="numeric">
|
152
|
-
<cfargument name="newHeight" required="yes" type="numeric">
|
153
|
-
<cfargument name="preserveAspect" required="no" type="boolean" default="FALSE">
|
154
|
-
<cfargument name="cropToExact" required="no" type="boolean" default="FALSE">
|
155
|
-
|
156
|
-
<cfset var imageResults = imageCFC.resize(variables.img,"","",newWidth,newHeight,preserveAspect,cropToExact)>
|
157
|
-
<cfset variables.revertimg = variables.img>
|
158
|
-
<cfset variables.img = imageResults.img>
|
159
|
-
<cfset variables.imageInfo = imageCFC.getImageInfo(variables.img,"")>
|
160
|
-
</cffunction>
|
161
|
-
|
162
|
-
<cffunction name="crop" access="public" output="true" returntype="void" hint="Crop an image.">
|
163
|
-
<cfargument name="fromX" required="yes" type="numeric">
|
164
|
-
<cfargument name="fromY" required="yes" type="numeric">
|
165
|
-
<cfargument name="newWidth" required="yes" type="numeric">
|
166
|
-
<cfargument name="newHeight" required="yes" type="numeric">
|
167
|
-
<cfset var imageResults = imageCFC.crop(variables.img,"","",fromX,fromY,newWidth,newHeight)>
|
168
|
-
<cfset variables.revertimg = variables.img>
|
169
|
-
<cfset variables.img = imageResults.img>
|
170
|
-
<cfset variables.imageInfo = imageCFC.getImageInfo(variables.img,"")>
|
171
|
-
|
172
|
-
</cffunction>
|
173
|
-
|
174
|
-
<cffunction name="rotate" access="public" output="true" returntype="void" hint="Rotate an image (+/-)90, (+/-)180, or (+/-)270 degrees.">
|
175
|
-
<cfargument name="degrees" required="yes" type="numeric">
|
176
|
-
<cfset var imageResults = imageCFC.rotate(variables.img,"","",degrees)>
|
177
|
-
<cfset variables.revertimg = variables.img>
|
178
|
-
<cfset variables.img = imageResults.img>
|
179
|
-
<cfset variables.imageInfo = imageCFC.getImageInfo(variables.img,"")>
|
180
|
-
|
181
|
-
</cffunction>
|
182
|
-
|
183
|
-
<cffunction name="setOption" access="public" output="true" returnType="void" hint="Sets values for allowed CFC options.">
|
184
|
-
<cfargument name="key" type="string" required="yes">
|
185
|
-
<cfargument name="val" type="string" required="yes">
|
186
|
-
<cfif lcase(trim(key)) eq "throwonerror">
|
187
|
-
<cfthrow message="Option Configuration Error" detail="You cannot set the throwOnError option when using ImageObject.cfc">
|
188
|
-
</cfif>
|
189
|
-
<cfset imageCFC.setOption(key, val)>
|
190
|
-
|
191
|
-
</cffunction>
|
192
|
-
|
193
|
-
<cffunction name="getOption" access="public" output="true" returnType="any" hint="Returns the current value for the specified CFC option.">
|
194
|
-
<cfargument name="key" type="string" required="yes">
|
195
|
-
<cfreturn imageCFC.getOption(key)>
|
196
|
-
</cffunction>
|
197
|
-
|
198
|
-
<cffunction name="filterFastBlur" access="public" output="true" returntype="void" hint="Internal method used for flipping and flopping images.">
|
199
|
-
<cfargument name="blurAmount" required="yes" type="numeric">
|
200
|
-
<cfargument name="iterations" required="yes" type="numeric">
|
201
|
-
<cfset var imageResults = imageCFC.filterFastBlur(variables.img,"","",blurAmount,iterations)>
|
202
|
-
<cfset variables.revertimg = variables.img>
|
203
|
-
<cfset variables.img = imageResults.img>
|
204
|
-
<cfset variables.imageInfo = imageCFC.getImageInfo(variables.img,"")>
|
205
|
-
|
206
|
-
</cffunction>
|
207
|
-
|
208
|
-
<cffunction name="filterSharpen" access="public" output="true" returntype="void" hint="Internal method used for flipping and flopping images.">
|
209
|
-
<cfset var imageResults = imageCFC.filterSharpen(variables.img,"","")>
|
210
|
-
<cfset variables.revertimg = variables.img>
|
211
|
-
<cfset variables.img = imageResults.img>
|
212
|
-
<cfset variables.imageInfo = imageCFC.getImageInfo(variables.img,"")>
|
213
|
-
|
214
|
-
</cffunction>
|
215
|
-
|
216
|
-
|
217
|
-
<cffunction name="filterPosterize" access="public" output="true" returntype="void" hint="Internal method used for flipping and flopping images.">
|
218
|
-
<cfargument name="amount" required="yes" type="string">
|
219
|
-
<cfset var imageResults = imageCFC.filterPosterize(variables.img,"","",amount)>
|
220
|
-
<cfset variables.revertimg = variables.img>
|
221
|
-
<cfset variables.img = imageResults.img>
|
222
|
-
<cfset variables.imageInfo = imageCFC.getImageInfo(variables.img,"")>
|
223
|
-
</cffunction>
|
224
|
-
|
225
|
-
|
226
|
-
<cffunction name="addText" access="public" output="true" returntype="void" hint="Add text to an image.">
|
227
|
-
<cfargument name="x" required="yes" type="numeric">
|
228
|
-
<cfargument name="y" required="yes" type="numeric">
|
229
|
-
<cfargument name="fontDetails" required="yes" type="struct">
|
230
|
-
<cfargument name="content" required="yes" type="String">
|
231
|
-
<cfset var imageResults = imageCFC.addText(variables.img,"","",x,y,fontDetails,content)>
|
232
|
-
<cfset variables.revertimg = variables.img>
|
233
|
-
<cfset variables.img = imageResults.img>
|
234
|
-
<cfset variables.imageInfo = imageCFC.getImageInfo(variables.img,"")>
|
235
|
-
|
236
|
-
</cffunction>
|
237
|
-
|
238
|
-
<cffunction name="watermark" access="public" output="false" returnType="void">
|
239
|
-
<cfargument name="wmImage" required="yes" type="Any">
|
240
|
-
<cfargument name="alpha" required="yes" type="numeric">
|
241
|
-
<cfargument name="placeAtX" required="yes" type="numeric">
|
242
|
-
<cfargument name="placeAtY" required="yes" type="numeric">
|
243
|
-
|
244
|
-
<cfset var imageResults = "">
|
245
|
-
<cfif isSimpleValue(wmImage)>
|
246
|
-
<!--- filename or URL --->
|
247
|
-
<cfset imageResults = imageCFC.watermark(variables.img,"","",wmImage,alpha,placeAtX,placeAtY)>
|
248
|
-
<cfelse>
|
249
|
-
<!--- must be a java object --->
|
250
|
-
<cfset imageResults = imageCFC.watermark(variables.img,wmImage,"","",alpha,placeAtX,placeAtY)>
|
251
|
-
</cfif>
|
252
|
-
<cfset variables.revertimg = variables.img>
|
253
|
-
<cfset variables.img = imageResults.img>
|
254
|
-
<cfset variables.imageInfo = imageCFC.getImageInfo(variables.img,"")>
|
255
|
-
|
256
|
-
</cffunction>
|
257
|
-
|
258
|
-
<cffunction name="save" access="public" output="false" returnType="void">
|
259
|
-
<cfargument name="filename" type="string" required="no">
|
260
|
-
<cfargument name="jpegCompression" type="numeric" required="no">
|
261
|
-
<cfif isDefined("arguments.jpegCompression") and isNumeric(arguments.jpegCompression)>
|
262
|
-
<cfset imageCFC.writeImage(filename,variables.img,jpegCompression)>
|
263
|
-
<cfelse>
|
264
|
-
<cfset imageCFC.writeImage(filename,variables.img)>
|
265
|
-
</cfif>
|
266
|
-
</cffunction>
|
267
|
-
|
268
|
-
<cffunction name="revert" access="public" output="true" returntype="void" hint="Undo the previous manipulation.">
|
269
|
-
<cfset variables.img = variables.revertimg>
|
270
|
-
<cfset variables.imageInfo = imageCFC.getImageInfo(variables.img,"")>
|
271
|
-
</cffunction>
|
272
|
-
|
273
|
-
</cfcomponent>
|
@@ -1,315 +0,0 @@
|
|
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 5.
|
23
|
-
* (based on the original CF connector by Hendrik Kramer - hk@lwd.de)
|
24
|
-
*
|
25
|
-
* Note:
|
26
|
-
* FCKeditor requires that the connector responds with UTF-8 encoded XML.
|
27
|
-
* As ColdFusion 5 does not fully support UTF-8 encoding, we force ASCII
|
28
|
-
* file and folder names in this connector to allow CF5 send a UTF-8
|
29
|
-
* encoded response - code points under 127 in UTF-8 are stored using a
|
30
|
-
* single byte, using the same encoding as ASCII, which is damn handy.
|
31
|
-
* This is all grand for the English speakers, like meself, but I dunno
|
32
|
-
* how others are gonna take to it. Well, the previous version of this
|
33
|
-
* connector already did this with file names and nobody seemed to mind,
|
34
|
-
* so fingers-crossed nobody will mind their folder names being munged too.
|
35
|
-
*
|
36
|
-
--->
|
37
|
-
|
38
|
-
<cfparam name="url.command">
|
39
|
-
<cfparam name="url.type">
|
40
|
-
<cfparam name="url.currentFolder">
|
41
|
-
<!--- note: no serverPath url parameter - see config.cfm if you need to set the serverPath manually --->
|
42
|
-
|
43
|
-
<cfinclude template="config.cfm">
|
44
|
-
|
45
|
-
<cfscript>
|
46
|
-
userFilesPath = config.userFilesPath;
|
47
|
-
|
48
|
-
if ( userFilesPath eq "" )
|
49
|
-
{
|
50
|
-
userFilesPath = "/userfiles/";
|
51
|
-
}
|
52
|
-
|
53
|
-
// make sure the user files path is correctly formatted
|
54
|
-
userFilesPath = replace(userFilesPath, "\", "/", "ALL");
|
55
|
-
userFilesPath = replace(userFilesPath, '//', '/', 'ALL');
|
56
|
-
if ( right(userFilesPath,1) NEQ "/" )
|
57
|
-
{
|
58
|
-
userFilesPath = userFilesPath & "/";
|
59
|
-
}
|
60
|
-
if ( left(userFilesPath,1) NEQ "/" )
|
61
|
-
{
|
62
|
-
userFilesPath = "/" & userFilesPath;
|
63
|
-
}
|
64
|
-
|
65
|
-
// make sure the current folder is correctly formatted
|
66
|
-
url.currentFolder = replace(url.currentFolder, "\", "/", "ALL");
|
67
|
-
url.currentFolder = replace(url.currentFolder, '//', '/', 'ALL');
|
68
|
-
if ( right(url.currentFolder,1) neq "/" )
|
69
|
-
{
|
70
|
-
url.currentFolder = url.currentFolder & "/";
|
71
|
-
}
|
72
|
-
if ( left(url.currentFolder,1) neq "/" )
|
73
|
-
{
|
74
|
-
url.currentFolder = "/" & url.currentFolder;
|
75
|
-
}
|
76
|
-
|
77
|
-
if ( find("/",getBaseTemplatePath()) neq 0 )
|
78
|
-
{
|
79
|
-
fs = "/";
|
80
|
-
}
|
81
|
-
else
|
82
|
-
{
|
83
|
-
fs = "\";
|
84
|
-
}
|
85
|
-
|
86
|
-
// Get the base physical path to the web root for this application. The code to determine the path automatically assumes that
|
87
|
-
// the "FCKeditor" directory in the http request path is directly off the web root for the application and that it's not a
|
88
|
-
// virtual directory or a symbolic link / junction. Use the serverPath config setting to force a physical path if necessary.
|
89
|
-
if ( len(config.serverPath) )
|
90
|
-
{
|
91
|
-
serverPath = config.serverPath;
|
92
|
-
|
93
|
-
if ( right(serverPath,1) neq fs )
|
94
|
-
{
|
95
|
-
serverPath = serverPath & fs;
|
96
|
-
}
|
97
|
-
}
|
98
|
-
else
|
99
|
-
{
|
100
|
-
serverPath = replaceNoCase(getBaseTemplatePath(),replace(cgi.script_name,"/",fs,"all"),"") & replace(userFilesPath,"/",fs,"all");
|
101
|
-
}
|
102
|
-
|
103
|
-
rootPath = left( serverPath, Len(serverPath) - Len(userFilesPath) ) ;
|
104
|
-
xmlContent = ""; // append to this string to build content
|
105
|
-
</cfscript>
|
106
|
-
|
107
|
-
<cfset resourceTypeUrl = rereplace( replace( Config.FileTypesPath[url.type], fs, "/", "all"), "/$", "") >
|
108
|
-
|
109
|
-
<cfif isDefined( "Config.FileTypesAbsolutePath" )
|
110
|
-
and structkeyexists( Config.FileTypesAbsolutePath, url.type )
|
111
|
-
and Len( Config.FileTypesAbsolutePath[url.type] )>
|
112
|
-
|
113
|
-
<cfset userFilesServerPath = Config.FileTypesAbsolutePath[url.type] & url.currentFolder>
|
114
|
-
<cfelse>
|
115
|
-
<cftry>
|
116
|
-
<cfset userFilesServerPath = expandpath( resourceTypeUrl ) & url.currentFolder>
|
117
|
-
<!--- Catch: Parameter 1 of function ExpandPath must be a relative path --->
|
118
|
-
<cfcatch type="any">
|
119
|
-
<cfset userFilesServerPath = rootPath & Config.FileTypesPath[url.type] & url.currentFolder>
|
120
|
-
</cfcatch>
|
121
|
-
</cftry>
|
122
|
-
</cfif>
|
123
|
-
|
124
|
-
<cfset userFilesServerPath = replace( userFilesServerPath, "/", fs, "all" ) >
|
125
|
-
<!--- get rid of double directory separators --->
|
126
|
-
<cfset userFilesServerPath = replace( userFilesServerPath, fs & fs, fs, "all") >
|
127
|
-
|
128
|
-
<cfif not config.enabled>
|
129
|
-
|
130
|
-
<cfset xmlContent = "<Error number=""1"" text=""This connector is disabled. Please check the 'editor/filemanager/connectors/cfm/config.cfm' file"" />">
|
131
|
-
|
132
|
-
<cfelseif find("..",url.currentFolder)>
|
133
|
-
|
134
|
-
<cfset xmlContent = "<Error number=""102"" />">
|
135
|
-
|
136
|
-
<cfelseif isDefined("Config.ConfigAllowedCommands") and not ListFind(Config.ConfigAllowedCommands, url.command)>
|
137
|
-
|
138
|
-
<cfset xmlContent = '<Error number="1" text="The "' & url.command & '" command isn''t allowed" />'>
|
139
|
-
|
140
|
-
<cfelseif isDefined("Config.ConfigAllowedTypes") and not ListFind(Config.ConfigAllowedTypes, url.type)>
|
141
|
-
|
142
|
-
<cfset xmlContent = '<Error number="1" text="The "' & url.type & '" type isn''t allowed" />'>
|
143
|
-
|
144
|
-
</cfif>
|
145
|
-
|
146
|
-
<cfset resourceTypeDirectory = left( userFilesServerPath, Len(userFilesServerPath) - Len(url.currentFolder) )>
|
147
|
-
|
148
|
-
<cfif not len(xmlContent) and not directoryexists(resourceTypeDirectory)>
|
149
|
-
<!--- create directories in physical path if they don't already exist --->
|
150
|
-
<cfset currentPath = "">
|
151
|
-
<cftry>
|
152
|
-
<cfloop list="#resourceTypeDirectory#" index="name" delimiters="#fs#">
|
153
|
-
<cfif currentPath eq "" and fs eq "\">
|
154
|
-
<!--- Without checking this, we would have in Windows \C:\ --->
|
155
|
-
<cfif not directoryExists(name)>
|
156
|
-
<cfdirectory action="create" directory="#name#" mode="755">
|
157
|
-
</cfif>
|
158
|
-
<cfelse>
|
159
|
-
<cfif not directoryExists(currentPath & fs & name)>
|
160
|
-
<cfdirectory action="create" directory="#currentPath##fs##name#" mode="755">
|
161
|
-
</cfif>
|
162
|
-
</cfif>
|
163
|
-
|
164
|
-
<cfif fs eq "\" and currentPath eq "">
|
165
|
-
<cfset currentPath = name>
|
166
|
-
<cfelse>
|
167
|
-
<cfset currentPath = currentPath & fs & name>
|
168
|
-
</cfif>
|
169
|
-
</cfloop>
|
170
|
-
|
171
|
-
<cfcatch type="any">
|
172
|
-
|
173
|
-
<!--- this should only occur as a result of a permissions problem --->
|
174
|
-
<cfset xmlContent = "<Error number=""103"" />">
|
175
|
-
|
176
|
-
</cfcatch>
|
177
|
-
|
178
|
-
</cftry>
|
179
|
-
</cfif>
|
180
|
-
|
181
|
-
<cfif not len(xmlContent)>
|
182
|
-
|
183
|
-
<!--- no errors thus far - run command --->
|
184
|
-
|
185
|
-
<!--- we need to know the physical path to the current folder for all commands --->
|
186
|
-
<cfset currentFolderPath = userFilesServerPath>
|
187
|
-
|
188
|
-
<cfswitch expression="#url.command#">
|
189
|
-
|
190
|
-
<cfcase value="FileUpload">
|
191
|
-
<cfset config_included = true >
|
192
|
-
<cfinclude template="cf5_upload.cfm">
|
193
|
-
<cfabort>
|
194
|
-
</cfcase>
|
195
|
-
|
196
|
-
|
197
|
-
<cfcase value="GetFolders">
|
198
|
-
|
199
|
-
<!--- Sort directories first, name ascending --->
|
200
|
-
<cfdirectory
|
201
|
-
action="list"
|
202
|
-
directory="#currentFolderPath#"
|
203
|
-
name="qDir"
|
204
|
-
sort="type,name">
|
205
|
-
|
206
|
-
<cfscript>
|
207
|
-
i=1;
|
208
|
-
folders = "";
|
209
|
-
while( i lte qDir.recordCount ) {
|
210
|
-
if( not compareNoCase( qDir.type[i], "FILE" ))
|
211
|
-
break;
|
212
|
-
if( not listFind(".,..", qDir.name[i]) )
|
213
|
-
folders = folders & '<Folder name="#HTMLEditFormat( qDir.name[i] )#" />';
|
214
|
-
i=i+1;
|
215
|
-
}
|
216
|
-
|
217
|
-
xmlContent = xmlContent & '<Folders>' & folders & '</Folders>';
|
218
|
-
</cfscript>
|
219
|
-
|
220
|
-
</cfcase>
|
221
|
-
|
222
|
-
|
223
|
-
<cfcase value="GetFoldersAndFiles">
|
224
|
-
|
225
|
-
<!--- Sort directories first, name ascending --->
|
226
|
-
<cfdirectory
|
227
|
-
action="list"
|
228
|
-
directory="#currentFolderPath#"
|
229
|
-
name="qDir"
|
230
|
-
sort="type,name">
|
231
|
-
|
232
|
-
<cfscript>
|
233
|
-
i=1;
|
234
|
-
folders = "";
|
235
|
-
files = "";
|
236
|
-
while( i lte qDir.recordCount ) {
|
237
|
-
if( not compareNoCase( qDir.type[i], "DIR" ) and not listFind(".,..", qDir.name[i]) ) {
|
238
|
-
folders = folders & '<Folder name="#HTMLEditFormat(qDir.name[i])#" />';
|
239
|
-
} else if( not compareNoCase( qDir.type[i], "FILE" ) ) {
|
240
|
-
fileSizeKB = round(qDir.size[i] / 1024);
|
241
|
-
files = files & '<File name="#HTMLEditFormat(qDir.name[i])#" size="#IIf( fileSizeKB GT 0, DE( fileSizeKB ), 1)#" />';
|
242
|
-
}
|
243
|
-
i=i+1;
|
244
|
-
}
|
245
|
-
|
246
|
-
xmlContent = xmlContent & '<Folders>' & folders & '</Folders>';
|
247
|
-
xmlContent = xmlContent & '<Files>' & files & '</Files>';
|
248
|
-
</cfscript>
|
249
|
-
|
250
|
-
</cfcase>
|
251
|
-
|
252
|
-
|
253
|
-
<cfcase value="CreateFolder">
|
254
|
-
|
255
|
-
<cfparam name="url.newFolderName" default="">
|
256
|
-
|
257
|
-
<cfscript>
|
258
|
-
newFolderName = url.newFolderName;
|
259
|
-
if( reFind("[^A-Za-z0-9_\-\.]", newFolderName) ) {
|
260
|
-
// Munge folder name same way as we do the filename
|
261
|
-
// This means folder names are always US-ASCII so we don't have to worry about CF5 and UTF-8
|
262
|
-
newFolderName = reReplace(newFolderName, "[^A-Za-z0-9\-\.]", "_", "all");
|
263
|
-
newFolderName = reReplace(newFolderName, "_{2,}", "_", "all");
|
264
|
-
newFolderName = reReplace(newFolderName, "([^_]+)_+$", "\1", "all");
|
265
|
-
newFolderName = reReplace(newFolderName, "$_([^_]+)$", "\1", "all");
|
266
|
-
}
|
267
|
-
</cfscript>
|
268
|
-
|
269
|
-
<cfif not len(newFolderName) or len(newFolderName) gt 255>
|
270
|
-
<cfset errorNumber = 102>
|
271
|
-
<cfelseif directoryExists(currentFolderPath & newFolderName)>
|
272
|
-
<cfset errorNumber = 101>
|
273
|
-
<cfelseif reFind("^\.\.",newFolderName)>
|
274
|
-
<cfset errorNumber = 103>
|
275
|
-
<cfelse>
|
276
|
-
<cfset errorNumber = 0>
|
277
|
-
|
278
|
-
<cftry>
|
279
|
-
<cfdirectory
|
280
|
-
action="create"
|
281
|
-
directory="#currentFolderPath##newFolderName#"
|
282
|
-
mode="755">
|
283
|
-
<cfcatch>
|
284
|
-
<!---
|
285
|
-
un-resolvable error numbers in ColdFusion:
|
286
|
-
* 102 : Invalid folder name.
|
287
|
-
* 103 : You have no permissions to create the folder.
|
288
|
-
--->
|
289
|
-
<cfset errorNumber = 110>
|
290
|
-
</cfcatch>
|
291
|
-
</cftry>
|
292
|
-
</cfif>
|
293
|
-
|
294
|
-
<cfset xmlContent = xmlContent & '<Error number="#errorNumber#" />'>
|
295
|
-
|
296
|
-
</cfcase>
|
297
|
-
|
298
|
-
<cfdefaultcase>
|
299
|
-
<cfthrow type="fckeditor.connector" message="Illegal command: #url.command#">
|
300
|
-
</cfdefaultcase>
|
301
|
-
|
302
|
-
</cfswitch>
|
303
|
-
</cfif>
|
304
|
-
|
305
|
-
<cfscript>
|
306
|
-
xmlHeader = '<?xml version="1.0" encoding="utf-8" ?><Connector command="#url.command#" resourceType="#url.type#">';
|
307
|
-
xmlHeader = xmlHeader & '<CurrentFolder path="#url.currentFolder#" url="#resourceTypeUrl##url.currentFolder#" />';
|
308
|
-
xmlFooter = '</Connector>';
|
309
|
-
</cfscript>
|
310
|
-
|
311
|
-
<cfheader name="Expires" value="#GetHttpTimeString(Now())#">
|
312
|
-
<cfheader name="Pragma" value="no-cache">
|
313
|
-
<cfheader name="Cache-Control" value="no-cache, no-store, must-revalidate">
|
314
|
-
<cfcontent reset="true" type="text/xml; charset=UTF-8">
|
315
|
-
<cfoutput>#xmlHeader##xmlContent##xmlFooter#</cfoutput>
|