summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLester Caine <lester@lsces.co.uk>2026-05-14 09:54:15 +0100
committerLester Caine <lester@lsces.co.uk>2026-05-14 09:54:15 +0100
commit7e4af642c93da5af9889211cff169c901e35d6b8 (patch)
tree9fd6433fcf8e763c97fd8499b2f13e88312bf3ce
parentb463af3dd0d69bf659bd0820bd07bebd6358f74c (diff)
downloadliberty-7e4af642c93da5af9889211cff169c901e35d6b8.tar.gz
liberty-7e4af642c93da5af9889211cff169c901e35d6b8.tar.bz2
liberty-7e4af642c93da5af9889211cff169c901e35d6b8.zip
php-cs-fixer tidies to php8.5 standards
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
-rwxr-xr-x[-rw-r--r--].htaccess0
-rwxr-xr-xadmin/admin_liberty_inc.php2
-rwxr-xr-xadmin/comments.php2
-rwxr-xr-xadmin/plugins.php4
-rwxr-xr-xadmin/plugins/data_code.php6
-rwxr-xr-xadmin/schema_inc.php13
-rwxr-xr-xajax_comments.php1
-rwxr-xr-xajax_edit_storage.php2
-rwxr-xr-xattachment_browser.php6
-rwxr-xr-xattachment_uploader.php2
-rwxr-xr-xcontent_permissions.php2
-rwxr-xr-xcontent_role_permissions.php3
-rwxr-xr-xdownload_file.php6
-rwxr-xr-x[-rw-r--r--]icons/Mind-Reader.swfbin122367 -> 122367 bytes
-rwxr-xr-x[-rw-r--r--]icons/active.gifbin222 -> 222 bytes
-rwxr-xr-x[-rw-r--r--]icons/active.pngbin348 -> 348 bytes
-rwxr-xr-x[-rw-r--r--]icons/bitweaver/adodb.gifbin232 -> 232 bytes
-rwxr-xr-x[-rw-r--r--]icons/bitweaver/bitweaver.gifbin534 -> 534 bytes
-rwxr-xr-x[-rw-r--r--]icons/bitweaver/firebird.gifbin969 -> 969 bytes
-rwxr-xr-x[-rw-r--r--]icons/bitweaver/htmlpurifier.gifbin203 -> 203 bytes
-rwxr-xr-x[-rw-r--r--]icons/bitweaver/htmlpurifier.pngbin297 -> 297 bytes
-rwxr-xr-x[-rw-r--r--]icons/bitweaver/ie7.gifbin208 -> 208 bytes
-rwxr-xr-x[-rw-r--r--]icons/bitweaver/large/adodb.gifbin1091 -> 1091 bytes
-rwxr-xr-x[-rw-r--r--]icons/bitweaver/large/bitweaver.gifbin1258 -> 1258 bytes
-rwxr-xr-x[-rw-r--r--]icons/bitweaver/large/bitweaver1.gifbin2643 -> 2643 bytes
-rwxr-xr-x[-rw-r--r--]icons/bitweaver/large/firebird.gifbin2843 -> 2843 bytes
-rwxr-xr-x[-rw-r--r--]icons/bitweaver/large/mysql.gifbin2221 -> 2221 bytes
-rwxr-xr-x[-rw-r--r--]icons/bitweaver/large/oracle.gifbin1707 -> 1707 bytes
-rwxr-xr-x[-rw-r--r--]icons/bitweaver/large/pear.gifbin861 -> 861 bytes
-rwxr-xr-x[-rw-r--r--]icons/bitweaver/large/pear.pngbin1445 -> 1445 bytes
-rwxr-xr-x[-rw-r--r--]icons/bitweaver/large/postgresql.gifbin2534 -> 2534 bytes
-rwxr-xr-x[-rw-r--r--]icons/bitweaver/large/smarty.gifbin1175 -> 1175 bytes
-rwxr-xr-x[-rw-r--r--]icons/bitweaver/mysql.gifbin739 -> 739 bytes
-rwxr-xr-x[-rw-r--r--]icons/bitweaver/oracle.gifbin451 -> 451 bytes
-rwxr-xr-x[-rw-r--r--]icons/bitweaver/pear.gifbin217 -> 217 bytes
-rwxr-xr-x[-rw-r--r--]icons/bitweaver/pear.pngbin282 -> 282 bytes
-rwxr-xr-x[-rw-r--r--]icons/bitweaver/postgresql.gifbin196 -> 196 bytes
-rwxr-xr-x[-rw-r--r--]icons/bitweaver/smarty.gifbin722 -> 722 bytes
-rwxr-xr-x[-rw-r--r--]icons/busy.gifbin1647 -> 1647 bytes
-rwxr-xr-x[-rw-r--r--]icons/collapsed.gifbin59 -> 59 bytes
-rwxr-xr-x[-rw-r--r--]icons/directory.gifbin616 -> 616 bytes
-rwxr-xr-x[-rw-r--r--]icons/directory.pngbin517 -> 517 bytes
-rwxr-xr-x[-rw-r--r--]icons/expanded.gifbin56 -> 56 bytes
-rwxr-xr-x[-rw-r--r--]icons/generating_thumbnails.gifbin10786 -> 10786 bytes
-rwxr-xr-x[-rw-r--r--]icons/generating_thumbnails.pngbin15746 -> 15746 bytes
-rw-r--r--icons/index.php2
-rwxr-xr-x[-rw-r--r--]icons/lulu.gifbin516 -> 516 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/ac3.gifbin2292 -> 2292 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/arj.gifbin2104 -> 2104 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/asf.gifbin1911 -> 1911 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/avi.gifbin1901 -> 1901 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/blank.gifbin2134 -> 2134 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/blank.pngbin2038 -> 2038 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/bmp.gifbin1928 -> 1928 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/bz2.gifbin2127 -> 2127 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/crv.gifbin2645 -> 2645 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/crv.pngbin3962 -> 3962 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/css.gifbin1606 -> 1606 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/css.pngbin3216 -> 3216 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/doc.gifbin2172 -> 2172 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/dxf.gifbin2462 -> 2462 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/dxf.pngbin3905 -> 3905 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/exe.gifbin1243 -> 1243 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/fcstd.gifbin2376 -> 2376 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/fcstd.pngbin3299 -> 3299 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/gbr.gifbin2467 -> 2467 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/gbr.pngbin3931 -> 3931 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/generic.gifbin1116 -> 1116 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/generic.pngbin1212 -> 1212 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/gif.gifbin2042 -> 2042 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/gz.gifbin2112 -> 2112 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/htm.gifbin2023 -> 2023 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/htm.pngbin3104 -> 3104 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/html.gifbin2023 -> 2023 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/html.pngbin3104 -> 3104 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/igs.gifbin2377 -> 2377 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/igs.pngbin3827 -> 3827 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/iso.gifbin1698 -> 1698 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/jar.gifbin2156 -> 2156 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/jpeg.gifbin1931 -> 1931 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/jpg.gifbin1931 -> 1931 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/js.gifbin2330 -> 2330 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/mov.gifbin1937 -> 1937 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/mp3.gifbin2356 -> 2356 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/mp3.pngbin3902 -> 3902 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/mpeg.gifbin1898 -> 1898 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/mpg.gifbin1898 -> 1898 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/mpg.pngbin4271 -> 4271 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/ogg.gifbin2494 -> 2494 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/pcb.gifbin2453 -> 2453 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/pcb.pngbin3903 -> 3903 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/pdf.gifbin1662 -> 1662 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/pdf.pngbin3541 -> 3541 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/php.gifbin1520 -> 1520 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/plain.gifbin2137 -> 2137 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/plain.pngbin2855 -> 2855 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/png.gifbin2074 -> 2074 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/ppt.gifbin2109 -> 2109 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/psd.gifbin2083 -> 2083 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/rar.gifbin2284 -> 2284 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/rpm.gifbin2176 -> 2176 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/rtf.gifbin1714 -> 1714 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/sch.gifbin2464 -> 2464 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/sch.pngbin3940 -> 3940 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/sh.gifbin2446 -> 2446 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/sql.gifbin2342 -> 2342 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/stl.gifbin2431 -> 2431 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/stl.pngbin3855 -> 3855 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/svg.gifbin2403 -> 2403 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/swf.gifbin1486 -> 1486 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/swf.pngbin3877 -> 3877 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/tar.gifbin2091 -> 2091 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/tcw.gifbin2476 -> 2476 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/tcw.pngbin3930 -> 3930 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/tif.gifbin1991 -> 1991 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/tiff.gifbin1991 -> 1991 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/txt.gifbin2137 -> 2137 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/vector-blank.pngbin3701 -> 3701 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/wmv.gifbin1933 -> 1933 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/xls.gifbin1769 -> 1769 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/xml.gifbin1639 -> 1639 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/zip.gifbin2039 -> 2039 bytes
-rwxr-xr-x[-rw-r--r--]icons/mime/zip.pngbin3771 -> 3771 bytes
-rwxr-xr-x[-rw-r--r--]icons/move.gifbin323 -> 323 bytes
-rwxr-xr-x[-rw-r--r--]icons/move_down.gifbin185 -> 185 bytes
-rwxr-xr-x[-rw-r--r--]icons/move_down.pngbin342 -> 342 bytes
-rwxr-xr-x[-rw-r--r--]icons/move_left.gifbin188 -> 188 bytes
-rwxr-xr-x[-rw-r--r--]icons/move_left.pngbin331 -> 331 bytes
-rwxr-xr-x[-rw-r--r--]icons/move_left_right.gifbin188 -> 188 bytes
-rwxr-xr-x[-rw-r--r--]icons/move_left_right.pngbin339 -> 339 bytes
-rwxr-xr-x[-rw-r--r--]icons/move_right.gifbin188 -> 188 bytes
-rwxr-xr-x[-rw-r--r--]icons/move_right.pngbin339 -> 339 bytes
-rwxr-xr-x[-rw-r--r--]icons/move_up.gifbin187 -> 187 bytes
-rwxr-xr-x[-rw-r--r--]icons/move_up.pngbin343 -> 343 bytes
-rwxr-xr-xicons/paypal/btn_cart_LG.gifbin0 -> 1951 bytes
-rwxr-xr-xicons/paypal/btn_subscribeCC_LG.gifbin0 -> 3039 bytes
-rwxr-xr-xicons/paypal/sc-but-03-de.gifbin0 -> 466 bytes
-rwxr-xr-xicons/paypal/sc-but-03.gifbin0 -> 700 bytes
-rwxr-xr-xicons/paypal/view_cart-de.gifbin0 -> 1611 bytes
-rwxr-xr-xicons/paypal/view_cart.gifbin0 -> 1695 bytes
-rwxr-xr-x[-rw-r--r--]icons/pbase.gifbin99 -> 99 bytes
-rwxr-xr-x[-rw-r--r--]icons/pkg_global.gifbin2150 -> 2150 bytes
-rwxr-xr-x[-rw-r--r--]icons/pkg_global.pngbin4118 -> 4118 bytes
-rwxr-xr-x[-rw-r--r--]icons/pkg_liberty.gifbin859 -> 859 bytes
-rwxr-xr-x[-rw-r--r--]icons/pkg_liberty.pngbin3994 -> 3994 bytes
-rwxr-xr-x[-rw-r--r--]icons/spacer.gifbin55 -> 55 bytes
-rwxr-xr-x[-rw-r--r--]icons/spacer_large.gifbin71 -> 71 bytes
-rwxr-xr-x[-rw-r--r--]icons/spacer_small.gifbin48 -> 48 bytes
-rwxr-xr-x[-rw-r--r--]icons/spy.gifbin2415 -> 2415 bytes
-rwxr-xr-xincludes/bit_setup_inc.php9
-rwxr-xr-xincludes/classes/LibertyBase.php3
-rwxr-xr-xincludes/classes/LibertyComment.php34
-rwxr-xr-xincludes/classes/LibertyContent.php84
-rwxr-xr-xincludes/classes/LibertyMime.php57
-rwxr-xr-xincludes/classes/LibertyStructure.php64
-rwxr-xr-xincludes/classes/LibertySystem.php28
-rwxr-xr-xincludes/comments_inc.php3
-rwxr-xr-xincludes/get_content_list_inc.php2
-rwxr-xr-xincludes/liberty_lib.php15
-rwxr-xr-xincludes/lookup_content_inc.php1
-rwxr-xr-xincludes/structure_edit_inc.php3
-rw-r--r--index.php2
-rwxr-xr-xliberty_rss.php3
-rwxr-xr-xlist_content.php4
-rwxr-xr-x[-rw-r--r--]modules/help_mod_last_changes.tpl0
-rwxr-xr-x[-rw-r--r--]modules/help_mod_last_comments.tpl0
-rwxr-xr-x[-rw-r--r--]modules/help_mod_structure_navigation.tpl0
-rwxr-xr-x[-rw-r--r--]modules/help_mod_structure_toc.tpl0
-rwxr-xr-x[-rw-r--r--]modules/help_mod_top_authors.tpl0
-rwxr-xr-xmodules/mod_last_changes.php4
-rwxr-xr-x[-rw-r--r--]modules/mod_last_changes.tpl0
-rwxr-xr-xmodules/mod_last_comments.php4
-rwxr-xr-x[-rw-r--r--]modules/mod_last_comments.tpl0
-rwxr-xr-x[-rw-r--r--]modules/mod_structure_navigation.php0
-rwxr-xr-x[-rw-r--r--]modules/mod_structure_navigation.tpl0
-rwxr-xr-xmodules/mod_structure_toc.php2
-rwxr-xr-x[-rw-r--r--]modules/mod_structure_toc.tpl0
-rwxr-xr-x[-rw-r--r--]modules/mod_top_authors.tpl0
-rwxr-xr-xplugins/data.addjstabs.php8
-rwxr-xr-xplugins/data.addtabs.php4
-rwxr-xr-xplugins/data.adsense.php7
-rwxr-xr-xplugins/data.agentinfo.php23
-rwxr-xr-xplugins/data.alias.php4
-rwxr-xr-xplugins/data.attachment.php4
-rwxr-xr-xplugins/data.biticon.php3
-rwxr-xr-xplugins/data.code.php10
-rwxr-xr-xplugins/data.comment.php3
-rwxr-xr-xplugins/data.copyright.php9
-rwxr-xr-xplugins/data.countdown.php34
-rwxr-xr-xplugins/data.creationtime.php5
-rwxr-xr-xplugins/data.div.php4
-rwxr-xr-xplugins/data.dropdown.php5
-rwxr-xr-xplugins/data.example.php5
-rwxr-xr-xplugins/data.geshidata.php7
-rwxr-xr-xplugins/data.googleviewer.php7
-rwxr-xr-xplugins/data.graphviz.php17
-rwxr-xr-xplugins/data.img.php3
-rwxr-xr-xplugins/data.include.php4
-rwxr-xr-xplugins/data.jstabs.php7
-rwxr-xr-xplugins/data.ledgertable.php117
-rwxr-xr-xplugins/data.module.php5
-rwxr-xr-xplugins/data.object.php7
-rwxr-xr-xplugins/data.pluginhelp.php3
-rwxr-xr-xplugins/data.pre.php4
-rwxr-xr-xplugins/data.quote.php6
-rwxr-xr-xplugins/data.renderer.php3
-rwxr-xr-xplugins/data.sort.php4
-rwxr-xr-xplugins/data.span.php4
-rwxr-xr-xplugins/data.textarea.php4
-rwxr-xr-xplugins/data.toc.php4
-rwxr-xr-xplugins/data.video.php3
-rwxr-xr-xplugins/data.youtube.php11
-rwxr-xr-xplugins/filter.attachment.php3
-rwxr-xr-xplugins/filter.backtotop.php7
-rwxr-xr-xplugins/filter.bitlinks.php12
-rwxr-xr-xplugins/filter.htmlpurifier.php35
-rwxr-xr-xplugins/filter.maketoc.php7
-rwxr-xr-xplugins/filter.simplepurifier.php2
-rwxr-xr-xplugins/filter.stylepurifier.php8
-rwxr-xr-xplugins/filter.urlcache.php8
-rwxr-xr-xplugins/format.bbcode.php6
-rwxr-xr-xplugins/format.bithtml.php2
-rwxr-xr-xplugins/format.markdown.php2
-rwxr-xr-xplugins/format.simpletext.php2
-rwxr-xr-xplugins/format.tikiwiki.php8
-rwxr-xr-xplugins/mime.application.php5
-rwxr-xr-xplugins/mime.audio.php1
-rwxr-xr-xplugins/mime.default.php6
-rwxr-xr-xplugins/mime.image.php5
-rwxr-xr-xplugins/mime.pbase.php1
-rw-r--r--plugins/mime.pdf.php4
-rwxr-xr-xplugins/mime.video.php9
-rwxr-xr-xplugins/processor.gd.php8
-rwxr-xr-xplugins/processor.imagick.php3
-rwxr-xr-xplugins/processor.magickwand.php1
-rwxr-xr-xplugins/storage.bitfile.php10
-rwxr-xr-x[-rw-r--r--]scripts/LibertyAttachment.js0
-rwxr-xr-x[-rw-r--r--]scripts/LibertyComment.js0
-rwxr-xr-xstructure_add_content.php7
-rwxr-xr-x[-rw-r--r--]templates/action_logs.tpl0
-rwxr-xr-x[-rw-r--r--]templates/admin_liberty.tpl0
-rwxr-xr-x[-rw-r--r--]templates/attachhelp.tpl0
-rwxr-xr-x[-rw-r--r--]templates/attachment_browser.tpl0
-rwxr-xr-x[-rw-r--r--]templates/attachment_browser_json.tpl0
-rwxr-xr-x[-rw-r--r--]templates/attachment_uploader.tpl0
-rwxr-xr-x[-rw-r--r--]templates/attachment_uploader_inc.tpl0
-rwxr-xr-x[-rw-r--r--]templates/attachments.tpl0
-rwxr-xr-x[-rw-r--r--]templates/center_list_generic.tpl0
-rw-r--r--templates/center_recent_comments.php2
-rwxr-xr-x[-rw-r--r--]templates/center_recent_comments.tpl0
-rwxr-xr-x[-rw-r--r--]templates/center_view_generic.tpl0
-rwxr-xr-x[-rw-r--r--]templates/edit_content_alias_inc.tpl0
-rwxr-xr-x[-rw-r--r--]templates/edit_textarea.tpl0
-rwxr-xr-x[-rw-r--r--]templates/html_head_inc.tpl0
-rwxr-xr-x[-rw-r--r--]templates/list_comment_files_inc.tpl0
-rwxr-xr-x[-rw-r--r--]templates/list_content_json.tpl0
-rwxr-xr-x[-rw-r--r--]templates/menu_liberty_admin.tpl0
-rwxr-xr-x[-rw-r--r--]templates/mime/application/view.tpl0
-rwxr-xr-x[-rw-r--r--]templates/mime/audio/edit.tpl0
-rwxr-xr-x[-rw-r--r--]templates/mime/audio/inline.tpl0
-rwxr-xr-x[-rw-r--r--]templates/mime/audio/storage.tpl0
-rwxr-xr-x[-rw-r--r--]templates/mime/audio/view.tpl0
-rwxr-xr-x[-rw-r--r--]templates/mime/default/upload.tpl0
-rwxr-xr-x[-rw-r--r--]templates/mime/default/view.tpl0
-rwxr-xr-x[-rw-r--r--]templates/mime/image/edit.tpl0
-rwxr-xr-x[-rw-r--r--]templates/mime/image/player.tpl0
-rwxr-xr-x[-rw-r--r--]templates/mime/image/view.tpl0
-rwxr-xr-x[-rw-r--r--]templates/mime/pbase/upload.tpl0
-rwxr-xr-x[-rw-r--r--]templates/mime/pdf/admin.tpl0
-rwxr-xr-x[-rw-r--r--]templates/mime/pdf/view.tpl0
-rwxr-xr-x[-rw-r--r--]templates/mime/video/edit.tpl0
-rwxr-xr-x[-rw-r--r--]templates/mime/video/inline.tpl0
-rwxr-xr-x[-rw-r--r--]templates/mime/video/player.tpl0
-rwxr-xr-x[-rw-r--r--]templates/mime/video/storage.tpl0
-rwxr-xr-x[-rw-r--r--]templates/mime/video/view.tpl0
-rwxr-xr-x[-rw-r--r--]templates/plugins/data_code_admin.tpl0
-rwxr-xr-x[-rw-r--r--]templates/plugins/data_toc.tpl0
-rwxr-xr-x[-rw-r--r--]templates/plugins/filter_htmlpurifier_admin.tpl0
-rwxr-xr-x[-rw-r--r--]templates/plugins/filter_simplepurifier_admin.tpl0
-rwxr-xr-x[-rw-r--r--]templates/rankings.tpl0
-rwxr-xr-x[-rw-r--r--]templates/service_content_edit_mini_inc.tpl0
-rwxr-xr-x[-rw-r--r--]templates/structure_add_content.tpl0
-rwxr-xr-x[-rw-r--r--]templates/structure_add_feedback_inc.tpl0
-rwxr-xr-x[-rw-r--r--]templates/structure_edit_content.tpl0
284 files changed, 424 insertions, 461 deletions
diff --git a/.htaccess b/.htaccess
index 47f663d..47f663d 100644..100755
--- a/.htaccess
+++ b/.htaccess
diff --git a/admin/admin_liberty_inc.php b/admin/admin_liberty_inc.php
index 81344a8..a1ad6af 100755
--- a/admin/admin_liberty_inc.php
+++ b/admin/admin_liberty_inc.php
@@ -107,7 +107,6 @@ $imageProcessors = [
];
$gBitSmarty->assign( 'imageProcessors', $imageProcessors );
-
$cacheTimes = [
0 => KernelTools::tra( "(no cache)" ),
60 => "1 " . KernelTools::tra( "minute" ),
@@ -123,7 +122,6 @@ $cacheTimes = [
];
$gBitSmarty->assign( "cacheTimes", $cacheTimes );
-
$formCaptcha = [
"liberty_use_captcha_freecap" => [
'label' => 'Use Freecap',
diff --git a/admin/comments.php b/admin/comments.php
index 1660d42..31fa501 100755
--- a/admin/comments.php
+++ b/admin/comments.php
@@ -40,7 +40,7 @@ if( !empty( $_REQUEST['change_prefs'] ) ) {
simple_set_toggle( $item, LIBERTY_PKG_NAME );
}
- $formValues = array('comments_edit_minutes', 'comments_per_page', 'comments_default_ordering', 'comments_default_display_mode' , 'comments_default_post_lines');
+ $formValues = ['comments_edit_minutes', 'comments_per_page', 'comments_default_ordering', 'comments_default_display_mode' , 'comments_default_post_lines'];
foreach( $formValues as $item ) {
simple_set_value( $item, LIBERTY_PKG_NAME );
}
diff --git a/admin/plugins.php b/admin/plugins.php
index d5a1df5..5aca875 100755
--- a/admin/plugins.php
+++ b/admin/plugins.php
@@ -1,5 +1,6 @@
<?php
namespace Bitweaver\Liberty;
+
require_once '../../kernel/includes/setup_inc.php';
use Bitweaver\KernelTools;
@@ -7,7 +8,7 @@ include_once KERNEL_PKG_INCLUDE_PATH.'simple_form_functions_lib.php';
$gBitSystem->verifyPermission( 'p_admin' );
-// this will clear out all plugin settings in the database. scanAllPlugins
+// this will clear out all plugin settings in the database. scanAllPlugins
// below will then reload all plugins and set them to their default setup.
if( !empty( $_REQUEST['reset_all_plugins'] ) ) {
// because of include_once scenarios in scanAllPlugins, you need two complete page refreshes afternuking the plugin settings
@@ -40,7 +41,6 @@ if( isset( $_REQUEST['pluginsave'] ) && !empty( $_REQUEST['pluginsave'] ) ) {
$gBitSystem->storeConfig( 'content_force_allow_html', !empty( $_REQUEST['content_force_allow_html'] ) ? $_REQUEST['content_force_allow_html'] : null, LIBERTY_PKG_NAME );
}
-
// Sort the plugins to avoild splitting tables
foreach( $gLibertySystem->mPlugins as $guid => $plugin ) {
// since plugins can be in other packages, they can't use package constants. here we re-interpret URLs
diff --git a/admin/plugins/data_code.php b/admin/plugins/data_code.php
index 0709945..8274a94 100755
--- a/admin/plugins/data_code.php
+++ b/admin/plugins/data_code.php
@@ -7,7 +7,7 @@ $gBitSystem->verifyPermission( 'p_admin' );
$feedback = [];
-$sources = array(
+$sources = [
'ASP' => 'ASP',
'ActionScript' => 'ActionScript',
'Ada' => 'Ada',
@@ -62,7 +62,7 @@ $sources = array(
'VisualFoxPro' => 'VisualFoxPro',
'XML' => 'XML',
'ini' => 'ini',
-);
+];
$gBitSmarty->assign( 'sources', $sources );
if( !empty( $_REQUEST['plugin_settings'] )) {
@@ -71,4 +71,4 @@ if( !empty( $_REQUEST['plugin_settings'] )) {
}
$gBitSmarty->assign( 'feedback', $feedback );
-$gBitSystem->display( 'bitpackage:liberty/plugins/data_code_admin.tpl', KernelTools::tra( 'Data Code Plugin Settings' ), array( 'display_mode' => 'admin' ));
+$gBitSystem->display( 'bitpackage:liberty/plugins/data_code_admin.tpl', KernelTools::tra( 'Data Code Plugin Settings' ), [ 'display_mode' => 'admin' ]);
diff --git a/admin/schema_inc.php b/admin/schema_inc.php
index 20e358a..bc56c89 100755
--- a/admin/schema_inc.php
+++ b/admin/schema_inc.php
@@ -238,8 +238,8 @@ foreach( array_keys( $tables ) AS $tableName ) {
// Constraints which must be installed after table creation
$constraints = [
- 'liberty_content_permissions' => array( 'liberty_content_perm_group_ref' => 'FOREIGN KEY (`group_id`) REFERENCES `' . BIT_DB_PREFIX . 'users_groups` (`group_id`)' ),
- 'liberty_process_queue' => array( 'liberty_process_queue_ref' => 'FOREIGN KEY (`content_id`) REFERENCES `' . BIT_DB_PREFIX . 'liberty_content`( `content_id` )' ),
+ 'liberty_content_permissions' => [ 'liberty_content_perm_group_ref' => 'FOREIGN KEY (`group_id`) REFERENCES `' . BIT_DB_PREFIX . 'users_groups` (`group_id`)' ],
+ 'liberty_process_queue' => [ 'liberty_process_queue_ref' => 'FOREIGN KEY (`content_id`) REFERENCES `' . BIT_DB_PREFIX . 'liberty_content`( `content_id` )' ],
];
@@ -272,9 +272,9 @@ $indices = [
];
if ( defined( 'ROLE_MODEL' ) ) {
- $constraints['liberty_content_permissions'] = array('liberty_content_perm_role_ref' => 'FOREIGN KEY (`role_id`) REFERENCES `'.BIT_DB_PREFIX.'users_roles` (`role_id`)');
+ $constraints['liberty_content_permissions'] = ['liberty_content_perm_role_ref' => 'FOREIGN KEY (`role_id`) REFERENCES `'.BIT_DB_PREFIX.'users_roles` (`role_id`)'];
unset($indices['liberty_content_perm_group_idx']);
- $indices['liberty_content_perm_role_idx'] = array( 'table' => 'liberty_content_permissions', 'cols' => 'role_id', 'opts' => null );
+ $indices['liberty_content_perm_role_idx'] = [ 'table' => 'liberty_content_permissions', 'cols' => 'role_id', 'opts' => null ];
}
foreach( array_keys($constraints) AS $tableName ) {
@@ -301,7 +301,7 @@ $sequences = [
$gBitInstaller->registerSchemaSequences( LIBERTY_PKG_NAME, $sequences );
// ### Default Preferences
-$gBitInstaller->registerPreferences( LIBERTY_PKG_NAME, array(
+$gBitInstaller->registerPreferences( LIBERTY_PKG_NAME, [
//array(LIBERTY_PKG_NAME, 'liberty_cache_images','n'),
//array(LIBERTY_PKG_NAME, 'liberty_cache_pages','n'),
[ LIBERTY_PKG_NAME, 'liberty_auto_display_attachment_thumbs', 'small' ],
@@ -312,7 +312,7 @@ $gBitInstaller->registerPreferences( LIBERTY_PKG_NAME, array(
// array(LIBERTY_PKG_NAME, 'liberty_attachment_style', 'standard'),
// The default for new installs is htmlpurifier old stays simple
[ LIBERTY_PKG_NAME, 'liberty_html_purifier', 'htmlpurifier' ],
-) );
+] );
$gBitInstaller->registerSchemaDefault( LIBERTY_PKG_NAME, [
"INSERT INTO `" . BIT_DB_PREFIX . "liberty_content_status` (`content_status_id`,`content_status_name`) VALUES (-999, 'Deleted')",
@@ -332,7 +332,6 @@ $gBitInstaller->registerSchemaDefault( LIBERTY_PKG_NAME, [
"UPDATE `" . BIT_DB_PREFIX . "liberty_content` SET `content_status_id`=50",
] );
-
// ### Default UserPermissions
$gBitInstaller->registerUserPermissions( LIBERTY_PKG_NAME, [
[ 'p_liberty_edit_html_style', 'Can include style information in HTML', 'editors', LIBERTY_PKG_NAME ],
diff --git a/ajax_comments.php b/ajax_comments.php
index e1fb2b1..f99e7f1 100755
--- a/ajax_comments.php
+++ b/ajax_comments.php
@@ -9,6 +9,7 @@
* required setup
*/
namespace Smarty;
+
use Bitweaver\KernelTools;
use Bitweaver\Liberty\LibertyBase;
use Bitweaver\Liberty\LibertyContent;
diff --git a/ajax_edit_storage.php b/ajax_edit_storage.php
index 3bf4eb0..c8c11f3 100755
--- a/ajax_edit_storage.php
+++ b/ajax_edit_storage.php
@@ -27,5 +27,5 @@ if( isset( $_REQUEST['form_id'] ) ){
$gBitSmarty->assign( 'form_id', $_REQUEST['form_id'] );
}
-$gBitSystem->display( 'bitpackage:liberty/edit_storage_list.tpl' , null, array( 'display_mode' => 'edit' ));
+$gBitSystem->display( 'bitpackage:liberty/edit_storage_list.tpl' , null, [ 'display_mode' => 'edit' ]);
?>
diff --git a/attachment_browser.php b/attachment_browser.php
index dc4bda0..48f8059 100755
--- a/attachment_browser.php
+++ b/attachment_browser.php
@@ -32,10 +32,10 @@ if (isset($_REQUEST['attachment_id']) && is_numeric($_REQUEST['attachment_id']))
}else{
// we want a list of user attachments
$listHash = $_REQUEST;
- $listHash = array(
- 'page' => BitBase::verifyId( $_REQUEST['pgnPage'] ?? 0 ) ? $_REQUEST['pgnPage'] : null,
+ $listHash = [
+ 'page' => BitBase::verifyId( $_REQUEST['pgnPage'] ?? 0 ) ? $_REQUEST['pgnPage'] : null,
'load_attached_to' => true,
- );
+ ];
$userAttachments = $gBitUser->getUserAttachments( $listHash );
// Fake the storage assignment for edit_storage_list.tpl
diff --git a/attachment_uploader.php b/attachment_uploader.php
index cc26600..4aa250a 100755
--- a/attachment_uploader.php
+++ b/attachment_uploader.php
@@ -106,5 +106,5 @@ if( isset( $_REQUEST['liberty_attachments']['form_id'] ) ){
$gBitSmarty->assign( 'form_id', $_REQUEST['liberty_attachments']['form_id'] );
}
-echo $gBitSystem->display( 'bitpackage:liberty/attachment_uploader.tpl', null, array( 'format'=>'none', 'display_mode' => 'display' ));
+echo $gBitSystem->display( 'bitpackage:liberty/attachment_uploader.tpl', null, [ 'format'=>'none', 'display_mode' => 'display' ]);
?>
diff --git a/content_permissions.php b/content_permissions.php
index c7f0887..65e1740 100755
--- a/content_permissions.php
+++ b/content_permissions.php
@@ -9,10 +9,10 @@
* bit setup
*/
namespace Smarty;
+
use Bitweaver\BitBase;
use Bitweaver\HttpStatusCodes;
use Bitweaver\KernelTools;
-use Bitweaver\Liberty\LibertyBase;
require_once '../kernel/includes/setup_inc.php';
diff --git a/content_role_permissions.php b/content_role_permissions.php
index 8ea94d7..08fc133 100755
--- a/content_role_permissions.php
+++ b/content_role_permissions.php
@@ -9,6 +9,7 @@
* bit setup
*/
namespace Smarty;
+
use Bitweaver\BitBase;
use Bitweaver\HttpStatusCodes;
@@ -108,4 +109,4 @@ if( $gBitThemes->isAjaxRequest() ) {
die;
}
-$gBitSystem->display( 'bitpackage:liberty/content_role_permissions.tpl', tra( 'Content Permissions' ), array( 'display_mode' => 'display' )); \ No newline at end of file
+$gBitSystem->display( 'bitpackage:liberty/content_role_permissions.tpl', tra( 'Content Permissions' ), [ 'display_mode' => 'display' ]); \ No newline at end of file
diff --git a/download_file.php b/download_file.php
index 2d8ba57..139f19b 100755
--- a/download_file.php
+++ b/download_file.php
@@ -12,9 +12,9 @@
* Setup
*/
namespace Bitweaver\Liberty;
+
use Bitweaver\BitBase;
use Bitweaver\KernelTools;
-use Bitweaver\Liberty\LibertyMime;
require_once '../kernel/includes/setup_inc.php';
// fetch the attachment details
@@ -33,7 +33,7 @@ if( $gContent = LibertyBase::getLibertyObject( $attachment['content_id'] ) ) {
if( $download_function( $attachment )) {
LibertyMime::addDownloadHit( $attachment['attachment_id'] );
die;
- } else {
+ }
if( !empty( $attachment['errors'] )) {
$msg = '';
foreach( $attachment['errors'] as $error ) {
@@ -43,7 +43,7 @@ if( $gContent = LibertyBase::getLibertyObject( $attachment['content_id'] ) ) {
} else {
$gBitSystem->fatalError( KernelTools::tra( 'There was an undetermined problem trying to prepare the file for download.' ));
}
- }
+
} else {
$gBitSystem->fatalError( KernelTools::tra( "No suitable download function found." ));
}
diff --git a/icons/Mind-Reader.swf b/icons/Mind-Reader.swf
index c5e142c..c5e142c 100644..100755
--- a/icons/Mind-Reader.swf
+++ b/icons/Mind-Reader.swf
Binary files differ
diff --git a/icons/active.gif b/icons/active.gif
index 1eacef5..1eacef5 100644..100755
--- a/icons/active.gif
+++ b/icons/active.gif
Binary files differ
diff --git a/icons/active.png b/icons/active.png
index 32c0d59..32c0d59 100644..100755
--- a/icons/active.png
+++ b/icons/active.png
Binary files differ
diff --git a/icons/bitweaver/adodb.gif b/icons/bitweaver/adodb.gif
index de72946..de72946 100644..100755
--- a/icons/bitweaver/adodb.gif
+++ b/icons/bitweaver/adodb.gif
Binary files differ
diff --git a/icons/bitweaver/bitweaver.gif b/icons/bitweaver/bitweaver.gif
index f2e5a41..f2e5a41 100644..100755
--- a/icons/bitweaver/bitweaver.gif
+++ b/icons/bitweaver/bitweaver.gif
Binary files differ
diff --git a/icons/bitweaver/firebird.gif b/icons/bitweaver/firebird.gif
index 54355c8..54355c8 100644..100755
--- a/icons/bitweaver/firebird.gif
+++ b/icons/bitweaver/firebird.gif
Binary files differ
diff --git a/icons/bitweaver/htmlpurifier.gif b/icons/bitweaver/htmlpurifier.gif
index c5fc462..c5fc462 100644..100755
--- a/icons/bitweaver/htmlpurifier.gif
+++ b/icons/bitweaver/htmlpurifier.gif
Binary files differ
diff --git a/icons/bitweaver/htmlpurifier.png b/icons/bitweaver/htmlpurifier.png
index 119c4b9..119c4b9 100644..100755
--- a/icons/bitweaver/htmlpurifier.png
+++ b/icons/bitweaver/htmlpurifier.png
Binary files differ
diff --git a/icons/bitweaver/ie7.gif b/icons/bitweaver/ie7.gif
index 64a2c2d..64a2c2d 100644..100755
--- a/icons/bitweaver/ie7.gif
+++ b/icons/bitweaver/ie7.gif
Binary files differ
diff --git a/icons/bitweaver/large/adodb.gif b/icons/bitweaver/large/adodb.gif
index c5e8dfc..c5e8dfc 100644..100755
--- a/icons/bitweaver/large/adodb.gif
+++ b/icons/bitweaver/large/adodb.gif
Binary files differ
diff --git a/icons/bitweaver/large/bitweaver.gif b/icons/bitweaver/large/bitweaver.gif
index 4741d4a..4741d4a 100644..100755
--- a/icons/bitweaver/large/bitweaver.gif
+++ b/icons/bitweaver/large/bitweaver.gif
Binary files differ
diff --git a/icons/bitweaver/large/bitweaver1.gif b/icons/bitweaver/large/bitweaver1.gif
index f23b9cd..f23b9cd 100644..100755
--- a/icons/bitweaver/large/bitweaver1.gif
+++ b/icons/bitweaver/large/bitweaver1.gif
Binary files differ
diff --git a/icons/bitweaver/large/firebird.gif b/icons/bitweaver/large/firebird.gif
index 183f802..183f802 100644..100755
--- a/icons/bitweaver/large/firebird.gif
+++ b/icons/bitweaver/large/firebird.gif
Binary files differ
diff --git a/icons/bitweaver/large/mysql.gif b/icons/bitweaver/large/mysql.gif
index 0df27f5..0df27f5 100644..100755
--- a/icons/bitweaver/large/mysql.gif
+++ b/icons/bitweaver/large/mysql.gif
Binary files differ
diff --git a/icons/bitweaver/large/oracle.gif b/icons/bitweaver/large/oracle.gif
index 78c78ba..78c78ba 100644..100755
--- a/icons/bitweaver/large/oracle.gif
+++ b/icons/bitweaver/large/oracle.gif
Binary files differ
diff --git a/icons/bitweaver/large/pear.gif b/icons/bitweaver/large/pear.gif
index 8136128..8136128 100644..100755
--- a/icons/bitweaver/large/pear.gif
+++ b/icons/bitweaver/large/pear.gif
Binary files differ
diff --git a/icons/bitweaver/large/pear.png b/icons/bitweaver/large/pear.png
index 3785be1..3785be1 100644..100755
--- a/icons/bitweaver/large/pear.png
+++ b/icons/bitweaver/large/pear.png
Binary files differ
diff --git a/icons/bitweaver/large/postgresql.gif b/icons/bitweaver/large/postgresql.gif
index cec74d9..cec74d9 100644..100755
--- a/icons/bitweaver/large/postgresql.gif
+++ b/icons/bitweaver/large/postgresql.gif
Binary files differ
diff --git a/icons/bitweaver/large/smarty.gif b/icons/bitweaver/large/smarty.gif
index 225d03f..225d03f 100644..100755
--- a/icons/bitweaver/large/smarty.gif
+++ b/icons/bitweaver/large/smarty.gif
Binary files differ
diff --git a/icons/bitweaver/mysql.gif b/icons/bitweaver/mysql.gif
index 4628ae1..4628ae1 100644..100755
--- a/icons/bitweaver/mysql.gif
+++ b/icons/bitweaver/mysql.gif
Binary files differ
diff --git a/icons/bitweaver/oracle.gif b/icons/bitweaver/oracle.gif
index 71f223c..71f223c 100644..100755
--- a/icons/bitweaver/oracle.gif
+++ b/icons/bitweaver/oracle.gif
Binary files differ
diff --git a/icons/bitweaver/pear.gif b/icons/bitweaver/pear.gif
index 4f0c89b..4f0c89b 100644..100755
--- a/icons/bitweaver/pear.gif
+++ b/icons/bitweaver/pear.gif
Binary files differ
diff --git a/icons/bitweaver/pear.png b/icons/bitweaver/pear.png
index 5daa6d8..5daa6d8 100644..100755
--- a/icons/bitweaver/pear.png
+++ b/icons/bitweaver/pear.png
Binary files differ
diff --git a/icons/bitweaver/postgresql.gif b/icons/bitweaver/postgresql.gif
index 402eb81..402eb81 100644..100755
--- a/icons/bitweaver/postgresql.gif
+++ b/icons/bitweaver/postgresql.gif
Binary files differ
diff --git a/icons/bitweaver/smarty.gif b/icons/bitweaver/smarty.gif
index 66b22db..66b22db 100644..100755
--- a/icons/bitweaver/smarty.gif
+++ b/icons/bitweaver/smarty.gif
Binary files differ
diff --git a/icons/busy.gif b/icons/busy.gif
index b7b700e..b7b700e 100644..100755
--- a/icons/busy.gif
+++ b/icons/busy.gif
Binary files differ
diff --git a/icons/collapsed.gif b/icons/collapsed.gif
index 10c64e7..10c64e7 100644..100755
--- a/icons/collapsed.gif
+++ b/icons/collapsed.gif
Binary files differ
diff --git a/icons/directory.gif b/icons/directory.gif
index 91252be..91252be 100644..100755
--- a/icons/directory.gif
+++ b/icons/directory.gif
Binary files differ
diff --git a/icons/directory.png b/icons/directory.png
index ba83dde..ba83dde 100644..100755
--- a/icons/directory.png
+++ b/icons/directory.png
Binary files differ
diff --git a/icons/expanded.gif b/icons/expanded.gif
index 1a3aeff..1a3aeff 100644..100755
--- a/icons/expanded.gif
+++ b/icons/expanded.gif
Binary files differ
diff --git a/icons/generating_thumbnails.gif b/icons/generating_thumbnails.gif
index 7f145e8..7f145e8 100644..100755
--- a/icons/generating_thumbnails.gif
+++ b/icons/generating_thumbnails.gif
Binary files differ
diff --git a/icons/generating_thumbnails.png b/icons/generating_thumbnails.png
index 7dab7cf..7dab7cf 100644..100755
--- a/icons/generating_thumbnails.png
+++ b/icons/generating_thumbnails.png
Binary files differ
diff --git a/icons/index.php b/icons/index.php
index 3e305fe..c0437d0 100644
--- a/icons/index.php
+++ b/icons/index.php
@@ -1,4 +1,4 @@
-<?php
+<?php
// This is not a package.
header ("location: ../index.php");
diff --git a/icons/lulu.gif b/icons/lulu.gif
index b030c98..b030c98 100644..100755
--- a/icons/lulu.gif
+++ b/icons/lulu.gif
Binary files differ
diff --git a/icons/mime/ac3.gif b/icons/mime/ac3.gif
index caafacb..caafacb 100644..100755
--- a/icons/mime/ac3.gif
+++ b/icons/mime/ac3.gif
Binary files differ
diff --git a/icons/mime/arj.gif b/icons/mime/arj.gif
index 7b70a9a..7b70a9a 100644..100755
--- a/icons/mime/arj.gif
+++ b/icons/mime/arj.gif
Binary files differ
diff --git a/icons/mime/asf.gif b/icons/mime/asf.gif
index 793e282..793e282 100644..100755
--- a/icons/mime/asf.gif
+++ b/icons/mime/asf.gif
Binary files differ
diff --git a/icons/mime/avi.gif b/icons/mime/avi.gif
index c4b2caf..c4b2caf 100644..100755
--- a/icons/mime/avi.gif
+++ b/icons/mime/avi.gif
Binary files differ
diff --git a/icons/mime/blank.gif b/icons/mime/blank.gif
index 04cf41c..04cf41c 100644..100755
--- a/icons/mime/blank.gif
+++ b/icons/mime/blank.gif
Binary files differ
diff --git a/icons/mime/blank.png b/icons/mime/blank.png
index 6e66655..6e66655 100644..100755
--- a/icons/mime/blank.png
+++ b/icons/mime/blank.png
Binary files differ
diff --git a/icons/mime/bmp.gif b/icons/mime/bmp.gif
index 248ef70..248ef70 100644..100755
--- a/icons/mime/bmp.gif
+++ b/icons/mime/bmp.gif
Binary files differ
diff --git a/icons/mime/bz2.gif b/icons/mime/bz2.gif
index 8c74849..8c74849 100644..100755
--- a/icons/mime/bz2.gif
+++ b/icons/mime/bz2.gif
Binary files differ
diff --git a/icons/mime/crv.gif b/icons/mime/crv.gif
index 8ea7155..8ea7155 100644..100755
--- a/icons/mime/crv.gif
+++ b/icons/mime/crv.gif
Binary files differ
diff --git a/icons/mime/crv.png b/icons/mime/crv.png
index 06c669c..06c669c 100644..100755
--- a/icons/mime/crv.png
+++ b/icons/mime/crv.png
Binary files differ
diff --git a/icons/mime/css.gif b/icons/mime/css.gif
index b8518ea..b8518ea 100644..100755
--- a/icons/mime/css.gif
+++ b/icons/mime/css.gif
Binary files differ
diff --git a/icons/mime/css.png b/icons/mime/css.png
index 41cc592..41cc592 100644..100755
--- a/icons/mime/css.png
+++ b/icons/mime/css.png
Binary files differ
diff --git a/icons/mime/doc.gif b/icons/mime/doc.gif
index 1ff7f03..1ff7f03 100644..100755
--- a/icons/mime/doc.gif
+++ b/icons/mime/doc.gif
Binary files differ
diff --git a/icons/mime/dxf.gif b/icons/mime/dxf.gif
index 12f7bc5..12f7bc5 100644..100755
--- a/icons/mime/dxf.gif
+++ b/icons/mime/dxf.gif
Binary files differ
diff --git a/icons/mime/dxf.png b/icons/mime/dxf.png
index 6aadd2d..6aadd2d 100644..100755
--- a/icons/mime/dxf.png
+++ b/icons/mime/dxf.png
Binary files differ
diff --git a/icons/mime/exe.gif b/icons/mime/exe.gif
index b12bed1..b12bed1 100644..100755
--- a/icons/mime/exe.gif
+++ b/icons/mime/exe.gif
Binary files differ
diff --git a/icons/mime/fcstd.gif b/icons/mime/fcstd.gif
index b157c66..b157c66 100644..100755
--- a/icons/mime/fcstd.gif
+++ b/icons/mime/fcstd.gif
Binary files differ
diff --git a/icons/mime/fcstd.png b/icons/mime/fcstd.png
index b3b0bc7..b3b0bc7 100644..100755
--- a/icons/mime/fcstd.png
+++ b/icons/mime/fcstd.png
Binary files differ
diff --git a/icons/mime/gbr.gif b/icons/mime/gbr.gif
index 0d94bf5..0d94bf5 100644..100755
--- a/icons/mime/gbr.gif
+++ b/icons/mime/gbr.gif
Binary files differ
diff --git a/icons/mime/gbr.png b/icons/mime/gbr.png
index ea75e17..ea75e17 100644..100755
--- a/icons/mime/gbr.png
+++ b/icons/mime/gbr.png
Binary files differ
diff --git a/icons/mime/generic.gif b/icons/mime/generic.gif
index e9d067f..e9d067f 100644..100755
--- a/icons/mime/generic.gif
+++ b/icons/mime/generic.gif
Binary files differ
diff --git a/icons/mime/generic.png b/icons/mime/generic.png
index 017a541..017a541 100644..100755
--- a/icons/mime/generic.png
+++ b/icons/mime/generic.png
Binary files differ
diff --git a/icons/mime/gif.gif b/icons/mime/gif.gif
index 9550a4c..9550a4c 100644..100755
--- a/icons/mime/gif.gif
+++ b/icons/mime/gif.gif
Binary files differ
diff --git a/icons/mime/gz.gif b/icons/mime/gz.gif
index c6014e2..c6014e2 100644..100755
--- a/icons/mime/gz.gif
+++ b/icons/mime/gz.gif
Binary files differ
diff --git a/icons/mime/htm.gif b/icons/mime/htm.gif
index 385626b..385626b 100644..100755
--- a/icons/mime/htm.gif
+++ b/icons/mime/htm.gif
Binary files differ
diff --git a/icons/mime/htm.png b/icons/mime/htm.png
index 63f3c95..63f3c95 100644..100755
--- a/icons/mime/htm.png
+++ b/icons/mime/htm.png
Binary files differ
diff --git a/icons/mime/html.gif b/icons/mime/html.gif
index 385626b..385626b 100644..100755
--- a/icons/mime/html.gif
+++ b/icons/mime/html.gif
Binary files differ
diff --git a/icons/mime/html.png b/icons/mime/html.png
index 63f3c95..63f3c95 100644..100755
--- a/icons/mime/html.png
+++ b/icons/mime/html.png
Binary files differ
diff --git a/icons/mime/igs.gif b/icons/mime/igs.gif
index 2462113..2462113 100644..100755
--- a/icons/mime/igs.gif
+++ b/icons/mime/igs.gif
Binary files differ
diff --git a/icons/mime/igs.png b/icons/mime/igs.png
index 9faaa0a..9faaa0a 100644..100755
--- a/icons/mime/igs.png
+++ b/icons/mime/igs.png
Binary files differ
diff --git a/icons/mime/iso.gif b/icons/mime/iso.gif
index 2515b3d..2515b3d 100644..100755
--- a/icons/mime/iso.gif
+++ b/icons/mime/iso.gif
Binary files differ
diff --git a/icons/mime/jar.gif b/icons/mime/jar.gif
index e3c842e..e3c842e 100644..100755
--- a/icons/mime/jar.gif
+++ b/icons/mime/jar.gif
Binary files differ
diff --git a/icons/mime/jpeg.gif b/icons/mime/jpeg.gif
index 657e0d5..657e0d5 100644..100755
--- a/icons/mime/jpeg.gif
+++ b/icons/mime/jpeg.gif
Binary files differ
diff --git a/icons/mime/jpg.gif b/icons/mime/jpg.gif
index 657e0d5..657e0d5 100644..100755
--- a/icons/mime/jpg.gif
+++ b/icons/mime/jpg.gif
Binary files differ
diff --git a/icons/mime/js.gif b/icons/mime/js.gif
index 6c89453..6c89453 100644..100755
--- a/icons/mime/js.gif
+++ b/icons/mime/js.gif
Binary files differ
diff --git a/icons/mime/mov.gif b/icons/mime/mov.gif
index 67f37fd..67f37fd 100644..100755
--- a/icons/mime/mov.gif
+++ b/icons/mime/mov.gif
Binary files differ
diff --git a/icons/mime/mp3.gif b/icons/mime/mp3.gif
index 636d831..636d831 100644..100755
--- a/icons/mime/mp3.gif
+++ b/icons/mime/mp3.gif
Binary files differ
diff --git a/icons/mime/mp3.png b/icons/mime/mp3.png
index afb7e1b..afb7e1b 100644..100755
--- a/icons/mime/mp3.png
+++ b/icons/mime/mp3.png
Binary files differ
diff --git a/icons/mime/mpeg.gif b/icons/mime/mpeg.gif
index 0b724ce..0b724ce 100644..100755
--- a/icons/mime/mpeg.gif
+++ b/icons/mime/mpeg.gif
Binary files differ
diff --git a/icons/mime/mpg.gif b/icons/mime/mpg.gif
index 0b724ce..0b724ce 100644..100755
--- a/icons/mime/mpg.gif
+++ b/icons/mime/mpg.gif
Binary files differ
diff --git a/icons/mime/mpg.png b/icons/mime/mpg.png
index f7dbd23..f7dbd23 100644..100755
--- a/icons/mime/mpg.png
+++ b/icons/mime/mpg.png
Binary files differ
diff --git a/icons/mime/ogg.gif b/icons/mime/ogg.gif
index 2532b97..2532b97 100644..100755
--- a/icons/mime/ogg.gif
+++ b/icons/mime/ogg.gif
Binary files differ
diff --git a/icons/mime/pcb.gif b/icons/mime/pcb.gif
index d752447..d752447 100644..100755
--- a/icons/mime/pcb.gif
+++ b/icons/mime/pcb.gif
Binary files differ
diff --git a/icons/mime/pcb.png b/icons/mime/pcb.png
index ecaac9a..ecaac9a 100644..100755
--- a/icons/mime/pcb.png
+++ b/icons/mime/pcb.png
Binary files differ
diff --git a/icons/mime/pdf.gif b/icons/mime/pdf.gif
index 61cb28c..61cb28c 100644..100755
--- a/icons/mime/pdf.gif
+++ b/icons/mime/pdf.gif
Binary files differ
diff --git a/icons/mime/pdf.png b/icons/mime/pdf.png
index 4e4725c..4e4725c 100644..100755
--- a/icons/mime/pdf.png
+++ b/icons/mime/pdf.png
Binary files differ
diff --git a/icons/mime/php.gif b/icons/mime/php.gif
index 127777c..127777c 100644..100755
--- a/icons/mime/php.gif
+++ b/icons/mime/php.gif
Binary files differ
diff --git a/icons/mime/plain.gif b/icons/mime/plain.gif
index 2107033..2107033 100644..100755
--- a/icons/mime/plain.gif
+++ b/icons/mime/plain.gif
Binary files differ
diff --git a/icons/mime/plain.png b/icons/mime/plain.png
index bfe4bad..bfe4bad 100644..100755
--- a/icons/mime/plain.png
+++ b/icons/mime/plain.png
Binary files differ
diff --git a/icons/mime/png.gif b/icons/mime/png.gif
index 838fc02..838fc02 100644..100755
--- a/icons/mime/png.gif
+++ b/icons/mime/png.gif
Binary files differ
diff --git a/icons/mime/ppt.gif b/icons/mime/ppt.gif
index 0375753..0375753 100644..100755
--- a/icons/mime/ppt.gif
+++ b/icons/mime/ppt.gif
Binary files differ
diff --git a/icons/mime/psd.gif b/icons/mime/psd.gif
index 91970d7..91970d7 100644..100755
--- a/icons/mime/psd.gif
+++ b/icons/mime/psd.gif
Binary files differ
diff --git a/icons/mime/rar.gif b/icons/mime/rar.gif
index 3763a80..3763a80 100644..100755
--- a/icons/mime/rar.gif
+++ b/icons/mime/rar.gif
Binary files differ
diff --git a/icons/mime/rpm.gif b/icons/mime/rpm.gif
index 869bf8a..869bf8a 100644..100755
--- a/icons/mime/rpm.gif
+++ b/icons/mime/rpm.gif
Binary files differ
diff --git a/icons/mime/rtf.gif b/icons/mime/rtf.gif
index f4d4a28..f4d4a28 100644..100755
--- a/icons/mime/rtf.gif
+++ b/icons/mime/rtf.gif
Binary files differ
diff --git a/icons/mime/sch.gif b/icons/mime/sch.gif
index d32ca99..d32ca99 100644..100755
--- a/icons/mime/sch.gif
+++ b/icons/mime/sch.gif
Binary files differ
diff --git a/icons/mime/sch.png b/icons/mime/sch.png
index d727b91..d727b91 100644..100755
--- a/icons/mime/sch.png
+++ b/icons/mime/sch.png
Binary files differ
diff --git a/icons/mime/sh.gif b/icons/mime/sh.gif
index 46eebae..46eebae 100644..100755
--- a/icons/mime/sh.gif
+++ b/icons/mime/sh.gif
Binary files differ
diff --git a/icons/mime/sql.gif b/icons/mime/sql.gif
index 77006e6..77006e6 100644..100755
--- a/icons/mime/sql.gif
+++ b/icons/mime/sql.gif
Binary files differ
diff --git a/icons/mime/stl.gif b/icons/mime/stl.gif
index a3ee7e9..a3ee7e9 100644..100755
--- a/icons/mime/stl.gif
+++ b/icons/mime/stl.gif
Binary files differ
diff --git a/icons/mime/stl.png b/icons/mime/stl.png
index 482b6e0..482b6e0 100644..100755
--- a/icons/mime/stl.png
+++ b/icons/mime/stl.png
Binary files differ
diff --git a/icons/mime/svg.gif b/icons/mime/svg.gif
index 1bb2999..1bb2999 100644..100755
--- a/icons/mime/svg.gif
+++ b/icons/mime/svg.gif
Binary files differ
diff --git a/icons/mime/swf.gif b/icons/mime/swf.gif
index 1333638..1333638 100644..100755
--- a/icons/mime/swf.gif
+++ b/icons/mime/swf.gif
Binary files differ
diff --git a/icons/mime/swf.png b/icons/mime/swf.png
index 9c653f7..9c653f7 100644..100755
--- a/icons/mime/swf.png
+++ b/icons/mime/swf.png
Binary files differ
diff --git a/icons/mime/tar.gif b/icons/mime/tar.gif
index ac61cab..ac61cab 100644..100755
--- a/icons/mime/tar.gif
+++ b/icons/mime/tar.gif
Binary files differ
diff --git a/icons/mime/tcw.gif b/icons/mime/tcw.gif
index 393f01c..393f01c 100644..100755
--- a/icons/mime/tcw.gif
+++ b/icons/mime/tcw.gif
Binary files differ
diff --git a/icons/mime/tcw.png b/icons/mime/tcw.png
index 49bdf18..49bdf18 100644..100755
--- a/icons/mime/tcw.png
+++ b/icons/mime/tcw.png
Binary files differ
diff --git a/icons/mime/tif.gif b/icons/mime/tif.gif
index 395f26b..395f26b 100644..100755
--- a/icons/mime/tif.gif
+++ b/icons/mime/tif.gif
Binary files differ
diff --git a/icons/mime/tiff.gif b/icons/mime/tiff.gif
index 395f26b..395f26b 100644..100755
--- a/icons/mime/tiff.gif
+++ b/icons/mime/tiff.gif
Binary files differ
diff --git a/icons/mime/txt.gif b/icons/mime/txt.gif
index 2107033..2107033 100644..100755
--- a/icons/mime/txt.gif
+++ b/icons/mime/txt.gif
Binary files differ
diff --git a/icons/mime/vector-blank.png b/icons/mime/vector-blank.png
index 1907c43..1907c43 100644..100755
--- a/icons/mime/vector-blank.png
+++ b/icons/mime/vector-blank.png
Binary files differ
diff --git a/icons/mime/wmv.gif b/icons/mime/wmv.gif
index f22a115..f22a115 100644..100755
--- a/icons/mime/wmv.gif
+++ b/icons/mime/wmv.gif
Binary files differ
diff --git a/icons/mime/xls.gif b/icons/mime/xls.gif
index 3923e3d..3923e3d 100644..100755
--- a/icons/mime/xls.gif
+++ b/icons/mime/xls.gif
Binary files differ
diff --git a/icons/mime/xml.gif b/icons/mime/xml.gif
index d5a3ec9..d5a3ec9 100644..100755
--- a/icons/mime/xml.gif
+++ b/icons/mime/xml.gif
Binary files differ
diff --git a/icons/mime/zip.gif b/icons/mime/zip.gif
index 6808784..6808784 100644..100755
--- a/icons/mime/zip.gif
+++ b/icons/mime/zip.gif
Binary files differ
diff --git a/icons/mime/zip.png b/icons/mime/zip.png
index b346812..b346812 100644..100755
--- a/icons/mime/zip.png
+++ b/icons/mime/zip.png
Binary files differ
diff --git a/icons/move.gif b/icons/move.gif
index 02129d9..02129d9 100644..100755
--- a/icons/move.gif
+++ b/icons/move.gif
Binary files differ
diff --git a/icons/move_down.gif b/icons/move_down.gif
index 12613b2..12613b2 100644..100755
--- a/icons/move_down.gif
+++ b/icons/move_down.gif
Binary files differ
diff --git a/icons/move_down.png b/icons/move_down.png
index 8d13da6..8d13da6 100644..100755
--- a/icons/move_down.png
+++ b/icons/move_down.png
Binary files differ
diff --git a/icons/move_left.gif b/icons/move_left.gif
index 0faed06..0faed06 100644..100755
--- a/icons/move_left.gif
+++ b/icons/move_left.gif
Binary files differ
diff --git a/icons/move_left.png b/icons/move_left.png
index ba2fa18..ba2fa18 100644..100755
--- a/icons/move_left.png
+++ b/icons/move_left.png
Binary files differ
diff --git a/icons/move_left_right.gif b/icons/move_left_right.gif
index a16f202..a16f202 100644..100755
--- a/icons/move_left_right.gif
+++ b/icons/move_left_right.gif
Binary files differ
diff --git a/icons/move_left_right.png b/icons/move_left_right.png
index 8450ccb..8450ccb 100644..100755
--- a/icons/move_left_right.png
+++ b/icons/move_left_right.png
Binary files differ
diff --git a/icons/move_right.gif b/icons/move_right.gif
index eb8713d..eb8713d 100644..100755
--- a/icons/move_right.gif
+++ b/icons/move_right.gif
Binary files differ
diff --git a/icons/move_right.png b/icons/move_right.png
index 4313173..4313173 100644..100755
--- a/icons/move_right.png
+++ b/icons/move_right.png
Binary files differ
diff --git a/icons/move_up.gif b/icons/move_up.gif
index 8bc6b90..8bc6b90 100644..100755
--- a/icons/move_up.gif
+++ b/icons/move_up.gif
Binary files differ
diff --git a/icons/move_up.png b/icons/move_up.png
index d78a2ea..d78a2ea 100644..100755
--- a/icons/move_up.png
+++ b/icons/move_up.png
Binary files differ
diff --git a/icons/paypal/btn_cart_LG.gif b/icons/paypal/btn_cart_LG.gif
new file mode 100755
index 0000000..c78d3d6
--- /dev/null
+++ b/icons/paypal/btn_cart_LG.gif
Binary files differ
diff --git a/icons/paypal/btn_subscribeCC_LG.gif b/icons/paypal/btn_subscribeCC_LG.gif
new file mode 100755
index 0000000..351416f
--- /dev/null
+++ b/icons/paypal/btn_subscribeCC_LG.gif
Binary files differ
diff --git a/icons/paypal/sc-but-03-de.gif b/icons/paypal/sc-but-03-de.gif
new file mode 100755
index 0000000..9c6f2d9
--- /dev/null
+++ b/icons/paypal/sc-but-03-de.gif
Binary files differ
diff --git a/icons/paypal/sc-but-03.gif b/icons/paypal/sc-but-03.gif
new file mode 100755
index 0000000..9722f60
--- /dev/null
+++ b/icons/paypal/sc-but-03.gif
Binary files differ
diff --git a/icons/paypal/view_cart-de.gif b/icons/paypal/view_cart-de.gif
new file mode 100755
index 0000000..350adcf
--- /dev/null
+++ b/icons/paypal/view_cart-de.gif
Binary files differ
diff --git a/icons/paypal/view_cart.gif b/icons/paypal/view_cart.gif
new file mode 100755
index 0000000..badd76f
--- /dev/null
+++ b/icons/paypal/view_cart.gif
Binary files differ
diff --git a/icons/pbase.gif b/icons/pbase.gif
index c3566f8..c3566f8 100644..100755
--- a/icons/pbase.gif
+++ b/icons/pbase.gif
Binary files differ
diff --git a/icons/pkg_global.gif b/icons/pkg_global.gif
index 260c6f7..260c6f7 100644..100755
--- a/icons/pkg_global.gif
+++ b/icons/pkg_global.gif
Binary files differ
diff --git a/icons/pkg_global.png b/icons/pkg_global.png
index 88f22d3..88f22d3 100644..100755
--- a/icons/pkg_global.png
+++ b/icons/pkg_global.png
Binary files differ
diff --git a/icons/pkg_liberty.gif b/icons/pkg_liberty.gif
index 86b9de2..86b9de2 100644..100755
--- a/icons/pkg_liberty.gif
+++ b/icons/pkg_liberty.gif
Binary files differ
diff --git a/icons/pkg_liberty.png b/icons/pkg_liberty.png
index c6e2d81..c6e2d81 100644..100755
--- a/icons/pkg_liberty.png
+++ b/icons/pkg_liberty.png
Binary files differ
diff --git a/icons/spacer.gif b/icons/spacer.gif
index 45b7594..45b7594 100644..100755
--- a/icons/spacer.gif
+++ b/icons/spacer.gif
Binary files differ
diff --git a/icons/spacer_large.gif b/icons/spacer_large.gif
index e0144fb..e0144fb 100644..100755
--- a/icons/spacer_large.gif
+++ b/icons/spacer_large.gif
Binary files differ
diff --git a/icons/spacer_small.gif b/icons/spacer_small.gif
index b9f1859..b9f1859 100644..100755
--- a/icons/spacer_small.gif
+++ b/icons/spacer_small.gif
Binary files differ
diff --git a/icons/spy.gif b/icons/spy.gif
index dc18436..dc18436 100644..100755
--- a/icons/spy.gif
+++ b/icons/spy.gif
Binary files differ
diff --git a/includes/bit_setup_inc.php b/includes/bit_setup_inc.php
index 1934883..20e86c1 100755
--- a/includes/bit_setup_inc.php
+++ b/includes/bit_setup_inc.php
@@ -8,6 +8,7 @@
* @subpackage functions
*/
namespace Bitweaver\Liberty;
+
use Bitweaver\BitBase;
use Bitweaver\KernelTools;
@@ -37,8 +38,8 @@ if( $gLibertySystem->mDb->isValid() ) { // install condition check
}
}
-$gLibertySystem->registerService( 'liberty',
- LIBERTY_PKG_NAME,
+$gLibertySystem->registerService( 'liberty',
+ LIBERTY_PKG_NAME,
[
'content_edit_mini_tpl' => 'bitpackage:liberty/service_content_edit_mini_inc.tpl',
'content_edit_tab_tpl' => 'bitpackage:liberty/service_content_edit_tab_inc.tpl',
@@ -52,10 +53,10 @@ $gLibertySystem->registerService( 'liberty',
'content_list_sql_function' => 'liberty_content_list_sql',
'content_preview_function' => 'liberty_content_preview',
],
- [
+ [
'description' => KernelTools::tra( 'Provides core functionality, including enforcing some access control and dynamic layout components.' ),
'required' => true,
- ]
+ ],
);
// delete cache file if requested
diff --git a/includes/classes/LibertyBase.php b/includes/classes/LibertyBase.php
index dc585a4..7bdcbef 100755
--- a/includes/classes/LibertyBase.php
+++ b/includes/classes/LibertyBase.php
@@ -22,6 +22,7 @@
* required setup
*/
namespace Bitweaver\Liberty;
+
use Bitweaver\BitBase;
/**
@@ -80,7 +81,7 @@ class LibertyBase extends BitBase {
$typeClass = null;
$pContentId = preg_replace( '/[\D]/', '', $pContentId );
if( empty( $pContentTypeGuid ) ) {
- $pContentTypeGuid = $gLibertySystem->mDb->getOne( "SELECT `content_type_guid` FROM `".BIT_DB_PREFIX."liberty_content` WHERE `content_id`=?", array( $pContentId ), null, null, 3600 );
+ $pContentTypeGuid = $gLibertySystem->mDb->getOne( "SELECT `content_type_guid` FROM `".BIT_DB_PREFIX."liberty_content` WHERE `content_id`=?", [ $pContentId ], null, null, 3600 );
}
if( !empty( $pContentTypeGuid ) && isset( $gLibertySystem->mContentTypes[$pContentTypeGuid] ) ) {
$typeClass = $gLibertySystem->getContentClassName( $pContentTypeGuid );
diff --git a/includes/classes/LibertyComment.php b/includes/classes/LibertyComment.php
index c0d7060..73c7612 100755
--- a/includes/classes/LibertyComment.php
+++ b/includes/classes/LibertyComment.php
@@ -11,6 +11,7 @@
* required setup
*/
namespace Bitweaver\Liberty;
+
use Bitweaver\BitBase;
use Bitweaver\KernelTools;
@@ -48,7 +49,6 @@ class LibertyComment extends LibertyMime {
}
}
-
public function __sleep() {
return array_merge( parent::__sleep(), [ 'mCommentId', 'mRootObj' ] );
}
@@ -149,10 +149,10 @@ class LibertyComment extends LibertyMime {
$this->mErrors['comment_attachments'] = KernelTools::tra( 'Files can not be uploaded with comments.' );
}
- // if we have an error we get them all by checking parent classes for additional errors
- if( count( $this->mErrors ) > 0 ){
- parent::verify( $pParamHash );
- }
+ // if we have an error we get them all by checking parent classes for additional errors
+ if( count( $this->mErrors ) > 0 ){
+ parent::verify( $pParamHash );
+ }
return count($this->mErrors) == 0;
}
@@ -179,7 +179,7 @@ class LibertyComment extends LibertyMime {
$this->mInfo['thread_forward_sequence'] = $parent_sequence_forward . sprintf("%09d.",$this->mCommentId);
$this->mInfo['thread_reverse_sequence'] = strtr($parent_sequence_forward . sprintf("%09d.",$this->mCommentId),
- '0123456789', '9876543210');
+ '0123456789', '9876543210', );
$sql = "INSERT INTO `".BIT_DB_PREFIX."liberty_comments` (`comment_id`, `content_id`, `parent_id`, `root_id`, `anon_name`, `thread_forward_sequence`, `thread_reverse_sequence`) VALUES (?,?,?,?,?,?,?)";
@@ -211,7 +211,6 @@ class LibertyComment extends LibertyMime {
return count($this->mErrors) == 0;
}
-
// This is a highly specialized method only used for emailing list synchronization. If you don't know anything about this, just move along and live in bliss
// (Hint: see mailing list integreation in boards)
function storeMessageId( $pMessageId ) {
@@ -235,7 +234,6 @@ class LibertyComment extends LibertyMime {
// $result = $this->mDb->query( $query, [ $this->getField( 'content_id' ) ] );
}
-
$sql = "DELETE FROM `".BIT_DB_PREFIX."liberty_comments` WHERE `comment_id` = ?";
$rs = $this->mDb->query($sql, [ $this->mCommentId ]);
@@ -335,11 +333,11 @@ class LibertyComment extends LibertyMime {
return $this->userCanEdit() || ($pRootContent && ($pRootContent->hasUserPermission( 'p_liberty_edit_comments' ) || $pRootContent->hasUserPermission( 'p_liberty_admin_comments' )));
}
- /**
- * @param string pLinkText name of
- * @param array pParamHash different possibilities depending on derived class
- * @return string the link to display the page.
- */
+ /**
+ * @param string pLinkText name of
+ * @param array pParamHash different possibilities depending on derived class
+ * @return string the link to display the page.
+ */
public static function getDisplayUrlFromHash( &$pParamHash ) {
$ret = null;
if( BitBase::verifyId( $pParamHash['root_id'] ) && $viewContent = LibertyBase::getLibertyObject( $pParamHash['root_id'] ) ) {
@@ -503,7 +501,6 @@ class LibertyComment extends LibertyMime {
return $ret;
}
-
function getNumComments($pContentId = null) {
$bindVars = null;
if (!$pContentId && $this->mContentId) {
@@ -556,10 +553,9 @@ class LibertyComment extends LibertyMime {
return $commentCount;
}
-
// used for direct access to view a single comment
// see usage in: liberty/comments_inc.php
- // there ought to be a better way to do this...
+ // there ought to be a better way to do this...
function getNumComments_upto($pCommentId = null, $pContentId = null) {
$comment = new LibertyComment($pCommentId, $pContentId);
@@ -655,7 +651,7 @@ class LibertyComment extends LibertyMime {
// get attachments for each comment
global $gLibertySystem;
$query = "SELECT * FROM `".BIT_DB_PREFIX."liberty_attachments` la WHERE la.`content_id`=? ORDER BY la.`pos` ASC, la.`attachment_id` ASC";
- if( $result2 = $this->mDb->query( $query,array( (int)$row['content_id'] ))) {
+ if( $result2 = $this->mDb->query( $query,[ (int)$row['content_id'] ])) {
while( $row2 = $result2->fetchRow() ) {
if( $func = $gLibertySystem->getPluginFunction( $row2['attachment_plugin_guid'], 'load_function', 'mime' )) {
// we will pass the preferences by reference that the plugin can easily update them
@@ -690,8 +686,8 @@ class LibertyComment extends LibertyMime {
return '{quote format_guid="'.$this->mInfo['format_guid'].'" comment_id="'.$this->mCommentId.'" user="'.$this->mInfo['login'].'"}'.trim($data).'{/quote}';
}
- // Basic formatting for quoting comments
- function quoteComment($commentData) {
+ // Basic formatting for quoting comments
+ function quoteComment($commentData) {
$ret = '> '.$commentData;
$ret = mb_eregi_replace("\n", "\n>", $ret);
return $ret;
diff --git a/includes/classes/LibertyContent.php b/includes/classes/LibertyContent.php
index 854847c..cc8cdb7 100755
--- a/includes/classes/LibertyContent.php
+++ b/includes/classes/LibertyContent.php
@@ -22,6 +22,7 @@
* required setup
*/
namespace Bitweaver\Liberty;
+
use Bitweaver\BitBase;
use Bitweaver\BitCacheable;
use Bitweaver\BitSystem;
@@ -132,7 +133,6 @@ class LibertyContent extends LibertyBase implements BitCacheable {
return !$gBitSystem->isLive();
}
-
public function isCacheableObject() {
return parent::isCacheableObject() && !empty( $this->mContentId );
}
@@ -410,7 +410,6 @@ class LibertyContent extends LibertyBase implements BitCacheable {
// store any messages in the logs
$this->storeActionLog( $pParamHash );
-
$this->CompleteTrans();
}
return count( $this->mErrors ) == 0;
@@ -432,7 +431,7 @@ class LibertyContent extends LibertyBase implements BitCacheable {
}
}
parent::expunge();
- return;
+
}
/**
@@ -636,8 +635,8 @@ class LibertyContent extends LibertyBase implements BitCacheable {
$data = [];
while( !$result->EOF ) {
$aux = $result->fields;
- $aux['creator'] = isset( $aux['creator_real_name'] ) ? $aux['creator_real_name'] : $aux['creator_user'];
- $aux['editor'] = isset( $aux['modifier_real_name'] ) ? $aux['modifier_real_name'] : $aux['modifier_user'];
+ $aux['creator'] = $aux['creator_real_name'] ?? $aux['creator_user'];
+ $aux['editor'] = $aux['modifier_real_name'] ?? $aux['modifier_user'];
$data[] = $aux;
//array_push( $ret, $aux );
$result->MoveNext();
@@ -676,10 +675,10 @@ class LibertyContent extends LibertyBase implements BitCacheable {
$res = $result->fetchRow();
$this->rollbackVersion( $res["version"] );
$this->expungeVersion( $res["version"] );
- } else {
+ }
// @TODO Build missing function
// $this->remove_all_versions($page);
- }
+
$action = "Removed last version";
$t = $gBitSystem->getUTCTime();
$query = "insert into `".BIT_DB_PREFIX."liberty_action_log`( `log_message`, `content_id`, `last_modified`, `user_id`, `ip`, `error_message`) values( ?, ?, ?, ?, ?, ?)";
@@ -842,7 +841,7 @@ class LibertyContent extends LibertyBase implements BitCacheable {
} elseif( $this->isValid() && @$this->verifyId( $this->mInfo['user_id'] ?? 0 ) ) {
$user_id = $this->mInfo['user_id'];
} else {
- $user_id = ANONYMOUS_USER_ID;
+ $user_id = ANONYMOUS_USER_ID;
}
return $user_id != ANONYMOUS_USER_ID && BitBase::verifyId( $user_id ) && $user_id == $gBitUser->mUserId;
}
@@ -1180,7 +1179,6 @@ class LibertyContent extends LibertyBase implements BitCacheable {
}
}
-
// -------------------------------- Content Permission Functions
/**
@@ -1370,7 +1368,7 @@ class LibertyContent extends LibertyBase implements BitCacheable {
INNER JOIN `".BIT_DB_PREFIX."liberty_content` lc ON( lcperm.`content_id`=lc.`content_id` )
LEFT OUTER JOIN `".BIT_DB_PREFIX."users_permissions` up ON( up.`perm_name`=lcperm.`perm_name` )
ORDER BY ".$gBitSystem->mDb->convertSortmode( 'content_type_guid_asc' ).", ".$gBitSystem->mDb->convertSortmode( 'title_asc' );
-
+
$perms = $gBitSystem->mDb->getAll( $query );
foreach( $perms as $perm ) {
$ret[$perm['content_type_guid']][$perm['content_id']][] = $perm;
@@ -1468,9 +1466,9 @@ class LibertyContent extends LibertyBase implements BitCacheable {
global $gBitSystem;
if( $this->hasAdminPermission( $pVerifyAccessControl ) ) {
return true;
- } else {
- $gBitSystem->fatalPermission( $this->mAdminContentPerm );
}
+ $gBitSystem->fatalPermission( $this->mAdminContentPerm );
+
return false;
}
@@ -1493,9 +1491,9 @@ class LibertyContent extends LibertyBase implements BitCacheable {
global $gBitSystem;
if( $this->hasExpungePermission( $pVerifyAccessControl ) ) {
return true;
- } else {
- $gBitSystem->fatalPermission( $this->mExpungeContentPerm );
}
+ $gBitSystem->fatalPermission( $this->mExpungeContentPerm );
+
return false;
}
@@ -1530,9 +1528,9 @@ class LibertyContent extends LibertyBase implements BitCacheable {
global $gBitSystem;
if( $this->hasUpdatePermission( $pVerifyAccessControl ) ) {
return true;
- } else {
- $gBitSystem->fatalPermission( $this->mUpdateContentPerm );
}
+ $gBitSystem->fatalPermission( $this->mUpdateContentPerm );
+
return false;
}
@@ -1565,9 +1563,9 @@ class LibertyContent extends LibertyBase implements BitCacheable {
global $gBitSystem;
if( !$this->isValid() && $this->hasCreatePermission( $pVerifyAccessControl ) ) {
return true;
- } else {
- $gBitSystem->fatalPermission( $this->mCreateContentPerm );
}
+ $gBitSystem->fatalPermission( $this->mCreateContentPerm );
+
return false;
}
@@ -1593,9 +1591,9 @@ class LibertyContent extends LibertyBase implements BitCacheable {
global $gBitSystem;
if( $this->hasViewPermission( $pVerifyAccessControl ) ) {
return true;
- } else {
- $gBitSystem->fatalPermission( $this->mViewContentPerm );
}
+ $gBitSystem->fatalPermission( $this->mViewContentPerm );
+
return false;
}
@@ -1617,7 +1615,7 @@ class LibertyContent extends LibertyBase implements BitCacheable {
*/
public function verifyPostCommentsPermission( $pVerifyAccessControl=true ) {
global $gBitSystem;
-// @TODO Missing function
+// @TODO Missing function
/* if( $this->hasPostCommentPermission( $pVerifyAccessControl ) ) {
return true;
} else {
@@ -1759,7 +1757,6 @@ class LibertyContent extends LibertyBase implements BitCacheable {
return false;
}
-
// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Preferences Functions
/**
@@ -1832,7 +1829,6 @@ class LibertyContent extends LibertyBase implements BitCacheable {
$this->mPrefs[$pPrefName] = $pPrefValue;
}
-
/**
* Saves a preference to the liberty_content_prefs database table with the given pref name and value. If the value is null, the existing value will be delete and the value will not be saved. However, a zero will be stored. This will update the mPrefs hash.
*
@@ -1917,7 +1913,6 @@ class LibertyContent extends LibertyBase implements BitCacheable {
return true;
}
-
/**
* Get Hits and Last Hit
*
@@ -2062,7 +2057,7 @@ class LibertyContent extends LibertyBase implements BitCacheable {
* Get the display name of the content type
* @param boolean $pPlural true will return the plural form of the content type display name
* @return string the display name of the content type
- */
+ */
public function getContentTypeName( $pPlural=false ){
global $gLibertySystem;
return $gLibertySystem->getContentTypeName( $this->getContentType(), $pPlural );
@@ -2091,7 +2086,6 @@ class LibertyContent extends LibertyBase implements BitCacheable {
return $this->getContentTypeName();
}
-
/**
* returns a path to the template type requested
* this is intended for package override. while not a requirement please use a naming convention of center_<action>_<content_type_guid>.tpl for new tpls
@@ -2233,7 +2227,6 @@ class LibertyContent extends LibertyBase implements BitCacheable {
return $ret;
}
-
/**
* Not-so-pure virtual function that returns Request_URI to the preview.
* @param string Text for DisplayLink function
@@ -2253,7 +2246,6 @@ class LibertyContent extends LibertyBase implements BitCacheable {
return $ret;
}
-
/**
* Not-so-pure virtual function that returns Request_URI to a content's thumbnail representation. It is up to the derived content what exactly this means
* If not implemented in the content's class, this class will return null, which is an acceptable case meaning no thumbnail is available.
@@ -2271,7 +2263,6 @@ class LibertyContent extends LibertyBase implements BitCacheable {
return '';
}
-
public static function getThumbnailUrlFromHash( array &$pMixed, string $pSize = 'small', ?int $pSecondaryId = null, ?int $pDefault = null ): string {
$ret = '';
if( !empty( $pMixed['content_type']['handler_package'] ) ) {
@@ -2285,7 +2276,6 @@ class LibertyContent extends LibertyBase implements BitCacheable {
return $ret;
}
-
public function getThumbnailUri( string $pSize='small' ) {
if( $this->isValid() ) {
return $this->getThumbnailUriFromHash( $this->mInfo, $pSize );
@@ -2301,7 +2291,6 @@ class LibertyContent extends LibertyBase implements BitCacheable {
return $ret;
}
-
public function getThumbnailFile( $pSize='small' ) {
if( $this->isValid() ) {
return $this->getThumbnailFileFromHash( $this->mInfo, $pSize );
@@ -2317,7 +2306,6 @@ class LibertyContent extends LibertyBase implements BitCacheable {
return BIT_ROOT_PATH.$ret;
}
-
/**
* Validate inbound sort_mode parameter
* @param array pParamHash hash of parameters for any getList() function
@@ -2358,7 +2346,6 @@ class LibertyContent extends LibertyBase implements BitCacheable {
return $this->mDb->convertSortmode( $pSortMode );
}
-
/**
* Liberty override to stuff content_status_id and prepares parameters with default values for any getList function
* @param array pListHash hash of parameters for any getList() function
@@ -2366,9 +2353,9 @@ class LibertyContent extends LibertyBase implements BitCacheable {
*/
public static function prepGetList( array &$pListHash ): void {
global $gBitUser;
- $pListHash['min_content_status_id'] = $gBitUser->isAdmin() ? -9999 : 1;
-// if( !empty( $this ) && is_object( $this ) ) {
-// $pListHash['min_content_status_id'] = $this->hasAdminPermission() ? -999
+ $pListHash['min_content_status_id'] = $gBitUser->isAdmin() ? -9999 : 1;
+// if( !empty( $this ) && is_object( $this ) ) {
+// $pListHash['min_content_status_id'] = $this->hasAdminPermission() ? -999
// : $this->hasUpdatePermission() ? -99 : 1;
// }
@@ -2485,7 +2472,7 @@ class LibertyContent extends LibertyBase implements BitCacheable {
}
$selectSql = !empty( $hashSql['select'] ) ? ','.implode( ',', $hashSql['select'] ) : '';
-
+
$joinSql = implode( ' ', $hashSql['join'] );
if( !empty( $pListHash['join_sql'] ) ) {
$joinSql .= $pListHash['join_sql'];
@@ -2724,7 +2711,6 @@ class LibertyContent extends LibertyBase implements BitCacheable {
$pListHash['offset'] = $pListHash['max_records'] * $lastPageNumber;
}
-
if( !empty( $hashBindVars['select'] ) ) {
$bindVars = array_merge($hashBindVars['select'], $bindVars);
}
@@ -2737,9 +2723,9 @@ class LibertyContent extends LibertyBase implements BitCacheable {
// quick alias for code readability
$type = &$contentTypes[$aux['content_type_guid']];
$aux['content_name'] = $type['content_name'];
- $aux['creator'] = isset( $aux['creator_real_name'] ) ? $aux['creator_real_name'] : $aux['creator_user'];
- $aux['real_name'] = isset( $aux['creator_real_name'] ) ? $aux['creator_real_name'] : $aux['creator_user'];
- $aux['editor'] = isset( $aux['modifier_real_name'] ) ? $aux['modifier_real_name'] : $aux['modifier_user'];
+ $aux['creator'] = $aux['creator_real_name'] ?? $aux['creator_user'];
+ $aux['real_name'] = $aux['creator_real_name'] ?? $aux['creator_user'];
+ $aux['editor'] = $aux['modifier_real_name'] ?? $aux['modifier_user'];
$aux['user'] = $aux['creator_user'];
$aux['user_id'] = $aux['creator_user_id'];
if( !empty( $gBitSystem->mPackages[$type['handler_package']] ) ) {
@@ -3251,7 +3237,7 @@ class LibertyContent extends LibertyBase implements BitCacheable {
global $gBitSystem;
$ret = null;
if( is_file( $pCacheFile ) && ( time() - filemtime( $pCacheFile )) < $gBitSystem->getConfig('liberty_cache') && filesize( $pCacheFile ) > 0 ) {
- // get contents from cacgmstrftime(he file
+ // get contents from cacgmstrftime(he file
$h = fopen( $pCacheFile, 'r' );
$ret = fread( $h, filesize( $pCacheFile ) );
fclose( $h );
@@ -3287,9 +3273,9 @@ class LibertyContent extends LibertyBase implements BitCacheable {
public static function getCacheFile( $pContentId = null, $pCacheExtension = null ) {
if( $ret = LibertyContent::getCachePath( $pContentId ) ) {
return $ret.$pContentId.( !empty( $pCacheExtension ) ? '.'.$pCacheExtension : '');
- } else {
- return false;
}
+ return false;
+
}
/**
@@ -3559,7 +3545,7 @@ class LibertyContent extends LibertyBase implements BitCacheable {
while( $aux = $result->fetchRow() ) {
$aux['user'] = $aux['modifier_user'];
- $aux['editor'] = isset( $aux['modifier_real_name'] ) ? $aux['modifier_real_name'] : $aux['modifier_user'];
+ $aux['editor'] = $aux['modifier_real_name'] ?? $aux['modifier_user'];
$aux['display_name'] = RoleUser::getDisplayNameFromHash( $aux );
$ret[] = $aux;
}
@@ -3603,9 +3589,9 @@ class LibertyContent extends LibertyBase implements BitCacheable {
global $gBitUser;
if( $gBitUser->hasPermission( 'p_liberty_edit_all_status' )) {
return $this->mDb->getAssoc( "SELECT `content_status_id`,`content_status_name` FROM `".BIT_DB_PREFIX."liberty_content_status` ORDER BY `content_status_id`" );
- } else {
- return $this->mDb->getAssoc( "SELECT `content_status_id`, `content_status_name` FROM `".BIT_DB_PREFIX."liberty_content_status` WHERE `content_status_id` > ? AND `content_status_id` < ? ORDER BY `content_status_id`", [ $pUserMinimum, $pUserMaximum ]);
}
+ return $this->mDb->getAssoc( "SELECT `content_status_id`, `content_status_name` FROM `".BIT_DB_PREFIX."liberty_content_status` WHERE `content_status_id` > ? AND `content_status_id` < ? ORDER BY `content_status_id`", [ $pUserMinimum, $pUserMaximum ]);
+
}
/**
@@ -3749,10 +3735,10 @@ class LibertyContent extends LibertyBase implements BitCacheable {
public function isCommentable() {
if( $this->getPreference( 'allow_comments' ) == 'y' ) {
return true;
- } else {
+ }
$setting = $this->getField( 'allow_comments' );
return $setting == true || $setting == 'y';
- }
+
}
/**
diff --git a/includes/classes/LibertyMime.php b/includes/classes/LibertyMime.php
index 30fe4d5..7dce907 100755
--- a/includes/classes/LibertyMime.php
+++ b/includes/classes/LibertyMime.php
@@ -9,6 +9,7 @@
* required setup
*/
namespace Bitweaver\Liberty;
+
use Bitweaver\BitBase;
use Bitweaver\KernelTools;
@@ -48,7 +49,7 @@ class LibertyMime extends LibertyContent {
}
$query = "SELECT * FROM `".BIT_DB_PREFIX."liberty_attachments` la WHERE la.`content_id`=? ORDER BY la.`pos` ASC, la.`attachment_id` ASC";
- if( $result = $this->mDb->query( $query,array( $this->mContentId ))) {
+ if( $result = $this->mDb->query( $query,[ $this->mContentId ])) {
$this->mStorage = [];
while( $row = $result->fetchRow() ) {
if( !empty( $row['is_primary'] ) ) {
@@ -154,7 +155,7 @@ class LibertyMime extends LibertyContent {
$this->setPrimaryAttachment(
$pParamHash['liberty_attachments']['primary'],
$pParamHash['content_id'],
- empty( $pParamHash['liberty_attachments']['auto_primary'] ) || $pParamHash['liberty_attachments']['auto_primary'] ? true : false
+ empty( $pParamHash['liberty_attachments']['auto_primary'] ) || $pParamHash['liberty_attachments']['auto_primary'] ? true : false,
);
// Roll back if something went wrong
@@ -373,7 +374,7 @@ class LibertyMime extends LibertyContent {
}
function getSourceFile( $pParamHash=[] ) {
- $ret = null;
+ $ret = null;
if( empty( $pParamHash ) && !empty( $this ) ) {
$pParamHash = $this->mInfo;
}
@@ -389,7 +390,6 @@ class LibertyMime extends LibertyContent {
return $ret;
}
-
/**
* getStoragePath - get path to store files for the feature site_upload_dir. It creates a calculable hierarchy of directories
*
@@ -401,11 +401,10 @@ class LibertyMime extends LibertyContent {
* @return string full path on local filsystem to store files.
*/
function getStoragePath( $pParamHash, $pRootDir=null ) {
- $ret = liberty_mime_get_storage_path( $pParamHash, $pRootDir );
- return $ret;
+ $ret = liberty_mime_get_storage_path( $pParamHash, $pRootDir );
+ return $ret;
}
-
function getStorageUrl( $pParamHash ) {
return STORAGE_PKG_URL.liberty_mime_get_storage_branch( $pParamHash );
}
@@ -466,7 +465,6 @@ class LibertyMime extends LibertyContent {
// }}}
-
// {{{ =================== Attachment Methods ====================
/**
* Get a list of all available attachments
@@ -474,7 +472,7 @@ class LibertyMime extends LibertyContent {
* @param array $pListHash
* @access public
* @return array
- */
+ */
public function getAttachmentList( &$pListHash ): array {
global $gLibertySystem, $gBitUser, $gBitSystem;
@@ -553,27 +551,27 @@ class LibertyMime extends LibertyContent {
$ret = null;
if( @$this->verifyId( $pAttachmentId ) ) {
$sql = "SELECT `attachment_plugin_guid`, `user_id` FROM `".BIT_DB_PREFIX."liberty_attachments` WHERE `attachment_id` = ?";
- if(( $row = $this->mDb->getRow( $sql, array( $pAttachmentId ))) && ( $this->isOwner( $row ) || $gBitUser->isAdmin() )) {
+ if(( $row = $this->mDb->getRow( $sql, [ $pAttachmentId ])) && ( $this->isOwner( $row ) || $gBitUser->isAdmin() )) {
// check if we have the means available to remove this attachment
if(( $guid = $row['attachment_plugin_guid'] ) && $expungeFunc = $gLibertySystem->getPluginFunction( $guid, 'expunge_function', 'mime' )) {
// --- Do the final cleanup of liberty related tables ---
// there might be situations where we remove user images including portrait, avatar or logo
// This needs to happen before the plugin can do it's work due to constraints
- $types = array( 'portrait', 'avatar', 'logo' );
+ $types = [ 'portrait', 'avatar', 'logo' ];
foreach( $types as $type ) {
$sql = "UPDATE `".BIT_DB_PREFIX."users_users` SET `{$type}_attachment_id` = null WHERE `{$type}_attachment_id` = ?";
- $this->mDb->query( $sql, array( $pAttachmentId ));
+ $this->mDb->query( $sql, [ $pAttachmentId ]);
}
if( $expungeFunc( $pAttachmentId )) {
// Delete the attachment meta data, prefs and record.
$sql = "DELETE FROM `".BIT_DB_PREFIX."liberty_attachment_meta_data` WHERE `attachment_id` = ?";
- $this->mDb->query( $sql, array( $pAttachmentId ));
+ $this->mDb->query( $sql, [ $pAttachmentId ]);
$sql = "DELETE FROM `".BIT_DB_PREFIX."liberty_attachment_prefs` WHERE `attachment_id` = ?";
- $this->mDb->query( $sql, array( $pAttachmentId ));
+ $this->mDb->query( $sql, [ $pAttachmentId ]);
$sql = "DELETE FROM `".BIT_DB_PREFIX."liberty_attachments` WHERE `attachment_id`=?";
- $this->mDb->query( $sql, array( $pAttachmentId ));
+ $this->mDb->query( $sql, [ $pAttachmentId ]);
// Remove attachment from memory
unset( $this->mStorage[$pAttachmentId] );
@@ -602,11 +600,11 @@ class LibertyMime extends LibertyContent {
if( BitBase::verifyId( $pAttachmentId )) {
$query = "SELECT * FROM `".BIT_DB_PREFIX."liberty_attachments` la WHERE la.`attachment_id`=?";
- if( $result = $gBitSystem->mDb->query( $query, array( (int)$pAttachmentId ))) {
+ if( $result = $gBitSystem->mDb->query( $query, [ (int)$pAttachmentId ])) {
if( $row = $result->fetchRow() ) {
if( $func = $gLibertySystem->getPluginFunction( $row['attachment_plugin_guid'], 'load_function', 'mime' )) {
$sql = "SELECT `pref_name`, `pref_value` FROM `".BIT_DB_PREFIX."liberty_attachment_prefs` WHERE `attachment_id` = ?";
- $prefs = $gBitSystem->mDb->getAssoc( $sql, array( $pAttachmentId ));
+ $prefs = $gBitSystem->mDb->getAssoc( $sql, [ $pAttachmentId ]);
$ret = $func( $row, $prefs, $pParams );
}
}
@@ -629,7 +627,7 @@ class LibertyMime extends LibertyContent {
if( BitBase::verifyId( $pAttachmentId )) {
$query = "SELECT * FROM `".BIT_DB_PREFIX."liberty_attachments` la WHERE la.`attachment_id`=?";
- if( $result = $gBitSystem->mDb->query( $query, array( (int)$pAttachmentId ))) {
+ if( $result = $gBitSystem->mDb->query( $query, [ (int)$pAttachmentId ])) {
if( $row = $result->fetchRow() ) {
if( $func = $gLibertySystem->getPluginFunction( $row['attachment_plugin_guid'], 'load_function', 'mime' )) {
$prefs = static::getAttachmentPreferences( $pAttachmentId );
@@ -682,7 +680,7 @@ class LibertyMime extends LibertyContent {
$query = "
UPDATE `".BIT_DB_PREFIX."liberty_attachments`
SET `is_primary` = ? WHERE `attachment_id` = ?";
- $this->mDb->query( $query, array( 'y', $pAttachmentId ));
+ $this->mDb->query( $query, [ 'y', $pAttachmentId ]);
$ret = true;
// Otherwise, are we supposed to clear the primary entirely?
@@ -708,7 +706,7 @@ class LibertyMime extends LibertyContent {
$query = "
UPDATE `".BIT_DB_PREFIX."liberty_attachments`
SET `is_primary` = ? WHERE `content_id` = ?";
- $this->mDb->query( $query, array( null, $pContentId ));
+ $this->mDb->query( $query, [ null, $pContentId ]);
$ret = true;
}
@@ -716,7 +714,6 @@ class LibertyMime extends LibertyContent {
}
// }}}
-
/**
* === Attachment Preferences ===
*/
@@ -757,7 +754,7 @@ class LibertyMime extends LibertyContent {
if( BitBase::verifyId( $pAttachmentId ) ) {
// if the object isn't loaded, we need to get the prefs from the database
$sql = "SELECT `pref_name`, `pref_value` FROM `".BIT_DB_PREFIX."liberty_attachment_prefs` WHERE `attachment_id` = ?";
- $ret = $gBitSystem->mDb->getAssoc( $sql, array( (int)$pAttachmentId ));
+ $ret = $gBitSystem->mDb->getAssoc( $sql, [ (int)$pAttachmentId ]);
}
return $ret;
@@ -857,7 +854,7 @@ class LibertyMime extends LibertyContent {
$ret = false;
if( BitBase::verifyId( $pAttachmentId ) ) {
$sql = "DELETE FROM `".BIT_DB_PREFIX."liberty_attachment_prefs` WHERE `attachment_id` = ?";
- $gBitSystem->mDb->query( $sql, array( $pAttachmentId ));
+ $gBitSystem->mDb->query( $sql, [ $pAttachmentId ]);
$ret = true;
}
return $ret;
@@ -913,9 +910,9 @@ class LibertyMime extends LibertyContent {
}
$ret = true;
- } else {
- // should we recurse?
}
+ // should we recurse?
+
}
}
}
@@ -958,7 +955,7 @@ class LibertyMime extends LibertyContent {
global $gBitSystem;
$ret = [];
if( BitBase::verifyId( $pAttachmentId )) {
- $bindVars = array( $pAttachmentId );
+ $bindVars = [ $pAttachmentId ];
$whereSql = "";
if( !empty( $pType ) && !empty( $pTitle )) {
@@ -1045,7 +1042,7 @@ class LibertyMime extends LibertyContent {
global $gBitSystem;
$ret = false;
if( !empty( $pDescription ) && ( $pTable == 'type' || $pTable == 'title' )) {
- $ret = $gBitSystem->mDb->getOne( "SELECT `meta_{$pTable}_id` FROM `".BIT_DB_PREFIX."liberty_meta_{$pTable}s` WHERE `meta_{$pTable}` = ?", array( LibertyMime::normalizeMetaDescription( $pDescription )));
+ $ret = $gBitSystem->mDb->getOne( "SELECT `meta_{$pTable}_id` FROM `".BIT_DB_PREFIX."liberty_meta_{$pTable}s` WHERE `meta_{$pTable}` = ?", [ LibertyMime::normalizeMetaDescription( $pDescription )]);
}
return $ret;
}
@@ -1062,7 +1059,7 @@ class LibertyMime extends LibertyContent {
global $gBitSystem;
$ret = false;
if( BitBase::verifyId( $pId )) {
- $ret = $gBitSystem->mDb->getOne( "SELECT `meta_{$pTable}` FROM `".BIT_DB_PREFIX."liberty_meta_{$pTable}s` WHERE `meta_{$pTable}_id` = ?", array( $pId ));
+ $ret = $gBitSystem->mDb->getOne( "SELECT `meta_{$pTable}` FROM `".BIT_DB_PREFIX."liberty_meta_{$pTable}s` WHERE `meta_{$pTable}_id` = ?", [ $pId ]);
}
return $ret;
}
@@ -1188,7 +1185,7 @@ if( !function_exists( '\Bitweaver\Liberty\liberty_mime_get_source_url' )) {
function liberty_mime_get_source_url( $pParamHash ) {
$fileName = BitBase::getParameter( $pParamHash, 'file_name' );
if( empty( $pParamHash['package'] ) ) {
- $pParamHash['package'] = liberty_mime_get_storage_sub_dir_name( array( 'mime_type' => BitBase::getParameter( $pParamHash, 'mime_type' ), 'name' => $fileName ) );
+ $pParamHash['package'] = liberty_mime_get_storage_sub_dir_name( [ 'mime_type' => BitBase::getParameter( $pParamHash, 'mime_type' ), 'name' => $fileName ] );
}
if( empty( $pParamHash['sub_dir'] ) ) {
$pParamHash['sub_dir'] = BitBase::getParameter( $pParamHash, 'attachment_id' );
@@ -1206,7 +1203,7 @@ if( !function_exists( '\Bitweaver\Liberty\liberty_mime_get_source_file' )) {
function liberty_mime_get_source_file( $pParamHash ) {
$fileName = BitBase::getParameter( $pParamHash, 'file_name' );
if( empty( $pParamHash['package'] ) ) {
- $pParamHash['package'] = liberty_mime_get_storage_sub_dir_name( array( 'mime_type' => BitBase::getParameter( $pParamHash, 'mime_type' ), 'name' => $fileName ) );
+ $pParamHash['package'] = liberty_mime_get_storage_sub_dir_name( [ 'mime_type' => BitBase::getParameter( $pParamHash, 'mime_type' ), 'name' => $fileName ] );
}
if( empty( $pParamHash['sub_dir'] ) ) {
$pParamHash['sub_dir'] = BitBase::getParameter( $pParamHash, 'attachment_id' );
diff --git a/includes/classes/LibertyStructure.php b/includes/classes/LibertyStructure.php
index b645eeb..eeaf043 100755
--- a/includes/classes/LibertyStructure.php
+++ b/includes/classes/LibertyStructure.php
@@ -10,6 +10,7 @@
* required setup
*/
namespace Bitweaver\Liberty;
+
use Bitweaver\BitBase;
use Bitweaver\KernelTools;
@@ -107,7 +108,7 @@ class LibertyStructure extends LibertyBase {
$ret = false;
if( !empty( $this->mInfo['content_object'] ) && is_a( $this->mInfo['content_object'], 'LibertyContent' ) ) {
return $this->mInfo['content_object']->hasUpdatePermission( $pVerifyAccessControl ) || empty( $this->mInfo['content_object']->mViewContentPerm ) || $this->mInfo['content_object']->hasUserPermission( $this->mInfo['content_object']->mViewContentPerm, $pVerifyAccessControl );
- }
+ }
return $ret;
}
@@ -180,7 +181,6 @@ class LibertyStructure extends LibertyBase {
}
}
-
public function isValid() {
return $this->verifyId( $this->mStructureId );
}
@@ -383,7 +383,7 @@ class LibertyStructure extends LibertyBase {
if( !empty( $pListHash['find'] ) ) {
$findesc = '%' . $pListHash['find'] . '%';
$mid = " (`parent_id` is null or `parent_id`=0) and (lc.`title` like ?)";
- $bindVars=array($findesc);
+ $bindVars=[$findesc];
} else {
$mid = " (`parent_id` is null or `parent_id`=0) ";
$bindVars=[];
@@ -474,7 +474,6 @@ class LibertyStructure extends LibertyBase {
//vd( $storeNodes );
}
-
// deprecated flat tree store, code is unused AFAIK.-- spiderr
if( !empty( $pParamHash['structure'] ) ) {
// LibertyStructure::embellishStructureHash( $pParamHash['structure'] );
@@ -581,13 +580,13 @@ class LibertyStructure extends LibertyBase {
$pParamHash['alias'] = '';
}
$pParamHash['max'] = isset( $pParamHash['after_ref_id'] )
- ? $this->mDb->getOne("select `pos` from `".BIT_DB_PREFIX."liberty_structures` where `structure_id`=?",array((int)$pParamHash['after_ref_id']))
- : $this->mDb->getOne("select max(`pos`) from `".BIT_DB_PREFIX."liberty_structures` where `parent_id`=?",array((int)$pParamHash['parent_id']));
+ ? $this->mDb->getOne("select `pos` from `".BIT_DB_PREFIX."liberty_structures` where `structure_id`=?",[(int)$pParamHash['after_ref_id']])
+ : $this->mDb->getOne("select max(`pos`) from `".BIT_DB_PREFIX."liberty_structures` where `parent_id`=?",[(int)$pParamHash['parent_id']]);
if( $pParamHash['max'] > 0 ) {
// For example, if max is 5 then we are inserting after position 5 so we'll insert 5 and move all the others
$query = "update `".BIT_DB_PREFIX."liberty_structures` set `pos`=`pos`+1 where `pos`>? and `parent_id`=?";
- $result = $this->mDb->query($query,array((int)$pParamHash['max'], (int)$pParamHash['parent_id']));
+ $result = $this->mDb->query($query,[(int)$pParamHash['max'], (int)$pParamHash['parent_id']]);
}
$pParamHash['max']++;
@@ -625,9 +624,9 @@ class LibertyStructure extends LibertyBase {
$result = $this->mDb->query( $query, [ $pParamHash['structure_id'], $pParamHash['parent_id'], (int)$pParamHash['content_id'], (int)$pParamHash['root_structure_id'], $pParamHash['alias'], $pParamHash['max'] ] );
$this->CompleteTrans();
$ret = (int) $pParamHash['structure_id'];
- } else {
- //vd( $this->mErrors );
}
+ //vd( $this->mErrors );
+
return $ret;
}
@@ -664,11 +663,11 @@ class LibertyStructure extends LibertyBase {
if( $this->isValid() ) {
$this->StartTrans();
$query = "select `structure_id`, `pos` from `".BIT_DB_PREFIX."liberty_structures` where `pos`<? and `parent_id`=? order by `pos` desc";
- $result = $this->mDb->query($query,array($this->mInfo["pos"], (int)$this->mInfo["parent_id"]));
+ $result = $this->mDb->query($query,[$this->mInfo["pos"], (int)$this->mInfo["parent_id"]]);
if ($previous = $result->fetchRow()) {
//Get last child nodes for previous sibling
$query = "select `pos` from `".BIT_DB_PREFIX."liberty_structures` where `parent_id`=? order by `pos` desc";
- $result = $this->mDb->query($query,array((int)$previous["structure_id"]));
+ $result = $this->mDb->query($query,[(int)$previous["structure_id"]]);
$pos = ($res = $result->fetchRow()) ? $res["pos"] : 0;
$query = "update `".BIT_DB_PREFIX."liberty_structures` set `parent_id`=?, `pos`=(? + 1) where `structure_id`=?";
@@ -690,13 +689,13 @@ class LibertyStructure extends LibertyBase {
if( $this->isValid() ) {
$this->StartTrans();
$query = "select `structure_id`, `pos` from `".BIT_DB_PREFIX."liberty_structures` where `pos`>? and `parent_id`=? order by `pos` asc";
- $result = $this->mDb->query($query,array((int)$this->mInfo["pos"], (int)$this->mInfo["parent_id"]));
+ $result = $this->mDb->query($query,[(int)$this->mInfo["pos"], (int)$this->mInfo["parent_id"]]);
$res = $result->fetchRow();
if ($res) {
//Swap position values
$query = "update `".BIT_DB_PREFIX."liberty_structures` set `pos`=? where `structure_id`=?";
- $this->mDb->query($query,array((int)$this->mInfo["pos"], (int)$res["structure_id"]) );
- $this->mDb->query($query,array((int)$res["pos"], (int)$this->mInfo["structure_id"]) );
+ $this->mDb->query($query,[(int)$this->mInfo["pos"], (int)$res["structure_id"]] );
+ $this->mDb->query($query,[(int)$res["pos"], (int)$this->mInfo["structure_id"]] );
}
$this->CompleteTrans();
}
@@ -711,30 +710,20 @@ class LibertyStructure extends LibertyBase {
if( $this->isValid() ) {
$this->StartTrans();
$query = "select `structure_id`, `pos` from `".BIT_DB_PREFIX."liberty_structures` where `pos`<? and `parent_id`=? order by `pos` desc";
- $result = $this->mDb->query($query,array((int)$this->mInfo["pos"], (int)$this->mInfo["parent_id"]));
+ $result = $this->mDb->query($query,[(int)$this->mInfo["pos"], (int)$this->mInfo["parent_id"]]);
$res = $result->fetchRow();
if ($res) {
//Swap position values
$query = "update `".BIT_DB_PREFIX."liberty_structures` set `pos`=? where `structure_id`=?";
- $this->mDb->query($query,array((int)$res["pos"], (int)$this->mInfo["structure_id"]) );
- $this->mDb->query($query,array((int)$this->mInfo["pos"], (int)$res["structure_id"]) );
+ $this->mDb->query($query,[(int)$res["pos"], (int)$this->mInfo["structure_id"]] );
+ $this->mDb->query($query,[(int)$this->mInfo["pos"], (int)$res["structure_id"]] );
}
$this->CompleteTrans();
}
}
-
-
-
-
-
-
-
-
// ============== OLD struct_lib STUFF
-
-
public function removeStructureNode( $structure_id, $delete=false ) {
// Now recursively remove
if( @$this->verifyId( $structure_id ) ) {
@@ -883,7 +872,6 @@ class LibertyStructure extends LibertyBase {
return $ret;
}
-
/**
* buildSubtreeToc
*
@@ -895,7 +883,7 @@ class LibertyStructure extends LibertyBase {
public function buildSubtreeToc( $id, $order='asc', $tocPrefix='', $pPrefixDepth=1, $pDepth=1 ) {
global $gLibertySystem, $gBitSystem;
$back = [];
- $cant = $this->mDb->getOne("select count(*) from `".BIT_DB_PREFIX."liberty_structures` where `parent_id`=?",array((int)$id));
+ $cant = $this->mDb->getOne("select count(*) from `".BIT_DB_PREFIX."liberty_structures` where `parent_id`=?",[(int)$id]);
if ($cant) {
$query = "SELECT `structure_id`, `root_structure_id`, `parent_id`, `page_alias`, `pos`, `structure_level`, lc.`user_id`, lc.`title`, lc.`content_type_guid`, uu.`login`, uu.`real_name`, lc.`content_id`, lc.`last_modified`, lct.*
FROM `".BIT_DB_PREFIX."liberty_structures` ls
@@ -904,7 +892,7 @@ class LibertyStructure extends LibertyBase {
LEFT JOIN `".BIT_DB_PREFIX."users_users` uu ON ( uu.`user_id` = lc.`user_id` )
WHERE `parent_id`=?
ORDER BY ".$this->mDb->convertSortmode("pos_".$order);
- $result = $this->mDb->query($query,array((int)$id));
+ $result = $this->mDb->query($query,[(int)$id]);
$prefix = 1;
$contentTypes = $gLibertySystem->mContentTypes;
while ($res = $result->fetchRow()) {
@@ -1011,7 +999,7 @@ class LibertyStructure extends LibertyBase {
* @param int $structure_id
* @param bool $deep
* @return int
- */
+ */
public function getNextStructureNode($structure_id, $deep = true) {
// If we have children then get the first child
if ($deep) {
@@ -1019,7 +1007,7 @@ class LibertyStructure extends LibertyBase {
FROM `".BIT_DB_PREFIX."liberty_structures` ls
WHERE `parent_id`=?
ORDER BY ".$this->mDb->convertSortmode("pos_asc");
- $result1 = $this->mDb->query($query,array((int)$structure_id));
+ $result1 = $this->mDb->query($query,[(int)$structure_id]);
if ($result1->numRows()) {
$res = $result1->fetchRow();
@@ -1039,15 +1027,15 @@ class LibertyStructure extends LibertyBase {
FROM `".BIT_DB_PREFIX."liberty_structures` ls
WHERE `parent_id`=? and `pos`>?
ORDER BY ".$this->mDb->convertSortmode("pos_asc");
- $result2 = $this->mDb->query($query,array((int)$parent_id, (int)$page_pos));
+ $result2 = $this->mDb->query($query,[(int)$parent_id, (int)$page_pos]);
if ($result2->numRows()) {
$res = $result2->fetchRow();
return $res["structure_id"];
}
- else {
+
return $this->getNextStructureNode($parent_id, false);
- }
+
}
/**
@@ -1064,7 +1052,7 @@ class LibertyStructure extends LibertyBase {
$query .= "from `".BIT_DB_PREFIX."liberty_structures` ls ";
$query .= "where `parent_id`=? ";
$query .= "order by ".$this->mDb->convertSortmode("pos_desc");
- $result = $this->mDb->query($query,array($structure_id));
+ $result = $this->mDb->query($query,[$structure_id]);
if ($result->numRows()) {
//There are more children
@@ -1086,7 +1074,7 @@ class LibertyStructure extends LibertyBase {
$query .= "from `".BIT_DB_PREFIX."liberty_structures` ls ";
$query .= "where `parent_id`=? and `pos`<? ";
$query .= "order by ".$this->mDb->convertSortmode("pos_desc");
- $result = $this->mDb->query($query,array((int)$parent_id, (int)$pos));
+ $result = $this->mDb->query($query,[(int)$parent_id, (int)$pos]);
if ($result->numRows()) {
//There is a previous sibling
@@ -1112,7 +1100,7 @@ class LibertyStructure extends LibertyBase {
FROM `".BIT_DB_PREFIX."liberty_structures` ls, `".BIT_DB_PREFIX."liberty_content` lc
WHERE ls.`content_id` = lc.`content_id` AND `parent_id`=? ";
$query .= "order by ".$this->mDb->convertSortmode("pos_asc");
- $result = $this->mDb->query($query,array((int)$pParentId));
+ $result = $this->mDb->query($query,[(int)$pParentId]);
while ($res = $result->fetchRow()) {
//$ret[] = $this->populate_page_info($res);
$ret[] = $res;
diff --git a/includes/classes/LibertySystem.php b/includes/classes/LibertySystem.php
index 5883041..6eca60b 100755
--- a/includes/classes/LibertySystem.php
+++ b/includes/classes/LibertySystem.php
@@ -20,6 +20,7 @@
// +----------------------------------------------------------------------+
namespace Bitweaver\Liberty;
+
use Bitweaver\BitSingleton;
use Bitweaver\KernelTools;
@@ -74,7 +75,6 @@ define( 'LIBERTY_UPLOAD', 'upload' );
#[\AllowDynamicProperties]
class LibertySystem extends BitSingleton {
-
// Hash of plugin data
public $mPlugins = [];
@@ -114,9 +114,8 @@ class LibertySystem extends BitSingleton {
$this->loadContentTypes();
}
-
public function __sleep() {
- return array_merge( parent::__sleep(), array( 'mPlugins', 'mDataTags', 'mContentStatus', 'mContentTypes', 'mPluginFileName', 'mSystem', 'mPluginPath' ) );
+ return array_merge( parent::__sleep(), [ 'mPlugins', 'mDataTags', 'mContentStatus', 'mContentTypes', 'mPluginFileName', 'mSystem', 'mPluginPath' ] );
}
// ****************************** Plugin Functions
@@ -294,7 +293,7 @@ class LibertySystem extends BitSingleton {
global $gBitSystem;
// plugins can set their own file_name. this is not mandatory but makes sure we store the path to the correct file
// this is useful for files that are included by other plugins
- $pluginPath = !empty( $pPluginParams['file_name'] )
+ $pluginPath = !empty( $pPluginParams['file_name'] )
? dirname( $this->mPluginFilePath ) . "/" . $pPluginParams['file_name']
: $this->mPluginFilePath;
@@ -311,7 +310,7 @@ class LibertySystem extends BitSingleton {
$pPluginParams['load_function'] = '\\Bitweaver\\Liberty\\' . $pPluginParams['load_function'];
}
if ( !empty( $pPluginParams['branch_function'] ) ) {
- $pPluginParams['branch_function'] = '\\Bitweaver\\Liberty\\' . $pPluginParams['branch_function'];
+ $pPluginParams['branch_function'] = '\\Bitweaver\\Liberty\\' . $pPluginParams['branch_function'];
}
if ( !empty( $pPluginParams['download_function'] ) ) {
$pPluginParams['download_function'] = '\\Bitweaver\\Liberty\\' . $pPluginParams['download_function'];
@@ -638,7 +637,7 @@ class LibertySystem extends BitSingleton {
( empty( $this->mContentTypes[$pGuid]['content_name_plural'] ) && version_compare( $gBitSystem->getVersion( LIBERTY_PKG_NAME ), '2.1.4', '>=' ) ) // temporary update condition during migration of content_description to content_name remove after april 20 2011
) {
$this->StartTrans();
- $result = $this->mDb->associateUpdate( BIT_DB_PREFIX."liberty_content_types", $pTypeParams, array( 'content_type_guid'=>$pGuid ) );
+ $result = $this->mDb->associateUpdate( BIT_DB_PREFIX."liberty_content_types", $pTypeParams, [ 'content_type_guid'=>$pGuid ] );
$this->CompleteTrans();
// we just ran some SQL - let's flush the loadContentTypes query cache
$this->loadContentTypes( 0 );
@@ -672,14 +671,14 @@ class LibertySystem extends BitSingleton {
* Get the display name of the content type
* @param boolean $pPlural true will return the plural form of the content type display name
* @return string the display name of the content type
- */
+ */
function getContentType( $pContentTypeGuid ){
$ret = null;
if( !isset( $this->mContentTypes ) ) {
$this->loadContentTypes();
}
if( !empty( $this->mContentTypes[$pContentTypeGuid] ) ) {
- $ret = $this->mContentTypes[$pContentTypeGuid];
+ $ret = $this->mContentTypes[$pContentTypeGuid];
}
return $ret;
}
@@ -688,14 +687,14 @@ class LibertySystem extends BitSingleton {
* Get the display name of the content type
* @param boolean $pPlural true will return the plural form of the content type display name
* @return string the display name of the content type
- */
+ */
public function getContentClassName( $pContentTypeGuid ) {
$ret = null;
if( !isset( $this->mContentTypes ) ) {
$this->loadContentTypes();
}
if( !empty( $this->mContentTypes[$pContentTypeGuid] ) && $this->requireHandlerFile( $this->mContentTypes[$pContentTypeGuid] ) ) {
- $ret = '\\Bitweaver\\'. ucfirst( $this->mContentTypes[$pContentTypeGuid]['handler_package'] ) . '\\' . $this->mContentTypes[$pContentTypeGuid]['handler_class'];
+ $ret = '\\Bitweaver\\'. ucfirst( $this->mContentTypes[$pContentTypeGuid]['handler_package'] ) . '\\' . $this->mContentTypes[$pContentTypeGuid]['handler_class'];
}
return $ret;
}
@@ -705,13 +704,13 @@ class LibertySystem extends BitSingleton {
* @param string $pContentTypeGuid
* @param boolean $pPlural true will return the plural form of the content type display name
* @return string the display name of the content type
- */
+ */
function getContentTypeName( $pContentTypeGuid, $pPlural=false ){
$ret = null;
if( $pPlural && isset( $this->mContentTypes[$pContentTypeGuid]['content_name_plural'] ) ) {
$ret = KernelTools::tra( $this->mContentTypes[$pContentTypeGuid]['content_name_plural'] );
} elseif( !empty( $this->mContentTypes[$pContentTypeGuid]['content_name'] ) ) {
- $ret = KernelTools::tra( $this->mContentTypes[$pContentTypeGuid]['content_name'] );
+ $ret = KernelTools::tra( $this->mContentTypes[$pContentTypeGuid]['content_name'] );
}
return $ret;
}
@@ -727,9 +726,6 @@ class LibertySystem extends BitSingleton {
return $this->getContentTypeName( $pContentType );
}
-
-
-
// ****************************** Service Functions
/**
* Get the service details of a given package
@@ -812,7 +808,7 @@ class LibertySystem extends BitSingleton {
$parts = explode( '/',$pMimeType );
if( count( $parts ) > 1 ) {
global $gBitSmarty, $gLibertySystem;
-
+
$ext = strtolower( $parts[1] );
$biticon = [
'ipackage' => 'liberty',
diff --git a/includes/comments_inc.php b/includes/comments_inc.php
index f2815e5..e40db09 100755
--- a/includes/comments_inc.php
+++ b/includes/comments_inc.php
@@ -35,7 +35,6 @@ use Bitweaver\KernelTools;
* @param string $comments_return_url The URL the user should be sent to after posting the comment (required)
**/
-
/**
* required setup
*/
@@ -335,7 +334,7 @@ if ($gContent->hasUserPermission( 'p_liberty_read_comments' )) {
&& (
BitBoardTopic::isLockedMsg( BitBase::verifyId( $storeComment->mInfo['parent_id'] )
? $storeComment->mInfo['parent_id'] : ( !BitBase::verifyId( $_REQUEST['post_comment_reply_id'] )
- ? $commentsParentId : $_REQUEST['post_comment_reply_id'] ))
+ ? $commentsParentId : $_REQUEST['post_comment_reply_id'] ), )
)
) {
unset( $_REQUEST['post_comment_request'] );
diff --git a/includes/get_content_list_inc.php b/includes/get_content_list_inc.php
index f89e1c6..b921b09 100755
--- a/includes/get_content_list_inc.php
+++ b/includes/get_content_list_inc.php
@@ -57,7 +57,7 @@ if( empty( $contentListHash ) ) {
'thumbnail_size' => !empty( $_REQUEST["thumbnail_size"] ) ? $_REQUEST["thumbnail_size"] : null,
];
- if( !empty( $_REQUEST['output'] ) && ( $_REQUEST['output'] == 'json' || $_REQUEST['output'] == 'ajax' ) ) {
+ if( !empty( $_REQUEST['output'] ) && ( $_REQUEST['output'] == 'json' || $_REQUEST['output'] == 'ajax' ) ) {
foreach( $_REQUEST as $key => $value ) {
if ( !is_array($value) ){
if( strstr( $value, ',' ) ) {
diff --git a/includes/liberty_lib.php b/includes/liberty_lib.php
index a223fba..810fdd0 100755
--- a/includes/liberty_lib.php
+++ b/includes/liberty_lib.php
@@ -18,6 +18,7 @@
* required setup
*/
namespace Bitweaver\Liberty;
+
use Bitweaver\BitBase;
use Bitweaver\KernelTools;
@@ -182,7 +183,6 @@ function parse_protect( &$pData, &$pReplace ) {
}
}
-
// ================== Liberty Plugin Helper ==================
/**
* pass in the plugin parameters and out comes a hash with usable styling information
@@ -273,7 +273,6 @@ function liberty_plugins_wrapper_style( $pParamHash ) {
return $ret;
}
-
// ================== Liberty Service Functions ==================
/**
* liberty_content_load_sql
@@ -415,7 +414,6 @@ function liberty_content_edit( $pObject, $pParamHash ) {
include_once LIBERTY_PKG_INCLUDE_PATH."edit_storage_inc.php";
}
-
// ================== Liberty File Processing Functions ==================
/**
@@ -459,7 +457,7 @@ function liberty_process_upload( &$pFileHash, $pMoveFile = true ) {
// Thumbs.db is a windows My Photos/ folder file, and seems to really piss off imagick
$canThumbFunc = liberty_get_function( 'can_thumbnail' );
- $ret = !empty( $canThumbFunc ) && $canThumbFunc( $pFileHash['type'] ) && $pFileHash['name'] != 'Thumbs.db'
+ $ret = !empty( $canThumbFunc ) && $canThumbFunc( $pFileHash['type'] ) && $pFileHash['name'] != 'Thumbs.db'
? liberty_process_image( $pFileHash, $pMoveFile )
: liberty_process_generic( $pFileHash, $pMoveFile );
@@ -559,9 +557,9 @@ function liberty_process_archive( &$pFileHash ) {
if( preg_match( "!^/+$!", $destDir || '' )) {
// obviously something went horribly wrong
return false;
- } else {
- return $destDir;
}
+ return $destDir;
+
}
/**
@@ -607,7 +605,6 @@ function liberty_process_generic( &$pFileHash, $pMoveFile = true ) {
return $ret;
}
-
/**
* liberty_process_image
*
@@ -712,7 +709,7 @@ function liberty_generate_thumbnails( $pFileHash ) {
// has a customer pdf rasterization function been defined?
if( function_exists( 'liberty_rasterize_pdf' ) && $rasteredFile = liberty_rasterize_pdf( $pFileHash['source_file'] ) ) {
$pFileHash['source_file'] = $rasteredFile;
- } else {
+ }
/* $magickWand = NewMagickWand();
if( !$pFileHash['error'] = liberty_magickwand_check_error( MagickReadImage( $magickWand, $pFileHash['source_file'] ), $magickWand )) {
MagickSetFormat( $magickWand, 'JPG' );
@@ -732,7 +729,7 @@ function liberty_generate_thumbnails( $pFileHash ) {
}
}
*/
- }
+
} else {
$pFileHash['dest_base_name'] = 'original';
$pFileHash['name'] = 'original.jpg';
diff --git a/includes/lookup_content_inc.php b/includes/lookup_content_inc.php
index 352ffa8..29e8728 100755
--- a/includes/lookup_content_inc.php
+++ b/includes/lookup_content_inc.php
@@ -12,6 +12,7 @@
* required setup
*/
namespace Bitweaver\Liberty;
+
use Bitweaver\BitBase;
global $gContent;
diff --git a/includes/structure_edit_inc.php b/includes/structure_edit_inc.php
index e6244dc..dd40020 100755
--- a/includes/structure_edit_inc.php
+++ b/includes/structure_edit_inc.php
@@ -12,11 +12,10 @@
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See http://www.gnu.org/copyleft/lesser.html for details.
namespace Bitweaver\Liberty;
+
require_once '../kernel/includes/setup_inc.php';
use Bitweaver\BitBase;
use Bitweaver\KernelTools;
-use Bitweaver\Liberty\LibertyContent;
-use Bitweaver\Liberty\LibertyStructure;
if( !BitBase::verifyId( $_REQUEST["structure_id"] ) ) {
$gBitSystem->fatalError( KernelTools::tra( "No structure indicated" ));
diff --git a/index.php b/index.php
index 3e305fe..c0437d0 100644
--- a/index.php
+++ b/index.php
@@ -1,4 +1,4 @@
-<?php
+<?php
// This is not a package.
header ("location: ../index.php");
diff --git a/liberty_rss.php b/liberty_rss.php
index 4c66144..00c75ed 100755
--- a/liberty_rss.php
+++ b/liberty_rss.php
@@ -12,7 +12,6 @@ require_once "../kernel/includes/setup_inc.php";
require_once RSS_PKG_INCLUDE_PATH . 'rss_inc.php';
use Bitweaver\KernelTools;
use Bitweaver\Liberty\LibertyContent;
-use Bitweaver\Feed\FeedStatus;
$gBitSystem->verifyPackage( 'rss' );
$gBitSystem->verifyFeature( 'liberty_rss' );
@@ -55,7 +54,7 @@ foreach( $feeds as $feed ) {
$item->date = ( int )$feed['last_modified'];
$item->source = 'http://'.$_SERVER['HTTP_HOST'].LIBERTY_PKG_URL.'/list_content.php';
- $item->author = $gBitUser->getDisplayName( false, array( 'real_name' => $feed['modifier_real_name'], 'login' => $feed['modifier_user'] ) );
+ $item->author = $gBitUser->getDisplayName( false, [ 'real_name' => $feed['modifier_real_name'], 'login' => $feed['modifier_user'] ] );
$item->descriptionTruncSize = $gBitSystem->getConfig( 'rssfeed_truncate', 5000 );
$item->descriptionHtmlSyndicated = false;
diff --git a/list_content.php b/list_content.php
index 35fde0d..d52d474 100755
--- a/list_content.php
+++ b/list_content.php
@@ -53,7 +53,7 @@ if( !empty( $_POST ) ) {
}
if( !empty( $delUsers ) ) {
$feedback['success'][] = KernelTools::tra( 'Content deleted' ).": <ul>$delUsers</ul>";
- }
+ }
if( !empty( $errDelUsers ) ) {
$feedback['error'][] = KernelTools::tra( 'Content not deleted' ).": <ul>$errDelUsers</ul>";
}
@@ -79,7 +79,7 @@ $contentListHash['listInfo']['ihash']['content_type_guid'] = $contentSelect;
$contentListHash['listInfo']['ihash']['user_id'] = BitBase::verifyId( $_REQUEST['user_id'] ?? 0 ) ? $_REQUEST['user_id'] : null;
$contentListHash['listInfo']['ihash']['find'] = $contentListHash['listInfo']['find'];
$gBitSmarty->assign( 'listInfo', $contentListHash['listInfo'] );
-$gBitSmarty->assign( 'content_type_guids', isset( $_REQUEST['content_type_guid'] ) ? $_REQUEST['content_type_guid'] : null );
+$gBitSmarty->assign( 'content_type_guids', $_REQUEST['content_type_guid'] ?? null );
//depricate 'ajax_xml', use 'output'
//@todo clean out from other packages
diff --git a/modules/help_mod_last_changes.tpl b/modules/help_mod_last_changes.tpl
index ff49d8b..ff49d8b 100644..100755
--- a/modules/help_mod_last_changes.tpl
+++ b/modules/help_mod_last_changes.tpl
diff --git a/modules/help_mod_last_comments.tpl b/modules/help_mod_last_comments.tpl
index 53e8c24..53e8c24 100644..100755
--- a/modules/help_mod_last_comments.tpl
+++ b/modules/help_mod_last_comments.tpl
diff --git a/modules/help_mod_structure_navigation.tpl b/modules/help_mod_structure_navigation.tpl
index 9e6db5d..9e6db5d 100644..100755
--- a/modules/help_mod_structure_navigation.tpl
+++ b/modules/help_mod_structure_navigation.tpl
diff --git a/modules/help_mod_structure_toc.tpl b/modules/help_mod_structure_toc.tpl
index dc2b958..dc2b958 100644..100755
--- a/modules/help_mod_structure_toc.tpl
+++ b/modules/help_mod_structure_toc.tpl
diff --git a/modules/help_mod_top_authors.tpl b/modules/help_mod_top_authors.tpl
index e7e4c9c..e7e4c9c 100644..100755
--- a/modules/help_mod_top_authors.tpl
+++ b/modules/help_mod_top_authors.tpl
diff --git a/modules/mod_last_changes.php b/modules/mod_last_changes.php
index 7c9862b..22656fb 100755
--- a/modules/mod_last_changes.php
+++ b/modules/mod_last_changes.php
@@ -34,13 +34,13 @@ if( !empty( $module_params['show_date'] ) ) {
$gBitSmarty->assign( 'contentType', !empty( $module_params['content_type_guid'] ) );
-$listHash = array(
+$listHash = [
'content_type_guid' => !empty( $module_params['content_type_guid'] ) ? $module_params['content_type_guid'] : null,
'offset' => 0,
'max_records' => $module_rows,
'sort_mode' => 'last_modified_desc',
'user_id' => $userId,
-);
+];
$modLastContent = $gBitUser->getContentList( $listHash );
$gBitSmarty->assign( 'modLastContent', $modLastContent );
?>
diff --git a/modules/mod_last_changes.tpl b/modules/mod_last_changes.tpl
index a89db88..a89db88 100644..100755
--- a/modules/mod_last_changes.tpl
+++ b/modules/mod_last_changes.tpl
diff --git a/modules/mod_last_comments.php b/modules/mod_last_comments.php
index 33d34f8..27259b4 100755
--- a/modules/mod_last_comments.php
+++ b/modules/mod_last_comments.php
@@ -19,10 +19,10 @@ if( !empty( $gQueryUser->mUserId ) ) {
$userId = $gQueryUser->mUserId;
}
-$listHash = array(
+$listHash = [
'user_id' => $userId,
'max_records' => $moduleParams['module_rows'],
-);
+];
if (!empty($params['full'])) {
$listHash['parse'] = true;
diff --git a/modules/mod_last_comments.tpl b/modules/mod_last_comments.tpl
index 094ad4b..094ad4b 100644..100755
--- a/modules/mod_last_comments.tpl
+++ b/modules/mod_last_comments.tpl
diff --git a/modules/mod_structure_navigation.php b/modules/mod_structure_navigation.php
index 170dd64..170dd64 100644..100755
--- a/modules/mod_structure_navigation.php
+++ b/modules/mod_structure_navigation.php
diff --git a/modules/mod_structure_navigation.tpl b/modules/mod_structure_navigation.tpl
index a983e14..a983e14 100644..100755
--- a/modules/mod_structure_navigation.tpl
+++ b/modules/mod_structure_navigation.tpl
diff --git a/modules/mod_structure_toc.php b/modules/mod_structure_toc.php
index 055f1b9..6d69da3 100755
--- a/modules/mod_structure_toc.php
+++ b/modules/mod_structure_toc.php
@@ -5,7 +5,7 @@
* @package liberty
* @subpackage modules
*/
-
+
/**
* Initial Setup
*/
diff --git a/modules/mod_structure_toc.tpl b/modules/mod_structure_toc.tpl
index 12afa2d..12afa2d 100644..100755
--- a/modules/mod_structure_toc.tpl
+++ b/modules/mod_structure_toc.tpl
diff --git a/modules/mod_top_authors.tpl b/modules/mod_top_authors.tpl
index 49970d8..49970d8 100644..100755
--- a/modules/mod_top_authors.tpl
+++ b/modules/mod_top_authors.tpl
diff --git a/plugins/data.addjstabs.php b/plugins/data.addjstabs.php
index 61a779b..9e37554 100755
--- a/plugins/data.addjstabs.php
+++ b/plugins/data.addjstabs.php
@@ -1,7 +1,7 @@
<?php
namespace Bitweaver\Liberty;
-use Bitweaver\Liberty\LibertyBase;
+
use Bitweaver\KernelTools;
/**
@@ -39,7 +39,7 @@ $pluginParams = [
'description' => KernelTools::tra("Will join the contents from several sources in a Tabbed Interface."),
'help_function' => 'data_addjstabs_help',
'syntax' => "{ADDTABS tab1= tab2= tab3= . . . tab99= }",
- 'plugin_type' => DATA_PLUGIN
+ 'plugin_type' => DATA_PLUGIN,
];
$gLibertySystem->registerPlugin( PLUGIN_GUID_DATAADDJSTABS, $pluginParams );
$gLibertySystem->registerDataTag( $pluginParams['tag'], PLUGIN_GUID_DATAADDJSTABS );
@@ -97,7 +97,7 @@ function data_addjstabs($data, $params) {
}
if( !empty( $html )) {
return \Bitweaver\Liberty\smarty_block_jstabs( [], $html, $gBitSmarty, '' );
- } else {
- return $html;
}
+ return $html;
+
}
diff --git a/plugins/data.addtabs.php b/plugins/data.addtabs.php
index de49b25..f470f67 100755
--- a/plugins/data.addtabs.php
+++ b/plugins/data.addtabs.php
@@ -1,7 +1,7 @@
<?php
namespace Bitweaver\Liberty;
-use Bitweaver\Liberty\LibertyBase;
+
use Bitweaver\KernelTools;
/**
@@ -38,7 +38,7 @@ $pluginParams = [
'description' => KernelTools::tra("Will join the contents from several sources in a Tabbed Interface."),
'help_function' => '\data_addtabs_help',
'syntax' => "{ADDTABS tab1= tab2= tab3= . . . tab99= }",
- 'plugin_type' => DATA_PLUGIN
+ 'plugin_type' => DATA_PLUGIN,
];
$gLibertySystem->registerPlugin( PLUGIN_GUID_DATAADDTABS, $pluginParams );
$gLibertySystem->registerDataTag( $pluginParams['tag'], PLUGIN_GUID_DATAADDTABS );
diff --git a/plugins/data.adsense.php b/plugins/data.adsense.php
index b8af0c9..698a691 100755
--- a/plugins/data.adsense.php
+++ b/plugins/data.adsense.php
@@ -1,6 +1,7 @@
<?php
namespace Bitweaver\Liberty;
+
use Bitweaver\KernelTools;
/**
@@ -30,7 +31,7 @@ use Bitweaver\KernelTools;
******************/
global $gLibertySystem;
define( 'PLUGIN_GUID_DATAADSENSE', 'dataadsense' );
-$pluginParams = array (
+$pluginParams = [
'tag' => 'ADSENSE',
'auto_activate' => false,
'requires_pair' => false,
@@ -40,8 +41,8 @@ $pluginParams = array (
'description' => KernelTools::tra("This plugin adds Adsense Code to page."),
'help_function' => '\data_adsense_help',
'syntax' => "{ADSENSE}",
- 'plugin_type' => DATA_PLUGIN
-);
+ 'plugin_type' => DATA_PLUGIN,
+];
$gLibertySystem->registerPlugin( PLUGIN_GUID_DATAADSENSE, $pluginParams );
$gLibertySystem->registerDataTag( $pluginParams['tag'], PLUGIN_GUID_DATAADSENSE );
diff --git a/plugins/data.agentinfo.php b/plugins/data.agentinfo.php
index b2b7cf5..9d07784 100755
--- a/plugins/data.agentinfo.php
+++ b/plugins/data.agentinfo.php
@@ -1,6 +1,7 @@
<?php
namespace Bitweaver\Liberty;
+
use Bitweaver\KernelTools;
/**
@@ -38,7 +39,7 @@ $pluginParams = [
'description' => KernelTools::tra("This plugin will display the viewer's IP address, the Browser they are using, or the info about the site's Server software."),
'help_function' => '\data_agentinfo_help',
'syntax' => "{AGENTINFO info= }",
- 'plugin_type' => DATA_PLUGIN
+ 'plugin_type' => DATA_PLUGIN,
];
$gLibertySystem->registerPlugin( PLUGIN_GUID_DATAAGENTINFO, $pluginParams );
$gLibertySystem->registerDataTag( $pluginParams['tag'], PLUGIN_GUID_DATAAGENTINFO );
@@ -69,19 +70,19 @@ function data_agentinfo_help() {
// Load Function
function data_agentinfo($data, $params) {
- $info = 'IP';
+ $info = 'IP';
extract ($params, EXTR_SKIP);
switch (strtoupper ($info)) {
case 'SVRSW': // To maintain Pre-Clyde Parameters
- case 'SERVER':
- $ret = $_SERVER["SERVER_SOFTWARE"];
- return $ret;
- case 'BROWSER':
- $ret = $_SERVER["HTTP_USER_AGENT"];
- return $ret;
- default:
- $ret = $_SERVER["REMOTE_ADDR"];
- return $ret;
+ case 'SERVER':
+ $ret = $_SERVER["SERVER_SOFTWARE"];
+ return $ret;
+ case 'BROWSER':
+ $ret = $_SERVER["HTTP_USER_AGENT"];
+ return $ret;
+ default:
+ $ret = $_SERVER["REMOTE_ADDR"];
+ return $ret;
}
}
diff --git a/plugins/data.alias.php b/plugins/data.alias.php
index ea44644..9c3eb75 100755
--- a/plugins/data.alias.php
+++ b/plugins/data.alias.php
@@ -1,7 +1,7 @@
<?php
namespace Bitweaver\Liberty;
-use Bitweaver\Liberty\LibertyContent;
+
use Bitweaver\Wiki\BitPage;
use Bitweaver\KernelTools;
@@ -30,7 +30,7 @@ $pluginParams = [
'description' => KernelTools::tra( "This plugin allows you to easily create an alias for a page." ),
'help_function' => '\data_alias_help',
'syntax' => "{alias page='title'}",
- 'plugin_type' => DATA_PLUGIN
+ 'plugin_type' => DATA_PLUGIN,
];
$gLibertySystem->registerPlugin( PLUGIN_GUID_DATAalias, $pluginParams );
$gLibertySystem->registerDataTag( $pluginParams['tag'], PLUGIN_GUID_DATAalias );
diff --git a/plugins/data.attachment.php b/plugins/data.attachment.php
index f1c0167..b3fcc68 100755
--- a/plugins/data.attachment.php
+++ b/plugins/data.attachment.php
@@ -1,8 +1,7 @@
<?php
namespace Bitweaver;
-use Bitweaver\BitBase;
-use Bitweaver\KernelTools;
+
use Bitweaver\Liberty\LibertyBase;
use Bitweaver\Liberty\LibertyContent;
use Bitweaver\Wiki\BitPage;
@@ -48,7 +47,6 @@ $pluginParams = [
$gLibertySystem->registerPlugin( PLUGIN_GUID_DATAATTACHMENT, $pluginParams );
$gLibertySystem->registerDataTag( $pluginParams['tag'], PLUGIN_GUID_DATAATTACHMENT );
-
function data_attachment_help() {
$help =
'<table class="data help">'
diff --git a/plugins/data.biticon.php b/plugins/data.biticon.php
index 70462f5..da40c68 100755
--- a/plugins/data.biticon.php
+++ b/plugins/data.biticon.php
@@ -1,6 +1,7 @@
<?php
namespace Bitweaver\Liberty;
+
use Bitweaver\KernelTools;
/**
@@ -24,7 +25,7 @@ $pluginParams = [
'description' => KernelTools::tra( "Display any bitweaver icon" ),
'help_function' => '\data_biticon_help',
'syntax' => '{biticon ipackage= iname= iexplain=}',
- 'plugin_type' => DATA_PLUGIN
+ 'plugin_type' => DATA_PLUGIN,
];
$gLibertySystem->registerPlugin( PLUGIN_GUID_DATABITICON, $pluginParams );
$gLibertySystem->registerDataTag( $pluginParams['tag'], PLUGIN_GUID_DATABITICON );
diff --git a/plugins/data.code.php b/plugins/data.code.php
index db070ad..3cf90dd 100755
--- a/plugins/data.code.php
+++ b/plugins/data.code.php
@@ -1,7 +1,6 @@
<?php
namespace Bitweaver;
-use Bitweaver\KernelTools;
/**
* @version $Revision$
@@ -155,7 +154,6 @@ if( !function_exists( 'deCodeHTML' )) { // avoid name collisions
}
}
-
// Load Function
function data_code( $pData, $pParams ) { // Pre-Clyde Changes
global $gBitSystem;
@@ -181,7 +179,7 @@ function data_code( $pData, $pParams ) { // Pre-Clyde Changes
break;
}
}
- $num = isset( $num ) ? $num : false;
+ $num = $num ?? false;
// trim any trailing spaces
$code = '';
@@ -241,7 +239,7 @@ function data_code( $pData, $pParams ) { // Pre-Clyde Changes
}
$code = highlight_string( $code, true );
// Replacement-map to replace Colors
- $convmap = array(
+ $convmap = [
// The Default Color
'#000000">' => '#004A4A">',
// Color for Functions/Variables/Numbers/&/Constants
@@ -251,8 +249,8 @@ function data_code( $pData, $pParams ) { // Pre-Clyde Changes
// Color for Constants
'#FF9900">' => '#BB4040">',
// Color for Strings
- '#CC0000">' => '#903030">'
- );
+ '#CC0000">' => '#903030">',
+ ];
// <-- # Assigned by HighLight_String / --> # Color to be Displayed
// NOTE: The colors assigned by HighLight_String have changed with different versions of PHP - these are for PHP 4.3.4
// Change the Colors
diff --git a/plugins/data.comment.php b/plugins/data.comment.php
index b5cbef4..6db25ea 100755
--- a/plugins/data.comment.php
+++ b/plugins/data.comment.php
@@ -1,6 +1,7 @@
<?php
namespace Bitweaver\Liberty;
+
use Bitweaver\KernelTools;
/**
@@ -25,7 +26,7 @@ $pluginParams = [
'description' => KernelTools::tra("This plugin allows Comments (Text that will not be displayed) to be added to a page."),
'help_function' => '\data__comment_help',
'syntax' => "{comment}Data Not Displayed{/comment}",
- 'plugin_type' => DATA_PLUGIN
+ 'plugin_type' => DATA_PLUGIN,
];
$gLibertySystem->registerPlugin( PLUGIN_GUID_DATACOMMENT, $pluginParams );
$gLibertySystem->registerDataTag( $pluginParams['tag'], PLUGIN_GUID_DATACOMMENT );
diff --git a/plugins/data.copyright.php b/plugins/data.copyright.php
index 9011acb..eb052e4 100755
--- a/plugins/data.copyright.php
+++ b/plugins/data.copyright.php
@@ -1,6 +1,7 @@
<?php
namespace Bitweaver\Liberty;
+
use Bitweaver\KernelTools;
/**
@@ -41,7 +42,7 @@ $pluginParams = [
'description' => KernelTools::tra("This plugin is used to insert CopyRight notices."),
'help_function' => '\data_copyright_help',
'syntax' => "{COPYRIGHT title= year= authors= }",
- 'plugin_type' => DATA_PLUGIN
+ 'plugin_type' => DATA_PLUGIN,
];
$gLibertySystem->registerPlugin( PLUGIN_GUID_DATACOPYRIGHT, $pluginParams );
$gLibertySystem->registerDataTag( $pluginParams['tag'], PLUGIN_GUID_DATACOPYRIGHT );
@@ -97,9 +98,9 @@ function data_copyright($data, $params) { // Pre-Clyde Changes
$pos2 = strlen($data) - $pos1;
$authors = substr( $data, $pos1, $pos2);
} else {
- $title = isset( $title) ? $title : ' ';
- $year = isset( $year) ? $year : ' ';
- $authors = isset( $authors) ? $authors : ' ';
+ $title = $title ?? ' ';
+ $year = $year ?? ' ';
+ $authors = $authors ?? ' ';
}
$ret = 'The plugin <strong>"' . $pluginParams['tag'] . '"</strong> has not been completed as yet. ';
return $ret;
diff --git a/plugins/data.countdown.php b/plugins/data.countdown.php
index ecab8a9..330d36c 100755
--- a/plugins/data.countdown.php
+++ b/plugins/data.countdown.php
@@ -1,6 +1,7 @@
<?php
namespace Bitweaver\Liberty;
+
use Bitweaver\KernelTools;
/**
@@ -28,7 +29,7 @@ use Bitweaver\KernelTools;
*/
define( 'PLUGIN_GUID_DATACOUNTDOWN', 'datacountdown' );
global $gLibertySystem;
-$pluginParams = array (
+$pluginParams = [
'tag' => 'COUNTDOWN',
'auto_activate' => false,
'requires_pair' => false,
@@ -38,8 +39,8 @@ $pluginParams = array (
'description' => KernelTools::tra("Displays a Count-Down until a date:time is reached - then - negative numbers indicate how long it has been since that date. The Count-Down is displayed in the format of (X days, X hours, X minutes and X seconds)."),
'help_function' => '\data_countdown_help',
'syntax' => "{COUNTDOWN enddate= localtime= class= punct= text=}",
- 'plugin_type' => DATA_PLUGIN
-);
+ 'plugin_type' => DATA_PLUGIN,
+];
$gLibertySystem->registerPlugin( PLUGIN_GUID_DATACOUNTDOWN, $pluginParams );
$gLibertySystem->registerDataTag( $pluginParams['tag'], PLUGIN_GUID_DATACOUNTDOWN );
@@ -66,17 +67,17 @@ function data_countdown_help() {
.'<td>class</td>'
.'<td>' . KernelTools::tra( "string") . '<br />' . KernelTools::tra("(optional)") . '</td>'
.'<td>' . KernelTools::tra( "Classname of the SPAN surrounding the countdown. The date/time segments are each wrapped in a VAR-Tag. Default = countdown") . '</td>'
- .'</tr>'
+ .'</tr>'
.'<tr class="even">'
.'<td>punct</td>'
.'<td>' . KernelTools::tra( "string") . '<br />' . KernelTools::tra("(optional)") . '</td>'
.'<td>' . KernelTools::tra( "Any kind of punctuation to divide the date/time segments from each other, a comma, a colon, a pipe ... Default = space. To put a non breaking space, use HTML: &amp;nbsp;") . '</td>'
- .'</tr>'
+ .'</tr>'
.'<tr class="odd">'
.'<td>text</td>'
.'<td>' . KernelTools::tra( "string") . '<br />' . KernelTools::tra("(optional)") . '</td>'
.'<td>' . KernelTools::tra( "Text to be displayed after the date/time string. It's wrapped in &lt;em&gt;.") . '</td>'
- .'</tr>'
+ .'</tr>'
.'</table>'
.'<p>' . KernelTools::tra("Example 1: ") . '<input value="{COUNTDOWN enddate=\'8:02pm May 10 2004\' localtime=\'on\' text=\'' . KernelTools::tra(" - Time Passes So Slowly") . '\'}" type="text" size="40" /></p>'
.'<p>' . KernelTools::tra("Example 2: ") . '<input value="{COUNTDOWN enddate=\'2012-12-22 00:01\' class=\'alert red\' punct=\', \' text=\'Purple Haze\'}" type="text" size="40" /></p>'
@@ -90,26 +91,26 @@ function data_countdown($data,$params) {
global $gLibertySystem;
$pluginParams = $gLibertySystem->mPlugins[PLUGIN_GUID_DATACOUNTDOWN];
extract ($params, EXTR_SKIP);
-
+
if (!isset($enddate) ) { // The Mandatory Parameter is missing
$ret = KernelTools::tra("The required parameter ") . "<strong>enddate</strong>" . KernelTools::tra(" was missing from the plugin ") . '<strong>"' . $pluginParams['tag'] . '"</strong>';
$ret.= data_countdown_help();
return $ret;
}
-
+
$then = strtotime ($enddate);
-
+
if ($then == -1) { // strtotime failed so enddate was not a valid date
$ret = KernelTools::tra("__Error__ - The plugin ") . '<strong>"' . $pluginParams['tag'] . '"</strong>' . KernelTools::tra(" was not given a valid date. The date given was:\n") . "enddate=$enddate";
return $ret;
}
-
+
$tz = isset($localtime) && $localtime == 'on' && isset($_COOKIE['tz_offset']) ? $_COOKIE['tz_offset'] : 0;
-
+
if (!isset($class)) {
$class = 'countdown';
}
-
+
if (!isset($punct)) {
$punct = " ";
}
@@ -118,17 +119,16 @@ function data_countdown($data,$params) {
$text = "";
}
-
$now = strtotime ("now") + $tz;
$difference = $then - $now;
$num = $difference/86400;
- $days = intval($num);
+ $days = (int) $num;
$num2 = ($num - $days)*24;
- $hours = intval($num2);
+ $hours = (int) $num2;
$num3 = ($num2 - $hours)*60;
- $mins = intval($num3);
+ $mins = (int) $num3;
$num4 = ($num3 - $mins)*60;
- $secs = intval($num4);
+ $secs = (int) $num4;
$ret = "
<span class='".$class."'>"
. "<var>" . $days . " " . KernelTools::tra("days") . "</var>" . $punct
diff --git a/plugins/data.creationtime.php b/plugins/data.creationtime.php
index 7d0b33d..ea3a848 100755
--- a/plugins/data.creationtime.php
+++ b/plugins/data.creationtime.php
@@ -1,7 +1,6 @@
<?php
namespace Bitweaver;
-use Bitweaver\KernelTools;
/**
* @version $Revision$
@@ -37,7 +36,7 @@ $pluginParams = [
'description' => KernelTools::tra("This plugin will display the creation time of a page."),
'help_function' => '\data_creationtime_help',
'syntax' => "{creationtime}",
- 'plugin_type' => DATA_PLUGIN
+ 'plugin_type' => DATA_PLUGIN,
];
$gLibertySystem->registerPlugin( PLUGIN_GUID_DATA_CREATIONTIME, $pluginParams );
$gLibertySystem->registerDataTag( $pluginParams['tag'], PLUGIN_GUID_DATA_CREATIONTIME );
@@ -47,7 +46,7 @@ function data_creationtime_help() {
return KernelTools::tra( "Example: " )."{creationtime}<br />";
}
-//The actual handler for the plugin
+//The actual handler for the plugin
function data_creationtime( $data, $params, &$pCommonObject ) {
return \Bitweaver\Liberty\smarty_modifier_bit_short_datetime( $pCommonObject->mInfo['created'] );
}
diff --git a/plugins/data.div.php b/plugins/data.div.php
index 1caee93..5c57c67 100755
--- a/plugins/data.div.php
+++ b/plugins/data.div.php
@@ -1,7 +1,7 @@
<?php
namespace Bitweaver;
-use Bitweaver\KernelTools;
+
use Bitweaver\Liberty\LibertyContent;
/**
@@ -29,7 +29,7 @@ $pluginParams = [
'description' => KernelTools::tra( "This plugin allows you to easily create a div with a number of optional CSS parameters." ),
'help_function' => '\data_div_help',
'syntax' => "{div border='3px solid blue'}",
- 'plugin_type' => DATA_PLUGIN
+ 'plugin_type' => DATA_PLUGIN,
];
$gLibertySystem->registerPlugin( PLUGIN_GUID_DATADIV, $pluginParams );
$gLibertySystem->registerDataTag( $pluginParams['tag'], PLUGIN_GUID_DATADIV );
diff --git a/plugins/data.dropdown.php b/plugins/data.dropdown.php
index 861b05d..4c1eee6 100755
--- a/plugins/data.dropdown.php
+++ b/plugins/data.dropdown.php
@@ -1,6 +1,7 @@
<?php
namespace Bitweaver\Liberty;
+
use Bitweaver\KernelTools;
/**
@@ -36,7 +37,7 @@ $pluginParams = [
'description' => KernelTools::tra("This plugin creates a expandable box of text. All text should be entered between the ") . "{DD} " . KernelTools::tra("blocks."),
'help_function' => '\data_dropdown_help',
'syntax' => "{DD title= width= }" . KernelTools::tra("Text in the Drop-Down box.") . "{DD}",
- 'plugin_type' => DATA_PLUGIN
+ 'plugin_type' => DATA_PLUGIN,
];
$gLibertySystem->registerPlugin( PLUGIN_GUID_DATADROPDOWN, $pluginParams );
$gLibertySystem->registerDataTag( $pluginParams['tag'], PLUGIN_GUID_DATADROPDOWN );
@@ -73,7 +74,7 @@ function data_dropdown_help() {
*/
function data_dropdown($data, $params) {
extract ($params, EXTR_SKIP);
- $title = isset($title) ? $title : KernelTools::tra( 'For More Information, click me.' );
+ $title = $title ?? KernelTools::tra( 'For More Information, click me.' );
$id = 'dropdown'.(microtime() * 1000000);
$ret = '<div style="text-align:center;font-weight:bold;">'
.'<a title="Click to Expand or Contract" href="javascript:flip(\''.$id.'\')">'.$title.'</a>'
diff --git a/plugins/data.example.php b/plugins/data.example.php
index 7e86407..2b1adfc 100755
--- a/plugins/data.example.php
+++ b/plugins/data.example.php
@@ -1,6 +1,7 @@
<?php
namespace Bitweaver\Liberty;
+
use Bitweaver\KernelTools;
/**
@@ -36,7 +37,7 @@ $pluginParams = [
'description' => KernelTools::tra("This Plugin is an Example that does nothing. It functions as a template for the creation of new plugins."),
'help_function' => '\data_example_help',
'syntax' => "{EXAM x1= x2= }",
- 'plugin_type' => DATA_PLUGIN
+ 'plugin_type' => DATA_PLUGIN,
];
$gLibertySystem->registerPlugin( PLUGIN_GUID_DATAEXAMPLE, $pluginParams );
$gLibertySystem->registerDataTag( $pluginParams['tag'], PLUGIN_GUID_DATAEXAMPLE );
@@ -65,7 +66,7 @@ function data_example_help() {
.'<br />' . KernelTools::tra( "The Default =") . ' <strong>3</strong> ' . KernelTools::tra( "Which means - What")
.'</td>'
.'</tr>'
- .'</table>'
+ .'</table>'
. KernelTools::tra("Example: ") . "{EXAM x1=' ' x2=5 }<br />"
. KernelTools::tra("This will display");
return $help;
diff --git a/plugins/data.geshidata.php b/plugins/data.geshidata.php
index a7ec24b..23ed18c 100755
--- a/plugins/data.geshidata.php
+++ b/plugins/data.geshidata.php
@@ -1,6 +1,7 @@
<?php
namespace Bitweaver\Liberty;
+
use Bitweaver\KernelTools;
// $Id$
@@ -31,7 +32,7 @@ $pluginParams = [
'description' => KernelTools::tra("This plugin is a documentation tool for the bitweaver site. It will display some of information defined in the GeSHi (Generic Syntax Highlighter) package."),
'help_function' => '\data_help_GeshiData',
'syntax' => "{GESHIDATA doall= lang= info= }",
- 'plugin_type' => DATA_PLUGIN
+ 'plugin_type' => DATA_PLUGIN,
];
$gLibertySystem->registerPlugin( PLUGIN_GUID_DATAGESHIDATA, $pluginParams );
$gLibertySystem->registerDataTag( $pluginParams['tag'], PLUGIN_GUID_DATAGESHIDATA );
@@ -120,7 +121,7 @@ function data_GeshiData($data, $params) {
return $ret;
} } }
return \pluginError('GeshiData', KernelTools::tra('The value placed in the parameter').' <strong>$info='.$info.'</strong> '.KernelTools::tra("was not a valid Key-word."));
- } else {
+ }
$ret = '<div class="box">';
$ret .= '<div class="error" style="text-align:center;">'; // The Header
$ret .= '<big><big><strong>'.KernelTools::tra('Language Properties').'</strong></big></big>';
@@ -161,6 +162,6 @@ function data_GeshiData($data, $params) {
} // foreach
$ret .= '</div>';
$ret .= '</div>';
- }
+
return $ret;
}
diff --git a/plugins/data.googleviewer.php b/plugins/data.googleviewer.php
index 89261b3..b2442bf 100755
--- a/plugins/data.googleviewer.php
+++ b/plugins/data.googleviewer.php
@@ -1,6 +1,7 @@
<?php
namespace Bitweaver\Liberty;
+
use Bitweaver\KernelTools;
/**
@@ -25,7 +26,7 @@ $pluginParams = [
'description' => KernelTools::tra( "This plugin allows you to simply embed a PDF document in a page using the embeddable Google Viewer." ),
'help_function' => '\data_googleviewer_help',
'syntax' => "{googleviewer url=}",
- 'plugin_type' => DATA_PLUGIN
+ 'plugin_type' => DATA_PLUGIN,
];
$gLibertySystem->registerPlugin( PLUGIN_GUID_DATAGOOGLEVIEWER, $pluginParams );
$gLibertySystem->registerDataTag( $pluginParams['tag'], PLUGIN_GUID_DATAGOOGLEVIEWER );
@@ -78,7 +79,7 @@ function data_googleviewer( $pData, $pParams ) {
if( !empty( $url )) {
return '<!--~np~--><iframe width="'.$width.'" height="'.$height.'" style="border:none;" src="http://docs.google.com/viewer?embedded=true&url='.urlencode($url).'"></iframe><!--~/np~-->';
- } else {
- return KernelTools::tra( 'No URL given' );
}
+ return KernelTools::tra( 'No URL given' );
+
}
diff --git a/plugins/data.graphviz.php b/plugins/data.graphviz.php
index d4d679e..e9db497 100755
--- a/plugins/data.graphviz.php
+++ b/plugins/data.graphviz.php
@@ -1,6 +1,7 @@
<?php
namespace Bitweaver\Liberty;
+
use Bitweaver\KernelTools;
/**
@@ -37,7 +38,7 @@ $pluginParams = [
'description' => KernelTools::tra("This plugin renders it's content as a graphviz image (dot or neato). It requies the Image_GraphViz pear plugin and graphviz to be installed: pear install Image_GraphViz"),
'help_function' => '\data_graphviz_help',
'syntax' => "{GRAPHVIZ}digraph ... {/GRAPHVIZ}",
- 'plugin_type' => DATA_PLUGIN
+ 'plugin_type' => DATA_PLUGIN,
];
$gLibertySystem->registerPlugin( PLUGIN_GUID_DATAGRAPHVIZ, $pluginParams );
$gLibertySystem->registerDataTag( $pluginParams['tag'], PLUGIN_GUID_DATAGRAPHVIZ );
@@ -66,7 +67,7 @@ function data_graphviz_help() {
.'<br />' . KernelTools::tra( "The Default =") . ' <strong>3</strong> ' . KernelTools::tra( "Which means - What")
.'</td>'
.'</tr>'
- .'</table>'
+ .'</table>'
. KernelTools::tra("Example: ") . "{EXAM x1=' ' x2=5 }<br />"
. KernelTools::tra("This will display");
return $help;
@@ -80,24 +81,24 @@ function data_graphviz($data, $params) {
$storageurl = STORAGE_PKG_URL.'GraphViz/';
$storagepath = STORAGE_PKG_PATH.'GraphViz/';
$temppath = TEMP_PKG_PATH.'GraphViz/';
-
+
if( !is_dir( $temppath ) ) {
KernelTools::mkdir_p( $temppath );
}
if( !is_dir( $storagepath ) ) {
KernelTools::mkdir_p( $storagepath );
}
-
+
$file = md5( $data );
$dotFile = $temppath . $file . '.dot';
$pngFile = $storagepath . $file . '.png';
$pngURL = $storageurl . $file . '.png';
-
+
if( !file_exists( $pngFile ) ) {
if( @include_once 'PEAR.php' ) {
if(@include_once UTIL_PKG_INCLUDE_PATH.'pear/Image/GraphViz.php' ) {
$graph = new \Image_GraphViz;
- $error = '<div class=error>'.KernelTools::tra("Unable to write temporary file. Please check your server configuration.").'</div>';
+ $error = '<div class=error>'.KernelTools::tra("Unable to write temporary file. Please check your server configuration.").'</div>';
if (!$fp = fopen($dotFile, 'w')) {
return $error;
}
@@ -108,7 +109,7 @@ function data_graphviz($data, $params) {
$graph->renderDotFile( $dotFile, $pngFile, 'png' );
// No need to keep this lying around
unlink($dotFile);
-
+
// If it still isn't there....
if (!file_exists($pngFile)) {
return '<div class=error>'.KernelTools::tra("Unable to generate graphviz image file. Please check your data.").'</div>';
@@ -118,7 +119,7 @@ function data_graphviz($data, $params) {
return "<div class=error>".KernelTools::tra("The Image_Graphviz pear plugin is not installed. Install with `pear install Image_Graphviz`.")."</div>";
}
}
- else {
+ else {
return "<div class=error>".KernelTools::tra("PEAR and the Image_Graphviz pear plugin are not installed.")."</div>";
}
}
diff --git a/plugins/data.img.php b/plugins/data.img.php
index d8ce09f..8e41af6 100755
--- a/plugins/data.img.php
+++ b/plugins/data.img.php
@@ -1,7 +1,6 @@
<?php
namespace Bitweaver;
-use Bitweaver\KernelTools;
/**
* @version $Revision$
@@ -27,7 +26,7 @@ $pluginParams = [
'syntax' => "{img src=http://www.google.at/logos/olympics06_ski_jump.gif}",
'plugin_type' => DATA_PLUGIN,
'booticon' => '{booticon iname="icon-picture" iexplain="Web Image"}',
- 'taginsert' => '{img src= width= height= align= description= link=}'
+ 'taginsert' => '{img src= width= height= align= description= link=}',
];
$gLibertySystem->registerPlugin( PLUGIN_GUID_DATAIMG, $pluginParams );
$gLibertySystem->registerDataTag( $pluginParams['tag'], PLUGIN_GUID_DATAIMG );
diff --git a/plugins/data.include.php b/plugins/data.include.php
index 1bbfc61..5d6e13d 100755
--- a/plugins/data.include.php
+++ b/plugins/data.include.php
@@ -1,8 +1,8 @@
<?php
namespace Bitweaver\Liberty;
+
use Bitweaver\KernelTools;
-use Bitweaver\Liberty\LibertyBase;
use Bitweaver\Wiki\BitPage;
/**
@@ -40,7 +40,7 @@ $pluginParams = [
'description' => KernelTools::tra("This plugin is used to include the contents of one Wiki page in another Wiki page."),
'help_function' => '\data_include_help',
'syntax' => "{INCLUDE content_id= }",
- 'plugin_type' => DATA_PLUGIN
+ 'plugin_type' => DATA_PLUGIN,
];
$gLibertySystem->registerPlugin( PLUGIN_GUID_DATAINCLUDE, $pluginParams );
$gLibertySystem->registerDataTag( $pluginParams['tag'], PLUGIN_GUID_DATAINCLUDE );
diff --git a/plugins/data.jstabs.php b/plugins/data.jstabs.php
index 50493d3..d3e9c15 100755
--- a/plugins/data.jstabs.php
+++ b/plugins/data.jstabs.php
@@ -1,8 +1,8 @@
<?php
namespace Bitweaver\Liberty;
+
use Bitweaver\KernelTools;
-use Bitweaver\Liberty\LibertyContent;
/**
* @version $Revision$
@@ -37,7 +37,6 @@ $pluginParams = [
$gLibertySystem->registerPlugin( PLUGIN_GUID_DATAJSTABS, $pluginParams );
$gLibertySystem->registerDataTag( $pluginParams['tag'], PLUGIN_GUID_DATAJSTABS );
-
function data_jstabs( $pData, $pParams, $pCommonObject ) {
global $gBitSmarty;
@@ -67,9 +66,9 @@ function data_jstabs( $pData, $pParams, $pCommonObject ) {
if( !empty( $html )) {
return \Bitweaver\Liberty\smarty_block_jstabs( [], $html, $gBitSmarty, '' );
- } else {
- return ' ';
}
+ return ' ';
+
}
function data_jstabs_help() {
diff --git a/plugins/data.ledgertable.php b/plugins/data.ledgertable.php
index 16554cf..cb3ef06 100755
--- a/plugins/data.ledgertable.php
+++ b/plugins/data.ledgertable.php
@@ -1,6 +1,7 @@
<?php
namespace Bitweaver\Liberty;
+
use Bitweaver\KernelTools;
// $Id$
@@ -30,7 +31,7 @@ $pluginParams = [
'description' => KernelTools::tra("This Plugin creates a ledger-like table with even/odd row colors, optional top- or left-placed headers, and support for row/column spans."),
'help_function' => '\data_ledgertable_help',
'syntax' => "{LEDGERTABLE loc= head= }",
- 'plugin_type' => DATA_PLUGIN
+ 'plugin_type' => DATA_PLUGIN,
];
$gLibertySystem->registerPlugin( PLUGIN_GUID_DATALEDGERTABLE, $pluginParams );
$gLibertySystem->registerDataTag( $pluginParams['tag'], PLUGIN_GUID_DATALEDGERTABLE );
@@ -60,14 +61,14 @@ function data_ledgertable_help() {
.'</table>'
. KernelTools::tra("LedgerTable: ") . "{LEDGERTABLE loc=>left head=>Row1~|~Row2~|~Row3}<br />"
. KernelTools::tra("This will display")
- . data_ledgertable('Example', array('loc' => 'left', 'head' => 'Row1~|~Row2~|~Row3'));
+ . data_ledgertable('Example', ['loc' => 'left', 'head' => 'Row1~|~Row2~|~Row3']);
return $help;
}
/****************
* Load Function *
****************/
function data_ledgertable($data, $params) {
- global $gBitSystem;
+ global $gBitSystem;
if (empty($data)) {
return "<!-- Error: No data passed to LEDGERTABLE plugin. -->";
@@ -77,76 +78,76 @@ function data_ledgertable($data, $params) {
}
$ret = '';
- if (isset($params['loc'])) {
+ if (isset($params['loc'])) {
$ret .= "<!-- Header row set to $params[loc]. -->";
$plugdata_loc = $params['loc'];
} else {
$ret .= "<!-- Defaulting header row to top. -->";
- $plugdata_loc = 'top';
- }
- if (isset($params['head'])) {
+ $plugdata_loc = 'top';
+ }
+ if (isset($params['head'])) {
$ret .= "<!-- Got headers. -->";
$plugdata_head = $params['head'];
- } else {
+ } else {
$ret .= "<!-- No headers specified. -->";
- }
- if (isset($params['width'])) {
+ }
+ if (isset($params['width'])) {
$ret .= "<!-- Got width $params[width]. -->";
$plugdata_width = " style=\"width: " . $params['width'] . '"';
- } else {
+ } else {
$plugdata_width = "";
- }
+ }
- $ret .= "<table class=\"ledgertable\"$plugdata_width>";
+ $ret .= "<table class=\"ledgertable\"$plugdata_width>";
- if (isset($plugdata_head)) {
- $headers = explode('~|~', $plugdata_head);
- if ($plugdata_loc == 'top') {
- $ret .= " <!-- Placing header row on top. -->";
- $ret .= " <tr class=\"ledgertable header row\">";
- foreach ($headers as $hdr) {
- $ret .= " <th class=\"header highlight\">$hdr</td>";
- }
- $ret .= " </tr>";
+ if (isset($plugdata_head)) {
+ $headers = explode('~|~', $plugdata_head);
+ if ($plugdata_loc == 'top') {
+ $ret .= " <!-- Placing header row on top. -->";
+ $ret .= " <tr class=\"ledgertable header row\">";
+ foreach ($headers as $hdr) {
+ $ret .= " <th class=\"header highlight\">$hdr</td>";
+ }
+ $ret .= " </tr>";
}
}
- $lines = mb_split("\n", $data);
- $line_count = 0;
- foreach ($lines as $line) {
- $line = trim($line);
- if (strlen($line) <= 0) {
- continue;
- }
- $line_count++;
+ $lines = mb_split("\n", $data);
+ $line_count = 0;
+ foreach ($lines as $line) {
+ $line = trim($line);
+ if (strlen($line) <= 0) {
+ continue;
+ }
+ $line_count++;
- $ret .= " <!-- Displaying row $line_count. -->";
- $ret .= " <tr class=\"" . (($line_count % 2) ? "odd" : "even") . "\">";
- if (isset($plugdata_head) && ($plugdata_loc == "left")) {
- $ret .= " <!-- Placing header on left. -->";
- $ret .= " <th class=\"header highlight\"";
- $header = array_shift($headers);
- if (preg_match("/^~(row|col)span:(\d+)~(.*)$/", $header, $matches)) {
- $ret .= " $matches[1]span=\"$matches[2]\"";
- $header = $matches[3];
- }
- $ret .= ">$header</td>";
- }
- $cells = explode("~|~", $line);
- foreach ($cells as $col) {
- $ret .= " <td class=\"" . (($line_count % 2) ? "odd" : "even") . "\"";
- $col = trim($col);
- if (!strcmp($col, "~blank~")) {
- $col = "&nbsp;";
- } else if (preg_match("/^~(row|col)span:(\d+)~(.*)$/", $col, $matches)) {
- $ret .= " $matches[1]span=\"$matches[2]\"";
- $col = $matches[3];
- }
- $ret .= ">$col</td>";
- }
- $ret .= " </tr>";
- }
- $ret .= "</table>";
+ $ret .= " <!-- Displaying row $line_count. -->";
+ $ret .= " <tr class=\"" . (($line_count % 2) ? "odd" : "even") . "\">";
+ if (isset($plugdata_head) && ($plugdata_loc == "left")) {
+ $ret .= " <!-- Placing header on left. -->";
+ $ret .= " <th class=\"header highlight\"";
+ $header = array_shift($headers);
+ if (preg_match("/^~(row|col)span:(\d+)~(.*)$/", $header, $matches)) {
+ $ret .= " $matches[1]span=\"$matches[2]\"";
+ $header = $matches[3];
+ }
+ $ret .= ">$header</td>";
+ }
+ $cells = explode("~|~", $line);
+ foreach ($cells as $col) {
+ $ret .= " <td class=\"" . (($line_count % 2) ? "odd" : "even") . "\"";
+ $col = trim($col);
+ if (!strcmp($col, "~blank~")) {
+ $col = "&nbsp;";
+ } else if (preg_match("/^~(row|col)span:(\d+)~(.*)$/", $col, $matches)) {
+ $ret .= " $matches[1]span=\"$matches[2]\"";
+ $col = $matches[3];
+ }
+ $ret .= ">$col</td>";
+ }
+ $ret .= " </tr>";
+ }
+ $ret .= "</table>";
- return $ret;
+ return $ret;
}
diff --git a/plugins/data.module.php b/plugins/data.module.php
index f692bb8..ccdc7e3 100755
--- a/plugins/data.module.php
+++ b/plugins/data.module.php
@@ -1,6 +1,7 @@
<?php
namespace Bitweaver\Liberty;
+
use Bitweaver\KernelTools;
/**
@@ -38,7 +39,7 @@ $pluginParams = [
'description' => KernelTools::tra("Display a module block in content"),
'help_function' => '\datamodule_help',
'syntax' => "{module module= align='right'}",
- 'plugin_type' => DATA_PLUGIN
+ 'plugin_type' => DATA_PLUGIN,
];
$gLibertySystem->registerPlugin( PLUGIN_GUID_DATAMODULE, $pluginParams );
$gLibertySystem->registerDataTag( $pluginParams['tag'], PLUGIN_GUID_DATAMODULE );
@@ -115,7 +116,7 @@ function data_datamodule( $pData, $pParams ) {
// deal with custom styling
$style = '';
- $style_options = array( 'float', 'width', 'background', 'color' );
+ $style_options = [ 'float', 'width', 'background', 'color' ];
foreach( $pParams as $param => $value ) {
if( in_array( $param, $style_options ) ) {
$style .= $param.':'.$value.';';
diff --git a/plugins/data.object.php b/plugins/data.object.php
index 642314a..840bc0c 100755
--- a/plugins/data.object.php
+++ b/plugins/data.object.php
@@ -1,6 +1,7 @@
<?php
namespace Bitweaver\Liberty;
+
use Bitweaver\KernelTools;
/**
@@ -43,12 +44,11 @@ $pluginParams = [
'description' => KernelTools::tra("This plugin displays a Flash, Tcl or Java applet/object."),
'help_function' => '\data_object_help',
'syntax' => "{OBJECT type= src= width= height=}",
- 'plugin_type' => DATA_PLUGIN
+ 'plugin_type' => DATA_PLUGIN,
];
$gLibertySystem->registerPlugin( PLUGIN_GUID_DATAOBJECT, $pluginParams );
$gLibertySystem->registerDataTag( $pluginParams['tag'], PLUGIN_GUID_DATAOBJECT );
-
function data_object_help() {
$help =
'<table class="data help">'
@@ -150,10 +150,9 @@ function data_object_help() {
return $help;
}
-
function data_object ($data, $params) {
// Need these plugin parameters
- foreach (array("type", "src") as $parameter) {
+ foreach (["type", "src"] as $parameter) {
if (!array_key_exists($parameter, $params))
return '<span class="warning">'.KernelTools::tra('When using <strong>{object}</strong>, a <strong>type</strong> and <strong>src</strong> parameter is required.').'</span>';
}
diff --git a/plugins/data.pluginhelp.php b/plugins/data.pluginhelp.php
index c5f914a..043d335 100755
--- a/plugins/data.pluginhelp.php
+++ b/plugins/data.pluginhelp.php
@@ -1,6 +1,7 @@
<?php
namespace Bitweaver\Liberty;
+
use Bitweaver\KernelTools;
/**
@@ -37,7 +38,7 @@ $pluginParams = [
'description' => KernelTools::tra("This plugin will display the plugin's Help."),
'help_function' => '\data_pluginhelp_help',
'syntax' => "{PLUGINHELP plugin= }",
- 'plugin_type' => DATA_PLUGIN
+ 'plugin_type' => DATA_PLUGIN,
];
$gLibertySystem->registerPlugin( PLUGIN_GUID_DATAPLUGINHELP, $pluginParams );
$gLibertySystem->registerDataTag( $pluginParams['tag'], PLUGIN_GUID_DATAPLUGINHELP );
diff --git a/plugins/data.pre.php b/plugins/data.pre.php
index 9bb42d0..c822713 100755
--- a/plugins/data.pre.php
+++ b/plugins/data.pre.php
@@ -1,8 +1,8 @@
<?php
namespace Bitweaver\Liberty;
+
use Bitweaver\KernelTools;
-use Bitweaver\Liberty\LibertyContent;
/**
* assigned_modules
@@ -29,7 +29,7 @@ $pluginParams = [
'description' => KernelTools::tra( "This plugin allows you to easily create a preformatted text block with a number of optional CSS parameters." ),
'help_function' => '\data_pre_help',
'syntax' => "{pre border='3px solid blue'}",
- 'plugin_type' => DATA_PLUGIN
+ 'plugin_type' => DATA_PLUGIN,
];
$gLibertySystem->registerPlugin( PLUGIN_GUID_DATAPRE, $pluginParams );
$gLibertySystem->registerDataTag( $pluginParams['tag'], PLUGIN_GUID_DATAPRE );
diff --git a/plugins/data.quote.php b/plugins/data.quote.php
index 67e927d..a05d4e2 100755
--- a/plugins/data.quote.php
+++ b/plugins/data.quote.php
@@ -1,9 +1,9 @@
<?php
namespace Bitweaver\Liberty;
+
use Bitweaver\KernelTools;
use Bitweaver\Boards\BitBoardPost;
-use Bitweaver\Liberty\LibertyComment;
use Bitweaver\Users\RoleUser;
/**
@@ -43,7 +43,7 @@ $pluginParams = [
'help_page' => 'DataPluginQuote',
'description' => KernelTools::tra( "This plugin allows content to be attributed to other authors and visually indicated." ),
'syntax' => "{quote format_guid= user= comment_id= }.. content ..{/quote}",
- 'plugin_type' => DATA_PLUGIN
+ 'plugin_type' => DATA_PLUGIN,
];
$gLibertySystem->registerPlugin( PLUGIN_GUID_DATAQUOTE, $pluginParams );
$gLibertySystem->registerDataTag( $pluginParams['tag'], PLUGIN_GUID_DATAQUOTE );
@@ -100,7 +100,7 @@ function data_quote( $pData, $pParams ) {
$user = empty( $pParams['user'] ) ? null : $pParams['user'];
if( !empty( $pParams['comment_id'] )) {
-
+
$c = $gBitSystem->getActivePackage() == 'boards'
? new BitBoardPost( preg_replace( '/[^0-9]/', '', $pParams['comment_id'] ) )
: new LibertyComment( preg_replace( '/[^0-9]/', '', $pParams['comment_id'] ) );
diff --git a/plugins/data.renderer.php b/plugins/data.renderer.php
index 3966a66..9a07095 100755
--- a/plugins/data.renderer.php
+++ b/plugins/data.renderer.php
@@ -1,6 +1,7 @@
<?php
namespace Bitweaver\Liberty;
+
use Bitweaver\KernelTools;
/**
@@ -40,7 +41,7 @@ $pluginParams = [
'help_page' => 'DataPluginRenderer',
'description' => KernelTools::tra( "This plugin will render the given content as described by the content_type given." ),
'syntax' => "{renderer class= format_guid= }.. content ..{/renderer}",
- 'plugin_type' => DATA_PLUGIN
+ 'plugin_type' => DATA_PLUGIN,
];
$gLibertySystem->registerPlugin( PLUGIN_GUID_DATARENDERER, $pluginParams );
$gLibertySystem->registerDataTag( $pluginParams['tag'], PLUGIN_GUID_DATARENDERER );
diff --git a/plugins/data.sort.php b/plugins/data.sort.php
index 0e228a2..998b177 100755
--- a/plugins/data.sort.php
+++ b/plugins/data.sort.php
@@ -1,8 +1,8 @@
<?php
namespace Bitweaver\Liberty;
+
use Bitweaver\KernelTools;
-use Bitweaver\Liberty\LibertyContent;
/**
* @version $Revision$
@@ -25,7 +25,7 @@ $pluginParams = [
'description' => KernelTools::tra( "This plugin will sort the lines within a {sort} block." ),
'help_function' => '\data_sort_help',
'syntax' => "{sort sort= }".KernelTools::tra( "Lines to be sorted" )."{sort}",
- 'plugin_type' => DATA_PLUGIN
+ 'plugin_type' => DATA_PLUGIN,
];
$gLibertySystem->registerPlugin( PLUGIN_GUID_DATASORT, $pluginParams );
$gLibertySystem->registerDataTag( $pluginParams['tag'], PLUGIN_GUID_DATASORT );
diff --git a/plugins/data.span.php b/plugins/data.span.php
index a16a89f..e7a0df9 100755
--- a/plugins/data.span.php
+++ b/plugins/data.span.php
@@ -1,8 +1,8 @@
<?php
namespace Bitweaver\Liberty;
+
use Bitweaver\KernelTools;
-use Bitweaver\Liberty\LibertyContent;
/**
* assigned_modules
@@ -29,7 +29,7 @@ $pluginParams = [
'description' => KernelTools::tra( "This plugin allows you to easily create a span with a number of optional CSS parameters." ),
'help_function' => '\data_span_help',
'syntax' => "{span border='3px solid blue'}",
- 'plugin_type' => DATA_PLUGIN
+ 'plugin_type' => DATA_PLUGIN,
];
$gLibertySystem->registerPlugin( PLUGIN_GUID_DATAspan, $pluginParams );
$gLibertySystem->registerDataTag( $pluginParams['tag'], PLUGIN_GUID_DATAspan );
diff --git a/plugins/data.textarea.php b/plugins/data.textarea.php
index a0890ac..107e28a 100755
--- a/plugins/data.textarea.php
+++ b/plugins/data.textarea.php
@@ -1,8 +1,8 @@
<?php
namespace Bitweaver\Liberty;
+
use Bitweaver\KernelTools;
-use Bitweaver\Liberty\LibertyContent;
/**
* assigned_modules
@@ -29,7 +29,7 @@ $pluginParams = [
'description' => KernelTools::tra( "This plugin allows you to easily create a textarea with a number of optional CSS parameters." ),
'help_function' => '\data_textarea_help',
'syntax' => "{textarea}",
- 'plugin_type' => DATA_PLUGIN
+ 'plugin_type' => DATA_PLUGIN,
];
$gLibertySystem->registerPlugin( PLUGIN_GUID_DATAtextarea, $pluginParams );
$gLibertySystem->registerDataTag( $pluginParams['tag'], PLUGIN_GUID_DATAtextarea );
diff --git a/plugins/data.toc.php b/plugins/data.toc.php
index c40a97d..5428587 100755
--- a/plugins/data.toc.php
+++ b/plugins/data.toc.php
@@ -1,9 +1,9 @@
<?php
namespace Bitweaver\Liberty;
+
use Bitweaver\KernelTools;
use Bitweaver\BitBase;
-use Bitweaver\Liberty\LibertyStructure;
/**
* @version $Revision$
@@ -44,7 +44,7 @@ $pluginParams = [
'plugin_type' => DATA_PLUGIN,
'booticon' => '{booticon iname="icon-list-ol" iexplain="Structure Table of Contents"}',
'taginsert' => '{toc}',
- 'structure_id' => 'id of the structure to display'
+ 'structure_id' => 'id of the structure to display',
];
$gLibertySystem->registerPlugin( PLUGIN_GUID_DATATOC, $pluginParams );
$gLibertySystem->registerDataTag( $pluginParams['tag'], PLUGIN_GUID_DATATOC );
diff --git a/plugins/data.video.php b/plugins/data.video.php
index 933886b..5d59520 100755
--- a/plugins/data.video.php
+++ b/plugins/data.video.php
@@ -1,6 +1,7 @@
<?php
namespace Bitweaver\Liberty;
+
use Bitweaver\KernelTools;
/**
@@ -26,7 +27,7 @@ $pluginParams = [
'description' => KernelTools::tra( "This plugin allows you to simply and safely insert a video in a page. Currently it only supports Flash Video (.flv) files." ),
'help_function' => '\data_video_help',
'syntax' => "{video video= player=}",
- 'plugin_type' => DATA_PLUGIN
+ 'plugin_type' => DATA_PLUGIN,
];
$gLibertySystem->registerPlugin( PLUGIN_GUID_DATAVIDEO, $pluginParams );
$gLibertySystem->registerDataTag( $pluginParams['tag'], PLUGIN_GUID_DATAVIDEO );
diff --git a/plugins/data.youtube.php b/plugins/data.youtube.php
index ddefc43..cd944b5 100755
--- a/plugins/data.youtube.php
+++ b/plugins/data.youtube.php
@@ -1,6 +1,7 @@
<?php
namespace Bitweaver\Liberty;
+
use Bitweaver\KernelTools;
/**
@@ -15,7 +16,7 @@ use Bitweaver\KernelTools;
global $gLibertySystem;
define( 'PLUGIN_GUID_DATAYOUTUBE', 'datayoutube' );
-$pluginParams = array (
+$pluginParams = [
'tag' => 'YOUTUBE',
'auto_activate' => false,
'requires_pair' => false,
@@ -25,8 +26,8 @@ $pluginParams = array (
'description' => KernelTools::tra( "This plugin allows you to simply and safely insert a YouTube video in a page." ),
'help_function' => '\data_youtube_help',
'syntax' => "{youtube id=}",
- 'plugin_type' => DATA_PLUGIN
-);
+ 'plugin_type' => DATA_PLUGIN,
+];
$gLibertySystem->registerPlugin( PLUGIN_GUID_DATAYOUTUBE, $pluginParams );
$gLibertySystem->registerDataTag( $pluginParams['tag'], PLUGIN_GUID_DATAYOUTUBE );
@@ -90,7 +91,7 @@ function data_youtube( $pData, $pParams ) {
if( !empty( $id )) {
return '<!--~np~--><object width="'.$width.'" height="'.$height.'"><param name="movie" value="http://www.youtube.com/v/'.$id.$lang.$format.'"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/'.$id.$lang.$format.'" type="application/x-shockwave-flash" wmode="transparent" width="'.$width.'" height="'.$height.'""></embed></object><!--~/np~-->';
- } else {
- return KernelTools::tra( 'No ID given' );
}
+ return KernelTools::tra( 'No ID given' );
+
}
diff --git a/plugins/filter.attachment.php b/plugins/filter.attachment.php
index a6b128e..2aa0b4c 100755
--- a/plugins/filter.attachment.php
+++ b/plugins/filter.attachment.php
@@ -1,5 +1,6 @@
<?php
namespace Bitweaver\Liberty;
+
use Bitweaver\BitBase;
/**
@@ -67,7 +68,7 @@ function attachment_filter_reqirements( $pInstall = false ) {
, CONSTRAINT `lib_att_usage_content_ref` FOREIGN KEY (`content_id`) REFERENCES `".BIT_DB_PREFIX."liberty_content`( `content_id` )
, CONSTRAINT `lib_att_usage_attachment_ref` FOREIGN KEY (`attachment_id`) REFERENCES `".BIT_DB_PREFIX."liberty_attachments`( `attachment_id` )
'
- "
+ ",
],
'indexes' => [
'lib_att_usage_content_idx' => [ 'table' => 'liberty_attachment_usage', 'cols' => 'content_id', 'opts' => null ],
diff --git a/plugins/filter.backtotop.php b/plugins/filter.backtotop.php
index 637a44c..f58f8aa 100755
--- a/plugins/filter.backtotop.php
+++ b/plugins/filter.backtotop.php
@@ -6,8 +6,9 @@
*/
namespace Bitweaver\Liberty;
+
use Bitweaver\KernelTools;
-
+
/**
* definitions ( guid character limit is 16 chars )
*/
@@ -42,11 +43,11 @@ function backtotop_postparsefilter( &$pData, &$pFilterHash ) {
$params['max'] = 6;
$params = array_merge( $params, KernelTools::parse_xml_attributes( $backtotop[1] ));
- $biticon = array(
+ $biticon = [
'ipackage' => 'icons',
'iname' => 'go-top',
'iexplain' => 'Back to top',
- );
+ ];
// get all headers into an array
preg_match_all( "/<h(\d[^>]*)>.*?<\/h\d>/i", $pData, $headers );
diff --git a/plugins/filter.bitlinks.php b/plugins/filter.bitlinks.php
index f448af9..593453b 100755
--- a/plugins/filter.bitlinks.php
+++ b/plugins/filter.bitlinks.php
@@ -1,9 +1,9 @@
<?php
namespace Bitweaver\Liberty;
+
use Bitweaver\KernelTools;
use Bitweaver\BitBase;
-use Bitweaver\Liberty\LibertyContent;
use Bitweaver\Wiki\BitPage;
/**
@@ -11,7 +11,6 @@ use Bitweaver\Wiki\BitPage;
* @package liberty
*/
-
/**
* definitions ( guid character limit is 16 chars )
*/
@@ -136,10 +135,6 @@ function bitlinks_expungefilter( &$pData, &$pFilterHash, $pObject ) {
$sBitLinks->expungeLinks( $pObject->mContentId );
}
-
-
-
-
/**
* BitLinks class
*
@@ -312,8 +307,8 @@ class BitLinks extends BitBase {
}
}
- // Process ((Wiki Page|Wiki Page Description)) type links first. Here
- // we don't handle plurals and the like since the user should know what
+ // Process ((Wiki Page|Wiki Page Description)) type links first. Here
+ // we don't handle plurals and the like since the user should know what
// he's linking to when using these links
preg_match_all( "@\({2}({$this->mWikiWordRegex})\|(.+?)\){2}@", $pData, $pages );
for( $i = 0; $i < count( $pages[1] ); $i++ ) {
@@ -588,7 +583,6 @@ class BitLinks extends BitBase {
// - replace with new name leaving description in tact
$replace[] = "(($pNewName|$1))";
-
// --- ((Wiki Page)) or WikiPage
// (\([2])? # check for (( - optional - put this in $1
// \b$pOldName\b # make sure the old name is on it's own
diff --git a/plugins/filter.htmlpurifier.php b/plugins/filter.htmlpurifier.php
index bfbfaa6..abed4e1 100755
--- a/plugins/filter.htmlpurifier.php
+++ b/plugins/filter.htmlpurifier.php
@@ -6,8 +6,7 @@
*/
namespace Bitweaver\Liberty;
- use Bitweaver\KernelTools;
-
+
/**
* definitions ( guid character limit is 16 chars )
*/
@@ -15,7 +14,7 @@ define( 'PLUGIN_GUID_FILTERHTMLPURIFIER', 'filterhtmlpure' );
global $gLibertySystem;
-$pluginParams = array (
+$pluginParams = [
// plugin title
'title' => 'HTMLPurifier',
// help page on bitweaver org that explains this plugin
@@ -38,7 +37,7 @@ $pluginParams = array (
// 'presplit_function' => '\Bitweaver\Liberty\htmlpure_filter',
// called after the data has been parsed if there is a split
'postsplit_function' => '\Bitweaver\Liberty\htmlpure_filter',
-);
+];
$gLibertySystem->registerPlugin( PLUGIN_GUID_FILTERHTMLPURIFIER, $pluginParams );
function htmlpure_filter( &$pString, &$pFilterHash, $pObject ) {
@@ -47,7 +46,7 @@ function htmlpure_filter( &$pString, &$pFilterHash, $pObject ) {
if (!isset($gHtmlPurifier)) {
$pear_version = false;
- if (@include_once "PEAR.php") {
+ if (@include_once "PEAR.php") {
if(@include_once UTIL_PKG_INCLUDE_PATH."/htmlpurifier-4.15.0/library/HTMLPurifier.php") {
// for backward compatibility checks
$htmlp_version = null;
@@ -61,11 +60,10 @@ function htmlpure_filter( &$pString, &$pFilterHash, $pObject ) {
$config = htmlpure_getDefaultConfig( $htmlp_version, $pObject );
-
// As suggested here: https://www.bitweaver.org/forums/index.php?t=8554
$gHtmlPurifier = new \HTMLPurifier($config);
- // how plugins are registered changed in v3.1
+ // how plugins are registered changed in v3.1
// old way of adding plugins before v3.1
if ( !$htmlp_version >= 3.1 ) {
htmlpure_legacyAddFilters();
@@ -75,7 +73,7 @@ function htmlpure_filter( &$pString, &$pFilterHash, $pObject ) {
}
// Did we manage to create one?
- if (isset($gHtmlPurifier)) {
+ if (isset($gHtmlPurifier)) {
/* Clean up the paragraphs a bit */
// $start = $pData;
$pString = htmlpure_cleanupPeeTags($pString);
@@ -103,8 +101,8 @@ function htmlpure_filter( &$pString, &$pFilterHash, $pObject ) {
// If we have another parse step they may be escaping
// entities so change quotes back.
- if (empty($pFilterHash['format_guid']) ||
- $pFilterHash['format_guid'] != 'bithtml') {
+ if (empty($pFilterHash['format_guid']) ||
+ $pFilterHash['format_guid'] != 'bithtml') {
$pString = preg_replace('|&quot;|', '"', $pString);
$pString = preg_replace('|&#039;|', "'", $pString);
}
@@ -140,7 +138,6 @@ function htmlpure_getDefaultConfig( &$htmlp_version, $pObject=null ){
//$config->set('HTML.DefinitionRev', 1);
//$config->set('Cache.DefinitionImpl', null); // remove this later!
-
// Set the cache path
$config->set('Cache.SerializerPath', rtrim( TEMP_PKG_PATH, '/' ) );
@@ -171,7 +168,7 @@ function htmlpure_getDefaultConfig( &$htmlp_version, $pObject=null ){
INNER JOIN `".BIT_DB_PREFIX."users_group_permissions` ugp ON (ugp.`group_id`=ugm.`group_id`)
WHERE ugm.`user_id`=? AND (ugp.`perm_name`=? OR ugp.`perm_name`='p_admin')";
// cache for 15 minutes
- $hasAdmin = $pObject->mDb->getOne( $query, array( $pObject->getField( 'modifier_user_id' ), $pObject->mAdminContentPerm ), null, null, 900 );
+ $hasAdmin = $pObject->mDb->getOne( $query, [ $pObject->getField( 'modifier_user_id' ), $pObject->mAdminContentPerm ], null, null, 900 );
}
if( $hasAdmin ) {
@@ -179,11 +176,11 @@ function htmlpure_getDefaultConfig( &$htmlp_version, $pObject=null ){
$config->set( 'CSS.AllowTricky', true );
$css = $config->getCSSDefinition();
- $css->info['position'] = new \HTMLPurifier_AttrDef_CSS_Composite([ new \HTMLPurifier_AttrDef_Enum(['absolute', 'fixed', 'relative', 'static', 'inherit'] ) ] );
- $css->info['top'] = new \HTMLPurifier_AttrDef_CSS_Composite([ new \HTMLPurifier_AttrDef_CSS_Length() ] );
- $css->info['left'] = new \HTMLPurifier_AttrDef_CSS_Composite([ new \HTMLPurifier_AttrDef_CSS_Length() ] );
- $css->info['bottom'] = new \HTMLPurifier_AttrDef_CSS_Composite([ new \HTMLPurifier_AttrDef_CSS_Length() ] );
- $css->info['right'] = new \HTMLPurifier_AttrDef_CSS_Composite([ new \HTMLPurifier_AttrDef_CSS_Length() ] );
+ $css->info['position'] = new \HTMLPurifier_AttrDef_CSS_Composite([ new \HTMLPurifier_AttrDef_Enum(['absolute', 'fixed', 'relative', 'static', 'inherit'] ) ] );
+ $css->info['top'] = new \HTMLPurifier_AttrDef_CSS_Composite([ new \HTMLPurifier_AttrDef_CSS_Length() ] );
+ $css->info['left'] = new \HTMLPurifier_AttrDef_CSS_Composite([ new \HTMLPurifier_AttrDef_CSS_Length() ] );
+ $css->info['bottom'] = new \HTMLPurifier_AttrDef_CSS_Composite([ new \HTMLPurifier_AttrDef_CSS_Length() ] );
+ $css->info['right'] = new \HTMLPurifier_AttrDef_CSS_Composite([ new \HTMLPurifier_AttrDef_CSS_Length() ] );
//$def =& $config->getHTMLDefinition();
//$def->addAttribute('a', 'target', 'Enum#_blank,_self,_target,_top');
} else {
@@ -277,7 +274,7 @@ function htmlpure_legacyAddFilters(){
function htmlpure_cleanupPeeTags( $pee ) {
// Convert us some form feeds for better cross platform support
- $pee = str_replace(array("\r\n", "\r"), "\n", $pee);
+ $pee = str_replace(["\r\n", "\r"], "\n", $pee);
// Strip out lots of duplicate newlines now
$pee = preg_replace("#\n\n+#", "\n\n", $pee);
@@ -292,7 +289,7 @@ function htmlpure_cleanupPeeTags( $pee ) {
$pee = preg_replace('#(<pre.*?(?:[^>]*)>)(.*?)</pre>#si',
" '$1' . preg_replace('#<br[\s/]*(?:[^>]*)/>#', '"."\n"."',
preg_replace('#<p[\s]*(?:[^>]*)>#', '"."\n"."',
- preg_replace('#</p[\s]*(?:[^>]*)>#', '', '$2'))). '</pre>'", $pee);
+ preg_replace('#</p[\s]*(?:[^>]*)>#', '', '$2'))). '</pre>'", $pee, );
// Fixup align divs so we can keep them.
$pee = preg_replace('#<div(.*?)align="(.*?)"(.*?)>#', '<div$1style="text-align:$2;"$3>', $pee);
diff --git a/plugins/filter.maketoc.php b/plugins/filter.maketoc.php
index 7daa56e..04b3467 100755
--- a/plugins/filter.maketoc.php
+++ b/plugins/filter.maketoc.php
@@ -1,5 +1,6 @@
<?php
namespace Bitweaver\Liberty;
+
use Bitweaver\KernelTools;
use function in_array;
@@ -53,8 +54,8 @@ function maketoc_postparsefilter( &$pData, &$pFilterHash ) {
// get all headers into an array
preg_match_all( "/<h(\d)[^>]*>(.*?)<\/h\d>/i", $pData, $headers );
- // clumsy way of finding out if index is set. since we can't allow
- // duplicate settings of index in one page, we either index everything
+ // clumsy way of finding out if index is set. since we can't allow
+ // duplicate settings of index in one page, we either index everything
// or nothing.
foreach( $params as $p ) {
if( empty( $index )) {
@@ -125,7 +126,7 @@ function maketoc_postparsefilter( &$pData, &$pFilterHash ) {
}
}
- $pData = isset( $ret ) ? $ret : preg_replace( "/\{maketoc[^\}]*\}\s*(<br[^>]*>)*/i", "", $pData );
+ $pData = $ret ?? preg_replace( "/\{maketoc[^\}]*\}\s*(<br[^>]*>)*/i", "", $pData );
}
function maketoc_create_list( $pTocHash, $pParams ) {
diff --git a/plugins/filter.simplepurifier.php b/plugins/filter.simplepurifier.php
index ba829b3..313a956 100755
--- a/plugins/filter.simplepurifier.php
+++ b/plugins/filter.simplepurifier.php
@@ -17,7 +17,7 @@ global $gLibertySystem;
// Set of default acceptable HTML tags
define( 'DEFAULT_ACCEPTABLE_TAGS', '<a><br><blockquote><cite><code><div><dd><dl><dt><em><h1><h2><h3><h4><hr>'
.'<it><img><li><ol><p><pre><span><strong><table><tbody><div><tr><td><th><u><ul>'
- .'<button><fieldset><form><label><input><option><select><textarea>' );
+ .'<button><fieldset><form><label><input><option><select><textarea>', );
$pluginParams = [
// plugin title
diff --git a/plugins/filter.stylepurifier.php b/plugins/filter.stylepurifier.php
index be54698..3385c39 100755
--- a/plugins/filter.stylepurifier.php
+++ b/plugins/filter.stylepurifier.php
@@ -41,10 +41,10 @@ function stylepure_filter( &$pData, &$pFilterHash ) {
// strip_tags has doesn't recognize that css within the style tags are not document text. To fix this do something similar to the following:
if( !$gBitUser->hasPermission( 'p_liberty_edit_html_style' )) {
$pattern = [
- "!<style[^>]*>.*</style>!siU", // <style>...</style>
- '![\s\n]*(style|class)\s*=\s*"[^">]*"?!i', // style="..." | class="..."
- "![\s\n]*(style|class)\s*=\s*'[^'>]*'?!i", // style='...' | class='...'
- "![\s\n]*(style|class)\s*=\s*[^\s>]*!i", // style=... | class=...
+ "!<style[^>]*>.*</style>!siU", // <style>...</style>
+ '![\s\n]*(style|class)\s*=\s*"[^">]*"?!i', // style="..." | class="..."
+ "![\s\n]*(style|class)\s*=\s*'[^'>]*'?!i", // style='...' | class='...'
+ "![\s\n]*(style|class)\s*=\s*[^\s>]*!i", // style=... | class=...
];
$pData = preg_replace( $pattern, '', $pData );
}
diff --git a/plugins/filter.urlcache.php b/plugins/filter.urlcache.php
index 9398cde..f0a4432 100755
--- a/plugins/filter.urlcache.php
+++ b/plugins/filter.urlcache.php
@@ -1,5 +1,6 @@
<?php
namespace Bitweaver\Liberty;
+
use Bitweaver\KernelTools;
/**
@@ -28,7 +29,6 @@ use Bitweaver\KernelTools;
* best to move all this stuff to a separate package - xing
*/
-
/**
* definitions ( guid character limit is 16 chars )
*/
@@ -113,9 +113,9 @@ function urlcache_store($url, $data = '') {
$query = "insert into `".BIT_DB_PREFIX."liberty_link_cache`(`url`,`data`,`refresh`) values(?,?,?)";
$result = $this->mDb->query($query, [ $url,BitDb::db_byte_encode($data),$refresh ] );
return !isset( $error );
- } else {
- return false;
}
+ return false;
+
}
function urlcache_postparsefilter( $pData, $pFilterHash ) {
@@ -146,7 +146,7 @@ function list_cache($offset, $max_records, $sort_mode, $find) {
$findesc = '%' . $find . '%';
$mid = " where (`url` like ?) ";
- $bindvars=array($findesc);
+ $bindvars=[$findesc];
} else {
$mid = "";
$bindvars=[];
diff --git a/plugins/format.bbcode.php b/plugins/format.bbcode.php
index e6ca2e3..8b8caf4 100755
--- a/plugins/format.bbcode.php
+++ b/plugins/format.bbcode.php
@@ -10,7 +10,7 @@ global $gLibertySystem;
/**
* run 'pear install Text_Wiki_BBCode-alpha' to install the library,
- */
+ */
if( @include_once 'doc/Text_Wiki_BBCode/doc/BBCodeParser.php' ) {
/**
@@ -26,7 +26,7 @@ $pluginParams = [
'edit_field' => PLUGIN_GUID_BBCODE,
'help_page' => 'BBCodeSyntax',
'plugin_type' => FORMAT_PLUGIN,
- 'linebreak' => "\r\n"
+ 'linebreak' => "\r\n",
];
$gLibertySystem->registerPlugin( PLUGIN_GUID_BBCODE, $pluginParams );
@@ -40,7 +40,7 @@ function bbcode_parse_data( &$pParseHash, &$pCommonObject ) {
$data = preg_replace( '/\[(quote|code):[0-9a-f]+=/', '[\1=', $data );
$data = preg_replace( '/:[0-9a-f]+\]/', ']', $data );
- // get options from the ini file
+ // get options from the ini file
// $config = parse_ini_file('BBCodeParser.ini', true);
$config = parse_ini_file('doc/Text_Wiki_BBCode/doc/BBCodeParser_V2.ini', true);
$options = \PEAR::getStaticProperty('HTML_BBCodeParser', '_options');
diff --git a/plugins/format.bithtml.php b/plugins/format.bithtml.php
index 3f1805a..fd11c25 100755
--- a/plugins/format.bithtml.php
+++ b/plugins/format.bithtml.php
@@ -22,7 +22,7 @@ $pluginParams = [
'edit_field' => PLUGIN_GUID_BITHTML,
'help_page' => 'HTMLSyntax',
'plugin_type' => FORMAT_PLUGIN,
- 'linebreak' => '<br />'
+ 'linebreak' => '<br />',
];
$gLibertySystem->registerPlugin( PLUGIN_GUID_BITHTML, $pluginParams );
diff --git a/plugins/format.markdown.php b/plugins/format.markdown.php
index 9bb5d30..c9e7a6b 100755
--- a/plugins/format.markdown.php
+++ b/plugins/format.markdown.php
@@ -25,7 +25,7 @@ $pluginParams = [
'edit_label' => 'Markdown',
'edit_field' => PLUGIN_GUID_MARKDOWN,
'plugin_type' => FORMAT_PLUGIN,
- 'linebreak' => "\r\n"
+ 'linebreak' => "\r\n",
];
$gLibertySystem->registerPlugin( PLUGIN_GUID_MARKDOWN, $pluginParams );
diff --git a/plugins/format.simpletext.php b/plugins/format.simpletext.php
index edfc7ea..ed046fc 100755
--- a/plugins/format.simpletext.php
+++ b/plugins/format.simpletext.php
@@ -22,7 +22,7 @@ $pluginParams = [
'edit_field' => PLUGIN_GUID_SIMPLETEXT,
'help_page' => 'SimpleTextSyntax',
'plugin_type' => FORMAT_PLUGIN,
- 'linebreak' => '<br />'
+ 'linebreak' => '<br />',
];
$gLibertySystem->registerPlugin( PLUGIN_GUID_SIMPLETEXT, $pluginParams );
diff --git a/plugins/format.tikiwiki.php b/plugins/format.tikiwiki.php
index c5ad92a..4455006 100755
--- a/plugins/format.tikiwiki.php
+++ b/plugins/format.tikiwiki.php
@@ -1,6 +1,7 @@
<?php
namespace Bitweaver\Liberty;
+
use Bitweaver\BitBase;
use Bitweaver\KernelTools;
use Bitweaver\BitSystem;
@@ -27,7 +28,7 @@ $pluginParams = [
'edit_field' => PLUGIN_GUID_TIKIWIKI,
'help_page' => 'TikiWikiSyntax',
'plugin_type' => FORMAT_PLUGIN,
- 'linebreak' => "\r\n"
+ 'linebreak' => "\r\n",
];
$gLibertySystem->registerPlugin( PLUGIN_GUID_TIKIWIKI, $pluginParams );
@@ -223,7 +224,6 @@ class TikiWikiParser extends BitBase {
$gLibertySystem->getContentClassName( 'bitpage' );
}
-
// only strip out html if needed
if( $gBitSystem->isFeatureActive( 'content_allow_html' ) || $gBitSystem->isFeatureActive( 'content_force_allow_html' )) {
// we allow html unconditionally with this parser
@@ -339,7 +339,7 @@ class TikiWikiParser extends BitBase {
$attributes = strstr( $link, $_SERVER["SERVER_NAME"] ) || !strstr( $link, '//' ) ? '' : 'class="external"';
// comments and anonymously created pages get nofollow
- if( is_object( $pCommonObject ) && ( get_class( $pCommonObject ) == 'comments' || ( isset( $pCommonObject->mInfo['user_id'] ) && $pCommonObject->mInfo['user_id'] == ANONYMOUS_USER_ID ))) {
+ if( is_object( $pCommonObject ) && ( $pCommonObject::class == 'comments' || ( isset( $pCommonObject->mInfo['user_id'] ) && $pCommonObject->mInfo['user_id'] == ANONYMOUS_USER_ID ))) {
$attributes .= ' rel="nofollow" ';
}
@@ -546,7 +546,7 @@ class TikiWikiParser extends BitBase {
$listate = substr($line, $listlevel, 1);
if (($listate == '+' || $listate == '-') && !($litype == '*' && !strstr(current($listbeg), '</ul>') || $litype == '#' && !strstr(current($listbeg), '</ol>'))) {
- $thisid = 'id' . intval( microtime(true) * 1000000 );
+ $thisid = 'id' . (int) ( microtime(true) * 1000000 );
$data .= '<br /><a id="flipper' . $thisid . '" href="javascript:BitBase.flipWithSign(\'' . $thisid . '\',1)">[' . ($listate == '-' ? '+' : '-') . ']</a>';
$listyle = ' id="' . $thisid . '" style="display:' . ($listate == '+' ? 'block' : 'none') . ';"';
$addremove = 1;
diff --git a/plugins/mime.application.php b/plugins/mime.application.php
index 087a32b..ade2c03 100755
--- a/plugins/mime.application.php
+++ b/plugins/mime.application.php
@@ -18,7 +18,6 @@ namespace Bitweaver\Liberty;
* where plugins can insert their own tables<br>
**/
-
/**
* setup
*/
@@ -55,9 +54,9 @@ $pluginParams = [
// Here you can use a perl regular expression to pick out file extensions you want to handle
// e.g.: Some image types: '#^image/(jpe?g|gif|png)#i'
// This plugin will be picked if nothing matches.
- 'mimetypes' => array(
+ 'mimetypes' => [
'#application/.*#i',
- ),
+ ],
];
$gLibertySystem->registerPlugin( PLUGIN_MIME_GUID_APPLICATION, $pluginParams );
diff --git a/plugins/mime.audio.php b/plugins/mime.audio.php
index a274e8a..6ba7908 100755
--- a/plugins/mime.audio.php
+++ b/plugins/mime.audio.php
@@ -1,6 +1,7 @@
<?php
namespace Bitweaver\Liberty;
+
use Bitweaver\BitBase;
use Bitweaver\KernelTools;
diff --git a/plugins/mime.default.php b/plugins/mime.default.php
index 3d3dbad..0de1fa5 100755
--- a/plugins/mime.default.php
+++ b/plugins/mime.default.php
@@ -15,11 +15,11 @@
* where plugins can insert their own tables<br>
**/
-
/**
* setup
*/
namespace Bitweaver\Liberty;
+
use Bitweaver\BitBase;
use Bitweaver\KernelTools;
@@ -105,7 +105,7 @@ if( !function_exists( '\Bitweaver\Liberty\mime_default_verify' )) {
$pStoreRow['attachment_id'] = $gBitSystem->mDb->GenID( 'liberty_attachments_id_seq' );
}
// try to generate thumbnails for the upload
- $pStoreRow['upload']['thumbnail'] = isset( $pStoreRow['upload']['thumbnail'] ) ? $pStoreRow['upload']['thumbnail'] : true;
+ $pStoreRow['upload']['thumbnail'] = $pStoreRow['upload']['thumbnail'] ?? true;
// Generic values needed by the storing mechanism
$pStoreRow['upload']['source_file'] = $pStoreRow['upload']['tmp_name'];
@@ -184,7 +184,7 @@ if( !function_exists( '\Bitweaver\Liberty\mime_default_update' )) {
$gBitSystem->mDb->associateUpdate(
BIT_DB_PREFIX."liberty_attachments",
[ 'attachment_plugin_guid' => $pStoreRow['attachment_plugin_guid'] ],
- [ 'attachment_id' => $pStoreRow['attachment_id'] ]
+ [ 'attachment_id' => $pStoreRow['attachment_id'] ],
);
}
}
diff --git a/plugins/mime.image.php b/plugins/mime.image.php
index 65f2ef0..b0abb45 100755
--- a/plugins/mime.image.php
+++ b/plugins/mime.image.php
@@ -1,6 +1,7 @@
<?php
namespace Bitweaver\Liberty;
+
use Bitweaver\BitBase;
use Bitweaver\KernelTools;
use Holiday\Metadata;
@@ -199,11 +200,11 @@ function mime_image_store_exif_data( $pFileHash ) {
if( BitBase::verifyId( $pFileHash['attachment_id'] ) && $exifHash = mime_image_get_exif_data( $upload ) ) {
// only makes sense to store the GPS data if we at least have latitude and longitude
if( !empty( $exifHash['GPS'] )) {
- LibertyMime::storeMetaData( $pFileHash['attachment_id'], $exifHash['GPS'], 'GPS' );
+ LibertyMime::storeMetaData( $pFileHash['attachment_id'], $exifHash['GPS'], 'GPS' );
}
if( !empty( $exifHash['EXIF'] )) {
- LibertyMime::storeMetaData( $pFileHash['attachment_id'], $exifHash['EXIF'], 'EXIF' );
+ LibertyMime::storeMetaData( $pFileHash['attachment_id'], $exifHash['EXIF'], 'EXIF' );
}
}
diff --git a/plugins/mime.pbase.php b/plugins/mime.pbase.php
index 8b75b8e..388d25c 100755
--- a/plugins/mime.pbase.php
+++ b/plugins/mime.pbase.php
@@ -1,6 +1,7 @@
<?php
namespace Bitweaver\Liberty;
+
use Bitweaver\BitBase;
/**
diff --git a/plugins/mime.pdf.php b/plugins/mime.pdf.php
index b5cfee3..567f7cf 100644
--- a/plugins/mime.pdf.php
+++ b/plugins/mime.pdf.php
@@ -1,8 +1,8 @@
<?php
namespace Bitweaver\Liberty;
+
use Bitweaver\BitBase;
-use Bitweaver\KernelTools;
/**
* @version $Header$
@@ -224,7 +224,7 @@ function mime_pdf_thumbnail( $pFileHash ) {
if( liberty_generate_thumbnails( $genHash )) {
}
$mask = "$dest_branch/thumb*.jpg";
- array_map( "unlink", glob( $mask ) );
+ array_map( "unlink", glob( $mask ) );
}
return empty( $pFileHash['log'] );
}
diff --git a/plugins/mime.video.php b/plugins/mime.video.php
index 28bbe01..cff98e8 100755
--- a/plugins/mime.video.php
+++ b/plugins/mime.video.php
@@ -1,9 +1,9 @@
<?php
namespace Bitweaver\Liberty;
+
use Bitweaver\BitBase;
use Bitweaver\BitDate;
-use Bitweaver\KernelTools;
/**
* @version $Header$
@@ -193,7 +193,7 @@ function mime_video_add_process( $pStoreRow ) {
UPDATE `".BIT_DB_PREFIX."liberty_process_queue`
SET `process_status`=?
WHERE `content_id`=? AND `process_status`=?";
- $gBitSystem->mDb->query( $query, array( 'defunkt', $pStoreRow['content_id'], 'pending' ));
+ $gBitSystem->mDb->query( $query, [ 'defunkt', $pStoreRow['content_id'], 'pending' ]);
$storeHash = [
'content_id' => $pStoreRow['content_id'],
@@ -266,7 +266,7 @@ function mime_video_converter( &$pParamHash, $pOnlyGetParameters = false ) {
];
// make sure audio sample rate is valid
- if( !empty( $info['audio_samplerate'] ) && !in_array( $info['audio_samplerate'], array( 11025, 22050, 44100 ))) {
+ if( !empty( $info['audio_samplerate'] ) && !in_array( $info['audio_samplerate'], [ 11025, 22050, 44100 ])) {
unset( $info['audio_samplerate'] );
}
} else {
@@ -430,7 +430,7 @@ function mime_video_converter( &$pParamHash, $pOnlyGetParameters = false ) {
if( $pOnlyGetParameters ) {
return $parameters;
- } else {
+ }
// we keep the output of this that we can store it to the error file if we need to do so
$debug = shell_exec( "$ffmpeg $parameters 2>&1" );
if( !empty( $parameters2 )) {
@@ -438,7 +438,6 @@ function mime_video_converter( &$pParamHash, $pOnlyGetParameters = false ) {
// change back to whence we came
chdir( $cwd );
}
- }
// make sure the conversion was successfull
if( is_file( $dest_file ) && filesize( $dest_file ) > 48 ) {
diff --git a/plugins/processor.gd.php b/plugins/processor.gd.php
index cd6b23a..3c3d7dd 100755
--- a/plugins/processor.gd.php
+++ b/plugins/processor.gd.php
@@ -1,6 +1,7 @@
<?php
namespace Bitweaver\Liberty;
+
use Bitweaver\KernelTools;
/**
@@ -68,7 +69,6 @@ function liberty_gd_resize_image( &$pFileHash ) {
//$imagegallib->ImageCopyResampleBicubic($t, $img, 0, 0, 0, 0, $tw, $ty, $size_x, $size_y);
}
-
// override $mimeExt if we have a custom setting for it
if( $gBitSystem->isFeatureActive( 'liberty_thumbnail_format' )) {
$mimeExt = $gBitSystem->getConfig( 'liberty_thumbnail_format' );
@@ -194,9 +194,9 @@ function get_gd_version( $pFullVersion = false ) {
if( $pFullVersion ) {
return $_SESSION['gd_version'];
- } else {
- return preg_replace( "!^(\d)+.*$!", "$1", $_SESSION['gd_version'] );
}
+ return preg_replace( "!^(\d)+.*$!", "$1", $_SESSION['gd_version'] );
+
}
// nicked from http://at2.php.net/manual/en/function.gd-info.php
@@ -212,7 +212,7 @@ if( !function_exists( 'gd_info' )) {
"JPG Support" => 0,
"PNG Support" => 0,
"WBMP Support" => 0,
- "XBM Support" => 0
+ "XBM Support" => 0,
];
$gif_support = 0;
diff --git a/plugins/processor.imagick.php b/plugins/processor.imagick.php
index 03c53d6..e85c6ff 100755
--- a/plugins/processor.imagick.php
+++ b/plugins/processor.imagick.php
@@ -1,6 +1,7 @@
<?php
namespace Bitweaver\Liberty;
+
use Bitweaver\KernelTools;
use Imagick;
use ImagickPixel;
@@ -42,7 +43,7 @@ function liberty_imagick_resize_image( &$pFileHash ) {
$pFileHash['error'] = null;
$ret = null;
if( !empty( $pFileHash['source_file'] ) && file_exists( $pFileHash['source_file'] ) && is_file( $pFileHash['source_file'] ) && (filesize( $pFileHash['source_file'] ) > 0) ) {
- try {
+ try {
$im = new Imagick();
$im->readImage( $pFileHash['source_file'] );
if( !$im->valid()) {
diff --git a/plugins/processor.magickwand.php b/plugins/processor.magickwand.php
index 64a9556..8ce6e55 100755
--- a/plugins/processor.magickwand.php
+++ b/plugins/processor.magickwand.php
@@ -1,6 +1,7 @@
<?php
namespace Bitweaver\Liberty;
+
use Bitweaver\KernelTools;
/**
diff --git a/plugins/storage.bitfile.php b/plugins/storage.bitfile.php
index da4018b..5a0a201 100755
--- a/plugins/storage.bitfile.php
+++ b/plugins/storage.bitfile.php
@@ -6,6 +6,7 @@
*/
namespace Bitweaver\Liberty;
+
use Bitweaver\BitBase;
global $gLibertySystem, $gBitSystem, $gBitSmarty, $gBitThemes;
@@ -25,7 +26,7 @@ $pluginParams = [
'edit_label' => 'Upload File',
'primary_edit_field' => '<input type="file" name="primary_attachment" size="40" />',
'edit_field' => '<input type="file" name="upload" size="40" />',
- 'edit_help' => 'After selecting the file you want to upload, please return to the edit area and click the save button.'
+ 'edit_help' => 'After selecting the file you want to upload, please return to the edit area and click the save button.',
];
if( isset( $gBitSystem )) {
@@ -53,7 +54,6 @@ if( isset( $gBitSystem )) {
//$gLibertySystem->registerPlugin( STORAGE_TYPE_BIT_FILES, $pluginParams );
$gLibertySystem->registerPlugin( PLUGIN_GUID_BIT_FILES, $pluginParams );
-
function bit_files_verify( &$pStoreRow ) {
$pStoreRow['plugin_guid'] = PLUGIN_GUID_BIT_FILES;
$pStoreRow['foreign_id'] = null;
@@ -79,7 +79,7 @@ function bit_files_store( &$pStoreRow ) {
if( BitBase::verifyId( $pStoreRow['foreign_id'] ) ) {
$sql = "UPDATE `".BIT_DB_PREFIX."liberty_files` SET `file_name`=?, `mime_type`=?, `file_size`=? WHERE `file_id` = ?";
- $gBitSystem->mDb->query( $sql, array( $pStoreRow['upload']['name'], $pStoreRow['upload']['type'], $pStoreRow['upload']['size'], $pStoreRow['foreign_id'] ) );
+ $gBitSystem->mDb->query( $sql, [ $pStoreRow['upload']['name'], $pStoreRow['upload']['type'], $pStoreRow['upload']['size'], $pStoreRow['foreign_id'] ] );
} else {
$pStoreRow['foreign_id'] = $gBitSystem->mDb->GenID( 'liberty_files_id_seq' );
$sql = "INSERT INTO `".BIT_DB_PREFIX."liberty_files` ( `file_name`, `file_id`, `mime_type`, `file_size`, `user_id` ) VALUES ( ?, ?, ?, ?, ? )";
@@ -122,7 +122,7 @@ function bit_files_expunge( $pStorageId ) {
$sql = "SELECT * FROM `".BIT_DB_PREFIX."liberty_attachments` la
INNER JOIN `".BIT_DB_PREFIX."liberty_files` lf ON (lf.`file_id`=la.`foreign_id`)
WHERE la.`attachment_id` = ?";
- if( $row = $gBitSystem->mDb->getRow( $sql, array( $pStorageId ))) {
+ if( $row = $gBitSystem->mDb->getRow( $sql, [ $pStorageId ])) {
$sourceFile = liberty_mime_get_source_file( $row );
if( $gBitUser->isAdmin() || $gBitUser->mUserId == $row['user_id'] ) {
if( file_exists( $sourceFile )) {
@@ -134,7 +134,7 @@ function bit_files_expunge( $pStorageId ) {
}
}
$query = "DELETE FROM `".BIT_DB_PREFIX."liberty_files` WHERE `file_id` = ?";
- $gBitSystem->mDb->query($query, array($row['foreign_id']) );
+ $gBitSystem->mDb->query($query, [$row['foreign_id']] );
$ret = true;
}
}
diff --git a/scripts/LibertyAttachment.js b/scripts/LibertyAttachment.js
index b49ec9a..b49ec9a 100644..100755
--- a/scripts/LibertyAttachment.js
+++ b/scripts/LibertyAttachment.js
diff --git a/scripts/LibertyComment.js b/scripts/LibertyComment.js
index e933df7..e933df7 100644..100755
--- a/scripts/LibertyComment.js
+++ b/scripts/LibertyComment.js
diff --git a/structure_add_content.php b/structure_add_content.php
index 9921bf7..eb3ca79 100755
--- a/structure_add_content.php
+++ b/structure_add_content.php
@@ -33,9 +33,9 @@ if( !empty( $_SERVER['HTTP_REFERER'] ) ) {
if( $gBitThemes->isAjaxRequest() ) {
header( 'Content-Type: text/html; charset=utf-8' );
- print $gBitSmarty->fetch( "bitpackage:liberty/structure_add_feedback_inc.tpl" );
+ print $gBitSmarty->fetch( "bitpackage:liberty/structure_add_feedback_inc.tpl" );
exit;
-} else {
+}
$_REQUEST['thumbnail_size'] = 'icon';
include_once( LIBERTY_PKG_INCLUDE_PATH.'get_content_list_inc.php' );
@@ -62,6 +62,5 @@ if( $gBitThemes->isAjaxRequest() ) {
bit_redirect( $gContent->getDisplayUri() );
}
}
- $gBitSystem->display( 'bitpackage:liberty/structure_add_content.tpl', "Add Content" , array( 'display_mode' => 'display' ));
-}
+ $gBitSystem->display( 'bitpackage:liberty/structure_add_content.tpl', "Add Content" , [ 'display_mode' => 'display' ]);
diff --git a/templates/action_logs.tpl b/templates/action_logs.tpl
index ccfd567..ccfd567 100644..100755
--- a/templates/action_logs.tpl
+++ b/templates/action_logs.tpl
diff --git a/templates/admin_liberty.tpl b/templates/admin_liberty.tpl
index f6a31ba..f6a31ba 100644..100755
--- a/templates/admin_liberty.tpl
+++ b/templates/admin_liberty.tpl
diff --git a/templates/attachhelp.tpl b/templates/attachhelp.tpl
index 3d66f24..3d66f24 100644..100755
--- a/templates/attachhelp.tpl
+++ b/templates/attachhelp.tpl
diff --git a/templates/attachment_browser.tpl b/templates/attachment_browser.tpl
index 90c2a9a..90c2a9a 100644..100755
--- a/templates/attachment_browser.tpl
+++ b/templates/attachment_browser.tpl
diff --git a/templates/attachment_browser_json.tpl b/templates/attachment_browser_json.tpl
index e229a31..e229a31 100644..100755
--- a/templates/attachment_browser_json.tpl
+++ b/templates/attachment_browser_json.tpl
diff --git a/templates/attachment_uploader.tpl b/templates/attachment_uploader.tpl
index 0badbb4..0badbb4 100644..100755
--- a/templates/attachment_uploader.tpl
+++ b/templates/attachment_uploader.tpl
diff --git a/templates/attachment_uploader_inc.tpl b/templates/attachment_uploader_inc.tpl
index 82f6330..82f6330 100644..100755
--- a/templates/attachment_uploader_inc.tpl
+++ b/templates/attachment_uploader_inc.tpl
diff --git a/templates/attachments.tpl b/templates/attachments.tpl
index 7c0ca83..7c0ca83 100644..100755
--- a/templates/attachments.tpl
+++ b/templates/attachments.tpl
diff --git a/templates/center_list_generic.tpl b/templates/center_list_generic.tpl
index 913f577..913f577 100644..100755
--- a/templates/center_list_generic.tpl
+++ b/templates/center_list_generic.tpl
diff --git a/templates/center_recent_comments.php b/templates/center_recent_comments.php
index c9e9d43..34d16f1 100644
--- a/templates/center_recent_comments.php
+++ b/templates/center_recent_comments.php
@@ -40,7 +40,7 @@ foreach( $keys as $k ) {
if($modLastComments[$k]['parent_content_type_guid'] == 'feedstatus'){ //if comment is a reply to a status, use the poster as the object, otherwise our thumbnail will be of the content we commented on (the other user,status)
$user = new BitUser( $modLastComments[$k]['user_id'] );
$user->load();
- $modLastComments[$k]['object'] = $user;
+ $modLastComments[$k]['object'] = $user;
}else{ //If a comment on a piece of content, use piece of content as object in question
$modLastComments[$k]['object'] = LibertyBase::getLibertyObject( $modLastComments[$k]['root_id'], $modLastComments[$k]['root_content_type_guid'] );
}
diff --git a/templates/center_recent_comments.tpl b/templates/center_recent_comments.tpl
index b69b199..b69b199 100644..100755
--- a/templates/center_recent_comments.tpl
+++ b/templates/center_recent_comments.tpl
diff --git a/templates/center_view_generic.tpl b/templates/center_view_generic.tpl
index 45283fb..45283fb 100644..100755
--- a/templates/center_view_generic.tpl
+++ b/templates/center_view_generic.tpl
diff --git a/templates/edit_content_alias_inc.tpl b/templates/edit_content_alias_inc.tpl
index 71e0019..71e0019 100644..100755
--- a/templates/edit_content_alias_inc.tpl
+++ b/templates/edit_content_alias_inc.tpl
diff --git a/templates/edit_textarea.tpl b/templates/edit_textarea.tpl
index 2f10ca5..2f10ca5 100644..100755
--- a/templates/edit_textarea.tpl
+++ b/templates/edit_textarea.tpl
diff --git a/templates/html_head_inc.tpl b/templates/html_head_inc.tpl
index 87da192..87da192 100644..100755
--- a/templates/html_head_inc.tpl
+++ b/templates/html_head_inc.tpl
diff --git a/templates/list_comment_files_inc.tpl b/templates/list_comment_files_inc.tpl
index b397b82..b397b82 100644..100755
--- a/templates/list_comment_files_inc.tpl
+++ b/templates/list_comment_files_inc.tpl
diff --git a/templates/list_content_json.tpl b/templates/list_content_json.tpl
index 169f975..169f975 100644..100755
--- a/templates/list_content_json.tpl
+++ b/templates/list_content_json.tpl
diff --git a/templates/menu_liberty_admin.tpl b/templates/menu_liberty_admin.tpl
index 57a29dd..57a29dd 100644..100755
--- a/templates/menu_liberty_admin.tpl
+++ b/templates/menu_liberty_admin.tpl
diff --git a/templates/mime/application/view.tpl b/templates/mime/application/view.tpl
index 84a1844..84a1844 100644..100755
--- a/templates/mime/application/view.tpl
+++ b/templates/mime/application/view.tpl
diff --git a/templates/mime/audio/edit.tpl b/templates/mime/audio/edit.tpl
index ef88d4c..ef88d4c 100644..100755
--- a/templates/mime/audio/edit.tpl
+++ b/templates/mime/audio/edit.tpl
diff --git a/templates/mime/audio/inline.tpl b/templates/mime/audio/inline.tpl
index c5f20d0..c5f20d0 100644..100755
--- a/templates/mime/audio/inline.tpl
+++ b/templates/mime/audio/inline.tpl
diff --git a/templates/mime/audio/storage.tpl b/templates/mime/audio/storage.tpl
index 59b98f3..59b98f3 100644..100755
--- a/templates/mime/audio/storage.tpl
+++ b/templates/mime/audio/storage.tpl
diff --git a/templates/mime/audio/view.tpl b/templates/mime/audio/view.tpl
index 30c6ce3..30c6ce3 100644..100755
--- a/templates/mime/audio/view.tpl
+++ b/templates/mime/audio/view.tpl
diff --git a/templates/mime/default/upload.tpl b/templates/mime/default/upload.tpl
index b089ba0..b089ba0 100644..100755
--- a/templates/mime/default/upload.tpl
+++ b/templates/mime/default/upload.tpl
diff --git a/templates/mime/default/view.tpl b/templates/mime/default/view.tpl
index a5c5dca..a5c5dca 100644..100755
--- a/templates/mime/default/view.tpl
+++ b/templates/mime/default/view.tpl
diff --git a/templates/mime/image/edit.tpl b/templates/mime/image/edit.tpl
index 2085c88..2085c88 100644..100755
--- a/templates/mime/image/edit.tpl
+++ b/templates/mime/image/edit.tpl
diff --git a/templates/mime/image/player.tpl b/templates/mime/image/player.tpl
index abec80a..abec80a 100644..100755
--- a/templates/mime/image/player.tpl
+++ b/templates/mime/image/player.tpl
diff --git a/templates/mime/image/view.tpl b/templates/mime/image/view.tpl
index f95c1b7..f95c1b7 100644..100755
--- a/templates/mime/image/view.tpl
+++ b/templates/mime/image/view.tpl
diff --git a/templates/mime/pbase/upload.tpl b/templates/mime/pbase/upload.tpl
index 25358eb..25358eb 100644..100755
--- a/templates/mime/pbase/upload.tpl
+++ b/templates/mime/pbase/upload.tpl
diff --git a/templates/mime/pdf/admin.tpl b/templates/mime/pdf/admin.tpl
index 5861c42..5861c42 100644..100755
--- a/templates/mime/pdf/admin.tpl
+++ b/templates/mime/pdf/admin.tpl
diff --git a/templates/mime/pdf/view.tpl b/templates/mime/pdf/view.tpl
index 327d19e..327d19e 100644..100755
--- a/templates/mime/pdf/view.tpl
+++ b/templates/mime/pdf/view.tpl
diff --git a/templates/mime/video/edit.tpl b/templates/mime/video/edit.tpl
index 44eb818..44eb818 100644..100755
--- a/templates/mime/video/edit.tpl
+++ b/templates/mime/video/edit.tpl
diff --git a/templates/mime/video/inline.tpl b/templates/mime/video/inline.tpl
index 97985df..97985df 100644..100755
--- a/templates/mime/video/inline.tpl
+++ b/templates/mime/video/inline.tpl
diff --git a/templates/mime/video/player.tpl b/templates/mime/video/player.tpl
index 364c3f1..364c3f1 100644..100755
--- a/templates/mime/video/player.tpl
+++ b/templates/mime/video/player.tpl
diff --git a/templates/mime/video/storage.tpl b/templates/mime/video/storage.tpl
index b12ce11..b12ce11 100644..100755
--- a/templates/mime/video/storage.tpl
+++ b/templates/mime/video/storage.tpl
diff --git a/templates/mime/video/view.tpl b/templates/mime/video/view.tpl
index 5e6e4ec..5e6e4ec 100644..100755
--- a/templates/mime/video/view.tpl
+++ b/templates/mime/video/view.tpl
diff --git a/templates/plugins/data_code_admin.tpl b/templates/plugins/data_code_admin.tpl
index 5c4ace7..5c4ace7 100644..100755
--- a/templates/plugins/data_code_admin.tpl
+++ b/templates/plugins/data_code_admin.tpl
diff --git a/templates/plugins/data_toc.tpl b/templates/plugins/data_toc.tpl
index 0f73687..0f73687 100644..100755
--- a/templates/plugins/data_toc.tpl
+++ b/templates/plugins/data_toc.tpl
diff --git a/templates/plugins/filter_htmlpurifier_admin.tpl b/templates/plugins/filter_htmlpurifier_admin.tpl
index e1fff82..e1fff82 100644..100755
--- a/templates/plugins/filter_htmlpurifier_admin.tpl
+++ b/templates/plugins/filter_htmlpurifier_admin.tpl
diff --git a/templates/plugins/filter_simplepurifier_admin.tpl b/templates/plugins/filter_simplepurifier_admin.tpl
index b8b0a35..b8b0a35 100644..100755
--- a/templates/plugins/filter_simplepurifier_admin.tpl
+++ b/templates/plugins/filter_simplepurifier_admin.tpl
diff --git a/templates/rankings.tpl b/templates/rankings.tpl
index b0f65fc..b0f65fc 100644..100755
--- a/templates/rankings.tpl
+++ b/templates/rankings.tpl
diff --git a/templates/service_content_edit_mini_inc.tpl b/templates/service_content_edit_mini_inc.tpl
index 44bcc42..44bcc42 100644..100755
--- a/templates/service_content_edit_mini_inc.tpl
+++ b/templates/service_content_edit_mini_inc.tpl
diff --git a/templates/structure_add_content.tpl b/templates/structure_add_content.tpl
index 8110d83..8110d83 100644..100755
--- a/templates/structure_add_content.tpl
+++ b/templates/structure_add_content.tpl
diff --git a/templates/structure_add_feedback_inc.tpl b/templates/structure_add_feedback_inc.tpl
index 65bab36..65bab36 100644..100755
--- a/templates/structure_add_feedback_inc.tpl
+++ b/templates/structure_add_feedback_inc.tpl
diff --git a/templates/structure_edit_content.tpl b/templates/structure_edit_content.tpl
index c5deee3..c5deee3 100644..100755
--- a/templates/structure_edit_content.tpl
+++ b/templates/structure_edit_content.tpl