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,87 +0,0 @@
|
|
1
|
-
<?php
|
2
|
-
/*
|
3
|
-
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
4
|
-
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
5
|
-
*
|
6
|
-
* == BEGIN LICENSE ==
|
7
|
-
*
|
8
|
-
* Licensed under the terms of any of the following licenses at your
|
9
|
-
* choice:
|
10
|
-
*
|
11
|
-
* - GNU General Public License Version 2 or later (the "GPL")
|
12
|
-
* http://www.gnu.org/licenses/gpl.html
|
13
|
-
*
|
14
|
-
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
15
|
-
* http://www.gnu.org/licenses/lgpl.html
|
16
|
-
*
|
17
|
-
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
18
|
-
* http://www.mozilla.org/MPL/MPL-1.1.html
|
19
|
-
*
|
20
|
-
* == END LICENSE ==
|
21
|
-
*
|
22
|
-
* This is the File Manager Connector for PHP.
|
23
|
-
*/
|
24
|
-
|
25
|
-
ob_start() ;
|
26
|
-
|
27
|
-
require('./config.php') ;
|
28
|
-
require('./util.php') ;
|
29
|
-
require('./io.php') ;
|
30
|
-
require('./basexml.php') ;
|
31
|
-
require('./commands.php') ;
|
32
|
-
require('./phpcompat.php') ;
|
33
|
-
|
34
|
-
if ( !$Config['Enabled'] )
|
35
|
-
SendError( 1, 'This connector is disabled. Please check the "editor/filemanager/connectors/php/config.php" file' ) ;
|
36
|
-
|
37
|
-
DoResponse() ;
|
38
|
-
|
39
|
-
function DoResponse()
|
40
|
-
{
|
41
|
-
if (!isset($_GET)) {
|
42
|
-
global $_GET;
|
43
|
-
}
|
44
|
-
if ( !isset( $_GET['Command'] ) || !isset( $_GET['Type'] ) || !isset( $_GET['CurrentFolder'] ) )
|
45
|
-
return ;
|
46
|
-
|
47
|
-
// Get the main request informaiton.
|
48
|
-
$sCommand = $_GET['Command'] ;
|
49
|
-
$sResourceType = $_GET['Type'] ;
|
50
|
-
$sCurrentFolder = GetCurrentFolder() ;
|
51
|
-
|
52
|
-
// Check if it is an allowed command
|
53
|
-
if ( ! IsAllowedCommand( $sCommand ) )
|
54
|
-
SendError( 1, 'The "' . $sCommand . '" command isn\'t allowed' ) ;
|
55
|
-
|
56
|
-
// Check if it is an allowed type.
|
57
|
-
if ( !IsAllowedType( $sResourceType ) )
|
58
|
-
SendError( 1, 'Invalid type specified' ) ;
|
59
|
-
|
60
|
-
// File Upload doesn't have to Return XML, so it must be intercepted before anything.
|
61
|
-
if ( $sCommand == 'FileUpload' )
|
62
|
-
{
|
63
|
-
FileUpload( $sResourceType, $sCurrentFolder, $sCommand ) ;
|
64
|
-
return ;
|
65
|
-
}
|
66
|
-
|
67
|
-
CreateXmlHeader( $sCommand, $sResourceType, $sCurrentFolder ) ;
|
68
|
-
|
69
|
-
// Execute the required command.
|
70
|
-
switch ( $sCommand )
|
71
|
-
{
|
72
|
-
case 'GetFolders' :
|
73
|
-
GetFolders( $sResourceType, $sCurrentFolder ) ;
|
74
|
-
break ;
|
75
|
-
case 'GetFoldersAndFiles' :
|
76
|
-
GetFoldersAndFiles( $sResourceType, $sCurrentFolder ) ;
|
77
|
-
break ;
|
78
|
-
case 'CreateFolder' :
|
79
|
-
CreateFolder( $sResourceType, $sCurrentFolder ) ;
|
80
|
-
break ;
|
81
|
-
}
|
82
|
-
|
83
|
-
CreateXmlFooter() ;
|
84
|
-
|
85
|
-
exit ;
|
86
|
-
}
|
87
|
-
?>
|
@@ -1,272 +0,0 @@
|
|
1
|
-
<?php
|
2
|
-
/*
|
3
|
-
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
4
|
-
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
5
|
-
*
|
6
|
-
* == BEGIN LICENSE ==
|
7
|
-
*
|
8
|
-
* Licensed under the terms of any of the following licenses at your
|
9
|
-
* choice:
|
10
|
-
*
|
11
|
-
* - GNU General Public License Version 2 or later (the "GPL")
|
12
|
-
* http://www.gnu.org/licenses/gpl.html
|
13
|
-
*
|
14
|
-
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
15
|
-
* http://www.gnu.org/licenses/lgpl.html
|
16
|
-
*
|
17
|
-
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
18
|
-
* http://www.mozilla.org/MPL/MPL-1.1.html
|
19
|
-
*
|
20
|
-
* == END LICENSE ==
|
21
|
-
*
|
22
|
-
* This is the File Manager Connector for PHP.
|
23
|
-
*/
|
24
|
-
function CombinePaths( $sBasePath, $sFolder )
|
25
|
-
{
|
26
|
-
return RemoveFromEnd( $sBasePath, '/' ) . '/' . RemoveFromStart( $sFolder, '/' ) ;
|
27
|
-
}
|
28
|
-
function GetResourceTypePath( $resourceType, $sCommand )
|
29
|
-
{
|
30
|
-
global $Config ;
|
31
|
-
|
32
|
-
if ( $sCommand == "QuickUpload")
|
33
|
-
return $Config['QuickUploadPath'][$resourceType] ;
|
34
|
-
else
|
35
|
-
return $Config['FileTypesPath'][$resourceType] ;
|
36
|
-
}
|
37
|
-
|
38
|
-
function GetResourceTypeDirectory( $resourceType, $sCommand )
|
39
|
-
{
|
40
|
-
global $Config ;
|
41
|
-
if ( $sCommand == "QuickUpload")
|
42
|
-
{
|
43
|
-
if ( strlen( $Config['QuickUploadAbsolutePath'][$resourceType] ) > 0 )
|
44
|
-
return $Config['QuickUploadAbsolutePath'][$resourceType] ;
|
45
|
-
|
46
|
-
// Map the "UserFiles" path to a local directory.
|
47
|
-
return Server_MapPath( $Config['QuickUploadPath'][$resourceType] ) ;
|
48
|
-
}
|
49
|
-
else
|
50
|
-
{
|
51
|
-
if ( strlen( $Config['FileTypesAbsolutePath'][$resourceType] ) > 0 )
|
52
|
-
return $Config['FileTypesAbsolutePath'][$resourceType] ;
|
53
|
-
|
54
|
-
// Map the "UserFiles" path to a local directory.
|
55
|
-
return Server_MapPath( $Config['FileTypesPath'][$resourceType] ) ;
|
56
|
-
}
|
57
|
-
}
|
58
|
-
|
59
|
-
function GetUrlFromPath( $resourceType, $folderPath, $sCommand )
|
60
|
-
{
|
61
|
-
return CombinePaths( GetResourceTypePath( $resourceType, $sCommand ), $folderPath ) ;
|
62
|
-
}
|
63
|
-
|
64
|
-
function RemoveExtension( $fileName )
|
65
|
-
{
|
66
|
-
return substr( $fileName, 0, strrpos( $fileName, '.' ) ) ;
|
67
|
-
}
|
68
|
-
|
69
|
-
function ServerMapFolder( $resourceType, $folderPath, $sCommand )
|
70
|
-
{
|
71
|
-
// Get the resource type directory.
|
72
|
-
$sResourceTypePath = GetResourceTypeDirectory( $resourceType, $sCommand ) ;
|
73
|
-
|
74
|
-
// Ensure that the directory exists.
|
75
|
-
$sErrorMsg = CreateServerFolder( $sResourceTypePath ) ;
|
76
|
-
if ( $sErrorMsg != '' )
|
77
|
-
SendError( 1, "Error creating folder \"{$sResourceTypePath}\" ({$sErrorMsg})" ) ;
|
78
|
-
|
79
|
-
// Return the resource type directory combined with the required path.
|
80
|
-
return CombinePaths( $sResourceTypePath , $folderPath ) ;
|
81
|
-
}
|
82
|
-
|
83
|
-
function GetParentFolder( $folderPath )
|
84
|
-
{
|
85
|
-
$sPattern = "-[/\\\\][^/\\\\]+[/\\\\]?$-" ;
|
86
|
-
return preg_replace( $sPattern, '', $folderPath ) ;
|
87
|
-
}
|
88
|
-
|
89
|
-
function CreateServerFolder( $folderPath, $lastFolder = null )
|
90
|
-
{
|
91
|
-
$sParent = GetParentFolder( $folderPath ) ;
|
92
|
-
|
93
|
-
// Ensure the folder path has no double-slashes, or mkdir may fail on certain platforms
|
94
|
-
while ( strpos($folderPath, '//') !== false )
|
95
|
-
{
|
96
|
-
$folderPath = str_replace( '//', '/', $folderPath ) ;
|
97
|
-
}
|
98
|
-
|
99
|
-
// Check if the parent exists, or create it.
|
100
|
-
if ( !file_exists( $sParent ) )
|
101
|
-
{
|
102
|
-
//prevents agains infinite loop when we can't create root folder
|
103
|
-
if ( !is_null( $lastFolder ) && $lastFolder === $sParent) {
|
104
|
-
return "Can't create $folderPath directory" ;
|
105
|
-
}
|
106
|
-
|
107
|
-
$sErrorMsg = CreateServerFolder( $sParent, $folderPath ) ;
|
108
|
-
if ( $sErrorMsg != '' )
|
109
|
-
return $sErrorMsg ;
|
110
|
-
}
|
111
|
-
|
112
|
-
if ( !file_exists( $folderPath ) )
|
113
|
-
{
|
114
|
-
// Turn off all error reporting.
|
115
|
-
error_reporting( 0 ) ;
|
116
|
-
|
117
|
-
$php_errormsg = '' ;
|
118
|
-
// Enable error tracking to catch the error.
|
119
|
-
ini_set( 'track_errors', '1' ) ;
|
120
|
-
|
121
|
-
// To create the folder with 0777 permissions, we need to set umask to zero.
|
122
|
-
$oldumask = umask(0) ;
|
123
|
-
mkdir( $folderPath, 0777 ) ;
|
124
|
-
umask( $oldumask ) ;
|
125
|
-
|
126
|
-
$sErrorMsg = $php_errormsg ;
|
127
|
-
|
128
|
-
// Restore the configurations.
|
129
|
-
ini_restore( 'track_errors' ) ;
|
130
|
-
ini_restore( 'error_reporting' ) ;
|
131
|
-
|
132
|
-
return $sErrorMsg ;
|
133
|
-
}
|
134
|
-
else
|
135
|
-
return '' ;
|
136
|
-
}
|
137
|
-
|
138
|
-
function GetRootPath()
|
139
|
-
{
|
140
|
-
if (!isset($_SERVER)) {
|
141
|
-
global $_SERVER;
|
142
|
-
}
|
143
|
-
$sRealPath = realpath( './' ) ;
|
144
|
-
|
145
|
-
$sSelfPath = $_SERVER['PHP_SELF'] ;
|
146
|
-
$sSelfPath = substr( $sSelfPath, 0, strrpos( $sSelfPath, '/' ) ) ;
|
147
|
-
|
148
|
-
$sSelfPath = str_replace( '/', DIRECTORY_SEPARATOR, $sSelfPath ) ;
|
149
|
-
|
150
|
-
$position = strpos( $sRealPath, $sSelfPath ) ;
|
151
|
-
|
152
|
-
// This can check only that this script isn't run from a virtual dir
|
153
|
-
// But it avoids the problems that arise if it isn't checked
|
154
|
-
if ( $position === false || $position <> strlen( $sRealPath ) - strlen( $sSelfPath ) )
|
155
|
-
SendError( 1, 'Sorry, can\'t map "UserFilesPath" to a physical path. You must set the "UserFilesAbsolutePath" value in "editor/filemanager/connectors/php/config.php".' ) ;
|
156
|
-
|
157
|
-
return substr( $sRealPath, 0, $position ) ;
|
158
|
-
}
|
159
|
-
|
160
|
-
// Emulate the asp Server.mapPath function.
|
161
|
-
// given an url path return the physical directory that it corresponds to
|
162
|
-
function Server_MapPath( $path )
|
163
|
-
{
|
164
|
-
// This function is available only for Apache
|
165
|
-
if ( function_exists( 'apache_lookup_uri' ) )
|
166
|
-
{
|
167
|
-
$info = apache_lookup_uri( $path ) ;
|
168
|
-
return $info->filename . $info->path_info ;
|
169
|
-
}
|
170
|
-
|
171
|
-
// This isn't correct but for the moment there's no other solution
|
172
|
-
// If this script is under a virtual directory or symlink it will detect the problem and stop
|
173
|
-
return GetRootPath() . $path ;
|
174
|
-
}
|
175
|
-
|
176
|
-
function IsAllowedExt( $sExtension, $resourceType )
|
177
|
-
{
|
178
|
-
global $Config ;
|
179
|
-
// Get the allowed and denied extensions arrays.
|
180
|
-
$arAllowed = $Config['AllowedExtensions'][$resourceType] ;
|
181
|
-
$arDenied = $Config['DeniedExtensions'][$resourceType] ;
|
182
|
-
|
183
|
-
if ( count($arAllowed) > 0 && !in_array( $sExtension, $arAllowed ) )
|
184
|
-
return false ;
|
185
|
-
|
186
|
-
if ( count($arDenied) > 0 && in_array( $sExtension, $arDenied ) )
|
187
|
-
return false ;
|
188
|
-
|
189
|
-
return true ;
|
190
|
-
}
|
191
|
-
|
192
|
-
function IsAllowedType( $resourceType )
|
193
|
-
{
|
194
|
-
global $Config ;
|
195
|
-
if ( !in_array( $resourceType, $Config['ConfigAllowedTypes'] ) )
|
196
|
-
return false ;
|
197
|
-
|
198
|
-
return true ;
|
199
|
-
}
|
200
|
-
|
201
|
-
function IsAllowedCommand( $sCommand )
|
202
|
-
{
|
203
|
-
global $Config ;
|
204
|
-
|
205
|
-
if ( !in_array( $sCommand, $Config['ConfigAllowedCommands'] ) )
|
206
|
-
return false ;
|
207
|
-
|
208
|
-
return true ;
|
209
|
-
}
|
210
|
-
|
211
|
-
function GetCurrentFolder()
|
212
|
-
{
|
213
|
-
if (!isset($_GET)) {
|
214
|
-
global $_GET;
|
215
|
-
}
|
216
|
-
$sCurrentFolder = isset( $_GET['CurrentFolder'] ) ? $_GET['CurrentFolder'] : '/' ;
|
217
|
-
|
218
|
-
// Check the current folder syntax (must begin and start with a slash).
|
219
|
-
if ( ! ereg( '/$', $sCurrentFolder ) ) $sCurrentFolder .= '/' ;
|
220
|
-
if ( strpos( $sCurrentFolder, '/' ) !== 0 ) $sCurrentFolder = '/' . $sCurrentFolder ;
|
221
|
-
|
222
|
-
// Ensure the folder path has no double-slashes
|
223
|
-
while ( strpos ($sCurrentFolder, '//') !== false ) {
|
224
|
-
$sCurrentFolder = str_replace ('//', '/', $sCurrentFolder) ;
|
225
|
-
}
|
226
|
-
|
227
|
-
// Check for invalid folder paths (..)
|
228
|
-
if ( strpos( $sCurrentFolder, '..' ) )
|
229
|
-
SendError( 102, '' ) ;
|
230
|
-
|
231
|
-
return $sCurrentFolder ;
|
232
|
-
}
|
233
|
-
|
234
|
-
// Do a cleanup of the folder name to avoid possible problems
|
235
|
-
function SanitizeFolderName( $sNewFolderName )
|
236
|
-
{
|
237
|
-
$sNewFolderName = stripslashes( $sNewFolderName ) ;
|
238
|
-
|
239
|
-
// Remove . \ / | : ? * " < >
|
240
|
-
$sNewFolderName = preg_replace( '/\\.|\\\\|\\/|\\||\\:|\\?|\\*|"|<|>/', '_', $sNewFolderName ) ;
|
241
|
-
|
242
|
-
return $sNewFolderName ;
|
243
|
-
}
|
244
|
-
|
245
|
-
// Do a cleanup of the file name to avoid possible problems
|
246
|
-
function SanitizeFileName( $sNewFileName )
|
247
|
-
{
|
248
|
-
global $Config ;
|
249
|
-
|
250
|
-
$sNewFileName = stripslashes( $sNewFileName ) ;
|
251
|
-
|
252
|
-
// Replace dots in the name with underscores (only one dot can be there... security issue).
|
253
|
-
if ( $Config['ForceSingleExtension'] )
|
254
|
-
$sNewFileName = preg_replace( '/\\.(?![^.]*$)/', '_', $sNewFileName ) ;
|
255
|
-
|
256
|
-
// Remove \ / | : ? * " < >
|
257
|
-
$sNewFileName = preg_replace( '/\\\\|\\/|\\||\\:|\\?|\\*|"|<|>/', '_', $sNewFileName ) ;
|
258
|
-
|
259
|
-
return $sNewFileName ;
|
260
|
-
}
|
261
|
-
|
262
|
-
// This is the function that sends the results of the uploading process.
|
263
|
-
function SendUploadResults( $errorNumber, $fileUrl = '', $fileName = '', $customMsg = '' )
|
264
|
-
{
|
265
|
-
echo '<script type="text/javascript">' ;
|
266
|
-
$rpl = array( '\\' => '\\\\', '"' => '\\"' ) ;
|
267
|
-
echo 'window.parent.OnUploadCompleted(' . $errorNumber . ',"' . strtr( $fileUrl, $rpl ) . '","' . strtr( $fileName, $rpl ) . '", "' . strtr( $customMsg, $rpl ) . '") ;' ;
|
268
|
-
echo '</script>' ;
|
269
|
-
exit ;
|
270
|
-
}
|
271
|
-
|
272
|
-
?>
|
@@ -1,17 +0,0 @@
|
|
1
|
-
<?php
|
2
|
-
|
3
|
-
if ( !isset( $_SERVER ) ) {
|
4
|
-
$_SERVER = $HTTP_SERVER_VARS ;
|
5
|
-
}
|
6
|
-
if ( !isset( $_GET ) ) {
|
7
|
-
$_GET = $HTTP_GET_VARS ;
|
8
|
-
}
|
9
|
-
if ( !isset( $_FILES ) ) {
|
10
|
-
$_FILES = $HTTP_POST_FILES ;
|
11
|
-
}
|
12
|
-
|
13
|
-
if ( !defined( 'DIRECTORY_SEPARATOR' ) ) {
|
14
|
-
define( 'DIRECTORY_SEPARATOR',
|
15
|
-
strtoupper(substr(PHP_OS, 0, 3) == 'WIN') ? '\\' : '/'
|
16
|
-
) ;
|
17
|
-
}
|
@@ -1,59 +0,0 @@
|
|
1
|
-
<?php
|
2
|
-
/*
|
3
|
-
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
4
|
-
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
5
|
-
*
|
6
|
-
* == BEGIN LICENSE ==
|
7
|
-
*
|
8
|
-
* Licensed under the terms of any of the following licenses at your
|
9
|
-
* choice:
|
10
|
-
*
|
11
|
-
* - GNU General Public License Version 2 or later (the "GPL")
|
12
|
-
* http://www.gnu.org/licenses/gpl.html
|
13
|
-
*
|
14
|
-
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
15
|
-
* http://www.gnu.org/licenses/lgpl.html
|
16
|
-
*
|
17
|
-
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
18
|
-
* http://www.mozilla.org/MPL/MPL-1.1.html
|
19
|
-
*
|
20
|
-
* == END LICENSE ==
|
21
|
-
*
|
22
|
-
* This is the "File Uploader" for PHP.
|
23
|
-
*/
|
24
|
-
|
25
|
-
require('./config.php') ;
|
26
|
-
require('./util.php') ;
|
27
|
-
require('./io.php') ;
|
28
|
-
require('./commands.php') ;
|
29
|
-
require('./phpcompat.php') ;
|
30
|
-
|
31
|
-
function SendError( $number, $text )
|
32
|
-
{
|
33
|
-
SendUploadResults( $number, '', '', $text ) ;
|
34
|
-
}
|
35
|
-
|
36
|
-
|
37
|
-
// Check if this uploader has been enabled.
|
38
|
-
if ( !$Config['Enabled'] )
|
39
|
-
SendUploadResults( '1', '', '', 'This file uploader is disabled. Please check the "editor/filemanager/connectors/php/config.php" file' ) ;
|
40
|
-
|
41
|
-
$sCommand = 'QuickUpload' ;
|
42
|
-
|
43
|
-
// The file type (from the QueryString, by default 'File').
|
44
|
-
$sType = isset( $_GET['Type'] ) ? $_GET['Type'] : 'File' ;
|
45
|
-
|
46
|
-
$sCurrentFolder = GetCurrentFolder() ;
|
47
|
-
|
48
|
-
// Is enabled the upload?
|
49
|
-
if ( ! IsAllowedCommand( $sCommand ) )
|
50
|
-
SendUploadResults( '1', '', '', 'The ""' . $sCommand . '"" command isn\'t allowed' ) ;
|
51
|
-
|
52
|
-
// Check if it is an allowed type.
|
53
|
-
if ( !IsAllowedType( $sType ) )
|
54
|
-
SendUploadResults( 1, '', '', 'Invalid type specified' ) ;
|
55
|
-
|
56
|
-
|
57
|
-
FileUpload( $sType, $sCurrentFolder, $sCommand )
|
58
|
-
|
59
|
-
?>
|
@@ -1,185 +0,0 @@
|
|
1
|
-
<?php
|
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
|
-
* Utility functions for the File Manager Connector for PHP.
|
23
|
-
*/
|
24
|
-
|
25
|
-
function RemoveFromStart( $sourceString, $charToRemove )
|
26
|
-
{
|
27
|
-
$sPattern = '|^' . $charToRemove . '+|' ;
|
28
|
-
return preg_replace( $sPattern, '', $sourceString ) ;
|
29
|
-
}
|
30
|
-
|
31
|
-
function RemoveFromEnd( $sourceString, $charToRemove )
|
32
|
-
{
|
33
|
-
$sPattern = '|' . $charToRemove . '+$|' ;
|
34
|
-
return preg_replace( $sPattern, '', $sourceString ) ;
|
35
|
-
}
|
36
|
-
|
37
|
-
function ConvertToXmlAttribute( $value )
|
38
|
-
{
|
39
|
-
if ( defined( 'PHP_OS' ) )
|
40
|
-
{
|
41
|
-
$os = PHP_OS ;
|
42
|
-
}
|
43
|
-
else
|
44
|
-
{
|
45
|
-
$os = php_uname() ;
|
46
|
-
}
|
47
|
-
|
48
|
-
if ( strtoupper( substr( $os, 0, 3 ) ) === 'WIN' )
|
49
|
-
{
|
50
|
-
return ( utf8_encode( htmlspecialchars( $value ) ) ) ;
|
51
|
-
}
|
52
|
-
else
|
53
|
-
{
|
54
|
-
return ( htmlspecialchars( $value ) ) ;
|
55
|
-
}
|
56
|
-
}
|
57
|
-
|
58
|
-
/**
|
59
|
-
* Check whether given extension is in html etensions list
|
60
|
-
*
|
61
|
-
* @param string $ext
|
62
|
-
* @param array $htmlExtensions
|
63
|
-
* @return boolean
|
64
|
-
*/
|
65
|
-
function IsHtmlExtension( $ext, $htmlExtensions )
|
66
|
-
{
|
67
|
-
if ( !$htmlExtensions || !is_array( $htmlExtensions ) )
|
68
|
-
{
|
69
|
-
return false ;
|
70
|
-
}
|
71
|
-
$lcaseHtmlExtensions = array() ;
|
72
|
-
foreach ( $htmlExtensions as $key => $val )
|
73
|
-
{
|
74
|
-
$lcaseHtmlExtensions[$key] = strtolower( $val ) ;
|
75
|
-
}
|
76
|
-
return in_array( $ext, $lcaseHtmlExtensions ) ;
|
77
|
-
}
|
78
|
-
|
79
|
-
/**
|
80
|
-
* Detect HTML in the first KB to prevent against potential security issue with
|
81
|
-
* IE/Safari/Opera file type auto detection bug.
|
82
|
-
* Returns true if file contain insecure HTML code at the beginning.
|
83
|
-
*
|
84
|
-
* @param string $filePath absolute path to file
|
85
|
-
* @return boolean
|
86
|
-
*/
|
87
|
-
function DetectHtml( $filePath )
|
88
|
-
{
|
89
|
-
$fp = fopen( $filePath, 'rb' ) ;
|
90
|
-
$chunk = fread( $fp, 1024 ) ;
|
91
|
-
fclose( $fp ) ;
|
92
|
-
|
93
|
-
$chunk = strtolower( $chunk ) ;
|
94
|
-
|
95
|
-
if (!$chunk)
|
96
|
-
{
|
97
|
-
return false ;
|
98
|
-
}
|
99
|
-
|
100
|
-
$chunk = trim( $chunk ) ;
|
101
|
-
|
102
|
-
if ( preg_match( "/<!DOCTYPE\W*X?HTML/sim", $chunk ) )
|
103
|
-
{
|
104
|
-
return true;
|
105
|
-
}
|
106
|
-
|
107
|
-
$tags = array( '<body', '<head', '<html', '<img', '<pre', '<script', '<table', '<title' ) ;
|
108
|
-
|
109
|
-
foreach( $tags as $tag )
|
110
|
-
{
|
111
|
-
if( false !== strpos( $chunk, $tag ) )
|
112
|
-
{
|
113
|
-
return true ;
|
114
|
-
}
|
115
|
-
}
|
116
|
-
|
117
|
-
//type = javascript
|
118
|
-
if ( preg_match( '!type\s*=\s*[\'"]?\s*(?:\w*/)?(?:ecma|java)!sim', $chunk ) )
|
119
|
-
{
|
120
|
-
return true ;
|
121
|
-
}
|
122
|
-
|
123
|
-
//href = javascript
|
124
|
-
//src = javascript
|
125
|
-
//data = javascript
|
126
|
-
if ( preg_match( '!(?:href|src|data)\s*=\s*[\'"]?\s*(?:ecma|java)script:!sim', $chunk ) )
|
127
|
-
{
|
128
|
-
return true ;
|
129
|
-
}
|
130
|
-
|
131
|
-
//url(javascript
|
132
|
-
if ( preg_match( '!url\s*\(\s*[\'"]?\s*(?:ecma|java)script:!sim', $chunk ) )
|
133
|
-
{
|
134
|
-
return true ;
|
135
|
-
}
|
136
|
-
|
137
|
-
return false ;
|
138
|
-
}
|
139
|
-
|
140
|
-
/**
|
141
|
-
* Check file content.
|
142
|
-
* Currently this function validates only image files.
|
143
|
-
* Returns false if file is invalid.
|
144
|
-
*
|
145
|
-
* @param string $filePath absolute path to file
|
146
|
-
* @param string $extension file extension
|
147
|
-
* @param integer $detectionLevel 0 = none, 1 = use getimagesize for images, 2 = use DetectHtml for images
|
148
|
-
* @return boolean
|
149
|
-
*/
|
150
|
-
function IsImageValid( $filePath, $extension )
|
151
|
-
{
|
152
|
-
$imageCheckExtensions = array('gif', 'jpeg', 'jpg', 'png', 'swf', 'psd', 'bmp', 'iff');
|
153
|
-
|
154
|
-
// version_compare is available since PHP4 >= 4.0.7
|
155
|
-
if ( function_exists( 'version_compare' ) ) {
|
156
|
-
$sCurrentVersion = phpversion();
|
157
|
-
if ( version_compare( $sCurrentVersion, "4.2.0" ) >= 0 ) {
|
158
|
-
$imageCheckExtensions[] = "tiff";
|
159
|
-
$imageCheckExtensions[] = "tif";
|
160
|
-
}
|
161
|
-
if ( version_compare( $sCurrentVersion, "4.3.0" ) >= 0 ) {
|
162
|
-
$imageCheckExtensions[] = "swc";
|
163
|
-
}
|
164
|
-
if ( version_compare( $sCurrentVersion, "4.3.2" ) >= 0 ) {
|
165
|
-
$imageCheckExtensions[] = "jpc";
|
166
|
-
$imageCheckExtensions[] = "jp2";
|
167
|
-
$imageCheckExtensions[] = "jpx";
|
168
|
-
$imageCheckExtensions[] = "jb2";
|
169
|
-
$imageCheckExtensions[] = "xbm";
|
170
|
-
$imageCheckExtensions[] = "wbmp";
|
171
|
-
}
|
172
|
-
}
|
173
|
-
|
174
|
-
if ( !in_array( $extension, $imageCheckExtensions ) ) {
|
175
|
-
return true;
|
176
|
-
}
|
177
|
-
|
178
|
-
if ( @getimagesize( $filePath ) === false ) {
|
179
|
-
return false ;
|
180
|
-
}
|
181
|
-
|
182
|
-
return true;
|
183
|
-
}
|
184
|
-
|
185
|
-
?>
|