Changeset 639699
- Timestamp:
- 12/15/2012 02:59:36 PM (13 years ago)
- Location:
- wp-filebase
- Files:
-
- 276 added
- 1 deleted
- 21 edited
-
tags/0.2.9.28 (added)
-
tags/0.2.9.28/classes (added)
-
tags/0.2.9.28/classes/Admin.php (added)
-
tags/0.2.9.28/classes/AdminGuiCats.php (added)
-
tags/0.2.9.28/classes/AdminGuiCss.php (added)
-
tags/0.2.9.28/classes/AdminGuiFiles.php (added)
-
tags/0.2.9.28/classes/AdminGuiManage.php (added)
-
tags/0.2.9.28/classes/AdminGuiSettings.php (added)
-
tags/0.2.9.28/classes/AdminGuiSupport.php (added)
-
tags/0.2.9.28/classes/AdminGuiTpls.php (added)
-
tags/0.2.9.28/classes/AdminHowToStart.php (added)
-
tags/0.2.9.28/classes/AdminLite.php (added)
-
tags/0.2.9.28/classes/AdvUploader.php (added)
-
tags/0.2.9.28/classes/Category.php (added)
-
tags/0.2.9.28/classes/Config.php (added)
-
tags/0.2.9.28/classes/Core.php (added)
-
tags/0.2.9.28/classes/Download.php (added)
-
tags/0.2.9.28/classes/File.php (added)
-
tags/0.2.9.28/classes/FileListTable.php (added)
-
tags/0.2.9.28/classes/FileUtils.php (added)
-
tags/0.2.9.28/classes/GetID3.php (added)
-
tags/0.2.9.28/classes/Item.php (added)
-
tags/0.2.9.28/classes/ListTpl.php (added)
-
tags/0.2.9.28/classes/Output.php (added)
-
tags/0.2.9.28/classes/PLUpload.php (added)
-
tags/0.2.9.28/classes/ProgressReporter.php (added)
-
tags/0.2.9.28/classes/SWFUpload.php (added)
-
tags/0.2.9.28/classes/Search.php (added)
-
tags/0.2.9.28/classes/Setup.php (added)
-
tags/0.2.9.28/classes/Sync.php (added)
-
tags/0.2.9.28/classes/TplLib.php (added)
-
tags/0.2.9.28/classes/Widget.php (added)
-
tags/0.2.9.28/editor_plugin.php (added)
-
tags/0.2.9.28/embedded_forms.css (added)
-
tags/0.2.9.28/extras (added)
-
tags/0.2.9.28/extras/ckeditor (added)
-
tags/0.2.9.28/extras/ckeditor/images (added)
-
tags/0.2.9.28/extras/ckeditor/images/btn.gif (added)
-
tags/0.2.9.28/extras/ckeditor/plugin.js (added)
-
tags/0.2.9.28/extras/flvplayer (added)
-
tags/0.2.9.28/extras/flvplayer/OSplayer.swf (added)
-
tags/0.2.9.28/extras/getid3 (added)
-
tags/0.2.9.28/extras/getid3/extension.cache.dbm.php (added)
-
tags/0.2.9.28/extras/getid3/extension.cache.mysql.php (added)
-
tags/0.2.9.28/extras/getid3/getid3.lib.php (added)
-
tags/0.2.9.28/extras/getid3/getid3.php (added)
-
tags/0.2.9.28/extras/getid3/helperapps (added)
-
tags/0.2.9.28/extras/getid3/helperapps/readme.helperapps.txt (added)
-
tags/0.2.9.28/extras/getid3/module.archive.gzip.php (added)
-
tags/0.2.9.28/extras/getid3/module.archive.rar.php (added)
-
tags/0.2.9.28/extras/getid3/module.archive.szip.php (added)
-
tags/0.2.9.28/extras/getid3/module.archive.tar.php (added)
-
tags/0.2.9.28/extras/getid3/module.archive.zip.php (added)
-
tags/0.2.9.28/extras/getid3/module.audio-video.asf.php (added)
-
tags/0.2.9.28/extras/getid3/module.audio-video.bink.php (added)
-
tags/0.2.9.28/extras/getid3/module.audio-video.flv.php (added)
-
tags/0.2.9.28/extras/getid3/module.audio-video.matroska.php (added)
-
tags/0.2.9.28/extras/getid3/module.audio-video.mpeg.php (added)
-
tags/0.2.9.28/extras/getid3/module.audio-video.nsv.php (added)
-
tags/0.2.9.28/extras/getid3/module.audio-video.quicktime.php (added)
-
tags/0.2.9.28/extras/getid3/module.audio-video.real.php (added)
-
tags/0.2.9.28/extras/getid3/module.audio-video.riff.php (added)
-
tags/0.2.9.28/extras/getid3/module.audio-video.swf.php (added)
-
tags/0.2.9.28/extras/getid3/module.audio.aa.php (added)
-
tags/0.2.9.28/extras/getid3/module.audio.aac.php (added)
-
tags/0.2.9.28/extras/getid3/module.audio.ac3.php (added)
-
tags/0.2.9.28/extras/getid3/module.audio.au.php (added)
-
tags/0.2.9.28/extras/getid3/module.audio.avr.php (added)
-
tags/0.2.9.28/extras/getid3/module.audio.bonk.php (added)
-
tags/0.2.9.28/extras/getid3/module.audio.dss.php (added)
-
tags/0.2.9.28/extras/getid3/module.audio.dts.php (added)
-
tags/0.2.9.28/extras/getid3/module.audio.flac.php (added)
-
tags/0.2.9.28/extras/getid3/module.audio.la.php (added)
-
tags/0.2.9.28/extras/getid3/module.audio.lpac.php (added)
-
tags/0.2.9.28/extras/getid3/module.audio.midi.php (added)
-
tags/0.2.9.28/extras/getid3/module.audio.mod.php (added)
-
tags/0.2.9.28/extras/getid3/module.audio.monkey.php (added)
-
tags/0.2.9.28/extras/getid3/module.audio.mp3.php (added)
-
tags/0.2.9.28/extras/getid3/module.audio.mpc.php (added)
-
tags/0.2.9.28/extras/getid3/module.audio.ogg.php (added)
-
tags/0.2.9.28/extras/getid3/module.audio.optimfrog.php (added)
-
tags/0.2.9.28/extras/getid3/module.audio.rkau.php (added)
-
tags/0.2.9.28/extras/getid3/module.audio.shorten.php (added)
-
tags/0.2.9.28/extras/getid3/module.audio.tta.php (added)
-
tags/0.2.9.28/extras/getid3/module.audio.voc.php (added)
-
tags/0.2.9.28/extras/getid3/module.audio.vqf.php (added)
-
tags/0.2.9.28/extras/getid3/module.audio.wavpack.php (added)
-
tags/0.2.9.28/extras/getid3/module.graphic.bmp.php (added)
-
tags/0.2.9.28/extras/getid3/module.graphic.efax.php (added)
-
tags/0.2.9.28/extras/getid3/module.graphic.gif.php (added)
-
tags/0.2.9.28/extras/getid3/module.graphic.jpg.php (added)
-
tags/0.2.9.28/extras/getid3/module.graphic.pcd.php (added)
-
tags/0.2.9.28/extras/getid3/module.graphic.png.php (added)
-
tags/0.2.9.28/extras/getid3/module.graphic.svg.php (added)
-
tags/0.2.9.28/extras/getid3/module.graphic.tiff.php (added)
-
tags/0.2.9.28/extras/getid3/module.misc.cue.php (added)
-
tags/0.2.9.28/extras/getid3/module.misc.exe.php (added)
-
tags/0.2.9.28/extras/getid3/module.misc.iso.php (added)
-
tags/0.2.9.28/extras/getid3/module.misc.msoffice.php (added)
-
tags/0.2.9.28/extras/getid3/module.misc.par2.php (added)
-
tags/0.2.9.28/extras/getid3/module.misc.pdf.php (added)
-
tags/0.2.9.28/extras/getid3/module.tag.apetag.php (added)
-
tags/0.2.9.28/extras/getid3/module.tag.id3v1.php (added)
-
tags/0.2.9.28/extras/getid3/module.tag.id3v2.php (added)
-
tags/0.2.9.28/extras/getid3/module.tag.lyrics3.php (added)
-
tags/0.2.9.28/extras/getid3/module.tag.xmp.php (added)
-
tags/0.2.9.28/extras/getid3/write.apetag.php (added)
-
tags/0.2.9.28/extras/getid3/write.id3v1.php (added)
-
tags/0.2.9.28/extras/getid3/write.id3v2.php (added)
-
tags/0.2.9.28/extras/getid3/write.lyrics3.php (added)
-
tags/0.2.9.28/extras/getid3/write.metaflac.php (added)
-
tags/0.2.9.28/extras/getid3/write.php (added)
-
tags/0.2.9.28/extras/getid3/write.real.php (added)
-
tags/0.2.9.28/extras/getid3/write.vorbiscomment.php (added)
-
tags/0.2.9.28/extras/jquery (added)
-
tags/0.2.9.28/extras/jquery/contextmenu (added)
-
tags/0.2.9.28/extras/jquery/contextmenu/cmenu-gloss-cyan-menu-item-hover.gif (added)
-
tags/0.2.9.28/extras/jquery/contextmenu/cmenu-gloss-menu-item-hover.gif (added)
-
tags/0.2.9.28/extras/jquery/contextmenu/cmenu-gloss-semitransparent-menu-item-hover.png (added)
-
tags/0.2.9.28/extras/jquery/contextmenu/cmenu-human-menu-item-hover.gif (added)
-
tags/0.2.9.28/extras/jquery/contextmenu/cmenu-osx-menu-item-hover.gif (added)
-
tags/0.2.9.28/extras/jquery/contextmenu/cmenu-vista-bg.gif (added)
-
tags/0.2.9.28/extras/jquery/contextmenu/cmenu-vista-menu-item-hover.gif (added)
-
tags/0.2.9.28/extras/jquery/contextmenu/cmenu-xp-bg.gif (added)
-
tags/0.2.9.28/extras/jquery/contextmenu/delete_icon.gif (added)
-
tags/0.2.9.28/extras/jquery/contextmenu/jquery.contextmenu.css (added)
-
tags/0.2.9.28/extras/jquery/contextmenu/jquery.contextmenu.js (added)
-
tags/0.2.9.28/extras/jquery/contextmenu/page_white_delete.png (added)
-
tags/0.2.9.28/extras/jquery/contextmenu/page_white_edit.png (added)
-
tags/0.2.9.28/extras/jquery/dataTables (added)
-
tags/0.2.9.28/extras/jquery/dataTables/css (added)
-
tags/0.2.9.28/extras/jquery/dataTables/css/demo_page.css (added)
-
tags/0.2.9.28/extras/jquery/dataTables/css/demo_table.css (added)
-
tags/0.2.9.28/extras/jquery/dataTables/css/demo_table_jui.css (added)
-
tags/0.2.9.28/extras/jquery/dataTables/css/jquery.dataTables.css (added)
-
tags/0.2.9.28/extras/jquery/dataTables/css/jquery.dataTables_themeroller.css (added)
-
tags/0.2.9.28/extras/jquery/dataTables/images (added)
-
tags/0.2.9.28/extras/jquery/dataTables/images/Sorting icons.psd (added)
-
tags/0.2.9.28/extras/jquery/dataTables/images/back_disabled.png (added)
-
tags/0.2.9.28/extras/jquery/dataTables/images/back_enabled.png (added)
-
tags/0.2.9.28/extras/jquery/dataTables/images/back_enabled_hover.png (added)
-
tags/0.2.9.28/extras/jquery/dataTables/images/favicon.ico (added)
-
tags/0.2.9.28/extras/jquery/dataTables/images/forward_disabled.png (added)
-
tags/0.2.9.28/extras/jquery/dataTables/images/forward_enabled.png (added)
-
tags/0.2.9.28/extras/jquery/dataTables/images/forward_enabled_hover.png (added)
-
tags/0.2.9.28/extras/jquery/dataTables/images/sort_asc.png (added)
-
tags/0.2.9.28/extras/jquery/dataTables/images/sort_asc_disabled.png (added)
-
tags/0.2.9.28/extras/jquery/dataTables/images/sort_both.png (added)
-
tags/0.2.9.28/extras/jquery/dataTables/images/sort_desc.png (added)
-
tags/0.2.9.28/extras/jquery/dataTables/images/sort_desc_disabled.png (added)
-
tags/0.2.9.28/extras/jquery/dataTables/js (added)
-
tags/0.2.9.28/extras/jquery/dataTables/js/jquery.dataTables.js (added)
-
tags/0.2.9.28/extras/jquery/dataTables/js/jquery.dataTables.min.js (added)
-
tags/0.2.9.28/extras/jquery/dataTables/js/jquery.js (added)
-
tags/0.2.9.28/extras/jquery/dataTables/src (added)
-
tags/0.2.9.28/extras/jquery/dataTables/src/DataTables.js (added)
-
tags/0.2.9.28/extras/jquery/dataTables/src/api (added)
-
tags/0.2.9.28/extras/jquery/dataTables/src/api/api.internal.js (added)
-
tags/0.2.9.28/extras/jquery/dataTables/src/api/api.methods.js (added)
-
tags/0.2.9.28/extras/jquery/dataTables/src/api/api.static.js (added)
-
tags/0.2.9.28/extras/jquery/dataTables/src/core (added)
-
tags/0.2.9.28/extras/jquery/dataTables/src/core/core.ajax.js (added)
-
tags/0.2.9.28/extras/jquery/dataTables/src/core/core.columns.js (added)
-
tags/0.2.9.28/extras/jquery/dataTables/src/core/core.constructor.js (added)
-
tags/0.2.9.28/extras/jquery/dataTables/src/core/core.data.js (added)
-
tags/0.2.9.28/extras/jquery/dataTables/src/core/core.draw.js (added)
-
tags/0.2.9.28/extras/jquery/dataTables/src/core/core.filter.js (added)
-
tags/0.2.9.28/extras/jquery/dataTables/src/core/core.info.js (added)
-
tags/0.2.9.28/extras/jquery/dataTables/src/core/core.init.js (added)
-
tags/0.2.9.28/extras/jquery/dataTables/src/core/core.length.js (added)
-
tags/0.2.9.28/extras/jquery/dataTables/src/core/core.page.js (added)
-
tags/0.2.9.28/extras/jquery/dataTables/src/core/core.processing.js (added)
-
tags/0.2.9.28/extras/jquery/dataTables/src/core/core.scrolling.js (added)
-
tags/0.2.9.28/extras/jquery/dataTables/src/core/core.sizing.js (added)
-
tags/0.2.9.28/extras/jquery/dataTables/src/core/core.sort.js (added)
-
tags/0.2.9.28/extras/jquery/dataTables/src/core/core.state.js (added)
-
tags/0.2.9.28/extras/jquery/dataTables/src/core/core.support.js (added)
-
tags/0.2.9.28/extras/jquery/dataTables/src/ext (added)
-
tags/0.2.9.28/extras/jquery/dataTables/src/ext/ext.classes.js (added)
-
tags/0.2.9.28/extras/jquery/dataTables/src/ext/ext.paging.js (added)
-
tags/0.2.9.28/extras/jquery/dataTables/src/ext/ext.sorting.js (added)
-
tags/0.2.9.28/extras/jquery/dataTables/src/ext/ext.types.js (added)
-
tags/0.2.9.28/extras/jquery/dataTables/src/model (added)
-
tags/0.2.9.28/extras/jquery/dataTables/src/model/model.column.js (added)
-
tags/0.2.9.28/extras/jquery/dataTables/src/model/model.defaults.columns.js (added)
-
tags/0.2.9.28/extras/jquery/dataTables/src/model/model.defaults.js (added)
-
tags/0.2.9.28/extras/jquery/dataTables/src/model/model.ext.js (added)
-
tags/0.2.9.28/extras/jquery/dataTables/src/model/model.row.js (added)
-
tags/0.2.9.28/extras/jquery/dataTables/src/model/model.search.js (added)
-
tags/0.2.9.28/extras/jquery/dataTables/src/model/model.settings.js (added)
-
tags/0.2.9.28/extras/jquery/jquery.cookie.js (added)
-
tags/0.2.9.28/extras/jquery/treeview (added)
-
tags/0.2.9.28/extras/jquery/treeview/images (added)
-
tags/0.2.9.28/extras/jquery/treeview/images/ajax-loader.gif (added)
-
tags/0.2.9.28/extras/jquery/treeview/images/file.gif (added)
-
tags/0.2.9.28/extras/jquery/treeview/images/folder-closed.gif (added)
-
tags/0.2.9.28/extras/jquery/treeview/images/folder.gif (added)
-
tags/0.2.9.28/extras/jquery/treeview/images/minus.gif (added)
-
tags/0.2.9.28/extras/jquery/treeview/images/plus.gif (added)
-
tags/0.2.9.28/extras/jquery/treeview/images/treeview-black-line.gif (added)
-
tags/0.2.9.28/extras/jquery/treeview/images/treeview-black.gif (added)
-
tags/0.2.9.28/extras/jquery/treeview/images/treeview-default-line.gif (added)
-
tags/0.2.9.28/extras/jquery/treeview/images/treeview-default.gif (added)
-
tags/0.2.9.28/extras/jquery/treeview/images/treeview-famfamfam-line.gif (added)
-
tags/0.2.9.28/extras/jquery/treeview/images/treeview-famfamfam.gif (added)
-
tags/0.2.9.28/extras/jquery/treeview/images/treeview-gray-line.gif (added)
-
tags/0.2.9.28/extras/jquery/treeview/images/treeview-gray.gif (added)
-
tags/0.2.9.28/extras/jquery/treeview/images/treeview-red-line.gif (added)
-
tags/0.2.9.28/extras/jquery/treeview/images/treeview-red.gif (added)
-
tags/0.2.9.28/extras/jquery/treeview/jquery.treeview.async.js (added)
-
tags/0.2.9.28/extras/jquery/treeview/jquery.treeview.css (added)
-
tags/0.2.9.28/extras/jquery/treeview/jquery.treeview.edit.js (added)
-
tags/0.2.9.28/extras/jquery/treeview/jquery.treeview.js (added)
-
tags/0.2.9.28/extras/jquery/treeview/jquery.treeview.sortable.js (added)
-
tags/0.2.9.28/extras/phpthumb.bmp.php (added)
-
tags/0.2.9.28/extras/phpthumb.functions.php (added)
-
tags/0.2.9.28/extras/progressbar.class.php (added)
-
tags/0.2.9.28/images (added)
-
tags/0.2.9.28/images/admin_menu_icon.png (added)
-
tags/0.2.9.28/images/crystal_cat.png (added)
-
tags/0.2.9.28/images/dl_btn.png (added)
-
tags/0.2.9.28/images/dl_btn_hover.png (added)
-
tags/0.2.9.28/images/down-gray.png (added)
-
tags/0.2.9.28/images/down.png (added)
-
tags/0.2.9.28/images/folder48.png (added)
-
tags/0.2.9.28/images/wpfb-icon.png (added)
-
tags/0.2.9.28/js (added)
-
tags/0.2.9.28/js/admin.js (added)
-
tags/0.2.9.28/js/common.js (added)
-
tags/0.2.9.28/js/editor-plugin.js (added)
-
tags/0.2.9.28/js/live-admin.js (added)
-
tags/0.2.9.28/languages (added)
-
tags/0.2.9.28/languages/template.po (added)
-
tags/0.2.9.28/languages/wpfb-be_BY.mo (added)
-
tags/0.2.9.28/languages/wpfb-be_BY.po (added)
-
tags/0.2.9.28/languages/wpfb-de_DE.mo (added)
-
tags/0.2.9.28/languages/wpfb-de_DE.po (added)
-
tags/0.2.9.28/languages/wpfb-fa_IR.mo (added)
-
tags/0.2.9.28/languages/wpfb-fa_IR.po (added)
-
tags/0.2.9.28/languages/wpfb-fr_FR.mo (added)
-
tags/0.2.9.28/languages/wpfb-fr_FR.po (added)
-
tags/0.2.9.28/languages/wpfb-it_IT.mo (added)
-
tags/0.2.9.28/languages/wpfb-it_IT.po (added)
-
tags/0.2.9.28/languages/wpfb-lt_LT.mo (added)
-
tags/0.2.9.28/languages/wpfb-lt_LT.po (added)
-
tags/0.2.9.28/languages/wpfb-nl_NL.mo (added)
-
tags/0.2.9.28/languages/wpfb-nl_NL.po (added)
-
tags/0.2.9.28/languages/wpfb-pt_BR.mo (added)
-
tags/0.2.9.28/languages/wpfb-pt_BR.po (added)
-
tags/0.2.9.28/languages/wpfb-ru_RU.mo (added)
-
tags/0.2.9.28/languages/wpfb-ru_RU.po (added)
-
tags/0.2.9.28/languages/wpfb-sk_SK.mo (added)
-
tags/0.2.9.28/languages/wpfb-sk_SK.po (added)
-
tags/0.2.9.28/languages/wpfb-sv_SE.mo (added)
-
tags/0.2.9.28/languages/wpfb-sv_SE.po (added)
-
tags/0.2.9.28/languages/wpfb-tr_TR.mo (added)
-
tags/0.2.9.28/languages/wpfb-tr_TR.po (added)
-
tags/0.2.9.28/lib (added)
-
tags/0.2.9.28/lib/wpfb_form_cat.php (added)
-
tags/0.2.9.28/lib/wpfb_form_file.php (added)
-
tags/0.2.9.28/readme.txt (added)
-
tags/0.2.9.28/tinymce (added)
-
tags/0.2.9.28/tinymce/editor_plugin.js (added)
-
tags/0.2.9.28/tinymce/images (added)
-
tags/0.2.9.28/tinymce/images/btn.gif (added)
-
tags/0.2.9.28/wp-filebase-admin.css (added)
-
tags/0.2.9.28/wp-filebase.css (added)
-
tags/0.2.9.28/wp-filebase.php (added)
-
tags/0.2.9.28/wp-filebase_css.php (added)
-
tags/0.2.9.28/wp-filebase_thumb.php (added)
-
tags/0.2.9.28/wpfb-ajax.php (added)
-
tags/0.2.9.28/wpfb-async-upload.php (added)
-
tags/0.2.9.28/wpfb-postbrowser.php (added)
-
trunk/classes/Admin.php (modified) (9 diffs)
-
trunk/classes/AdminGuiCats.php (modified) (1 diff)
-
trunk/classes/AdminGuiCss.php (modified) (1 diff)
-
trunk/classes/AdminGuiManage.php (modified) (9 diffs)
-
trunk/classes/AdminGuiSettings.php (modified) (1 diff)
-
trunk/classes/Category.php (modified) (1 diff)
-
trunk/classes/Core.php (modified) (3 diffs)
-
trunk/classes/Download.php (modified) (1 diff)
-
trunk/classes/File.php (modified) (9 diffs)
-
trunk/classes/FileUtils.php (added)
-
trunk/classes/Item.php (modified) (6 diffs)
-
trunk/classes/ListTpl.php (modified) (6 diffs)
-
trunk/classes/Output.php (modified) (2 diffs)
-
trunk/classes/PLUpload.php (modified) (1 diff)
-
trunk/classes/ProgressReporter.php (modified) (1 diff)
-
trunk/classes/Sync.php (modified) (3 diffs)
-
trunk/classes/TplLib.php (modified) (1 diff)
-
trunk/classes/Widget.php (modified) (3 diffs)
-
trunk/embedded_forms.css (added)
-
trunk/extras/getid3/getid3.php (modified) (1 diff)
-
trunk/images/down-gray.png (added)
-
trunk/readme.txt (modified) (7 diffs)
-
trunk/wp-filebase-admin.css (modified) (2 diffs)
-
trunk/wp-filebase.php (modified) (2 diffs)
-
wp-filebase-plupload-hotfix.zip (deleted)
Legend:
- Unmodified
- Added
- Removed
-
wp-filebase/trunk/classes/Admin.php
r631304 r639699 6 6 static function InitClass() 7 7 { 8 wpfb_loadclass('AdminLite', 'Item', 'File', 'Category' );8 wpfb_loadclass('AdminLite', 'Item', 'File', 'Category','FileUtils'); 9 9 10 10 wp_enqueue_script('jquery'); … … 87 87 'file_browser_fbc' => array('default' => false, 'title' => __('Files before Categories', WPFB), 'type' => 'checkbox', 'desc' => __('Files will appear above categories in the file browser.', WPFB)), 88 88 89 'small_icon_size' => array('default' => 32, 'title' => __('Small Icon Size'), 'desc' => __('Icon size for categories and files', WPFB), 'type' => 'number', 'class' => 'num', 'size' => 8), 90 89 91 90 92 'cat_drop_down' => array('default' => false, 'title' => __('Category drop down list', WPFB), 'type' => 'checkbox', 'desc' => __('Use category drop down list in the file browser instead of listing like files.', WPFB)), … … 530 532 $file_flash_upload = json_decode($data->file_flash_upload, true); 531 533 $file_flash_upload['tmp_name'] = WPFB_Core::UploadDir().'/'.str_replace('../','',$file_flash_upload['tmp_name']); 532 if(is_file($file_flash_upload['tmp_name']) && $file_flash_upload['size'] == filesize($file_flash_upload['tmp_name']))534 if(is_file($file_flash_upload['tmp_name']) && $file_flash_upload['size'] == WPFB_FileUtils::GetFileSize($file_flash_upload['tmp_name'])) 533 535 $data->file_upload = $file_flash_upload; 534 536 } … … 540 542 541 543 // are we uploading a thumbnail? 542 $upload_thumb = (!$add_existing && @is_uploaded_file($data->file_upload_thumb['tmp_name']) && self::IsValidImage($data->file_upload_thumb['tmp_name']) !== false);544 $upload_thumb = (!$add_existing && @is_uploaded_file($data->file_upload_thumb['tmp_name']) && WPFB_FileUtils::FileHasImageExt($data->file_upload['name']) && WPFB_FileUtils::IsValidImage($data->file_upload_thumb['tmp_name'])); 543 545 544 546 if($remote_upload) { … … 591 593 592 594 593 // this sets permissions as well:595 // this inherits permissions as well: 594 596 $result = $file->ChangeCategoryOrName($file_category, empty($data->file_rename) ? $file_name : $data->file_rename, $add_existing, !empty($data->overwrite)); 595 597 if(!empty($result['error'])) return $result; … … 632 634 if(!($update && $remote_redirect) && is_file($file->GetLocalPath())) 633 635 { 634 $file->file_size = filesize($file->GetLocalPath());636 $file->file_size = WPFB_FileUtils::GetFileSize($file->GetLocalPath()); 635 637 $file->file_mtime = filemtime($file->GetLocalPath()); 636 638 $old_hash = $file->file_hash; … … 732 734 } 733 735 734 static function IsValidImage($img) { 735 return @getimagesize($img) !== false; 736 } 736 737 737 738 738 739 static function ParseFileNameVersion($file_name, $file_version) { … … 801 802 802 803 if( $size_for_progress >= self::$MIN_SIZE_FOR_PROGRESSBAR) { 803 i nclude_once(WPFB_PLUGIN_ROOT.'extras/progressbar.class.php');804 if(!class_exists('progressbar')) include_once(WPFB_PLUGIN_ROOT.'extras/progressbar.class.php'); 804 805 $progress_bar = new progressbar(0, $size_for_progress, 300, 30, '#aaa'); 805 806 echo "<p><code>".esc_html($url)."</code> ...</p>"; … … 1120 1121 $content .= $file->GenTpl2(); 1121 1122 $title = trim(__('File added.', WPFB),'.'); 1123 1122 1124 } 1123 1125 -
wp-filebase/trunk/classes/AdminGuiCats.php
r630203 r639699 104 104 <form class="search-form topmargin" action="" method="get"><p class="search-box"> 105 105 <input type="hidden" value="<?php echo esc_attr($_GET['page']); ?>" name="page" /> 106 <input type="hidden" value="<?php echo esc_attr($action); ?>" name="action" />107 106 <label class="hidden" for="category-search-input"><?php _e('Search Categories'/*def*/); ?>:</label> 108 107 <input type="text" class="search-input" id="category-search-input" name="s" value="<?php echo(isset($_GET['s']) ? esc_attr($_GET['s']) : ''); ?>" /> -
wp-filebase/trunk/classes/AdminGuiCss.php
r487234 r639699 46 46 // write 47 47 $newcontent = stripslashes($_POST['newcontent']); 48 $f = fopen($css_path_edit, 'w+'); 49 if ($f !== false) { 50 fwrite($f, $newcontent); 51 fclose($f); 52 $exists = true; 53 } 48 $exists = (file_put_contents($css_path_edit, $newcontent) !== false); 54 49 } 55 50 56 51 $fpath = $exists ? $css_path_edit : $css_path_default; 57 $f = fopen($fpath , 'r'); 58 $content = fread($f, filesize($fpath)); 59 fclose($f); 60 $content = htmlspecialchars($content); 52 $content = esc_html(file_get_contents($fpath)); 61 53 ?> 62 54 <form name="csseditor" id="csseditor" action="<?php echo $clean_uri ?>&action=edit_css" method="post"> -
wp-filebase/trunk/classes/AdminGuiManage.php
r630203 r639699 40 40 }); 41 41 } 42 </script> 42 </script> 43 44 43 45 <div class="wrap"> 44 46 <div id="icon-wpfilebase" class="icon32"><br /></div> … … 102 104 <div id="wpfb-liking"> 103 105 <div style="text-align: center;"><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwordpress.org%2Fextend%2Fplugins%2Fwp-filebase%2F&send=false&layout=button_count&width=150&show_faces=false&action=like&colorscheme=light&font&height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:140px; height:21px; display:inline-block; text-align:center;" <?php echo ' allowTransparency="true"'; ?>></iframe></div> 106 107 <div style="text-align: center;" ><a href="https://twitter.com/wpfilebase" class="twitter-follow-button" data-show-count="false">Follow @wpfilebase</a> 108 <script type="text/javascript">!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://plugins.trac.wordpress.org//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script></div> 109 104 110 <p>Please <a href="http://wordpress.org/extend/plugins/wp-filebase/">give it a good rating</a>, or even consider a donation using PayPal or Flattr to support the developer of WP-Filebase:</p> 105 111 <div style="text-align: center;"> … … 113 119 ?> 114 120 121 <div id="wpfb-stats-wrap" style="float:right; border-left: 1px solid #eee; margin-left: 5px;"> 115 122 <div id="col-container"> 116 123 <div id="col-right"> 117 124 <div class="col-wrap"> 118 125 <h3><?php _e('Traffic', WPFB); ?></h3> 119 <table class=" form-table">126 <table class="wpfb-stats-table"> 120 127 <?php 121 128 $traffic_stats = WPFB_Core::GetTraffic(); … … 124 131 ?> 125 132 <tr> 126 <th scope="row"><?php _e('Today', WPFB); ?></th>127 133 <td><?php 128 134 if($limit_day > 0) … … 131 137 echo WPFB_Output::FormatFilesize($traffic_stats['today']); 132 138 ?></td> 133 </tr>134 < tr>135 <th scope="row"><?php _e('This Month', WPFB); ?></th>139 <th scope="row"><?php _e('Today', WPFB); ?></th> 140 </tr> 141 <tr> 136 142 <td><?php 137 143 if($limit_month > 0) … … 140 146 echo WPFB_Output::FormatFilesize($traffic_stats['month']); 141 147 ?></td> 142 </tr> 143 <tr> 148 <th scope="row"><?php _e('This Month', WPFB); ?></th> 149 </tr> 150 <tr> 151 <td><?php echo WPFB_Output::FormatFilesize($wpdb->get_var("SELECT SUM(file_size) FROM $wpdb->wpfilebase_files")) ?></td> 144 152 <th scope="row"><?php _e('Total File Size', WPFB); ?></th> 145 <td><?php echo WPFB_Output::FormatFilesize($wpdb->get_var("SELECT SUM(file_size) FROM $wpdb->wpfilebase_files")) ?></td>146 153 </tr> 147 154 </table> … … 153 160 154 161 <h3><?php _e('Statistics', WPFB); ?></h3> 155 <table class="form-table"> 156 <tr> 157 <th scope="row"><?php _e('Number of Files', WPFB); ?></th> 162 <table class="wpfb-stats-table"> 163 <tr> 158 164 <td><?php echo WPFB_File::GetNumFiles() ?></td> 159 </tr>160 < tr>161 <th scope="row"><?php _e('Number of Categories', WPFB); ?></th>165 <th scope="row"><?php _e('Files', WPFB); ?></th> 166 </tr> 167 <tr> 162 168 <td><?php echo WPFB_Category::GetNumCats() ?></td> 163 </tr>164 < tr>165 <th scope="row"><?php _e('Total Downloads', WPFB); ?></th>169 <th scope="row"><?php _e('Categories', WPFB); ?></th> 170 </tr> 171 <tr> 166 172 <td><?php echo $wpdb->get_var("SELECT SUM(file_hits) FROM $wpdb->wpfilebase_files") ?></td> 173 <th scope="row"><?php _e('Downloads', WPFB); ?></th> 167 174 </tr> 168 175 </table> … … 171 178 172 179 </div><!-- /col-container --> 173 180 </div> 181 182 183 <div> 174 184 <h2><?php _e('Tools'); ?></h2> 175 <p><a href="<?php echo add_query_arg( 185 <table class="wpfb-tools"> 186 <tr><th><a href="<?php echo add_query_arg( 176 187 array('action' => 'sync', 177 )); ?>" class="button"><?php _e('Sync Filebase',WPFB)?></a> <?php _e('Synchronises the database with the file system. Use this to add FTP-uploaded files.',WPFB) ?></p> 178 179 <p> 188 )); ?>" class="button"><?php _e('Sync Filebase',WPFB)?></a></th><td><?php _e('Synchronises the database with the file system. Use this to add FTP-uploaded files.',WPFB) ?><br /> 189 180 190 <?php 181 191 if(WPFB_Core::GetOpt('cron_sync')) { … … 187 197 } 188 198 ?> 189 </p> 190 191 199 </td> 200 </tr> 201 202 203 204 205 206 </table> 207 192 208 193 209 <?php if(WPFB_Core::GetOpt('tag_conv_req')) { ?><p><a href="<?php echo add_query_arg('action', 'convert-tags') ?>" class="button"><?php _e('Convert old Tags',WPFB)?></a> <?php printf(__('Convert tags from versions earlier than %s.',WPFB), '0.2.0') ?></p> <?php } ?> 194 210 <!-- <p><a href="<?php echo add_query_arg('action', 'add-urls') ?>" class="button"><?php _e('Add multiple URLs',WPFB)?></a> <?php _e('Add multiple remote files at once.', WPFB); ?></p> 195 211 --> 212 </div> 196 213 197 214 <?php -
wp-filebase/trunk/classes/AdminGuiSettings.php
r630203 r639699 206 206 __('Common', WPFB) => array('upload_path','search_integration' /*'cat_drop_down'*/), 207 207 __('Display', WPFB) => array('file_date_format','thumbnail_size','auto_attach_files', 'attach_loop','attach_pos', 'filelist_sorting', 'filelist_sorting_dir', 'filelist_num', /* TODO: remove? 'parse_tags_rss',*/ 'decimal_size_format'), 208 __('File Browser',WPFB) => array('file_browser_post_id','file_browser_cat_sort_by','file_browser_cat_sort_dir','file_browser_file_sort_by','file_browser_file_sort_dir','file_browser_fbc', 'late_script_loading', 208 __('File Browser',WPFB) => array('file_browser_post_id','file_browser_cat_sort_by','file_browser_cat_sort_dir','file_browser_file_sort_by','file_browser_file_sort_dir','file_browser_fbc', 'late_script_loading','small_icon_size', 209 209 'disable_footer_credits','footer_credits_style', 210 210 ), -
wp-filebase/trunk/classes/Category.php
r631304 r639699 177 177 case 'cat_parent_name': return is_object($parent =& $this->GetParent()) ? $parent->cat_name : ''; 178 178 case 'cat_icon_url': return $this->GetIconUrl(); 179 case 'cat_small_icon': $esc=false; return '<img src="'.$this->GetIconUrl('small').'" style="height: 32px;vertical-align:middle;" />';179 case 'cat_small_icon': $esc=false; return '<img src="'.$this->GetIconUrl('small').'" style="height:'.WPFB_Core::GetOpt('small_icon_size').'px;vertical-align:middle;" />'; 180 180 case 'cat_num_files': return $this->cat_num_files; 181 181 case 'cat_num_files_total': return $this->cat_num_files_total; -
wp-filebase/trunk/classes/Core.php
r630203 r639699 4 4 static $file_browser_search = false; 5 5 static $file_browser_item = null; 6 //static $options= null;6 static $current_user = null; 7 7 8 8 static function InitClass() … … 305 305 if(!empty($wpfb_fb) && !WPFB_Core::GetOpt('disable_footer_credits')) { 306 306 echo '<div id="wpfb-credits" name="wpfb-credits" style="'.esc_attr(WPFB_Core::GetOpt('footer_credits_style')).'">'; 307 printf(__('<a href="%s" title="Wordpress Download Manager Plugin" style="color:inherit;font-size:inherit;">Downloads served by WP-Filebase</a>',WPFB),'http://wpfilebase. fabi.me/');307 printf(__('<a href="%s" title="Wordpress Download Manager Plugin" style="color:inherit;font-size:inherit;">Downloads served by WP-Filebase</a>',WPFB),'http://wpfilebase.com/'); 308 308 echo '</div>'; 309 309 } … … 657 657 } 658 658 659 } 659 660 } -
wp-filebase/trunk/classes/Download.php
r615301 r639699 359 359 } 360 360 361 $size = filesize($file_path); 361 wpfb_loadclass('FileUtils'); 362 $size = WPFB_FileUtils::GetFileSize($file_path); 362 363 $time = filemtime($file_path); 363 364 $file_type = WPFB_Download::GetFileType($file_path); -
wp-filebase/trunk/classes/File.php
r630203 r639699 161 161 { 162 162 global $wpdb; 163 return (int)$wpdb->get_var("SELECT COUNT( $wpdb->wpfilebase_files.file_id) FROM ".self::genSelectSql($where, $check_permissions));163 return (int)$wpdb->get_var("SELECT COUNT(`{$wpdb->wpfilebase_files}`.`file_id`) FROM ".self::genSelectSql($where, $check_permissions)); 164 164 } 165 165 … … 178 178 { // validate some values before saving (fixes for mysql strict mode) 179 179 if($this->locked > 0) return $this->TriggerLockedError(); 180 $ints = array('file_ size','file_category','file_post_id','file_attach_order','file_wpattach_id','file_added_by','file_update_of','file_hits','file_ratings','file_rating_sum');180 $ints = array('file_category','file_post_id','file_attach_order','file_wpattach_id','file_added_by','file_update_of','file_hits','file_ratings','file_rating_sum'); 181 181 foreach($ints as $i) $this->$i = intval($this->$i); 182 182 $this->file_offline = (int)!empty($this->file_offline); … … 199 199 200 200 function CreateThumbnail($src_image='', $del_src=false) 201 { 201 { 202 wpfb_loadclass('FileUtils'); 203 202 204 $src_set = !empty($src_image) && file_exists($src_image); 203 205 $tmp_src = $del_src; … … 220 222 221 223 $ext = trim($this->GetExtension(), '.'); 222 223 if($ext != 'bmp' && 224 ($src_size = @getimagesize($src_image)) === false) { // check if valid image 224 $src_size = array(); 225 226 if(!WPFB_FileUtils::FileHasImageExt($this->file_name) && 227 !($src_set && WPFB_FileUtils::IsValidImage($src_image, $src_size))) { // check if valid image 225 228 if($tmp_src) @unlink($src_image); 226 229 return; … … 231 234 $thumb_size = (int)WPFB_Core::GetOpt('thumbnail_size'); 232 235 233 if(!function_exists('wp_create_thumbnail')) { 234 require_once(ABSPATH . 'wp-admin/includes/image.php'); 235 if(!function_exists('wp_create_thumbnail')) 236 { 237 if($tmp_src) @unlink($src_image); 238 wp_die('Function wp_create_thumbnail does not exist!'); 239 return; 240 } 241 } 236 242 237 243 238 $extras_dir = WPFB_PLUGIN_ROOT . 'extras/'; … … 259 254 if(@file_exists($jpg_file) && @filesize($jpg_file) > 0) 260 255 { 261 $thumb = @wp_create_thumbnail($jpg_file, $thumb_size);256 $thumb = WPFB_FileUtils::CreateThumbnail($jpg_file, $thumb_size); 262 257 } 263 258 @unlink($jpg_file); … … 266 261 } 267 262 } else { 268 $thumb = @wp_create_thumbnail($src_image, $thumb_size);263 $thumb = WPFB_FileUtils::CreateThumbnail($src_image, $thumb_size); 269 264 if(is_wp_error($thumb) && max($src_size) <= $thumb_size) { // error occurs when image is smaller than thumb_size. in this case, just copy original 270 265 $name = wp_basename($src_image, ".$ext"); … … 387 382 case 'file_post_url': return htmlspecialchars(!($url = $this->GetPostUrl()) ? $this->GetUrl() : $url); 388 383 case 'file_icon_url': return htmlspecialchars($this->GetIconUrl()); 389 case 'file_small_icon': return '<img src="'.esc_attr($this->GetIconUrl('small')).'" style="vertical-align:middle;height: 32px;" />';384 case 'file_small_icon': return '<img src="'.esc_attr($this->GetIconUrl('small')).'" style="vertical-align:middle;height:'.WPFB_Core::GetOpt('small_icon_size').'px;" />'; 390 385 case 'file_size': return $this->GetFormattedSize(); 391 386 case 'file_path': return htmlspecialchars($this->GetLocalPathRel()); 392 387 393 388 case 'file_category': return htmlspecialchars(is_object($cat = $this->GetParent()) ? $cat->cat_name : ''); 394 case 'cat_small_icon': return is_null($cat = $this->GetParent()) ? '' : ('<img align="" src="'.htmlspecialchars($cat->GetIconUrl('small')).'" style="height: 32px;vertical-align:middle;" />');389 case 'cat_small_icon': return is_null($cat = $this->GetParent()) ? '' : ('<img align="" src="'.htmlspecialchars($cat->GetIconUrl('small')).'" style="height:'.WPFB_Core::GetOpt('small_icon_size').'px;vertical-align:middle;" />'); 395 390 case 'cat_icon_url': return is_null($cat = $this->GetParent()) ? '' : htmlspecialchars($cat->GetIconUrl()); 396 391 case 'cat_url': return is_null($cat = $this->GetParent()) ? '' : htmlspecialchars($cat->GetUrl()); … … 428 423 return htmlspecialchars($this->getInfoValue($path)); 429 424 } elseif(strpos($name, 'file_custom') === 0) // dont esc custom 430 return isset($this->$name) ? $this->$name : ''; 425 return isset($this->$name) ? $this->$name : ''; 426 427 // string length limit: 428 if(!isset($this->$name) && ($p=strpos($name, ':')) > 0) { 429 $maxlen = (int)substr($name, $p+1); 430 $name = substr($name, 0, $p); 431 $str = $this->get_tpl_var($name); 432 if($maxlen > 3 && strlen($str) > $maxlen) $str = (function_exists('mb_substr') ? mb_substr($str, 0, $maxlen-3,'utf8') : mb_substr($str, 0, $maxlen-3)).'...'; 433 return $str; 434 } 435 431 436 return isset($this->$name) ? htmlspecialchars($this->$name) : ''; 432 437 } -
wp-filebase/trunk/classes/Item.php
r631304 r639699 31 31 function GetTitle($maxlen=0){ 32 32 $t = $this->is_file?$this->file_display_name:$this->cat_name; 33 if($maxlen > 3 && strlen($t) > $maxlen) $t = mb_substr($t, 0, $maxlen-3,'utf8').'...';33 if($maxlen > 3 && strlen($t) > $maxlen) $t = (function_exists('mb_substr') ? mb_substr($t, 0, $maxlen-3,'utf8') : substr($t, 0, $maxlen-3)).'...'; 34 34 return $t; 35 35 } … … 95 95 static function Sort(&$items, $order_sql) { 96 96 $order_sql = str_replace(array('>','<'), array('>','<'), $order_sql); 97 if(($desc = ($order_sql{0} == '>')) || $order_sql{0} = '<')97 if(($desc = ($order_sql{0} == '>')) || $order_sql{0} == '<') 98 98 $on = substr($order_sql,1); 99 99 else { … … 198 198 function CurUserCanAccess($for_tpl=false) 199 199 { 200 global $ current_user;201 if( $current_user->ID > 0 && empty($current_user->roles[0]))202 $current_user = new WP_User($current_user->ID);// load the roles!203 204 if( ($for_tpl && !WPFB_Core::GetOpt('hide_inaccessible')) || in_array('administrator', $current_user->roles) || ($this->is_file && $this->CurUserIsOwner()) )200 global $user_ID; // is 0 when not logged in 201 if(is_null(WPFB_Core::$current_user)) 202 WPFB_Core::$current_user = new WP_User($user_ID); //load all roles 203 204 if( ($for_tpl && !WPFB_Core::GetOpt('hide_inaccessible')) || in_array('administrator',WPFB_Core::$current_user->roles) || ($this->is_file && $this->CurUserIsOwner()) ) 205 205 return true; 206 206 if(WPFB_Core::GetOpt('private_files') && $this->GetOwnerId() != 0 && !$this->CurUserIsOwner()) // check private files … … 208 208 $frs = $this->GetReadPermissions(); 209 209 if(empty($frs)) return true; // item is for everyone! 210 foreach( $current_user->roles as $ur) { // check user roles against item roles210 foreach(WPFB_Core::$current_user->roles as $ur) { // check user roles against item roles 211 211 if(in_array($ur, $frs)) 212 212 return true; … … 310 310 { 311 311 // add mtime for cache updates 312 return WPFB_PLUGIN_URI . (empty($this->cat_icon) ? ('images/'.(($size=='small')?'folder48':'crystal_cat').'.png') : "wp-filebase_thumb.php?cid=$this->cat_id&t=". filemtime($this->GetThumbPath()));312 return WPFB_PLUGIN_URI . (empty($this->cat_icon) ? ('images/'.(($size=='small')?'folder48':'crystal_cat').'.png') : "wp-filebase_thumb.php?cid=$this->cat_id&t=".@filemtime($this->GetThumbPath())); 313 313 } 314 314 … … 526 526 527 527 protected static function GetPermissionWhere($owner_field, $permissions_field) { 528 global $wpdb, $current_user; 528 global $wpdb, $user_ID; 529 530 if(is_null(WPFB_Core::$current_user)) 531 WPFB_Core::$current_user = new WP_User($user_ID); //load all roles 532 $current_user = WPFB_Core::$current_user; 533 529 534 static $permission_sql = ''; 530 535 if(empty($permission_sql)) { // only generate once per request 531 if($current_user->ID > 0 && empty($current_user->roles[0]))532 $current_user = new WP_User($current_user->ID);// load the roles533 534 536 if(in_array('administrator',$current_user->roles)) $permission_sql = '1=1'; // administrator can access everything! 535 537 elseif(WPFB_Core::GetOpt('private_files')) { -
wp-filebase/trunk/classes/ListTpl.php
r598768 r639699 43 43 44 44 static function ParseHeaderFooter($str, $uid=null) { 45 global $wp_query;46 45 $str = preg_replace('/%sort_?link:([a-z0-9_]+)%/ie', __CLASS__.'::GenSortlink(\'$1\')', $str); 47 if(strpos($str, '%search_form%') !== false) { 48 $searching = !empty($_GET['wpfb_s']); 49 if($searching) { 50 $sb = empty($wp_query->query_vars['s'])?null:$wp_query->query_vars['s']; 51 $wp_query->query_vars['s'] = $_GET['wpfb_s']; 52 } 53 54 ob_start(); 55 get_search_form(); 56 $form = ob_get_clean(); 57 if(empty($form)) echo "Searchform empty!"; 58 59 if($searching) $wp_query->query_vars['s'] = $sb; // restore query var s 60 61 $form = preg_replace('/action=["\'].+?["\']/', 'action=""', $form); 62 $form = str_replace('="s"', '="wpfb_s"', $form); 63 $form = str_replace("='s'", "='wpfb_s'", $form); 64 $gets = ''; 65 foreach($_GET as $name => $value) if($name != 'wpfb_s' && $name != 'wpfb_list_page') $gets.='<input type="hidden" name="'.esc_attr(stripslashes($name)).'" value="'.esc_attr(stripslashes($value)).'" />'; 66 $form = str_ireplace('</form>', "$gets</form>", $form); 67 $str = str_replace('%search_form%', $form, $str); 68 } 46 47 if(strpos($str, '%search_form%') !== false) 48 $str = str_replace('%search_form%', WPFB_Output::GetSearchForm("", $_GET), $str); 69 49 70 50 $str = preg_replace('/%print_?script:([a-z0-9_-]+)%/ie', __CLASS__.'::PrintScriptOrStyle(\'$1\', false)', $str); … … 95 75 } 96 76 97 function Generate($categories, $show_cats, $file_order, $page_limit, $cat_order=null )77 function Generate($categories, $show_cats, $file_order, $page_limit, $cat_order=null, $hide_pagenav = false) 98 78 { 99 79 $uid = uniqid(); … … 152 132 if($nf > 0) { 153 133 $files = WPFB_File::GetFiles2("($where) AND ".WPFB_File::GetSqlCatWhereStr($cat->cat_id), $hia, $sort, $page_limit, $start); 154 if( $show_cats &&count($files) > 0)134 if(count($files) > 0) 155 135 $content .= $cat->GenTpl2($this->cat_tpl_tag); // check for file count again, due to pagination! 156 136 … … 175 155 $keys = array_keys($all_files); 176 156 if($start == -1) $start = 0; 177 $last = min($start + $page_limit, $num_total_files);157 $last = ($page_limit > 0) ? min($start + $page_limit, $num_total_files) : $num_total_files; 178 158 for($i = $start; $i < $last; $i++) 179 159 $content .= $all_files[$keys[$i]]->GenTpl2($this->file_tpl_tag); … … 184 164 $footer = self::ParseHeaderFooter($this->footer, $uid); 185 165 186 if($page_limit > 0 && $num_total_files > $page_limit ) {166 if($page_limit > 0 && $num_total_files > $page_limit && !$hide_pagenav) { 187 167 $pagenav = paginate_links( array( 188 168 'base' => add_query_arg( 'wpfb_list_page', '%#%' ), … … 191 171 'current' => empty($_GET['wpfb_list_page']) ? 1 : absint($_GET['wpfb_list_page']) 192 172 )); 193 /*194 'show_all' => false,195 'prev_next' => true,196 'prev_text' => __('« Previous'),197 'next_text' => __('Next »'),198 'end_size' => 1,199 'mid_size' => 2,200 'type' => 'plain',201 'add_args' => false, // array of query args to add202 'add_fragment' => ''*/203 173 204 174 if(strpos($footer, '%page_nav%') === false) -
wp-filebase/trunk/classes/Output.php
r630203 r639699 74 74 return ''; 75 75 } 76 } 77 78 if(empty($args['id']) || $args['id'] == -1) { 79 $cats = $args['showcats'] ? WPFB_Category::GetCats() : null; 80 } else { 81 $cats = array(); 82 $cat_ids = explode(',', $args['id']); 83 foreach($cat_ids as $cat_id) { 84 if(!is_null($cat = WPFB_Category::GetCat($cat_id))) $cats[] = $cat; 85 } 86 } 87 88 return $tpl->Generate($cats, $args['showcats'], $args['sort'], $args['num'], $args['sortcats']); 76 } 77 78 $cats = (empty($args['id']) || $args['id'] == -1) ? ($args['showcats'] ? WPFB_Category::GetCats() : null) : array_filter(array_map(array('WPFB_Category','GetCat'), explode(',', $args['id']))); 79 80 return $tpl->Generate($cats, $args['showcats'], $args['sort'], $args['num'], $args['sortcats'], isset($args['pagenav']) && !((int)$args['pagenav'])); 89 81 } 90 82 … … 460 452 <small><?php printf(str_replace('%d%s','%s',__('Maximum upload file size: %d%s'/*def*/)), WPFB_Output::FormatFilesize(WPFB_Core::GetMaxUlSize())) ?></small> 461 453 462 <div style="float: right; text-align:right;"><input type="submit" class="button-primary" name="submit-btn" value="<?php _ex('Add New', 'file'); ?>" /></div> 454 <?php if(empty($auto_submit)) { ?><div style="float: right; text-align:right;"><input type="submit" class="button-primary" name="submit-btn" value="<?php _ex('Add New', 'file'); ?>" /></div> 455 <?php } ?> 463 456 </div> 464 457 </form> 465 458 <?php 466 459 } 467 } 460 461 static function GetSearchForm($action, $hidden_vars = array(), $prefix=null) 462 { 463 global $wp_query; 464 465 $searching = !empty($_GET['wpfb_s']); 466 if($searching) { // set preset value for search form 467 $sb = empty($wp_query->query_vars['s'])?null:$wp_query->query_vars['s']; 468 $wp_query->query_vars['s'] = stripslashes($_GET['wpfb_s']); 469 } 470 471 ob_start(); 472 get_search_form(); 473 $form = ob_get_clean(); 474 475 if($searching) $wp_query->query_vars['s'] = $sb; // restore query var s 476 477 $form = preg_replace('/action=["\'].+?["\']/', 'action="'.esc_attr($action).'"', $form); 478 $form = str_replace('name="s"', 'name="wpfb_s"', $form); 479 $form = str_replace("name='s'", "name='wpfb_s'", $form); 480 481 if(!empty($hidden_vars)) { 482 $gets = ''; 483 foreach($hidden_vars as $name => $value) if($name != 'wpfb_s' && $name != 'wpfb_list_page') $gets.='<input type="hidden" name="'.esc_attr(stripslashes($name)).'" value="'.esc_attr(stripslashes($value)).'" />'; 484 $form = str_ireplace('</form>', "$gets</form>", $form); 485 } 486 487 if(!empty($prefix)) { 488 $form = str_replace('id="', 'id="'.$prefix, $form); 489 $form = str_replace("id='", "id='".$prefix, $form); 490 } 491 return $form; 492 } 493 } -
wp-filebase/trunk/classes/PLUpload.php
r630203 r639699 41 41 $id = $this->id; 42 42 43 require_once(ABSPATH . 'wp-admin/includes/template.php'); // wp_max_upload_size 44 $upload_size_unit = $max_upload_size = wp_max_upload_size(); 43 $upload_size_unit = $max_upload_size = WPFB_Core::GetMaxUlSize(); 45 44 $sizes = array( 'KB', 'MB', 'GB' ); 46 45 -
wp-filebase/trunk/classes/ProgressReporter.php
r615301 r639699 29 29 if(!$this->quiet) { 30 30 if(is_null($this->progress_bar)) { 31 i nclude_once(WPFB_PLUGIN_ROOT.'extras/progressbar.class.php');31 if(!class_exists('progressbar')) include_once(WPFB_PLUGIN_ROOT.'extras/progressbar.class.php'); 32 32 $this->progress_bar = new progressbar(0, 100); 33 33 $this->progress_bar->print_code(); -
wp-filebase/trunk/classes/Sync.php
r630203 r639699 5 5 static function InitClass() 6 6 { 7 wpfb_loadclass("Admin", "GetID3" );7 wpfb_loadclass("Admin", "GetID3", "FileUtils"); 8 8 require_once(ABSPATH . 'wp-admin/includes/file.php'); 9 9 … … 111 111 echo "</p>"; 112 112 113 i nclude_once(WPFB_PLUGIN_ROOT.'extras/progressbar.class.php');113 if(!class_exists('progressbar')) include_once(WPFB_PLUGIN_ROOT.'extras/progressbar.class.php'); 114 114 $progress_bar = new progressbar(0, $sync_data->num_files_to_add); 115 115 $progress_bar->print_code(); … … 193 193 194 194 if($sync_data->hash_sync) $file_hash = WPFB_Admin::GetFileHash($file_path); 195 $file_size = (int)@filesize($file_path);195 $file_size = WPFB_FileUtils::GetFileSize($file_path); 196 196 $file_mtime = filemtime($file_path); 197 197 $file_analyzetime = !$sync_id3 ? $file_mtime : WPFB_GetID3::GetFileAnalyzeTime($file); -
wp-filebase/trunk/classes/TplLib.php
r599590 r639699 39 39 40 40 // parse variables 41 $tpl = preg_replace('/%([a-z0-9_\/ ]+?)%/i', '\'.$f->get_tpl_var(\'$1\').\'', $tpl);41 $tpl = preg_replace('/%([a-z0-9_\/:]+?)%/i', '\'.$f->get_tpl_var(\'$1\').\'', $tpl); 42 42 43 43 // remove html comments -
wp-filebase/trunk/classes/Widget.php
r615301 r639699 270 270 271 271 $prefix = "wpfb-search-widget-".$this->id_base; 272 $form_url = add_query_arg('wpfb_add_cat', 1); 273 $nonce_action = $prefix; 274 ?> 275 <form name="<?php echo $prefix ?>form" method="get" action="<?php echo remove_query_arg(array('p','post_id','page_id','wpfb_s')); ?>" class="searchform" id="searchform"> 276 <input name="p" type="hidden" value="<?php echo WPFB_Core::GetOpt('file_browser_post_id') ?>" /> 277 <fieldset> 278 <input name="wpfb_s" id="<?php echo $prefix ?>search" type="text" value="<?php echo empty($_GET['wpfb_s']) ? '' : esc_attr(stripslashes($_GET['wpfb_s'])) ?>" /> 279 <!-- <button type="submit" name="searchsubmit" value="Search"></button> --> 280 <input type="submit" class="button-primary" name="searchsubmit" value="<?php _e('Search'/*def*/) ?>" /> 281 </fieldset> 282 </form> 283 <?php 272 273 $fbp_id = WPFB_Core::GetOpt('file_browser_post_id'); 274 $action = WPFB_Core::GetPostUrl($fbp_id); 275 $p_in_query = (strpos($action,'?') !== false); // no permalinks? 276 $action = $p_in_query ? remove_query_arg(array('p','post_id','page_id','wpfb_s')) : $action; 277 278 echo WPFB_Output::GetSearchForm($action, $p_in_query ? array('p' => $fbp_id) : null, ""); 279 284 280 echo $after_widget; 285 281 } … … 407 403 parent::WP_Widget( false, WPFB_PLUGIN_NAME .' '.__('File list', WPFB), array('description' => __('Listing of files with custom sorting', WPFB)) ); 408 404 } 405 406 static function limitStrLen($str, $maxlen) 407 { 408 if($maxlen > 3 && strlen($str) > $maxlen) $str = (function_exists('mb_substr') ? mb_substr($str, 0, $maxlen-3,'utf8') : mb_substr($str, 0, $maxlen-3)).'...'; 409 return $str; 410 } 409 411 410 412 function widget( $args, $instance ) { … … 425 427 (int)$instance['limit'] 426 428 ); 429 430 //$instance['tpl_parsed'] 431 //WPFB_FileListWidget 427 432 428 433 $tpl_func = WPFB_Core::CreateTplFunc($instance['tpl_parsed']); -
wp-filebase/trunk/extras/getid3/getid3.php
r559064 r639699 1737 1737 1738 1738 1739 class getid3_exception extends Exception 1740 { 1741 public $message; 1739 if(!class_exists('getid3_exception')) { 1740 class getid3_exception extends Exception 1741 { 1742 public $message; 1743 } 1742 1744 } 1743 1745 -
wp-filebase/trunk/readme.txt
r631304 r639699 4 4 Tags: filebase, filemanager, file, files, manager, upload, download, downloads, downloadmanager, images, pdf, widget, filelist, list, thumbnails, thumbnail, attachment, attachments, category, categories, media, template, ftp, http, mp3, id3 5 5 Requires at least: 3.1 6 Tested up to: 3. 4.27 Stable tag: 0.2.9.2 76 Tested up to: 3.5 7 Stable tag: 0.2.9.28 8 8 9 9 Adds a powerful download manager including file categories, downloads counter, widgets, sorted file lists and more to your WordPress blog. … … 49 49 * Automatic synchronization of file system and database 50 50 51 You can see a [live demo on my Website](http://fabi.me/downloads/ "WP-Filebase demo"), [documentation can be found here](http://wpfilebase. fabi.me/documentation/ "WP-Filebase documentation").51 You can see a [live demo on my Website](http://fabi.me/downloads/ "WP-Filebase demo"), [documentation can be found here](http://wpfilebase.com/documentation/ "WP-Filebase documentation"). 52 52 For support, please [leave a message on my blog](http://fabi.me/wordpress-plugins/wp-filebase-file-download-manager/#postcomment "Post comment"). When having trouble don't forget to post PHP and Wordpress version! Any ideas/feature requests are welcome. 53 53 54 54 = WP-Filebase Pro = 55 [WP-Filebase Pro](http://wpfilebase. fabi.me/) includes even more advanced features:55 [WP-Filebase Pro](http://wpfilebase.com/) includes even more advanced features: 56 56 57 57 * PDF indexing and thumbnails … … 69 69 3. Activate the Plugin and customize the settings under *Settings->WP-Filebase* 70 70 71 Read more in [WP-Filebase documentation](http://wpfilebase. fabi.me/documentation/setup/).71 Read more in [WP-Filebase documentation](http://wpfilebase.com/documentation/setup/). 72 72 73 73 == Frequently Asked Questions == … … 114 114 == Changelog == 115 115 116 = 0.2.9.28 = 117 * Made code adjustments for WordPress 3.5 compatibility 118 * New Option `Small Icon Size` in File Browser settings to adjust the size of icons and thumbnails 119 * Improved compatibility with custom Role Plugins 120 * Some GUI changes 121 * Fixed 'Cheating uh?' bug when using the category seaech form after editing (thanks to David Bell) 122 * Fixed secondary category query causing files to appear in root folder 123 * Removed call wp_create_thumbnail which is deprecated since WP 3.5 124 * Widget File Search Form now looks like the default search form 125 * Added length limit for template variables: `%file_display_name:20%` limits the name to 20 characters 126 * Fixed pagenav shortcode parameter, thanks to yuanl 127 * Fixed file size limit in Drag&Drop uploader causing trouble 128 * Fixed CSS Editor Bug 129 * Fixed bug in list sorting 130 116 131 = 0.2.9.27 = 117 132 * Fixed AJAX tree not showing … … 126 141 127 142 = 0.2.9.25 = 128 * [WP-Filebase Documentation](http://wpfilebase. fabi.me/documentation/) and [WP-Filebase Pro](http://wpfilebase.fabi.me/) released143 * [WP-Filebase Documentation](http://wpfilebase.com/documentation/) and [WP-Filebase Pro](http://wpfilebase.com/) released 129 144 * Added Category Owners 130 145 * Raised limits of file name length: file name 300, category folder name: 300, total path length: 2000 … … 569 584 570 585 == Documentation == 571 [WP-Filebase Documentation](http://wpfilebase. fabi.me/documentation/)586 [WP-Filebase Documentation](http://wpfilebase.com/documentation/) 572 587 573 588 == Translation == … … 578 593 579 594 == WP-Filebase Pro == 580 [WP-Filebase Pro](http://wpfilebase. fabi.me/) is the commercial version of WP-Filebase with an extended range of functions. It supports secondary categories, extended permissions, embedded upload forms. Furthermore it can generate PDF thumbnails, sync with Dropbox or FTP and includes an improved file sync algorithm.595 [WP-Filebase Pro](http://wpfilebase.com/) is the commercial version of WP-Filebase with an extended range of functions. It supports secondary categories, extended permissions, embedded upload forms. Furthermore it can generate PDF thumbnails, sync with Dropbox or FTP and includes an improved file sync algorithm. 581 596 582 597 == Traffic Limiter == -
wp-filebase/trunk/wp-filebase-admin.css
r630203 r639699 264 264 position:absolute; 265 265 right: 0px; 266 top: 40px; 266 267 267 268 border-width:1px; … … 352 353 353 354 } 355 356 357 .wpfb-tools td { 358 padding: 10px; 359 cursor: default; 360 } 361 362 .wpfb-tools th { 363 text-align:center; 364 padding: 10px 365 } 366 367 .wpfb-tools tr { 368 border-bottom: 1px solid #aaa; 369 } 370 371 .wpfb-tools tr:hover { 372 background-color: #eee; 373 } 374 375 .wpfb-stats-table { 376 377 } 378 379 .wpfb-stats-table th { 380 text-align: left; 381 padding: 5px; 382 font-weight: normal; 383 } 384 385 .wpfb-stats-table td { 386 text-align: right; 387 padding: 2px; 388 font-family: Georgia,"Times New Roman","Bitstream Charter",Times,serif; 389 font-size: 18px; 390 } -
wp-filebase/trunk/wp-filebase.php
r631304 r639699 5 5 Description: Adds a powerful downloads manager supporting file categories, download counter, widgets, sorted file lists and more to your WordPress blog. 6 6 Author: Fabian Schlieper 7 Version: 0.2.9.2 77 Version: 0.2.9.28 8 8 Author URI: http://fabi.me/ 9 9 */ … … 12 12 { 13 13 define('WPFB', 'wpfb'); 14 define('WPFB_VERSION', '0.2.9.2 7');14 define('WPFB_VERSION', '0.2.9.28'); 15 15 define('WPFB_PLUGIN_ROOT', str_replace('\\','/',dirname(__FILE__)).'/'); 16 16 if(!defined('ABSPATH')) {
Note: See TracChangeset
for help on using the changeset viewer.