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
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
"""
|
4
4
|
FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
5
|
-
Copyright (C) 2003-
|
5
|
+
Copyright (C) 2003-2008 Frederico Caldeira Knabben
|
6
6
|
|
7
7
|
== BEGIN LICENSE ==
|
8
8
|
|
@@ -37,7 +37,7 @@ class FCKeditorConnector( FCKeditorConnectorBase,
|
|
37
37
|
GetFoldersCommandMixin,
|
38
38
|
GetFoldersAndFilesCommandMixin,
|
39
39
|
CreateFolderCommandMixin,
|
40
|
-
UploadFileCommandMixin,
|
40
|
+
UploadFileCommandMixin,
|
41
41
|
BaseHttpMixin, BaseXmlMixin, BaseHtmlMixin ):
|
42
42
|
"The Standard connector class."
|
43
43
|
def doResponse(self):
|
@@ -57,39 +57,39 @@ class FCKeditorConnector( FCKeditorConnectorBase,
|
|
57
57
|
# Check for invalid paths
|
58
58
|
if currentFolder is None:
|
59
59
|
return self.sendError(102, "")
|
60
|
-
|
60
|
+
|
61
61
|
# Check if it is an allowed command
|
62
62
|
if ( not command in Config.ConfigAllowedCommands ):
|
63
|
-
return self.sendError( 1, 'The %s command isn\'t allowed' % command )
|
64
|
-
|
63
|
+
return self.sendError( 1, 'The %s command isn\'t allowed' % command )
|
64
|
+
|
65
65
|
if ( not resourceType in Config.ConfigAllowedTypes ):
|
66
|
-
return self.sendError( 1, 'Invalid type specified' )
|
66
|
+
return self.sendError( 1, 'Invalid type specified' )
|
67
67
|
|
68
68
|
# Setup paths
|
69
69
|
if command == "QuickUpload":
|
70
|
-
self.userFilesFolder = Config.QuickUploadAbsolutePath[resourceType]
|
70
|
+
self.userFilesFolder = Config.QuickUploadAbsolutePath[resourceType]
|
71
71
|
self.webUserFilesFolder = Config.QuickUploadPath[resourceType]
|
72
72
|
else:
|
73
73
|
self.userFilesFolder = Config.FileTypesAbsolutePath[resourceType]
|
74
|
-
self.webUserFilesFolder = Config.FileTypesPath[resourceType]
|
75
|
-
|
74
|
+
self.webUserFilesFolder = Config.FileTypesPath[resourceType]
|
75
|
+
|
76
76
|
if not self.userFilesFolder: # no absolute path given (dangerous...)
|
77
|
-
self.userFilesFolder = mapServerPath(self.environ,
|
77
|
+
self.userFilesFolder = mapServerPath(self.environ,
|
78
78
|
self.webUserFilesFolder)
|
79
79
|
# Ensure that the directory exists.
|
80
80
|
if not os.path.exists(self.userFilesFolder):
|
81
81
|
try:
|
82
|
-
self.createServerFoldercreateServerFolder( self.userFilesFolder )
|
82
|
+
self.createServerFoldercreateServerFolder( self.userFilesFolder )
|
83
83
|
except:
|
84
84
|
return self.sendError(1, "This connector couldn\'t access to local user\'s files directories. Please check the UserFilesAbsolutePath in \"editor/filemanager/connectors/py/config.py\" and try again. ")
|
85
85
|
|
86
86
|
# File upload doesn't have to return XML, so intercept here
|
87
87
|
if (command == "FileUpload"):
|
88
88
|
return self.uploadFile(resourceType, currentFolder)
|
89
|
-
|
89
|
+
|
90
90
|
# Create Url
|
91
91
|
url = combinePaths( self.webUserFilesFolder, currentFolder )
|
92
|
-
|
92
|
+
|
93
93
|
# Begin XML
|
94
94
|
s += self.createXmlHeader(command, resourceType, currentFolder, url)
|
95
95
|
# Execute the command
|
@@ -99,8 +99,8 @@ class FCKeditorConnector( FCKeditorConnectorBase,
|
|
99
99
|
}
|
100
100
|
s += selector[command](resourceType, currentFolder)
|
101
101
|
s += self.createXmlFooter()
|
102
|
-
return s
|
103
|
-
|
102
|
+
return s
|
103
|
+
|
104
104
|
# Running from command line (plain old CGI)
|
105
105
|
if __name__ == '__main__':
|
106
106
|
try:
|
@@ -109,7 +109,7 @@ if __name__ == '__main__':
|
|
109
109
|
data = conn.doResponse()
|
110
110
|
for header in conn.headers:
|
111
111
|
print '%s: %s' % header
|
112
|
-
print
|
112
|
+
print
|
113
113
|
print data
|
114
114
|
except:
|
115
115
|
print "Content-Type: text/plain"
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
"""
|
4
4
|
FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
5
|
-
Copyright (C) 2003-
|
5
|
+
Copyright (C) 2003-2008 Frederico Caldeira Knabben
|
6
6
|
|
7
7
|
== BEGIN LICENSE ==
|
8
8
|
|
@@ -100,7 +100,7 @@ class CreateFolderCommandMixin (object):
|
|
100
100
|
elif e.errno==13: # permission denied
|
101
101
|
errorNo = 103
|
102
102
|
elif e.errno==36 or e.errno==2 or e.errno==22: # filename too long / no such file / invalid name
|
103
|
-
errorNo = 102
|
103
|
+
errorNo = 102
|
104
104
|
else:
|
105
105
|
errorNo = 110
|
106
106
|
else:
|
@@ -110,9 +110,18 @@ class CreateFolderCommandMixin (object):
|
|
110
110
|
def createServerFolder(self, folderPath):
|
111
111
|
"Purpose: physically creates a folder on the server"
|
112
112
|
# No need to check if the parent exists, just create all hierachy
|
113
|
-
|
114
|
-
|
115
|
-
|
113
|
+
|
114
|
+
try:
|
115
|
+
permissions = Config.ChmodOnFolderCreate
|
116
|
+
if not permissions:
|
117
|
+
os.makedirs(folderPath)
|
118
|
+
except AttributeError: #ChmodOnFolderCreate undefined
|
119
|
+
permissions = 0755
|
120
|
+
|
121
|
+
if permissions:
|
122
|
+
oldumask = os.umask(0)
|
123
|
+
os.makedirs(folderPath,mode=0755)
|
124
|
+
os.umask( oldumask )
|
116
125
|
|
117
126
|
class UploadFileCommandMixin (object):
|
118
127
|
def uploadFile(self, resourceType, currentFolder):
|
@@ -125,7 +134,7 @@ class UploadFileCommandMixin (object):
|
|
125
134
|
newFile = self.request.get("NewFile", "")
|
126
135
|
# Get the file name
|
127
136
|
newFileName = newFile.filename
|
128
|
-
newFileName = sanitizeFileName( newFileName )
|
137
|
+
newFileName = sanitizeFileName( newFileName )
|
129
138
|
newFileNameOnly = removeExtension(newFileName)
|
130
139
|
newFileExtension = getExtension(newFileName).lower()
|
131
140
|
allowedExtensions = Config.AllowedExtensions[resourceType]
|
@@ -168,9 +177,17 @@ class UploadFileCommandMixin (object):
|
|
168
177
|
fout.close()
|
169
178
|
|
170
179
|
if os.path.exists ( newFilePath ):
|
171
|
-
|
172
|
-
|
173
|
-
|
180
|
+
doChmod = False
|
181
|
+
try:
|
182
|
+
doChmod = Config.ChmodOnUpload
|
183
|
+
permissions = Config.ChmodOnUpload
|
184
|
+
except AttributeError: #ChmodOnUpload undefined
|
185
|
+
doChmod = True
|
186
|
+
permissions = 0755
|
187
|
+
if ( doChmod ):
|
188
|
+
oldumask = os.umask(0)
|
189
|
+
os.chmod( newFilePath, permissions )
|
190
|
+
os.umask( oldumask )
|
174
191
|
|
175
192
|
newFileUrl = self.webUserFilesFolder + currentFolder + newFileName
|
176
193
|
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
"""
|
4
4
|
FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
5
|
-
Copyright (C) 2003-
|
5
|
+
Copyright (C) 2003-2008 Frederico Caldeira Knabben
|
6
6
|
|
7
7
|
== BEGIN LICENSE ==
|
8
8
|
|
@@ -38,7 +38,7 @@ class FCKeditorConnectorBase( object ):
|
|
38
38
|
def __init__(self, environ=None):
|
39
39
|
"Constructor: Here you should parse request fields, initialize variables, etc."
|
40
40
|
self.request = FCKeditorRequest(environ) # Parse request
|
41
|
-
self.headers = [] # Clean Headers
|
41
|
+
self.headers = [] # Clean Headers
|
42
42
|
if environ:
|
43
43
|
self.environ = environ
|
44
44
|
else:
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
"""
|
4
4
|
FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
5
|
-
Copyright (C) 2003-
|
5
|
+
Copyright (C) 2003-2008 Frederico Caldeira Knabben
|
6
6
|
|
7
7
|
== BEGIN LICENSE ==
|
8
8
|
|
@@ -53,12 +53,12 @@ class BaseHttpMixin(object):
|
|
53
53
|
# Date in the past
|
54
54
|
self.setHeader('Expires','Mon, 26 Jul 1997 05:00:00 GMT')
|
55
55
|
# always modified
|
56
|
-
self.setHeader('Last-Modified',strftime("%a, %d %b %Y %H:%M:%S GMT", gmtime()))
|
56
|
+
self.setHeader('Last-Modified',strftime("%a, %d %b %Y %H:%M:%S GMT", gmtime()))
|
57
57
|
# HTTP/1.1
|
58
|
-
self.setHeader('Cache-Control','no-store, no-cache, must-revalidate')
|
59
|
-
self.setHeader('Cache-Control','post-check=0, pre-check=0')
|
58
|
+
self.setHeader('Cache-Control','no-store, no-cache, must-revalidate')
|
59
|
+
self.setHeader('Cache-Control','post-check=0, pre-check=0')
|
60
60
|
# HTTP/1.0
|
61
|
-
self.setHeader('Pragma','no-cache')
|
61
|
+
self.setHeader('Pragma','no-cache')
|
62
62
|
|
63
63
|
# Set the response format.
|
64
64
|
self.setHeader( 'Content-Type', content_type + '; charset=utf-8' )
|
@@ -93,7 +93,7 @@ class BaseXmlMixin(object):
|
|
93
93
|
"""<Connector>""" +
|
94
94
|
self.sendErrorNode (number, text) +
|
95
95
|
"""</Connector>""" )
|
96
|
-
|
96
|
+
|
97
97
|
def sendErrorNode(self, number, text):
|
98
98
|
return """<Error number="%s" text="%s" />""" % (number, convertToXmlAttribute(text))
|
99
99
|
|
@@ -102,10 +102,41 @@ class BaseHtmlMixin(object):
|
|
102
102
|
self.setHttpHeaders("text/html")
|
103
103
|
"This is the function that sends the results of the uploading process"
|
104
104
|
return """<script type="text/javascript">
|
105
|
-
|
105
|
+
(function()
|
106
|
+
{
|
107
|
+
var d = document.domain ;
|
108
|
+
|
109
|
+
while ( true )
|
110
|
+
{
|
111
|
+
// Test if we can access a parent property.
|
112
|
+
try
|
113
|
+
{
|
114
|
+
var test = window.top.opener.document.domain ;
|
115
|
+
break ;
|
116
|
+
}
|
117
|
+
catch( e ) {}
|
118
|
+
|
119
|
+
// Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ...
|
120
|
+
d = d.replace( /.*?(?:\.|$)/, '' ) ;
|
121
|
+
|
122
|
+
if ( d.length == 0 )
|
123
|
+
break ; // It was not able to detect the domain.
|
124
|
+
|
125
|
+
try
|
126
|
+
{
|
127
|
+
document.domain = d ;
|
128
|
+
}
|
129
|
+
catch (e)
|
130
|
+
{
|
131
|
+
break ;
|
132
|
+
}
|
133
|
+
}
|
134
|
+
})() ;
|
135
|
+
|
136
|
+
window.parent.OnUploadCompleted(%(errorNumber)s,"%(fileUrl)s","%(fileName)s","%(customMsg)s");
|
106
137
|
</script>""" % {
|
107
138
|
'errorNumber': errorNo,
|
108
139
|
'fileUrl': fileUrl.replace ('"', '\\"'),
|
109
|
-
'fileName': fileName.replace ( '"', '\\"' ) ,
|
140
|
+
'fileName': fileName.replace ( '"', '\\"' ) ,
|
110
141
|
'customMsg': customMsg.replace ( '"', '\\"' ),
|
111
|
-
}
|
142
|
+
}
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
"""
|
4
4
|
FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
5
|
-
Copyright (C) 2003-
|
5
|
+
Copyright (C) 2003-2008 Frederico Caldeira Knabben
|
6
6
|
|
7
7
|
== BEGIN LICENSE ==
|
8
8
|
|
@@ -20,7 +20,7 @@ http://www.mozilla.org/MPL/MPL-1.1.html
|
|
20
20
|
|
21
21
|
== END LICENSE ==
|
22
22
|
|
23
|
-
Utility functions for the File Manager Connector for Python
|
23
|
+
Utility functions for the File Manager Connector for Python
|
24
24
|
|
25
25
|
"""
|
26
26
|
|
@@ -49,10 +49,10 @@ def removeFromEnd(string, char):
|
|
49
49
|
# Path functions
|
50
50
|
|
51
51
|
def combinePaths( basePath, folder ):
|
52
|
-
return removeFromEnd( basePath, '/' ) + '/' + removeFromStart( folder, '/' )
|
52
|
+
return removeFromEnd( basePath, '/' ) + '/' + removeFromStart( folder, '/' )
|
53
53
|
|
54
54
|
def getFileName(filename):
|
55
|
-
" Purpose: helper function to extrapolate the filename "
|
55
|
+
" Purpose: helper function to extrapolate the filename "
|
56
56
|
for splitChar in ["/", "\\"]:
|
57
57
|
array = filename.split(splitChar)
|
58
58
|
if (len(array) > 1):
|
@@ -61,8 +61,8 @@ def getFileName(filename):
|
|
61
61
|
|
62
62
|
def sanitizeFolderName( newFolderName ):
|
63
63
|
"Do a cleanup of the folder name to avoid possible problems"
|
64
|
-
# Remove . \ / | : ? *
|
65
|
-
return re.sub( '
|
64
|
+
# Remove . \ / | : ? * " < > and control characters
|
65
|
+
return re.sub( '(?u)\\.|\\\\|\\/|\\||\\:|\\?|\\*|"|<|>|[^\u0000-\u001f\u007f-\u009f]', '_', newFolderName )
|
66
66
|
|
67
67
|
def sanitizeFileName( newFileName ):
|
68
68
|
"Do a cleanup of the file name to avoid possible problems"
|
@@ -72,27 +72,27 @@ def sanitizeFileName( newFileName ):
|
|
72
72
|
newFileName = newFileName.replace('\\','/') # convert windows to unix path
|
73
73
|
newFileName = os.path.basename (newFileName) # strip directories
|
74
74
|
# Remove \ / | : ? *
|
75
|
-
return re.sub ( '
|
75
|
+
return re.sub ( '(?u)/\\\\|\\/|\\||\\:|\\?|\\*|"|<|>|[^\u0000-\u001f\u007f-\u009f]/', '_', newFileName )
|
76
76
|
|
77
77
|
def getCurrentFolder(currentFolder):
|
78
|
-
if not currentFolder:
|
79
|
-
currentFolder = '/'
|
78
|
+
if not currentFolder:
|
79
|
+
currentFolder = '/'
|
80
80
|
|
81
81
|
# Check the current folder syntax (must begin and end with a slash).
|
82
82
|
if (currentFolder[-1] <> "/"):
|
83
83
|
currentFolder += "/"
|
84
84
|
if (currentFolder[0] <> "/"):
|
85
85
|
currentFolder = "/" + currentFolder
|
86
|
-
|
86
|
+
|
87
87
|
# Ensure the folder path has no double-slashes
|
88
88
|
while '//' in currentFolder:
|
89
|
-
currentFolder = currentFolder.replace('//','/')
|
89
|
+
currentFolder = currentFolder.replace('//','/')
|
90
90
|
|
91
91
|
# Check for invalid folder paths (..)
|
92
|
-
if '..' in currentFolder:
|
92
|
+
if '..' in currentFolder or '\\' in currentFolder:
|
93
93
|
return None
|
94
94
|
|
95
|
-
return currentFolder
|
95
|
+
return currentFolder
|
96
96
|
|
97
97
|
def mapServerPath( environ, url):
|
98
98
|
" Emulate the asp Server.mapPath function. Given an url path return the physical directory that it corresponds to "
|
@@ -101,7 +101,7 @@ def mapServerPath( environ, url):
|
|
101
101
|
return combinePaths( getRootPath(environ), url )
|
102
102
|
|
103
103
|
def mapServerFolder(resourceTypePath, folderPath):
|
104
|
-
return combinePaths ( resourceTypePath , folderPath )
|
104
|
+
return combinePaths ( resourceTypePath , folderPath )
|
105
105
|
|
106
106
|
def getRootPath(environ):
|
107
107
|
"Purpose: returns the root path on the server"
|
@@ -111,17 +111,16 @@ def getRootPath(environ):
|
|
111
111
|
if environ.has_key('DOCUMENT_ROOT'):
|
112
112
|
return environ['DOCUMENT_ROOT']
|
113
113
|
else:
|
114
|
-
realPath = os.path.realpath( './' )
|
114
|
+
realPath = os.path.realpath( './' )
|
115
115
|
selfPath = environ['SCRIPT_FILENAME']
|
116
|
-
selfPath = selfPath [ : selfPath.rfind( '/' ) ]
|
117
|
-
selfPath = selfPath.replace( '/', os.path.sep)
|
118
|
-
|
119
|
-
position = realPath.find(selfPath)
|
116
|
+
selfPath = selfPath [ : selfPath.rfind( '/' ) ]
|
117
|
+
selfPath = selfPath.replace( '/', os.path.sep)
|
118
|
+
|
119
|
+
position = realPath.find(selfPath)
|
120
120
|
|
121
121
|
# This can check only that this script isn't run from a virtual dir
|
122
122
|
# But it avoids the problems that arise if it isn't checked
|
123
|
-
raise realPath
|
123
|
+
raise realPath
|
124
124
|
if ( position < 0 or position <> len(realPath) - len(selfPath) or realPath[ : position ]==''):
|
125
125
|
raise Exception('Sorry, can\'t map "UserFilesPath" to a physical path. You must set the "UserFilesAbsolutePath" value in "editor/filemanager/connectors/py/config.py".')
|
126
126
|
return realPath[ : position ]
|
127
|
-
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# replace the name of this file to .htaccess (if using apache),
|
1
|
+
# replace the name of this file to .htaccess (if using apache),
|
2
2
|
# and set the proper options and paths according your enviroment
|
3
3
|
|
4
4
|
Allow from all
|
@@ -19,5 +19,5 @@ PythonOption wsgi.application wsgi::App
|
|
19
19
|
|
20
20
|
|
21
21
|
# Plain old CGI
|
22
|
-
#Options +ExecCGI
|
22
|
+
#Options +ExecCGI
|
23
23
|
#AddHandler cgi-script py
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
"""
|
4
4
|
FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
5
|
-
Copyright (C) 2003-
|
5
|
+
Copyright (C) 2003-2008 Frederico Caldeira Knabben
|
6
6
|
|
7
7
|
== BEGIN LICENSE ==
|
8
8
|
|
@@ -31,8 +31,8 @@ from fckconnector import FCKeditorConnectorBase # import base connector
|
|
31
31
|
import config as Config
|
32
32
|
|
33
33
|
class FCKeditorQuickUpload( FCKeditorConnectorBase,
|
34
|
-
UploadFileCommandMixin,
|
35
|
-
BaseHttpMixin, BaseHtmlMixin):
|
34
|
+
UploadFileCommandMixin,
|
35
|
+
BaseHttpMixin, BaseHtmlMixin):
|
36
36
|
def doResponse(self):
|
37
37
|
"Main function. Process the request, set headers and return a string as response."
|
38
38
|
# Check if this connector is disabled
|
@@ -48,24 +48,24 @@ class FCKeditorQuickUpload( FCKeditorConnectorBase,
|
|
48
48
|
|
49
49
|
# Check if it is an allowed command
|
50
50
|
if ( not command in Config.ConfigAllowedCommands ):
|
51
|
-
return self.sendUploadResults( 1, '', '', 'The %s command isn\'t allowed' % command )
|
52
|
-
|
51
|
+
return self.sendUploadResults( 1, '', '', 'The %s command isn\'t allowed' % command )
|
52
|
+
|
53
53
|
if ( not resourceType in Config.ConfigAllowedTypes ):
|
54
|
-
return self.sendUploadResults( 1, '', '', 'Invalid type specified' )
|
54
|
+
return self.sendUploadResults( 1, '', '', 'Invalid type specified' )
|
55
55
|
|
56
56
|
# Setup paths
|
57
|
-
self.userFilesFolder = Config.QuickUploadAbsolutePath[resourceType]
|
58
|
-
self.webUserFilesFolder = Config.QuickUploadPath[resourceType]
|
57
|
+
self.userFilesFolder = Config.QuickUploadAbsolutePath[resourceType]
|
58
|
+
self.webUserFilesFolder = Config.QuickUploadPath[resourceType]
|
59
59
|
if not self.userFilesFolder: # no absolute path given (dangerous...)
|
60
|
-
self.userFilesFolder = mapServerPath(self.environ,
|
60
|
+
self.userFilesFolder = mapServerPath(self.environ,
|
61
61
|
self.webUserFilesFolder)
|
62
|
-
|
62
|
+
|
63
63
|
# Ensure that the directory exists.
|
64
64
|
if not os.path.exists(self.userFilesFolder):
|
65
65
|
try:
|
66
|
-
self.createServerFoldercreateServerFolder( self.userFilesFolder )
|
66
|
+
self.createServerFoldercreateServerFolder( self.userFilesFolder )
|
67
67
|
except:
|
68
|
-
return self.sendError(1, "This connector couldn\'t access to local user\'s files directories. Please check the UserFilesAbsolutePath in \"editor/filemanager/connectors/py/config.py\" and try again. ")
|
68
|
+
return self.sendError(1, "This connector couldn\'t access to local user\'s files directories. Please check the UserFilesAbsolutePath in \"editor/filemanager/connectors/py/config.py\" and try again. ")
|
69
69
|
|
70
70
|
# File upload doesn't have to return XML, so intercept here
|
71
71
|
return self.uploadFile(resourceType, currentFolder)
|
@@ -79,7 +79,7 @@ if __name__ == '__main__':
|
|
79
79
|
for header in conn.headers:
|
80
80
|
if not header is None:
|
81
81
|
print '%s: %s' % header
|
82
|
-
print
|
82
|
+
print
|
83
83
|
print data
|
84
84
|
except:
|
85
85
|
print "Content-Type: text/plain"
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
"""
|
4
4
|
FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
5
|
-
Copyright (C) 2003-
|
5
|
+
Copyright (C) 2003-2008 Frederico Caldeira Knabben
|
6
6
|
|
7
7
|
== BEGIN LICENSE ==
|
8
8
|
|
@@ -33,7 +33,7 @@ import cgitb
|
|
33
33
|
from cStringIO import StringIO
|
34
34
|
|
35
35
|
# Running from WSGI capable server (recomended)
|
36
|
-
def App(environ, start_response):
|
36
|
+
def App(environ, start_response):
|
37
37
|
"WSGI entry point. Run the connector"
|
38
38
|
if environ['SCRIPT_NAME'].endswith("connector.py"):
|
39
39
|
conn = FCKeditorConnector(environ)
|
@@ -54,5 +54,5 @@ def App(environ, start_response):
|
|
54
54
|
except:
|
55
55
|
start_response("500 Internal Server Error",[("Content-type","text/html")])
|
56
56
|
file = StringIO()
|
57
|
-
cgitb.Hook(file = file).handle()
|
57
|
+
cgitb.Hook(file = file).handle()
|
58
58
|
yield file.getvalue()
|