From 132695ceb1d7ab0e4bfbb141e9e9639111dd25b5 Mon Sep 17 00:00:00 2001 From: Jakob Sack Date: Tue, 1 Mar 2011 23:20:16 +0100 Subject: [PATCH] Start of the refactoring. Commit is quite big because I forgot to use git right from the beginning. Sorry. --- {inc => 3dparty}/Archive/Tar.php | 0 {inc => 3dparty}/COPYING-PHP | 0 {inc => 3dparty}/COPYING-README | 0 {inc => 3dparty}/Console/Getopt.php | 0 {inc => 3dparty}/HTTP/WebDAV/Server.php | 0 .../HTTP/WebDAV/Tools/_parse_lockinfo.php | 0 .../HTTP/WebDAV/Tools/_parse_propfind.php | 0 .../HTTP/WebDAV/Tools/_parse_proppatch.php | 0 {inc => 3dparty}/Log.php | 0 {inc => 3dparty}/Log/composite.php | 0 {inc => 3dparty}/Log/console.php | 0 {inc => 3dparty}/Log/daemon.php | 0 {inc => 3dparty}/Log/display.php | 0 {inc => 3dparty}/Log/error_log.php | 0 {inc => 3dparty}/Log/file.php | 0 {inc => 3dparty}/Log/mail.php | 0 {inc => 3dparty}/Log/mcal.php | 0 {inc => 3dparty}/Log/null.php | 0 {inc => 3dparty}/Log/observer.php | 0 {inc => 3dparty}/Log/sql.php | 0 {inc => 3dparty}/Log/sqlite.php | 0 {inc => 3dparty}/Log/syslog.php | 0 {inc => 3dparty}/Log/win.php | 0 {inc => 3dparty}/MDB2.php | 0 {inc => 3dparty}/MDB2/Date.php | 0 .../MDB2/Driver/Datatype/Common.php | 0 .../MDB2/Driver/Datatype/mysql.php | 0 .../MDB2/Driver/Datatype/pgsql.php | 0 .../MDB2/Driver/Datatype/sqlite.php | 0 .../MDB2/Driver/Function/Common.php | 0 .../MDB2/Driver/Function/mysql.php | 0 .../MDB2/Driver/Function/pgsql.php | 0 .../MDB2/Driver/Function/sqlite.php | 0 .../MDB2/Driver/Manager/Common.php | 0 .../MDB2/Driver/Manager/mysql.php | 0 .../MDB2/Driver/Manager/pgsql.php | 0 .../MDB2/Driver/Manager/sqlite.php | 0 .../MDB2/Driver/Native/Common.php | 0 {inc => 3dparty}/MDB2/Driver/Native/mysql.php | 0 {inc => 3dparty}/MDB2/Driver/Native/pgsql.php | 0 .../MDB2/Driver/Native/sqlite.php | 0 .../MDB2/Driver/Reverse/Common.php | 0 .../MDB2/Driver/Reverse/mysql.php | 0 .../MDB2/Driver/Reverse/pgsql.php | 0 .../MDB2/Driver/Reverse/sqlite.php | 0 {inc => 3dparty}/MDB2/Driver/mysql.php | 0 {inc => 3dparty}/MDB2/Driver/pgsql.php | 0 {inc => 3dparty}/MDB2/Driver/sqlite.php | 0 {inc => 3dparty}/MDB2/Extended.php | 0 {inc => 3dparty}/MDB2/Iterator.php | 0 {inc => 3dparty}/MDB2/LOB.php | 0 {inc => 3dparty}/MDB2/Schema.php | 0 {inc => 3dparty}/MDB2/Schema/Parser.php | 0 {inc => 3dparty}/MDB2/Schema/Parser2.php | 0 .../MDB2/Schema/Reserved/ibase.php | 0 .../MDB2/Schema/Reserved/mssql.php | 0 .../MDB2/Schema/Reserved/mysql.php | 0 .../MDB2/Schema/Reserved/oci8.php | 0 .../MDB2/Schema/Reserved/pgsql.php | 0 {inc => 3dparty}/MDB2/Schema/Tool.php | 0 .../MDB2/Schema/Tool/ParameterException.php | 0 {inc => 3dparty}/MDB2/Schema/Validate.php | 0 {inc => 3dparty}/MDB2/Schema/Writer.php | 0 {inc => 3dparty}/Mail.php | 0 {inc => 3dparty}/Mail/RFC822.php | 0 {inc => 3dparty}/Mail/mail.php | 0 {inc => 3dparty}/Mail/mime.php | 0 {inc => 3dparty}/Mail/mimeDecode.php | 0 {inc => 3dparty}/Mail/mimePart.php | 0 {inc => 3dparty}/Mail/null.php | 0 {inc => 3dparty}/Mail/sendmail.php | 0 {inc => 3dparty}/Mail/smtp.php | 0 {inc => 3dparty}/Mail/xmail.dtd | 0 {inc => 3dparty}/Mail/xmail.xsl | 0 {inc => 3dparty}/Net/SMTP.php | 0 {inc => 3dparty}/Net/Socket.php | 0 {inc => 3dparty}/OS/Guess.php | 0 {inc => 3dparty}/PEAR.php | 0 {inc => 3dparty}/PEAR/Autoloader.php | 0 {inc => 3dparty}/PEAR/Builder.php | 0 {inc => 3dparty}/PEAR/Command.php | 0 {inc => 3dparty}/PEAR/Command/Auth.php | 0 {inc => 3dparty}/PEAR/Command/Build.php | 0 {inc => 3dparty}/PEAR/Command/Common.php | 0 {inc => 3dparty}/PEAR/Command/Config.php | 0 {inc => 3dparty}/PEAR/Command/Install.php | 0 {inc => 3dparty}/PEAR/Command/Mirror.php | 0 {inc => 3dparty}/PEAR/Command/Package.php | 0 {inc => 3dparty}/PEAR/Command/Registry.php | 0 {inc => 3dparty}/PEAR/Command/Remote.php | 0 {inc => 3dparty}/PEAR/Common.php | 0 {inc => 3dparty}/PEAR/Config.php | 0 {inc => 3dparty}/PEAR/Dependency.php | 0 {inc => 3dparty}/PEAR/Downloader.php | 0 {inc => 3dparty}/PEAR/ErrorStack.php | 0 {inc => 3dparty}/PEAR/Exception.php | 0 {inc => 3dparty}/PEAR/Frontend/CLI.php | 0 {inc => 3dparty}/PEAR/Installer.php | 0 {inc => 3dparty}/PEAR/Packager.php | 0 {inc => 3dparty}/PEAR/Registry.php | 0 {inc => 3dparty}/PEAR/Remote.php | 0 {inc => 3dparty}/PEAR/RunTest.php | 0 {inc => 3dparty}/PHPUnit.php | 0 {inc => 3dparty}/PHPUnit/Assert.php | 0 {inc => 3dparty}/PHPUnit/GUI/Gtk.php | 0 {inc => 3dparty}/PHPUnit/GUI/HTML.php | 0 .../PHPUnit/GUI/SetupDecorator.php | 0 {inc => 3dparty}/PHPUnit/RepeatedTest.php | 0 {inc => 3dparty}/PHPUnit/Skeleton.php | 0 {inc => 3dparty}/PHPUnit/TestCase.php | 0 {inc => 3dparty}/PHPUnit/TestDecorator.php | 0 {inc => 3dparty}/PHPUnit/TestFailure.php | 0 {inc => 3dparty}/PHPUnit/TestListener.php | 0 {inc => 3dparty}/PHPUnit/TestResult.php | 0 {inc => 3dparty}/PHPUnit/TestSuite.php | 0 3dparty/Smarty/Smarty.class.php | 815 +++++ 3dparty/Smarty/debug.tpl | 133 + 3dparty/Smarty/plugins/block.php.php | 27 + 3dparty/Smarty/plugins/block.textformat.php | 102 + 3dparty/Smarty/plugins/function.counter.php | 78 + 3dparty/Smarty/plugins/function.cycle.php | 106 + 3dparty/Smarty/plugins/function.fetch.php | 216 ++ .../plugins/function.html_checkboxes.php | 143 + .../Smarty/plugins/function.html_image.php | 137 + .../Smarty/plugins/function.html_options.php | 133 + .../Smarty/plugins/function.html_radios.php | 154 + .../plugins/function.html_select_date.php | 330 ++ .../plugins/function.html_select_time.php | 194 ++ .../Smarty/plugins/function.html_table.php | 177 + 3dparty/Smarty/plugins/function.mailto.php | 156 + 3dparty/Smarty/plugins/function.math.php | 83 + .../Smarty/plugins/modifier.capitalize.php | 37 + .../Smarty/plugins/modifier.date_format.php | 61 + .../plugins/modifier.debug_print_var.php | 87 + 3dparty/Smarty/plugins/modifier.escape.php | 91 + .../Smarty/plugins/modifier.regex_replace.php | 46 + 3dparty/Smarty/plugins/modifier.replace.php | 29 + 3dparty/Smarty/plugins/modifier.spacify.php | 37 + 3dparty/Smarty/plugins/modifier.truncate.php | 67 + .../Smarty/plugins/modifiercompiler.cat.php | 29 + .../modifiercompiler.count_characters.php | 39 + .../modifiercompiler.count_paragraphs.php | 27 + .../modifiercompiler.count_sentences.php | 27 + .../plugins/modifiercompiler.count_words.php | 31 + .../plugins/modifiercompiler.default.php | 33 + .../plugins/modifiercompiler.indent.php | 32 + .../Smarty/plugins/modifiercompiler.lower.php | 31 + .../plugins/modifiercompiler.noprint.php | 24 + .../modifiercompiler.string_format.php | 26 + .../Smarty/plugins/modifiercompiler.strip.php | 33 + .../plugins/modifiercompiler.strip_tags.php | 34 + .../Smarty/plugins/modifiercompiler.upper.php | 30 + .../plugins/modifiercompiler.wordwrap.php | 35 + .../plugins/outputfilter.trimwhitespace.php | 77 + .../plugins/shared.escape_special_chars.php | 29 + .../Smarty/plugins/shared.make_timestamp.php | 43 + .../Smarty/plugins/shared.mb_str_replace.php | 38 + .../variablefilter.htmlspecialchars.php | 22 + .../smarty_internal_cacheresource_file.php | 205 ++ .../smarty_internal_compile_append.php | 50 + .../smarty_internal_compile_assign.php | 64 + .../smarty_internal_compile_block.php | 187 ++ .../smarty_internal_compile_break.php | 65 + .../smarty_internal_compile_call.php | 108 + .../smarty_internal_compile_capture.php | 81 + .../smarty_internal_compile_config_load.php | 64 + .../smarty_internal_compile_continue.php | 64 + .../smarty_internal_compile_debug.php | 38 + .../smarty_internal_compile_eval.php | 51 + .../smarty_internal_compile_extends.php | 90 + .../smarty_internal_compile_for.php | 147 + .../smarty_internal_compile_foreach.php | 219 ++ .../smarty_internal_compile_function.php | 134 + .../sysplugins/smarty_internal_compile_if.php | 179 + .../smarty_internal_compile_include.php | 176 + .../smarty_internal_compile_include_php.php | 90 + .../smarty_internal_compile_insert.php | 123 + .../smarty_internal_compile_ldelim.php | 37 + .../smarty_internal_compile_nocache.php | 63 + ..._internal_compile_private_block_plugin.php | 78 + ...ternal_compile_private_function_plugin.php | 58 + ...arty_internal_compile_private_modifier.php | 69 + ..._compile_private_object_block_function.php | 80 + ...ternal_compile_private_object_function.php | 71 + ...ernal_compile_private_print_expression.php | 77 + ...ernal_compile_private_registered_block.php | 95 + ...al_compile_private_registered_function.php | 67 + ...ernal_compile_private_special_variable.php | 99 + .../smarty_internal_compile_rdelim.php | 37 + .../smarty_internal_compile_section.php | 173 + .../smarty_internal_compile_while.php | 82 + .../smarty_internal_compilebase.php | 150 + .../sysplugins/smarty_internal_config.php | 288 ++ .../smarty_internal_config_file_compiler.php | 106 + .../smarty_internal_configfilelexer.php | 526 +++ .../smarty_internal_configfileparser.php | 870 +++++ .../sysplugins/smarty_internal_data.php | 479 +++ .../sysplugins/smarty_internal_debug.php | 170 + .../sysplugins/smarty_internal_filter.php | 89 + .../smarty_internal_filter_handler.php | 67 + .../smarty_internal_function_call_handler.php | 40 + .../smarty_internal_get_include_path.php | 44 + .../smarty_internal_nocache_insert.php | 49 + .../sysplugins/smarty_internal_parsetree.php | 236 ++ .../sysplugins/smarty_internal_register.php | 156 + .../smarty_internal_resource_eval.php | 89 + .../smarty_internal_resource_extends.php | 176 + .../smarty_internal_resource_file.php | 128 + .../smarty_internal_resource_php.php | 127 + .../smarty_internal_resource_registered.php | 143 + .../smarty_internal_resource_stream.php | 99 + .../smarty_internal_resource_string.php | 133 + ...smarty_internal_smartytemplatecompiler.php | 72 + .../sysplugins/smarty_internal_template.php | 998 ++++++ .../smarty_internal_templatecompilerbase.php | 435 +++ .../smarty_internal_templatelexer.php | 1182 +++++++ .../smarty_internal_templateparser.php | 2966 +++++++++++++++++ .../sysplugins/smarty_internal_utility.php | 300 ++ .../sysplugins/smarty_internal_wrapper.php | 131 + .../sysplugins/smarty_internal_write_file.php | 56 + 3dparty/Smarty/sysplugins/smarty_security.php | 229 ++ {inc => 3dparty}/System.php | 0 {inc => 3dparty}/XML/Parser.php | 0 {inc => 3dparty}/XML/RPC.php | 0 {inc => 3dparty}/XML/RPC/Server.php | 0 .../docs/HTTP_WebDAV_Server/README | 0 .../docs/HTTP_WebDAV_Server/dav.txt | 0 .../docs/HTTP_WebDAV_Server/db/Fileserver.sql | 0 {inc => 3dparty}/package.dtd | 0 {inc => 3dparty}/packages/Archive_Tar.xml | 0 {inc => 3dparty}/packages/Console_Getopt.xml | 0 {inc => 3dparty}/packages/DB.xml | 0 {inc => 3dparty}/packages/Log.xml | 0 {inc => 3dparty}/packages/Mail.xml | 0 {inc => 3dparty}/packages/Mail_Mime.xml | 0 {inc => 3dparty}/packages/Net_SMTP.xml | 0 {inc => 3dparty}/packages/Net_Socket.xml | 0 {inc => 3dparty}/packages/PEAR.xml | 0 {inc => 3dparty}/packages/PHPUnit.xml | 0 {inc => 3dparty}/packages/XML_Parser.xml | 0 {inc => 3dparty}/packages/XML_RPC.xml | 0 {inc => 3dparty}/pearcmd.php | 0 admin/appinfo.php | 12 + admin/index.php | 44 +- admin/plugins.php | 51 + files/upload.php => admin/system.php | 50 +- admin/templates/_c/.gitkeep | 0 admin/templates/index.tmpl | 7 + admin/templates/plugins.tmpl | 23 + admin/templates/system.tmpl | 3 + admin/templates/users.tmpl | 39 + admin/users.php | 54 + bin/Smarty-3.0.7.tar.gz | Bin 0 -> 135613 bytes bin/jquery-1.5.min.js | 16 + bin/jquery-ui-1.8.10.custom.zip | Bin 0 -> 1059316 bytes css/default.php | 521 --- .../ui-bg_diagonals-thick_90_eeeeee_40x40.png | Bin 0 -> 251 bytes css/images/ui-bg_flat_15_cd0a0a_40x100.png | Bin 0 -> 181 bytes css/images/ui-bg_glass_100_e4f1fb_1x400.png | Bin 0 -> 119 bytes css/images/ui-bg_glass_50_3baae3_1x400.png | Bin 0 -> 131 bytes css/images/ui-bg_glass_80_d7ebf9_1x400.png | Bin 0 -> 124 bytes .../ui-bg_highlight-hard_100_f2f5f7_1x100.png | Bin 0 -> 103 bytes .../ui-bg_highlight-hard_70_000000_1x100.png | Bin 0 -> 118 bytes .../ui-bg_highlight-soft_100_deedf7_1x100.png | Bin 0 -> 104 bytes .../ui-bg_highlight-soft_25_ffef8f_1x100.png | Bin 0 -> 153 bytes css/images/ui-icons_2694e8_256x240.png | Bin 0 -> 5355 bytes css/images/ui-icons_2e83ff_256x240.png | Bin 0 -> 4369 bytes css/images/ui-icons_3d80b3_256x240.png | Bin 0 -> 5355 bytes css/images/ui-icons_72a7cf_256x240.png | Bin 0 -> 4369 bytes css/images/ui-icons_ffffff_256x240.png | Bin 0 -> 4369 bytes css/jquery-ui-1.8.10.custom.css | 573 ++++ css/small.php | 440 --- css/styles.css | 656 ++++ docs/FAQs | 8 - docs/INSTALL | 30 - docs/TODO | 16 - docs/owncloud.sql | 61 - files/api.php | 101 - files/appinfo.php | 6 + files/get_files.php | 109 - files/index.php | 29 +- files/open_file.php | 47 - files/pull.php | 11 - files/templates/_c/.gitkeep | 0 files/templates/index.tmpl | 3 + img/arrow.png | Bin 214 -> 0 bytes img/arrow_down.png | Bin 116 -> 0 bytes img/arrow_up.png | Bin 112 -> 0 bytes img/body_background.jpg | Bin 0 -> 305 bytes img/dots.png | Bin 204 -> 0 bytes img/drop-arrow.png | Bin 0 -> 2899 bytes img/header_background.png | Bin 0 -> 2953 bytes img/header_background2.png | Bin 0 -> 2402 bytes img/help_about.png | Bin 0 -> 1538 bytes img/icons/COPYING | 215 -- img/icons/delete.png | Bin 641 -> 0 bytes img/icons/folder.png | Bin 386 -> 0 bytes img/icons/loading.gif | Bin 1844 -> 0 bytes img/icons/other.png | Bin 431 -> 0 bytes img/icons/rename.png | Bin 245 -> 0 bytes img/owncloud-icon.png | Bin 2098 -> 0 bytes img/owncloud-logo-medium-white.png | Bin 0 -> 15478 bytes img/owncloud-logo-small-white.png | Bin 0 -> 5444 bytes img/owncloud-logo-small.png | Bin 12825 -> 0 bytes img/owncloud-logo.png | Bin 47374 -> 0 bytes inc/lib_log.php | 86 - inc/templates/adminform.php | 193 -- inc/templates/configform.php | 36 - inc/templates/footer.php | 26 - inc/templates/header.php | 90 - inc/templates/loginform.php | 9 - inc/templates/pluginform.php | 77 - inc/templates/settings.php | 50 - inc/templates/userform.php | 126 - index.php | 58 +- js/ajax.js | 23 - js/filebrowser.js | 596 ---- js/jquery-1.5.min.js | 16 + js/jquery-ui-1.8.10.custom.min.js | 782 +++++ js/js.js | 50 + js/lib_ajax.js | 237 -- js/lib_api.js | 34 - js/lib_drag.js | 348 -- js/lib_event.js | 48 - js/lib_files.js | 414 --- js/lib_notification.js | 48 - js/lib_timer.js | 52 - js/lib_xmlloader.js | 154 - .../HTTP/WebDAV/Server/Filesystem.php | 148 +- {inc => lib}/User/backend.php | 20 +- {inc => lib}/User/database.php | 55 +- lib/appconfig.php | 45 + inc/lib_base.php => lib/base.php | 526 +-- inc/lib_config.php => lib/config.php | 0 inc/lib_connect.php => lib/connect.php | 0 .../fileobserver.php | 0 inc/lib_files.php => lib/files.php | 28 +- .../filestorage.php | 0 inc/lib_filesystem.php => lib/filesystem.php | 0 lib/log.php | 78 + inc/lib_ocs.php => lib/ocs.php | 0 inc/lib_plugin.php => lib/plugin.php | 42 +- .../remotestorage.php | 0 lib/template.php | 197 ++ inc/lib_user.php => lib/user.php | 28 +- log/appinfo.php | 6 + log/index.php | 39 +- log/templates/_c/.gitkeep | 0 log/templates/index.tmpl | 46 + settings/appinfo.php | 6 + settings/index.php | 64 +- settings/templates/_c/.gitkeep | 0 settings/templates/index.tmpl | 19 + templates/_c/.gitkeep | 0 templates/layout.admin.tmpl | 43 + templates/layout.guest.tmpl | 20 + templates/layout.user.tmpl | 43 + templates/login.tmpl | 15 + templates/logout.tmpl | 1 + webdav/owncloud.php => webdav.php | 20 +- 360 files changed, 21275 insertions(+), 4726 deletions(-) rename {inc => 3dparty}/Archive/Tar.php (100%) rename {inc => 3dparty}/COPYING-PHP (100%) rename {inc => 3dparty}/COPYING-README (100%) rename {inc => 3dparty}/Console/Getopt.php (100%) rename {inc => 3dparty}/HTTP/WebDAV/Server.php (100%) rename {inc => 3dparty}/HTTP/WebDAV/Tools/_parse_lockinfo.php (100%) rename {inc => 3dparty}/HTTP/WebDAV/Tools/_parse_propfind.php (100%) rename {inc => 3dparty}/HTTP/WebDAV/Tools/_parse_proppatch.php (100%) rename {inc => 3dparty}/Log.php (100%) rename {inc => 3dparty}/Log/composite.php (100%) rename {inc => 3dparty}/Log/console.php (100%) rename {inc => 3dparty}/Log/daemon.php (100%) rename {inc => 3dparty}/Log/display.php (100%) rename {inc => 3dparty}/Log/error_log.php (100%) rename {inc => 3dparty}/Log/file.php (100%) rename {inc => 3dparty}/Log/mail.php (100%) rename {inc => 3dparty}/Log/mcal.php (100%) rename {inc => 3dparty}/Log/null.php (100%) rename {inc => 3dparty}/Log/observer.php (100%) rename {inc => 3dparty}/Log/sql.php (100%) rename {inc => 3dparty}/Log/sqlite.php (100%) rename {inc => 3dparty}/Log/syslog.php (100%) rename {inc => 3dparty}/Log/win.php (100%) rename {inc => 3dparty}/MDB2.php (100%) rename {inc => 3dparty}/MDB2/Date.php (100%) rename {inc => 3dparty}/MDB2/Driver/Datatype/Common.php (100%) rename {inc => 3dparty}/MDB2/Driver/Datatype/mysql.php (100%) rename {inc => 3dparty}/MDB2/Driver/Datatype/pgsql.php (100%) rename {inc => 3dparty}/MDB2/Driver/Datatype/sqlite.php (100%) rename {inc => 3dparty}/MDB2/Driver/Function/Common.php (100%) rename {inc => 3dparty}/MDB2/Driver/Function/mysql.php (100%) rename {inc => 3dparty}/MDB2/Driver/Function/pgsql.php (100%) rename {inc => 3dparty}/MDB2/Driver/Function/sqlite.php (100%) rename {inc => 3dparty}/MDB2/Driver/Manager/Common.php (100%) rename {inc => 3dparty}/MDB2/Driver/Manager/mysql.php (100%) rename {inc => 3dparty}/MDB2/Driver/Manager/pgsql.php (100%) rename {inc => 3dparty}/MDB2/Driver/Manager/sqlite.php (100%) rename {inc => 3dparty}/MDB2/Driver/Native/Common.php (100%) rename {inc => 3dparty}/MDB2/Driver/Native/mysql.php (100%) rename {inc => 3dparty}/MDB2/Driver/Native/pgsql.php (100%) rename {inc => 3dparty}/MDB2/Driver/Native/sqlite.php (100%) rename {inc => 3dparty}/MDB2/Driver/Reverse/Common.php (100%) rename {inc => 3dparty}/MDB2/Driver/Reverse/mysql.php (100%) rename {inc => 3dparty}/MDB2/Driver/Reverse/pgsql.php (100%) rename {inc => 3dparty}/MDB2/Driver/Reverse/sqlite.php (100%) rename {inc => 3dparty}/MDB2/Driver/mysql.php (100%) rename {inc => 3dparty}/MDB2/Driver/pgsql.php (100%) rename {inc => 3dparty}/MDB2/Driver/sqlite.php (100%) rename {inc => 3dparty}/MDB2/Extended.php (100%) rename {inc => 3dparty}/MDB2/Iterator.php (100%) rename {inc => 3dparty}/MDB2/LOB.php (100%) rename {inc => 3dparty}/MDB2/Schema.php (100%) rename {inc => 3dparty}/MDB2/Schema/Parser.php (100%) rename {inc => 3dparty}/MDB2/Schema/Parser2.php (100%) rename {inc => 3dparty}/MDB2/Schema/Reserved/ibase.php (100%) rename {inc => 3dparty}/MDB2/Schema/Reserved/mssql.php (100%) rename {inc => 3dparty}/MDB2/Schema/Reserved/mysql.php (100%) rename {inc => 3dparty}/MDB2/Schema/Reserved/oci8.php (100%) rename {inc => 3dparty}/MDB2/Schema/Reserved/pgsql.php (100%) rename {inc => 3dparty}/MDB2/Schema/Tool.php (100%) rename {inc => 3dparty}/MDB2/Schema/Tool/ParameterException.php (100%) rename {inc => 3dparty}/MDB2/Schema/Validate.php (100%) rename {inc => 3dparty}/MDB2/Schema/Writer.php (100%) rename {inc => 3dparty}/Mail.php (100%) rename {inc => 3dparty}/Mail/RFC822.php (100%) rename {inc => 3dparty}/Mail/mail.php (100%) rename {inc => 3dparty}/Mail/mime.php (100%) rename {inc => 3dparty}/Mail/mimeDecode.php (100%) rename {inc => 3dparty}/Mail/mimePart.php (100%) rename {inc => 3dparty}/Mail/null.php (100%) rename {inc => 3dparty}/Mail/sendmail.php (100%) rename {inc => 3dparty}/Mail/smtp.php (100%) rename {inc => 3dparty}/Mail/xmail.dtd (100%) rename {inc => 3dparty}/Mail/xmail.xsl (100%) rename {inc => 3dparty}/Net/SMTP.php (100%) rename {inc => 3dparty}/Net/Socket.php (100%) rename {inc => 3dparty}/OS/Guess.php (100%) rename {inc => 3dparty}/PEAR.php (100%) rename {inc => 3dparty}/PEAR/Autoloader.php (100%) rename {inc => 3dparty}/PEAR/Builder.php (100%) rename {inc => 3dparty}/PEAR/Command.php (100%) rename {inc => 3dparty}/PEAR/Command/Auth.php (100%) rename {inc => 3dparty}/PEAR/Command/Build.php (100%) rename {inc => 3dparty}/PEAR/Command/Common.php (100%) rename {inc => 3dparty}/PEAR/Command/Config.php (100%) rename {inc => 3dparty}/PEAR/Command/Install.php (100%) rename {inc => 3dparty}/PEAR/Command/Mirror.php (100%) rename {inc => 3dparty}/PEAR/Command/Package.php (100%) rename {inc => 3dparty}/PEAR/Command/Registry.php (100%) rename {inc => 3dparty}/PEAR/Command/Remote.php (100%) rename {inc => 3dparty}/PEAR/Common.php (100%) rename {inc => 3dparty}/PEAR/Config.php (100%) rename {inc => 3dparty}/PEAR/Dependency.php (100%) rename {inc => 3dparty}/PEAR/Downloader.php (100%) rename {inc => 3dparty}/PEAR/ErrorStack.php (100%) rename {inc => 3dparty}/PEAR/Exception.php (100%) rename {inc => 3dparty}/PEAR/Frontend/CLI.php (100%) rename {inc => 3dparty}/PEAR/Installer.php (100%) rename {inc => 3dparty}/PEAR/Packager.php (100%) rename {inc => 3dparty}/PEAR/Registry.php (100%) rename {inc => 3dparty}/PEAR/Remote.php (100%) rename {inc => 3dparty}/PEAR/RunTest.php (100%) rename {inc => 3dparty}/PHPUnit.php (100%) rename {inc => 3dparty}/PHPUnit/Assert.php (100%) rename {inc => 3dparty}/PHPUnit/GUI/Gtk.php (100%) rename {inc => 3dparty}/PHPUnit/GUI/HTML.php (100%) rename {inc => 3dparty}/PHPUnit/GUI/SetupDecorator.php (100%) rename {inc => 3dparty}/PHPUnit/RepeatedTest.php (100%) rename {inc => 3dparty}/PHPUnit/Skeleton.php (100%) rename {inc => 3dparty}/PHPUnit/TestCase.php (100%) rename {inc => 3dparty}/PHPUnit/TestDecorator.php (100%) rename {inc => 3dparty}/PHPUnit/TestFailure.php (100%) rename {inc => 3dparty}/PHPUnit/TestListener.php (100%) rename {inc => 3dparty}/PHPUnit/TestResult.php (100%) rename {inc => 3dparty}/PHPUnit/TestSuite.php (100%) create mode 100644 3dparty/Smarty/Smarty.class.php create mode 100644 3dparty/Smarty/debug.tpl create mode 100644 3dparty/Smarty/plugins/block.php.php create mode 100644 3dparty/Smarty/plugins/block.textformat.php create mode 100644 3dparty/Smarty/plugins/function.counter.php create mode 100644 3dparty/Smarty/plugins/function.cycle.php create mode 100644 3dparty/Smarty/plugins/function.fetch.php create mode 100644 3dparty/Smarty/plugins/function.html_checkboxes.php create mode 100644 3dparty/Smarty/plugins/function.html_image.php create mode 100644 3dparty/Smarty/plugins/function.html_options.php create mode 100644 3dparty/Smarty/plugins/function.html_radios.php create mode 100644 3dparty/Smarty/plugins/function.html_select_date.php create mode 100644 3dparty/Smarty/plugins/function.html_select_time.php create mode 100644 3dparty/Smarty/plugins/function.html_table.php create mode 100644 3dparty/Smarty/plugins/function.mailto.php create mode 100644 3dparty/Smarty/plugins/function.math.php create mode 100644 3dparty/Smarty/plugins/modifier.capitalize.php create mode 100644 3dparty/Smarty/plugins/modifier.date_format.php create mode 100644 3dparty/Smarty/plugins/modifier.debug_print_var.php create mode 100644 3dparty/Smarty/plugins/modifier.escape.php create mode 100644 3dparty/Smarty/plugins/modifier.regex_replace.php create mode 100644 3dparty/Smarty/plugins/modifier.replace.php create mode 100644 3dparty/Smarty/plugins/modifier.spacify.php create mode 100644 3dparty/Smarty/plugins/modifier.truncate.php create mode 100644 3dparty/Smarty/plugins/modifiercompiler.cat.php create mode 100644 3dparty/Smarty/plugins/modifiercompiler.count_characters.php create mode 100644 3dparty/Smarty/plugins/modifiercompiler.count_paragraphs.php create mode 100644 3dparty/Smarty/plugins/modifiercompiler.count_sentences.php create mode 100644 3dparty/Smarty/plugins/modifiercompiler.count_words.php create mode 100644 3dparty/Smarty/plugins/modifiercompiler.default.php create mode 100644 3dparty/Smarty/plugins/modifiercompiler.indent.php create mode 100644 3dparty/Smarty/plugins/modifiercompiler.lower.php create mode 100644 3dparty/Smarty/plugins/modifiercompiler.noprint.php create mode 100644 3dparty/Smarty/plugins/modifiercompiler.string_format.php create mode 100644 3dparty/Smarty/plugins/modifiercompiler.strip.php create mode 100644 3dparty/Smarty/plugins/modifiercompiler.strip_tags.php create mode 100644 3dparty/Smarty/plugins/modifiercompiler.upper.php create mode 100644 3dparty/Smarty/plugins/modifiercompiler.wordwrap.php create mode 100644 3dparty/Smarty/plugins/outputfilter.trimwhitespace.php create mode 100644 3dparty/Smarty/plugins/shared.escape_special_chars.php create mode 100644 3dparty/Smarty/plugins/shared.make_timestamp.php create mode 100644 3dparty/Smarty/plugins/shared.mb_str_replace.php create mode 100644 3dparty/Smarty/plugins/variablefilter.htmlspecialchars.php create mode 100644 3dparty/Smarty/sysplugins/smarty_internal_cacheresource_file.php create mode 100644 3dparty/Smarty/sysplugins/smarty_internal_compile_append.php create mode 100644 3dparty/Smarty/sysplugins/smarty_internal_compile_assign.php create mode 100644 3dparty/Smarty/sysplugins/smarty_internal_compile_block.php create mode 100644 3dparty/Smarty/sysplugins/smarty_internal_compile_break.php create mode 100644 3dparty/Smarty/sysplugins/smarty_internal_compile_call.php create mode 100644 3dparty/Smarty/sysplugins/smarty_internal_compile_capture.php create mode 100644 3dparty/Smarty/sysplugins/smarty_internal_compile_config_load.php create mode 100644 3dparty/Smarty/sysplugins/smarty_internal_compile_continue.php create mode 100644 3dparty/Smarty/sysplugins/smarty_internal_compile_debug.php create mode 100644 3dparty/Smarty/sysplugins/smarty_internal_compile_eval.php create mode 100644 3dparty/Smarty/sysplugins/smarty_internal_compile_extends.php create mode 100644 3dparty/Smarty/sysplugins/smarty_internal_compile_for.php create mode 100644 3dparty/Smarty/sysplugins/smarty_internal_compile_foreach.php create mode 100644 3dparty/Smarty/sysplugins/smarty_internal_compile_function.php create mode 100644 3dparty/Smarty/sysplugins/smarty_internal_compile_if.php create mode 100644 3dparty/Smarty/sysplugins/smarty_internal_compile_include.php create mode 100644 3dparty/Smarty/sysplugins/smarty_internal_compile_include_php.php create mode 100644 3dparty/Smarty/sysplugins/smarty_internal_compile_insert.php create mode 100644 3dparty/Smarty/sysplugins/smarty_internal_compile_ldelim.php create mode 100644 3dparty/Smarty/sysplugins/smarty_internal_compile_nocache.php create mode 100644 3dparty/Smarty/sysplugins/smarty_internal_compile_private_block_plugin.php create mode 100644 3dparty/Smarty/sysplugins/smarty_internal_compile_private_function_plugin.php create mode 100644 3dparty/Smarty/sysplugins/smarty_internal_compile_private_modifier.php create mode 100644 3dparty/Smarty/sysplugins/smarty_internal_compile_private_object_block_function.php create mode 100644 3dparty/Smarty/sysplugins/smarty_internal_compile_private_object_function.php create mode 100644 3dparty/Smarty/sysplugins/smarty_internal_compile_private_print_expression.php create mode 100644 3dparty/Smarty/sysplugins/smarty_internal_compile_private_registered_block.php create mode 100644 3dparty/Smarty/sysplugins/smarty_internal_compile_private_registered_function.php create mode 100644 3dparty/Smarty/sysplugins/smarty_internal_compile_private_special_variable.php create mode 100644 3dparty/Smarty/sysplugins/smarty_internal_compile_rdelim.php create mode 100644 3dparty/Smarty/sysplugins/smarty_internal_compile_section.php create mode 100644 3dparty/Smarty/sysplugins/smarty_internal_compile_while.php create mode 100644 3dparty/Smarty/sysplugins/smarty_internal_compilebase.php create mode 100644 3dparty/Smarty/sysplugins/smarty_internal_config.php create mode 100644 3dparty/Smarty/sysplugins/smarty_internal_config_file_compiler.php create mode 100644 3dparty/Smarty/sysplugins/smarty_internal_configfilelexer.php create mode 100644 3dparty/Smarty/sysplugins/smarty_internal_configfileparser.php create mode 100644 3dparty/Smarty/sysplugins/smarty_internal_data.php create mode 100644 3dparty/Smarty/sysplugins/smarty_internal_debug.php create mode 100644 3dparty/Smarty/sysplugins/smarty_internal_filter.php create mode 100644 3dparty/Smarty/sysplugins/smarty_internal_filter_handler.php create mode 100644 3dparty/Smarty/sysplugins/smarty_internal_function_call_handler.php create mode 100644 3dparty/Smarty/sysplugins/smarty_internal_get_include_path.php create mode 100644 3dparty/Smarty/sysplugins/smarty_internal_nocache_insert.php create mode 100644 3dparty/Smarty/sysplugins/smarty_internal_parsetree.php create mode 100644 3dparty/Smarty/sysplugins/smarty_internal_register.php create mode 100644 3dparty/Smarty/sysplugins/smarty_internal_resource_eval.php create mode 100644 3dparty/Smarty/sysplugins/smarty_internal_resource_extends.php create mode 100644 3dparty/Smarty/sysplugins/smarty_internal_resource_file.php create mode 100644 3dparty/Smarty/sysplugins/smarty_internal_resource_php.php create mode 100644 3dparty/Smarty/sysplugins/smarty_internal_resource_registered.php create mode 100644 3dparty/Smarty/sysplugins/smarty_internal_resource_stream.php create mode 100644 3dparty/Smarty/sysplugins/smarty_internal_resource_string.php create mode 100644 3dparty/Smarty/sysplugins/smarty_internal_smartytemplatecompiler.php create mode 100644 3dparty/Smarty/sysplugins/smarty_internal_template.php create mode 100644 3dparty/Smarty/sysplugins/smarty_internal_templatecompilerbase.php create mode 100644 3dparty/Smarty/sysplugins/smarty_internal_templatelexer.php create mode 100644 3dparty/Smarty/sysplugins/smarty_internal_templateparser.php create mode 100644 3dparty/Smarty/sysplugins/smarty_internal_utility.php create mode 100644 3dparty/Smarty/sysplugins/smarty_internal_wrapper.php create mode 100644 3dparty/Smarty/sysplugins/smarty_internal_write_file.php create mode 100644 3dparty/Smarty/sysplugins/smarty_security.php rename {inc => 3dparty}/System.php (100%) rename {inc => 3dparty}/XML/Parser.php (100%) rename {inc => 3dparty}/XML/RPC.php (100%) rename {inc => 3dparty}/XML/RPC/Server.php (100%) rename {inc => 3dparty}/docs/HTTP_WebDAV_Server/README (100%) rename {inc => 3dparty}/docs/HTTP_WebDAV_Server/dav.txt (100%) rename {inc => 3dparty}/docs/HTTP_WebDAV_Server/db/Fileserver.sql (100%) rename {inc => 3dparty}/package.dtd (100%) rename {inc => 3dparty}/packages/Archive_Tar.xml (100%) rename {inc => 3dparty}/packages/Console_Getopt.xml (100%) rename {inc => 3dparty}/packages/DB.xml (100%) rename {inc => 3dparty}/packages/Log.xml (100%) rename {inc => 3dparty}/packages/Mail.xml (100%) rename {inc => 3dparty}/packages/Mail_Mime.xml (100%) rename {inc => 3dparty}/packages/Net_SMTP.xml (100%) rename {inc => 3dparty}/packages/Net_Socket.xml (100%) rename {inc => 3dparty}/packages/PEAR.xml (100%) rename {inc => 3dparty}/packages/PHPUnit.xml (100%) rename {inc => 3dparty}/packages/XML_Parser.xml (100%) rename {inc => 3dparty}/packages/XML_RPC.xml (100%) rename {inc => 3dparty}/pearcmd.php (100%) create mode 100644 admin/appinfo.php create mode 100644 admin/plugins.php rename files/upload.php => admin/system.php (50%) create mode 100644 admin/templates/_c/.gitkeep create mode 100644 admin/templates/index.tmpl create mode 100644 admin/templates/plugins.tmpl create mode 100644 admin/templates/system.tmpl create mode 100644 admin/templates/users.tmpl create mode 100644 admin/users.php create mode 100644 bin/Smarty-3.0.7.tar.gz create mode 100644 bin/jquery-1.5.min.js create mode 100644 bin/jquery-ui-1.8.10.custom.zip delete mode 100644 css/default.php create mode 100644 css/images/ui-bg_diagonals-thick_90_eeeeee_40x40.png create mode 100644 css/images/ui-bg_flat_15_cd0a0a_40x100.png create mode 100644 css/images/ui-bg_glass_100_e4f1fb_1x400.png create mode 100644 css/images/ui-bg_glass_50_3baae3_1x400.png create mode 100644 css/images/ui-bg_glass_80_d7ebf9_1x400.png create mode 100644 css/images/ui-bg_highlight-hard_100_f2f5f7_1x100.png create mode 100644 css/images/ui-bg_highlight-hard_70_000000_1x100.png create mode 100644 css/images/ui-bg_highlight-soft_100_deedf7_1x100.png create mode 100644 css/images/ui-bg_highlight-soft_25_ffef8f_1x100.png create mode 100644 css/images/ui-icons_2694e8_256x240.png create mode 100644 css/images/ui-icons_2e83ff_256x240.png create mode 100644 css/images/ui-icons_3d80b3_256x240.png create mode 100644 css/images/ui-icons_72a7cf_256x240.png create mode 100644 css/images/ui-icons_ffffff_256x240.png create mode 100644 css/jquery-ui-1.8.10.custom.css delete mode 100644 css/small.php create mode 100644 css/styles.css delete mode 100644 docs/FAQs delete mode 100644 docs/INSTALL delete mode 100644 docs/TODO delete mode 100644 docs/owncloud.sql delete mode 100644 files/api.php create mode 100644 files/appinfo.php delete mode 100644 files/get_files.php delete mode 100644 files/open_file.php delete mode 100644 files/pull.php create mode 100644 files/templates/_c/.gitkeep create mode 100644 files/templates/index.tmpl delete mode 100644 img/arrow.png delete mode 100644 img/arrow_down.png delete mode 100644 img/arrow_up.png create mode 100644 img/body_background.jpg delete mode 100644 img/dots.png create mode 100644 img/drop-arrow.png create mode 100644 img/header_background.png create mode 100644 img/header_background2.png create mode 100644 img/help_about.png delete mode 100644 img/icons/COPYING delete mode 100644 img/icons/delete.png delete mode 100644 img/icons/folder.png delete mode 100644 img/icons/loading.gif delete mode 100644 img/icons/other.png delete mode 100644 img/icons/rename.png delete mode 100644 img/owncloud-icon.png create mode 100644 img/owncloud-logo-medium-white.png create mode 100644 img/owncloud-logo-small-white.png delete mode 100644 img/owncloud-logo-small.png delete mode 100644 img/owncloud-logo.png delete mode 100644 inc/lib_log.php delete mode 100644 inc/templates/adminform.php delete mode 100644 inc/templates/configform.php delete mode 100644 inc/templates/footer.php delete mode 100644 inc/templates/header.php delete mode 100644 inc/templates/loginform.php delete mode 100644 inc/templates/pluginform.php delete mode 100644 inc/templates/settings.php delete mode 100644 inc/templates/userform.php delete mode 100644 js/ajax.js delete mode 100644 js/filebrowser.js create mode 100644 js/jquery-1.5.min.js create mode 100644 js/jquery-ui-1.8.10.custom.min.js create mode 100644 js/js.js delete mode 100644 js/lib_ajax.js delete mode 100644 js/lib_api.js delete mode 100644 js/lib_drag.js delete mode 100644 js/lib_event.js delete mode 100644 js/lib_files.js delete mode 100644 js/lib_notification.js delete mode 100644 js/lib_timer.js delete mode 100644 js/lib_xmlloader.js rename {inc => lib}/HTTP/WebDAV/Server/Filesystem.php (93%) rename {inc => lib}/User/backend.php (95%) rename {inc => lib}/User/database.php (93%) create mode 100644 lib/appconfig.php rename inc/lib_base.php => lib/base.php (66%) rename inc/lib_config.php => lib/config.php (100%) rename inc/lib_connect.php => lib/connect.php (100%) rename inc/lib_fileobserver.php => lib/fileobserver.php (100%) rename inc/lib_files.php => lib/files.php (96%) rename inc/lib_filestorage.php => lib/filestorage.php (100%) rename inc/lib_filesystem.php => lib/filesystem.php (100%) create mode 100644 lib/log.php rename inc/lib_ocs.php => lib/ocs.php (100%) rename inc/lib_plugin.php => lib/plugin.php (97%) rename inc/lib_remotestorage.php => lib/remotestorage.php (100%) create mode 100644 lib/template.php rename inc/lib_user.php => lib/user.php (94%) create mode 100644 log/appinfo.php create mode 100644 log/templates/_c/.gitkeep create mode 100644 log/templates/index.tmpl create mode 100644 settings/appinfo.php create mode 100644 settings/templates/_c/.gitkeep create mode 100644 settings/templates/index.tmpl create mode 100644 templates/_c/.gitkeep create mode 100644 templates/layout.admin.tmpl create mode 100644 templates/layout.guest.tmpl create mode 100644 templates/layout.user.tmpl create mode 100644 templates/login.tmpl create mode 100644 templates/logout.tmpl rename webdav/owncloud.php => webdav.php (86%) diff --git a/inc/Archive/Tar.php b/3dparty/Archive/Tar.php similarity index 100% rename from inc/Archive/Tar.php rename to 3dparty/Archive/Tar.php diff --git a/inc/COPYING-PHP b/3dparty/COPYING-PHP similarity index 100% rename from inc/COPYING-PHP rename to 3dparty/COPYING-PHP diff --git a/inc/COPYING-README b/3dparty/COPYING-README similarity index 100% rename from inc/COPYING-README rename to 3dparty/COPYING-README diff --git a/inc/Console/Getopt.php b/3dparty/Console/Getopt.php similarity index 100% rename from inc/Console/Getopt.php rename to 3dparty/Console/Getopt.php diff --git a/inc/HTTP/WebDAV/Server.php b/3dparty/HTTP/WebDAV/Server.php similarity index 100% rename from inc/HTTP/WebDAV/Server.php rename to 3dparty/HTTP/WebDAV/Server.php diff --git a/inc/HTTP/WebDAV/Tools/_parse_lockinfo.php b/3dparty/HTTP/WebDAV/Tools/_parse_lockinfo.php similarity index 100% rename from inc/HTTP/WebDAV/Tools/_parse_lockinfo.php rename to 3dparty/HTTP/WebDAV/Tools/_parse_lockinfo.php diff --git a/inc/HTTP/WebDAV/Tools/_parse_propfind.php b/3dparty/HTTP/WebDAV/Tools/_parse_propfind.php similarity index 100% rename from inc/HTTP/WebDAV/Tools/_parse_propfind.php rename to 3dparty/HTTP/WebDAV/Tools/_parse_propfind.php diff --git a/inc/HTTP/WebDAV/Tools/_parse_proppatch.php b/3dparty/HTTP/WebDAV/Tools/_parse_proppatch.php similarity index 100% rename from inc/HTTP/WebDAV/Tools/_parse_proppatch.php rename to 3dparty/HTTP/WebDAV/Tools/_parse_proppatch.php diff --git a/inc/Log.php b/3dparty/Log.php similarity index 100% rename from inc/Log.php rename to 3dparty/Log.php diff --git a/inc/Log/composite.php b/3dparty/Log/composite.php similarity index 100% rename from inc/Log/composite.php rename to 3dparty/Log/composite.php diff --git a/inc/Log/console.php b/3dparty/Log/console.php similarity index 100% rename from inc/Log/console.php rename to 3dparty/Log/console.php diff --git a/inc/Log/daemon.php b/3dparty/Log/daemon.php similarity index 100% rename from inc/Log/daemon.php rename to 3dparty/Log/daemon.php diff --git a/inc/Log/display.php b/3dparty/Log/display.php similarity index 100% rename from inc/Log/display.php rename to 3dparty/Log/display.php diff --git a/inc/Log/error_log.php b/3dparty/Log/error_log.php similarity index 100% rename from inc/Log/error_log.php rename to 3dparty/Log/error_log.php diff --git a/inc/Log/file.php b/3dparty/Log/file.php similarity index 100% rename from inc/Log/file.php rename to 3dparty/Log/file.php diff --git a/inc/Log/mail.php b/3dparty/Log/mail.php similarity index 100% rename from inc/Log/mail.php rename to 3dparty/Log/mail.php diff --git a/inc/Log/mcal.php b/3dparty/Log/mcal.php similarity index 100% rename from inc/Log/mcal.php rename to 3dparty/Log/mcal.php diff --git a/inc/Log/null.php b/3dparty/Log/null.php similarity index 100% rename from inc/Log/null.php rename to 3dparty/Log/null.php diff --git a/inc/Log/observer.php b/3dparty/Log/observer.php similarity index 100% rename from inc/Log/observer.php rename to 3dparty/Log/observer.php diff --git a/inc/Log/sql.php b/3dparty/Log/sql.php similarity index 100% rename from inc/Log/sql.php rename to 3dparty/Log/sql.php diff --git a/inc/Log/sqlite.php b/3dparty/Log/sqlite.php similarity index 100% rename from inc/Log/sqlite.php rename to 3dparty/Log/sqlite.php diff --git a/inc/Log/syslog.php b/3dparty/Log/syslog.php similarity index 100% rename from inc/Log/syslog.php rename to 3dparty/Log/syslog.php diff --git a/inc/Log/win.php b/3dparty/Log/win.php similarity index 100% rename from inc/Log/win.php rename to 3dparty/Log/win.php diff --git a/inc/MDB2.php b/3dparty/MDB2.php similarity index 100% rename from inc/MDB2.php rename to 3dparty/MDB2.php diff --git a/inc/MDB2/Date.php b/3dparty/MDB2/Date.php similarity index 100% rename from inc/MDB2/Date.php rename to 3dparty/MDB2/Date.php diff --git a/inc/MDB2/Driver/Datatype/Common.php b/3dparty/MDB2/Driver/Datatype/Common.php similarity index 100% rename from inc/MDB2/Driver/Datatype/Common.php rename to 3dparty/MDB2/Driver/Datatype/Common.php diff --git a/inc/MDB2/Driver/Datatype/mysql.php b/3dparty/MDB2/Driver/Datatype/mysql.php similarity index 100% rename from inc/MDB2/Driver/Datatype/mysql.php rename to 3dparty/MDB2/Driver/Datatype/mysql.php diff --git a/inc/MDB2/Driver/Datatype/pgsql.php b/3dparty/MDB2/Driver/Datatype/pgsql.php similarity index 100% rename from inc/MDB2/Driver/Datatype/pgsql.php rename to 3dparty/MDB2/Driver/Datatype/pgsql.php diff --git a/inc/MDB2/Driver/Datatype/sqlite.php b/3dparty/MDB2/Driver/Datatype/sqlite.php similarity index 100% rename from inc/MDB2/Driver/Datatype/sqlite.php rename to 3dparty/MDB2/Driver/Datatype/sqlite.php diff --git a/inc/MDB2/Driver/Function/Common.php b/3dparty/MDB2/Driver/Function/Common.php similarity index 100% rename from inc/MDB2/Driver/Function/Common.php rename to 3dparty/MDB2/Driver/Function/Common.php diff --git a/inc/MDB2/Driver/Function/mysql.php b/3dparty/MDB2/Driver/Function/mysql.php similarity index 100% rename from inc/MDB2/Driver/Function/mysql.php rename to 3dparty/MDB2/Driver/Function/mysql.php diff --git a/inc/MDB2/Driver/Function/pgsql.php b/3dparty/MDB2/Driver/Function/pgsql.php similarity index 100% rename from inc/MDB2/Driver/Function/pgsql.php rename to 3dparty/MDB2/Driver/Function/pgsql.php diff --git a/inc/MDB2/Driver/Function/sqlite.php b/3dparty/MDB2/Driver/Function/sqlite.php similarity index 100% rename from inc/MDB2/Driver/Function/sqlite.php rename to 3dparty/MDB2/Driver/Function/sqlite.php diff --git a/inc/MDB2/Driver/Manager/Common.php b/3dparty/MDB2/Driver/Manager/Common.php similarity index 100% rename from inc/MDB2/Driver/Manager/Common.php rename to 3dparty/MDB2/Driver/Manager/Common.php diff --git a/inc/MDB2/Driver/Manager/mysql.php b/3dparty/MDB2/Driver/Manager/mysql.php similarity index 100% rename from inc/MDB2/Driver/Manager/mysql.php rename to 3dparty/MDB2/Driver/Manager/mysql.php diff --git a/inc/MDB2/Driver/Manager/pgsql.php b/3dparty/MDB2/Driver/Manager/pgsql.php similarity index 100% rename from inc/MDB2/Driver/Manager/pgsql.php rename to 3dparty/MDB2/Driver/Manager/pgsql.php diff --git a/inc/MDB2/Driver/Manager/sqlite.php b/3dparty/MDB2/Driver/Manager/sqlite.php similarity index 100% rename from inc/MDB2/Driver/Manager/sqlite.php rename to 3dparty/MDB2/Driver/Manager/sqlite.php diff --git a/inc/MDB2/Driver/Native/Common.php b/3dparty/MDB2/Driver/Native/Common.php similarity index 100% rename from inc/MDB2/Driver/Native/Common.php rename to 3dparty/MDB2/Driver/Native/Common.php diff --git a/inc/MDB2/Driver/Native/mysql.php b/3dparty/MDB2/Driver/Native/mysql.php similarity index 100% rename from inc/MDB2/Driver/Native/mysql.php rename to 3dparty/MDB2/Driver/Native/mysql.php diff --git a/inc/MDB2/Driver/Native/pgsql.php b/3dparty/MDB2/Driver/Native/pgsql.php similarity index 100% rename from inc/MDB2/Driver/Native/pgsql.php rename to 3dparty/MDB2/Driver/Native/pgsql.php diff --git a/inc/MDB2/Driver/Native/sqlite.php b/3dparty/MDB2/Driver/Native/sqlite.php similarity index 100% rename from inc/MDB2/Driver/Native/sqlite.php rename to 3dparty/MDB2/Driver/Native/sqlite.php diff --git a/inc/MDB2/Driver/Reverse/Common.php b/3dparty/MDB2/Driver/Reverse/Common.php similarity index 100% rename from inc/MDB2/Driver/Reverse/Common.php rename to 3dparty/MDB2/Driver/Reverse/Common.php diff --git a/inc/MDB2/Driver/Reverse/mysql.php b/3dparty/MDB2/Driver/Reverse/mysql.php similarity index 100% rename from inc/MDB2/Driver/Reverse/mysql.php rename to 3dparty/MDB2/Driver/Reverse/mysql.php diff --git a/inc/MDB2/Driver/Reverse/pgsql.php b/3dparty/MDB2/Driver/Reverse/pgsql.php similarity index 100% rename from inc/MDB2/Driver/Reverse/pgsql.php rename to 3dparty/MDB2/Driver/Reverse/pgsql.php diff --git a/inc/MDB2/Driver/Reverse/sqlite.php b/3dparty/MDB2/Driver/Reverse/sqlite.php similarity index 100% rename from inc/MDB2/Driver/Reverse/sqlite.php rename to 3dparty/MDB2/Driver/Reverse/sqlite.php diff --git a/inc/MDB2/Driver/mysql.php b/3dparty/MDB2/Driver/mysql.php similarity index 100% rename from inc/MDB2/Driver/mysql.php rename to 3dparty/MDB2/Driver/mysql.php diff --git a/inc/MDB2/Driver/pgsql.php b/3dparty/MDB2/Driver/pgsql.php similarity index 100% rename from inc/MDB2/Driver/pgsql.php rename to 3dparty/MDB2/Driver/pgsql.php diff --git a/inc/MDB2/Driver/sqlite.php b/3dparty/MDB2/Driver/sqlite.php similarity index 100% rename from inc/MDB2/Driver/sqlite.php rename to 3dparty/MDB2/Driver/sqlite.php diff --git a/inc/MDB2/Extended.php b/3dparty/MDB2/Extended.php similarity index 100% rename from inc/MDB2/Extended.php rename to 3dparty/MDB2/Extended.php diff --git a/inc/MDB2/Iterator.php b/3dparty/MDB2/Iterator.php similarity index 100% rename from inc/MDB2/Iterator.php rename to 3dparty/MDB2/Iterator.php diff --git a/inc/MDB2/LOB.php b/3dparty/MDB2/LOB.php similarity index 100% rename from inc/MDB2/LOB.php rename to 3dparty/MDB2/LOB.php diff --git a/inc/MDB2/Schema.php b/3dparty/MDB2/Schema.php similarity index 100% rename from inc/MDB2/Schema.php rename to 3dparty/MDB2/Schema.php diff --git a/inc/MDB2/Schema/Parser.php b/3dparty/MDB2/Schema/Parser.php similarity index 100% rename from inc/MDB2/Schema/Parser.php rename to 3dparty/MDB2/Schema/Parser.php diff --git a/inc/MDB2/Schema/Parser2.php b/3dparty/MDB2/Schema/Parser2.php similarity index 100% rename from inc/MDB2/Schema/Parser2.php rename to 3dparty/MDB2/Schema/Parser2.php diff --git a/inc/MDB2/Schema/Reserved/ibase.php b/3dparty/MDB2/Schema/Reserved/ibase.php similarity index 100% rename from inc/MDB2/Schema/Reserved/ibase.php rename to 3dparty/MDB2/Schema/Reserved/ibase.php diff --git a/inc/MDB2/Schema/Reserved/mssql.php b/3dparty/MDB2/Schema/Reserved/mssql.php similarity index 100% rename from inc/MDB2/Schema/Reserved/mssql.php rename to 3dparty/MDB2/Schema/Reserved/mssql.php diff --git a/inc/MDB2/Schema/Reserved/mysql.php b/3dparty/MDB2/Schema/Reserved/mysql.php similarity index 100% rename from inc/MDB2/Schema/Reserved/mysql.php rename to 3dparty/MDB2/Schema/Reserved/mysql.php diff --git a/inc/MDB2/Schema/Reserved/oci8.php b/3dparty/MDB2/Schema/Reserved/oci8.php similarity index 100% rename from inc/MDB2/Schema/Reserved/oci8.php rename to 3dparty/MDB2/Schema/Reserved/oci8.php diff --git a/inc/MDB2/Schema/Reserved/pgsql.php b/3dparty/MDB2/Schema/Reserved/pgsql.php similarity index 100% rename from inc/MDB2/Schema/Reserved/pgsql.php rename to 3dparty/MDB2/Schema/Reserved/pgsql.php diff --git a/inc/MDB2/Schema/Tool.php b/3dparty/MDB2/Schema/Tool.php similarity index 100% rename from inc/MDB2/Schema/Tool.php rename to 3dparty/MDB2/Schema/Tool.php diff --git a/inc/MDB2/Schema/Tool/ParameterException.php b/3dparty/MDB2/Schema/Tool/ParameterException.php similarity index 100% rename from inc/MDB2/Schema/Tool/ParameterException.php rename to 3dparty/MDB2/Schema/Tool/ParameterException.php diff --git a/inc/MDB2/Schema/Validate.php b/3dparty/MDB2/Schema/Validate.php similarity index 100% rename from inc/MDB2/Schema/Validate.php rename to 3dparty/MDB2/Schema/Validate.php diff --git a/inc/MDB2/Schema/Writer.php b/3dparty/MDB2/Schema/Writer.php similarity index 100% rename from inc/MDB2/Schema/Writer.php rename to 3dparty/MDB2/Schema/Writer.php diff --git a/inc/Mail.php b/3dparty/Mail.php similarity index 100% rename from inc/Mail.php rename to 3dparty/Mail.php diff --git a/inc/Mail/RFC822.php b/3dparty/Mail/RFC822.php similarity index 100% rename from inc/Mail/RFC822.php rename to 3dparty/Mail/RFC822.php diff --git a/inc/Mail/mail.php b/3dparty/Mail/mail.php similarity index 100% rename from inc/Mail/mail.php rename to 3dparty/Mail/mail.php diff --git a/inc/Mail/mime.php b/3dparty/Mail/mime.php similarity index 100% rename from inc/Mail/mime.php rename to 3dparty/Mail/mime.php diff --git a/inc/Mail/mimeDecode.php b/3dparty/Mail/mimeDecode.php similarity index 100% rename from inc/Mail/mimeDecode.php rename to 3dparty/Mail/mimeDecode.php diff --git a/inc/Mail/mimePart.php b/3dparty/Mail/mimePart.php similarity index 100% rename from inc/Mail/mimePart.php rename to 3dparty/Mail/mimePart.php diff --git a/inc/Mail/null.php b/3dparty/Mail/null.php similarity index 100% rename from inc/Mail/null.php rename to 3dparty/Mail/null.php diff --git a/inc/Mail/sendmail.php b/3dparty/Mail/sendmail.php similarity index 100% rename from inc/Mail/sendmail.php rename to 3dparty/Mail/sendmail.php diff --git a/inc/Mail/smtp.php b/3dparty/Mail/smtp.php similarity index 100% rename from inc/Mail/smtp.php rename to 3dparty/Mail/smtp.php diff --git a/inc/Mail/xmail.dtd b/3dparty/Mail/xmail.dtd similarity index 100% rename from inc/Mail/xmail.dtd rename to 3dparty/Mail/xmail.dtd diff --git a/inc/Mail/xmail.xsl b/3dparty/Mail/xmail.xsl similarity index 100% rename from inc/Mail/xmail.xsl rename to 3dparty/Mail/xmail.xsl diff --git a/inc/Net/SMTP.php b/3dparty/Net/SMTP.php similarity index 100% rename from inc/Net/SMTP.php rename to 3dparty/Net/SMTP.php diff --git a/inc/Net/Socket.php b/3dparty/Net/Socket.php similarity index 100% rename from inc/Net/Socket.php rename to 3dparty/Net/Socket.php diff --git a/inc/OS/Guess.php b/3dparty/OS/Guess.php similarity index 100% rename from inc/OS/Guess.php rename to 3dparty/OS/Guess.php diff --git a/inc/PEAR.php b/3dparty/PEAR.php similarity index 100% rename from inc/PEAR.php rename to 3dparty/PEAR.php diff --git a/inc/PEAR/Autoloader.php b/3dparty/PEAR/Autoloader.php similarity index 100% rename from inc/PEAR/Autoloader.php rename to 3dparty/PEAR/Autoloader.php diff --git a/inc/PEAR/Builder.php b/3dparty/PEAR/Builder.php similarity index 100% rename from inc/PEAR/Builder.php rename to 3dparty/PEAR/Builder.php diff --git a/inc/PEAR/Command.php b/3dparty/PEAR/Command.php similarity index 100% rename from inc/PEAR/Command.php rename to 3dparty/PEAR/Command.php diff --git a/inc/PEAR/Command/Auth.php b/3dparty/PEAR/Command/Auth.php similarity index 100% rename from inc/PEAR/Command/Auth.php rename to 3dparty/PEAR/Command/Auth.php diff --git a/inc/PEAR/Command/Build.php b/3dparty/PEAR/Command/Build.php similarity index 100% rename from inc/PEAR/Command/Build.php rename to 3dparty/PEAR/Command/Build.php diff --git a/inc/PEAR/Command/Common.php b/3dparty/PEAR/Command/Common.php similarity index 100% rename from inc/PEAR/Command/Common.php rename to 3dparty/PEAR/Command/Common.php diff --git a/inc/PEAR/Command/Config.php b/3dparty/PEAR/Command/Config.php similarity index 100% rename from inc/PEAR/Command/Config.php rename to 3dparty/PEAR/Command/Config.php diff --git a/inc/PEAR/Command/Install.php b/3dparty/PEAR/Command/Install.php similarity index 100% rename from inc/PEAR/Command/Install.php rename to 3dparty/PEAR/Command/Install.php diff --git a/inc/PEAR/Command/Mirror.php b/3dparty/PEAR/Command/Mirror.php similarity index 100% rename from inc/PEAR/Command/Mirror.php rename to 3dparty/PEAR/Command/Mirror.php diff --git a/inc/PEAR/Command/Package.php b/3dparty/PEAR/Command/Package.php similarity index 100% rename from inc/PEAR/Command/Package.php rename to 3dparty/PEAR/Command/Package.php diff --git a/inc/PEAR/Command/Registry.php b/3dparty/PEAR/Command/Registry.php similarity index 100% rename from inc/PEAR/Command/Registry.php rename to 3dparty/PEAR/Command/Registry.php diff --git a/inc/PEAR/Command/Remote.php b/3dparty/PEAR/Command/Remote.php similarity index 100% rename from inc/PEAR/Command/Remote.php rename to 3dparty/PEAR/Command/Remote.php diff --git a/inc/PEAR/Common.php b/3dparty/PEAR/Common.php similarity index 100% rename from inc/PEAR/Common.php rename to 3dparty/PEAR/Common.php diff --git a/inc/PEAR/Config.php b/3dparty/PEAR/Config.php similarity index 100% rename from inc/PEAR/Config.php rename to 3dparty/PEAR/Config.php diff --git a/inc/PEAR/Dependency.php b/3dparty/PEAR/Dependency.php similarity index 100% rename from inc/PEAR/Dependency.php rename to 3dparty/PEAR/Dependency.php diff --git a/inc/PEAR/Downloader.php b/3dparty/PEAR/Downloader.php similarity index 100% rename from inc/PEAR/Downloader.php rename to 3dparty/PEAR/Downloader.php diff --git a/inc/PEAR/ErrorStack.php b/3dparty/PEAR/ErrorStack.php similarity index 100% rename from inc/PEAR/ErrorStack.php rename to 3dparty/PEAR/ErrorStack.php diff --git a/inc/PEAR/Exception.php b/3dparty/PEAR/Exception.php similarity index 100% rename from inc/PEAR/Exception.php rename to 3dparty/PEAR/Exception.php diff --git a/inc/PEAR/Frontend/CLI.php b/3dparty/PEAR/Frontend/CLI.php similarity index 100% rename from inc/PEAR/Frontend/CLI.php rename to 3dparty/PEAR/Frontend/CLI.php diff --git a/inc/PEAR/Installer.php b/3dparty/PEAR/Installer.php similarity index 100% rename from inc/PEAR/Installer.php rename to 3dparty/PEAR/Installer.php diff --git a/inc/PEAR/Packager.php b/3dparty/PEAR/Packager.php similarity index 100% rename from inc/PEAR/Packager.php rename to 3dparty/PEAR/Packager.php diff --git a/inc/PEAR/Registry.php b/3dparty/PEAR/Registry.php similarity index 100% rename from inc/PEAR/Registry.php rename to 3dparty/PEAR/Registry.php diff --git a/inc/PEAR/Remote.php b/3dparty/PEAR/Remote.php similarity index 100% rename from inc/PEAR/Remote.php rename to 3dparty/PEAR/Remote.php diff --git a/inc/PEAR/RunTest.php b/3dparty/PEAR/RunTest.php similarity index 100% rename from inc/PEAR/RunTest.php rename to 3dparty/PEAR/RunTest.php diff --git a/inc/PHPUnit.php b/3dparty/PHPUnit.php similarity index 100% rename from inc/PHPUnit.php rename to 3dparty/PHPUnit.php diff --git a/inc/PHPUnit/Assert.php b/3dparty/PHPUnit/Assert.php similarity index 100% rename from inc/PHPUnit/Assert.php rename to 3dparty/PHPUnit/Assert.php diff --git a/inc/PHPUnit/GUI/Gtk.php b/3dparty/PHPUnit/GUI/Gtk.php similarity index 100% rename from inc/PHPUnit/GUI/Gtk.php rename to 3dparty/PHPUnit/GUI/Gtk.php diff --git a/inc/PHPUnit/GUI/HTML.php b/3dparty/PHPUnit/GUI/HTML.php similarity index 100% rename from inc/PHPUnit/GUI/HTML.php rename to 3dparty/PHPUnit/GUI/HTML.php diff --git a/inc/PHPUnit/GUI/SetupDecorator.php b/3dparty/PHPUnit/GUI/SetupDecorator.php similarity index 100% rename from inc/PHPUnit/GUI/SetupDecorator.php rename to 3dparty/PHPUnit/GUI/SetupDecorator.php diff --git a/inc/PHPUnit/RepeatedTest.php b/3dparty/PHPUnit/RepeatedTest.php similarity index 100% rename from inc/PHPUnit/RepeatedTest.php rename to 3dparty/PHPUnit/RepeatedTest.php diff --git a/inc/PHPUnit/Skeleton.php b/3dparty/PHPUnit/Skeleton.php similarity index 100% rename from inc/PHPUnit/Skeleton.php rename to 3dparty/PHPUnit/Skeleton.php diff --git a/inc/PHPUnit/TestCase.php b/3dparty/PHPUnit/TestCase.php similarity index 100% rename from inc/PHPUnit/TestCase.php rename to 3dparty/PHPUnit/TestCase.php diff --git a/inc/PHPUnit/TestDecorator.php b/3dparty/PHPUnit/TestDecorator.php similarity index 100% rename from inc/PHPUnit/TestDecorator.php rename to 3dparty/PHPUnit/TestDecorator.php diff --git a/inc/PHPUnit/TestFailure.php b/3dparty/PHPUnit/TestFailure.php similarity index 100% rename from inc/PHPUnit/TestFailure.php rename to 3dparty/PHPUnit/TestFailure.php diff --git a/inc/PHPUnit/TestListener.php b/3dparty/PHPUnit/TestListener.php similarity index 100% rename from inc/PHPUnit/TestListener.php rename to 3dparty/PHPUnit/TestListener.php diff --git a/inc/PHPUnit/TestResult.php b/3dparty/PHPUnit/TestResult.php similarity index 100% rename from inc/PHPUnit/TestResult.php rename to 3dparty/PHPUnit/TestResult.php diff --git a/inc/PHPUnit/TestSuite.php b/3dparty/PHPUnit/TestSuite.php similarity index 100% rename from inc/PHPUnit/TestSuite.php rename to 3dparty/PHPUnit/TestSuite.php diff --git a/3dparty/Smarty/Smarty.class.php b/3dparty/Smarty/Smarty.class.php new file mode 100644 index 0000000000..274c9138d4 --- /dev/null +++ b/3dparty/Smarty/Smarty.class.php @@ -0,0 +1,815 @@ + + * @author Uwe Tews + * @package Smarty + * @version 3.0.7 + */ + +/** + * define shorthand directory separator constant + */ +if (!defined('DS')) { + define('DS', DIRECTORY_SEPARATOR); +} + +/** + * set SMARTY_DIR to absolute path to Smarty library files. + * Sets SMARTY_DIR only if user application has not already defined it. + */ +if (!defined('SMARTY_DIR')) { + define('SMARTY_DIR', dirname(__FILE__) . DS); +} + +/** + * set SMARTY_SYSPLUGINS_DIR to absolute path to Smarty internal plugins. + * Sets SMARTY_SYSPLUGINS_DIR only if user application has not already defined it. + */ +if (!defined('SMARTY_SYSPLUGINS_DIR')) { + define('SMARTY_SYSPLUGINS_DIR', SMARTY_DIR . 'sysplugins' . DS); +} +if (!defined('SMARTY_PLUGINS_DIR')) { + define('SMARTY_PLUGINS_DIR', SMARTY_DIR . 'plugins' . DS); +} +if (!defined('SMARTY_RESOURCE_CHAR_SET')) { + define('SMARTY_RESOURCE_CHAR_SET', 'UTF-8'); +} +if (!defined('SMARTY_RESOURCE_DATE_FORMAT')) { + define('SMARTY_RESOURCE_DATE_FORMAT', '%b %e, %Y'); +} + +/** + * register the class autoloader + */ +if (!defined('SMARTY_SPL_AUTOLOAD')) { + define('SMARTY_SPL_AUTOLOAD', 0); +} + +if (SMARTY_SPL_AUTOLOAD && set_include_path(get_include_path() . PATH_SEPARATOR . SMARTY_SYSPLUGINS_DIR) !== false) { + $registeredAutoLoadFunctions = spl_autoload_functions(); + if (!isset($registeredAutoLoadFunctions['spl_autoload'])) { + spl_autoload_register(); + } +} else { + spl_autoload_register('smartyAutoload'); +} + +/** + * This is the main Smarty class + */ +class Smarty extends Smarty_Internal_Data { + /** + * constant definitions + */ + // smarty version + const SMARTY_VERSION = 'Smarty-3.0.7'; + //define variable scopes + const SCOPE_LOCAL = 0; + const SCOPE_PARENT = 1; + const SCOPE_ROOT = 2; + const SCOPE_GLOBAL = 3; + // define caching modes + const CACHING_OFF = 0; + const CACHING_LIFETIME_CURRENT = 1; + const CACHING_LIFETIME_SAVED = 2; + /** modes for handling of "" tags in templates. **/ + const PHP_PASSTHRU = 0; //-> print tags as plain text + const PHP_QUOTE = 1; //-> escape tags as entities + const PHP_REMOVE = 2; //-> escape tags as entities + const PHP_ALLOW = 3; //-> escape tags as entities + // filter types + const FILTER_POST = 'post'; + const FILTER_PRE = 'pre'; + const FILTER_OUTPUT = 'output'; + const FILTER_VARIABLE = 'variable'; + // plugin types + const PLUGIN_FUNCTION = 'function'; + const PLUGIN_BLOCK = 'block'; + const PLUGIN_COMPILER = 'compiler'; + const PLUGIN_MODIFIER = 'modifier'; + + /** + * static variables + */ + // assigned global tpl vars + static $global_tpl_vars = array(); + + /** + * variables + */ + // auto literal on delimiters with whitspace + public $auto_literal = true; + // display error on not assigned variables + public $error_unassigned = false; + // template directory + public $template_dir = null; + // default template handler + public $default_template_handler_func = null; + // compile directory + public $compile_dir = null; + // plugins directory + public $plugins_dir = null; + // cache directory + public $cache_dir = null; + // config directory + public $config_dir = null; + // force template compiling? + public $force_compile = false; + // check template for modifications? + public $compile_check = true; + // locking concurrent compiles + public $compile_locking = true; + // use sub dirs for compiled/cached files? + public $use_sub_dirs = false; + // compile_error? + public $compile_error = false; + // caching enabled + public $caching = false; + // merge compiled includes + public $merge_compiled_includes = false; + // cache lifetime + public $cache_lifetime = 3600; + // force cache file creation + public $force_cache = false; + // cache_id + public $cache_id = null; + // compile_id + public $compile_id = null; + // template delimiters + public $left_delimiter = "{"; + public $right_delimiter = "}"; + // security + public $security_class = 'Smarty_Security'; + public $security_policy = null; + public $php_handling = self::PHP_PASSTHRU; + public $allow_php_tag = false; + public $allow_php_templates = false; + public $direct_access_security = true; + public $trusted_dir = array(); + // debug mode + public $debugging = false; + public $debugging_ctrl = 'NONE'; + public $smarty_debug_id = 'SMARTY_DEBUG'; + public $debug_tpl = null; + // When set, smarty does uses this value as error_reporting-level. + public $error_reporting = null; + // config var settings + public $config_overwrite = true; //Controls whether variables with the same name overwrite each other. + public $config_booleanize = true; //Controls whether config values of on/true/yes and off/false/no get converted to boolean + public $config_read_hidden = false; //Controls whether hidden config sections/vars are read from the file. + // config vars + public $config_vars = array(); + // assigned tpl vars + public $tpl_vars = array(); + // dummy parent object + public $parent = null; + // global template functions + public $template_functions = array(); + // resource type used if none given + public $default_resource_type = 'file'; + // caching type + public $caching_type = 'file'; + // internal cache resource types + public $cache_resource_types = array('file'); + // internal config properties + public $properties = array(); + // config type + public $default_config_type = 'file'; + // cached template objects + public $template_objects = null; + // check If-Modified-Since headers + public $cache_modified_check = false; + // registered plugins + public $registered_plugins = array(); + // plugin search order + public $plugin_search_order = array('function', 'block', 'compiler', 'class'); + // registered objects + public $registered_objects = array(); + // registered classes + public $registered_classes = array(); + // registered filters + public $registered_filters = array(); + // registered resources + public $registered_resources = array(); + // autoload filter + public $autoload_filters = array(); + // status of filter on variable output + public $variable_filter = true; + // default modifier + public $default_modifiers = array(); + // global internal smarty vars + static $_smarty_vars = array(); + // start time for execution time calculation + public $start_time = 0; + // default file permissions + public $_file_perms = 0644; + // default dir permissions + public $_dir_perms = 0771; + // block tag hierarchy + public $_tag_stack = array(); + // flag if {block} tag is compiled for template inheritance + public $inheritance = false; + // generate deprecated function call notices? + public $deprecation_notices = true; + // Smarty 2 BC + public $_version = self::SMARTY_VERSION; + // self pointer to Smarty object + public $smarty; + + /** + * Class constructor, initializes basic smarty properties + */ + public function __construct() + { + // selfpointer need by some other class methods + $this->smarty = $this; + if (is_callable('mb_internal_encoding')) { + mb_internal_encoding(SMARTY_RESOURCE_CHAR_SET); + } + $this->start_time = microtime(true); + // set default dirs + $this->template_dir = array('.' . DS . 'templates' . DS); + $this->compile_dir = '.' . DS . 'templates_c' . DS; + $this->plugins_dir = array(SMARTY_PLUGINS_DIR); + $this->cache_dir = '.' . DS . 'cache' . DS; + $this->config_dir = '.' . DS . 'configs' . DS; + $this->debug_tpl = SMARTY_DIR . 'debug.tpl'; + if (isset($_SERVER['SCRIPT_NAME'])) { + $this->assignGlobal('SCRIPT_NAME', $_SERVER['SCRIPT_NAME']); + } + } + + /** + * Class destructor + */ + public function __destruct() + { + } + + /** + * fetches a rendered Smarty template + * + * @param string $template the resource handle of the template file or template object + * @param mixed $cache_id cache id to be used with this template + * @param mixed $compile_id compile id to be used with this template + * @param object $ |null $parent next higher level of Smarty variables + * @return string rendered template output + */ + public function fetch($template, $cache_id = null, $compile_id = null, $parent = null, $display = false) + { + if (!empty($cache_id) && is_object($cache_id)) { + $parent = $cache_id; + $cache_id = null; + } + if ($parent === null) { + // get default Smarty data object + $parent = $this; + } + // create template object if necessary + ($template instanceof $this->template_class)? $_template = $template : + $_template = $this->createTemplate ($template, $cache_id, $compile_id, $parent, false); + if (isset($this->error_reporting)) { + $_smarty_old_error_level = error_reporting($this->error_reporting); + } + // check URL debugging control + if (!$this->debugging && $this->debugging_ctrl == 'URL') { + if (isset($_SERVER['QUERY_STRING'])) { + $_query_string = $_SERVER['QUERY_STRING']; + } else { + $_query_string = ''; + } + if (false !== strpos($_query_string, $this->smarty_debug_id)) { + if (false !== strpos($_query_string, $this->smarty_debug_id . '=on')) { + // enable debugging for this browser session + setcookie('SMARTY_DEBUG', true); + $this->debugging = true; + } elseif (false !== strpos($_query_string, $this->smarty_debug_id . '=off')) { + // disable debugging for this browser session + setcookie('SMARTY_DEBUG', false); + $this->debugging = false; + } else { + // enable debugging for this page + $this->debugging = true; + } + } else { + if (isset($_COOKIE['SMARTY_DEBUG'])) { + $this->debugging = true; + } + } + } + // obtain data for cache modified check + if ($this->cache_modified_check && $this->caching && $display) { + $_isCached = $_template->isCached() && !$_template->has_nocache_code; + if ($_isCached) { + $_gmt_mtime = gmdate('D, d M Y H:i:s', $_template->getCachedTimestamp()) . ' GMT'; + } else { + $_gmt_mtime = ''; + } + } + // return rendered template + if ((!$this->caching || $_template->resource_object->isEvaluated) && (isset($this->autoload_filters['output']) || isset($this->registered_filters['output']))) { + $_output = Smarty_Internal_Filter_Handler::runFilter('output', $_template->getRenderedTemplate(), $_template); + } else { + $_output = $_template->getRenderedTemplate(); + } + $_template->rendered_content = null; + if (isset($this->error_reporting)) { + error_reporting($_smarty_old_error_level); + } + // display or fetch + if ($display) { + if ($this->caching && $this->cache_modified_check) { + $_last_modified_date = @substr($_SERVER['HTTP_IF_MODIFIED_SINCE'], 0, strpos($_SERVER['HTTP_IF_MODIFIED_SINCE'], 'GMT') + 3); + if ($_isCached && $_gmt_mtime == $_last_modified_date) { + if (php_sapi_name() == 'cgi') + header('Status: 304 Not Modified'); + else + header('HTTP/1.1 304 Not Modified'); + } else { + header('Last-Modified: ' . gmdate('D, d M Y H:i:s', $_template->getCachedTimestamp()) . ' GMT'); + echo $_output; + } + } else { + echo $_output; + } + // debug output + if ($this->debugging) { + Smarty_Internal_Debug::display_debug($this); + } + return; + } else { + // return fetched content + return $_output; + } + } + + /** + * displays a Smarty template + * + * @param string $ |object $template the resource handle of the template file or template object + * @param mixed $cache_id cache id to be used with this template + * @param mixed $compile_id compile id to be used with this template + * @param object $parent next higher level of Smarty variables + */ + public function display($template, $cache_id = null, $compile_id = null, $parent = null) + { + // display template + $this->fetch ($template, $cache_id, $compile_id, $parent, true); + } + + /** + * test if cache i valid + * + * @param string $ |object $template the resource handle of the template file or template object + * @param mixed $cache_id cache id to be used with this template + * @param mixed $compile_id compile id to be used with this template + * @param object $parent next higher level of Smarty variables + * @return boolean cache status + */ + public function isCached($template, $cache_id = null, $compile_id = null, $parent = null) + { + if ($parent === null) { + $parent = $this; + } + if (!($template instanceof $this->template_class)) { + $template = $this->createTemplate ($template, $cache_id, $compile_id, $parent, false); + } + // return cache status of template + return $template->isCached(); + } + + /** + * creates a data object + * + * @param object $parent next higher level of Smarty variables + * @returns object data object + */ + public function createData($parent = null) + { + return new Smarty_Data($parent, $this); + } + + /** + * creates a template object + * + * @param string $template the resource handle of the template file + * @param mixed $cache_id cache id to be used with this template + * @param mixed $compile_id compile id to be used with this template + * @param object $parent next higher level of Smarty variables + * @param boolean $do_clone flag is Smarty object shall be cloned + * @returns object template object + */ + public function createTemplate($template, $cache_id = null, $compile_id = null, $parent = null, $do_clone = true) + { + if (!empty($cache_id) && (is_object($cache_id) || is_array($cache_id))) { + $parent = $cache_id; + $cache_id = null; + } + if (!empty($parent) && is_array($parent)) { + $data = $parent; + $parent = null; + } else { + $data = null; + } + if (!is_object($template)) { + // we got a template resource + // already in template cache? + $_templateId = sha1($template . $cache_id . $compile_id); + if (isset($this->template_objects[$_templateId]) && $this->caching) { + // return cached template object + $tpl = $this->template_objects[$_templateId]; + } else { + // create new template object + if ($do_clone) { + $tpl = new $this->template_class($template, clone $this, $parent, $cache_id, $compile_id); + } else { + $tpl = new $this->template_class($template, $this, $parent, $cache_id, $compile_id); + } + } + } else { + // just return a copy of template class + $tpl = $template; + } + // fill data if present + if (!empty($data) && is_array($data)) { + // set up variable values + foreach ($data as $_key => $_val) { + $tpl->tpl_vars[$_key] = new Smarty_variable($_val); + } + } + return $tpl; + } + + + + /** + * Check if a template resource exists + * + * @param string $resource_name template name + * @return boolean status + */ + function templateExists($resource_name) + { + // create template object + $save = $this->template_objects; + $tpl = new $this->template_class($resource_name, $this); + // check if it does exists + $result = $tpl->isExisting(); + $this->template_objects = $save; + return $result; + } + + /** + * Returns a single or all global variables + * + * @param object $smarty + * @param string $varname variable name or null + * @return string variable value or or array of variables + */ + function getGlobal($varname = null) + { + if (isset($varname)) { + if (isset(self::$global_tpl_vars[$varname])) { + return self::$global_tpl_vars[$varname]->value; + } else { + return ''; + } + } else { + $_result = array(); + foreach (self::$global_tpl_vars AS $key => $var) { + $_result[$key] = $var->value; + } + return $_result; + } + } + + /** + * Empty cache folder + * + * @param integer $exp_time expiration time + * @param string $type resource type + * @return integer number of cache files deleted + */ + function clearAllCache($exp_time = null, $type = null) + { + // load cache resource and call clearAll + return $this->loadCacheResource($type)->clearAll($exp_time); + } + + /** + * Empty cache for a specific template + * + * @param string $template_name template name + * @param string $cache_id cache id + * @param string $compile_id compile id + * @param integer $exp_time expiration time + * @param string $type resource type + * @return integer number of cache files deleted + */ + function clearCache($template_name, $cache_id = null, $compile_id = null, $exp_time = null, $type = null) + { + // load cache resource and call clear + return $this->loadCacheResource($type)->clear($template_name, $cache_id, $compile_id, $exp_time); + } + + /** + * Loads security class and enables security + */ + public function enableSecurity($security_class = null) + { + if ($security_class instanceof Smarty_Security) { + $this->security_policy = $security_class; + return; + } + if ($security_class == null) { + $security_class = $this->security_class; + } + if (class_exists($security_class)) { + $this->security_policy = new $security_class($this); + } else { + throw new SmartyException("Security class '$security_class' is not defined"); + } + } + + /** + * Disable security + */ + public function disableSecurity() + { + $this->security_policy = null; + } + + /** + * Loads cache resource. + * + * @param string $type cache resource type + * @return object of cache resource + */ + public function loadCacheResource($type = null) { + if (!isset($type)) { + $type = $this->caching_type; + } + if (in_array($type, $this->cache_resource_types)) { + $cache_resource_class = 'Smarty_Internal_CacheResource_' . ucfirst($type); + return new $cache_resource_class($this); + } + else { + // try plugins dir + $cache_resource_class = 'Smarty_CacheResource_' . ucfirst($type); + if ($this->loadPlugin($cache_resource_class)) { + return new $cache_resource_class($this); + } + else { + throw new SmartyException("Unable to load cache resource '{$type}'"); + } + } + } + + + /** + * Set template directory + * + * @param string $ |array $template_dir folder(s) of template sorces + */ + public function setTemplateDir($template_dir) + { + $this->template_dir = (array)$template_dir; + return; + } + + /** + * Adds template directory(s) to existing ones + * + * @param string $ |array $template_dir folder(s) of template sources + */ + public function addTemplateDir($template_dir) + { + $this->template_dir = array_unique(array_merge((array)$this->template_dir, (array)$template_dir)); + return; + } + + /** + * Adds directory of plugin files + * + * @param object $smarty + * @param string $ |array $ plugins folder + * @return + */ + function addPluginsDir($plugins_dir) + { + $this->plugins_dir = array_unique(array_merge((array)$this->plugins_dir, (array)$plugins_dir)); + return; + } + + + /** + * return a reference to a registered object + * + * @param string $name object name + * @return object + */ + function getRegisteredObject($name) + { + if (!isset($this->registered_objects[$name])) + throw new SmartyException("'$name' is not a registered object"); + + if (!is_object($this->registered_objects[$name][0])) + throw new SmartyException("registered '$name' is not an object"); + + return $this->registered_objects[$name][0]; + } + + + /** + * return name of debugging template + * + * @return string + */ + function getDebugTemplate() + { + return $this->debug_tpl; + } + + /** + * set the debug template + * + * @param string $tpl_name + * @return bool + */ + function setDebugTemplate($tpl_name) + { + return $this->debug_tpl = $tpl_name; + } + + /** + * Takes unknown classes and loads plugin files for them + * class name format: Smarty_PluginType_PluginName + * plugin filename format: plugintype.pluginname.php + * + * @param string $plugin_name class plugin name to load + * @return string |boolean filepath of loaded file or false + */ + public function loadPlugin($plugin_name, $check = true) + { + // if function or class exists, exit silently (already loaded) + if ($check && (is_callable($plugin_name) || class_exists($plugin_name, false))) + return true; + // Plugin name is expected to be: Smarty_[Type]_[Name] + $_plugin_name = strtolower($plugin_name); + $_name_parts = explode('_', $_plugin_name, 3); + // class name must have three parts to be valid plugin + if (count($_name_parts) < 3 || $_name_parts[0] !== 'smarty') { + throw new SmartyException("plugin {$plugin_name} is not a valid name format"); + return false; + } + // if type is "internal", get plugin from sysplugins + if ($_name_parts[1] == 'internal') { + $file = SMARTY_SYSPLUGINS_DIR . $_plugin_name . '.php'; + if (file_exists($file)) { + require_once($file); + return $file; + } else { + return false; + } + } + // plugin filename is expected to be: [type].[name].php + $_plugin_filename = "{$_name_parts[1]}.{$_name_parts[2]}.php"; + // loop through plugin dirs and find the plugin + foreach((array)$this->plugins_dir as $_plugin_dir) { + if (strpos('/\\', substr($_plugin_dir, -1)) === false) { + $_plugin_dir .= DS; + } + $file = $_plugin_dir . $_plugin_filename; + if (file_exists($file)) { + require_once($file); + return $file; + } + } + // no plugin loaded + return false; + } + + /** + * clean up properties on cloned object + */ + public function __clone() + { + // clear config vars + $this->config_vars = array(); + // clear assigned tpl vars + $this->tpl_vars = array(); + // clear objects for external methods + unset($this->register); + unset($this->filter); + } + + + /** + * Handle unknown class methods + * + * @param string $name unknown methode name + * @param array $args aurgument array + */ + public function __call($name, $args) + { + static $camel_func; + if (!isset($camel_func)) + $camel_func = create_function('$c', 'return "_" . strtolower($c[1]);'); + // see if this is a set/get for a property + $first3 = strtolower(substr($name, 0, 3)); + if (in_array($first3, array('set', 'get')) && substr($name, 3, 1) !== '_') { + // try to keep case correct for future PHP 6.0 case-sensitive class methods + // lcfirst() not available < PHP 5.3.0, so improvise + $property_name = strtolower(substr($name, 3, 1)) . substr($name, 4); + // convert camel case to underscored name + $property_name = preg_replace_callback('/([A-Z])/', $camel_func, $property_name); + if (!property_exists($this, $property_name)) { + throw new SmartyException("property '$property_name' does not exist."); + return false; + } + if ($first3 == 'get') + return $this->$property_name; + else + return $this->$property_name = $args[0]; + } + // Smarty Backward Compatible wrapper + if (strpos($name,'_') !== false) { + if (!isset($this->wrapper)) { + $this->wrapper = new Smarty_Internal_Wrapper($this); + } + return $this->wrapper->convert($name, $args); + } + // external Smarty methods ? + foreach(array('filter','register') as $external) { + if (method_exists("Smarty_Internal_{$external}",$name)) { + if (!isset($this->$external)) { + $class = "Smarty_Internal_{$external}"; + $this->$external = new $class($this); + } + return call_user_func_array(array($this->$external,$name), $args); + } + } + if (in_array($name,array('clearCompiledTemplate','compileAllTemplates','compileAllConfig','testInstall','getTags'))) { + if (!isset($this->utility)) { + $this->utility = new Smarty_Internal_Utility($this); + } + return call_user_func_array(array($this->utility,$name), $args); + } + // PHP4 call to constructor? + if (strtolower($name) == 'smarty') { + throw new SmartyException('Please use parent::__construct() to call parent constuctor'); + return false; + } + throw new SmartyException("Call of unknown function '$name'."); + } +} + +/** + * Autoloader + */ +function smartyAutoload($class) +{ + $_class = strtolower($class); + if (substr($_class, 0, 16) === 'smarty_internal_' || $_class == 'smarty_security') { + include SMARTY_SYSPLUGINS_DIR . $_class . '.php'; + } +} + +/** + * Smarty exception class + */ +Class SmartyException extends Exception { +} + +/** + * Smarty compiler exception class + */ +Class SmartyCompilerException extends SmartyException { +} + +?> diff --git a/3dparty/Smarty/debug.tpl b/3dparty/Smarty/debug.tpl new file mode 100644 index 0000000000..7c318a4fcc --- /dev/null +++ b/3dparty/Smarty/debug.tpl @@ -0,0 +1,133 @@ +{capture name='_smarty_debug' assign=debug_output} + + + + Smarty Debug Console + + + + +

Smarty Debug Console - {if isset($template_name)}{$template_name|debug_print_var}{else}Total Time {$execution_time|string_format:"%.5f"}{/if}

+ +{if !empty($template_data)} +

included templates & config files (load time in seconds)

+ +
+{foreach $template_data as $template} + {$template.name} + + (compile {$template['compile_time']|string_format:"%.5f"}) (render {$template['render_time']|string_format:"%.5f"}) (cache {$template['cache_time']|string_format:"%.5f"}) + +
+{/foreach} +
+{/if} + +

assigned template variables

+ + + {foreach $assigned_vars as $vars} + + + + {/foreach} +
${$vars@key|escape:'html'}{$vars|debug_print_var}
+ +

assigned config file variables (outer template scope)

+ + + {foreach $config_vars as $vars} + + + + {/foreach} + +
{$vars@key|escape:'html'}{$vars|debug_print_var}
+ + +{/capture} + diff --git a/3dparty/Smarty/plugins/block.php.php b/3dparty/Smarty/plugins/block.php.php new file mode 100644 index 0000000000..8fedd8b435 --- /dev/null +++ b/3dparty/Smarty/plugins/block.php.php @@ -0,0 +1,27 @@ +allow_php_tag) { + throw new SmartyException("{php} is deprecated, set allow_php_tag = true to enable"); + } + eval($content); + return ''; +} + +?> \ No newline at end of file diff --git a/3dparty/Smarty/plugins/block.textformat.php b/3dparty/Smarty/plugins/block.textformat.php new file mode 100644 index 0000000000..517fd62dd5 --- /dev/null +++ b/3dparty/Smarty/plugins/block.textformat.php @@ -0,0 +1,102 @@ + + * Name: textformat
+ * Purpose: format text a certain way with preset styles + * or custom wrap/indent settings
+ * + * @link http://smarty.php.net/manual/en/language.function.textformat.php {textformat} + * (Smarty online manual) + * @param array $params parameters + *
+ * Params:   style: string (email)
+ *            indent: integer (0)
+ *            wrap: integer (80)
+ *            wrap_char string ("\n")
+ *            indent_char: string (" ")
+ *            wrap_boundary: boolean (true)
+ * 
+ * @author Monte Ohrt + * @param string $content contents of the block + * @param object $template template object + * @param boolean &$repeat repeat flag + * @return string content re-formatted + */ +function smarty_block_textformat($params, $content, $template, &$repeat) +{ + if (is_null($content)) { + return; + } + + $style = null; + $indent = 0; + $indent_first = 0; + $indent_char = ' '; + $wrap = 80; + $wrap_char = "\n"; + $wrap_cut = false; + $assign = null; + + foreach ($params as $_key => $_val) { + switch ($_key) { + case 'style': + case 'indent_char': + case 'wrap_char': + case 'assign': + $$_key = (string)$_val; + break; + + case 'indent': + case 'indent_first': + case 'wrap': + $$_key = (int)$_val; + break; + + case 'wrap_cut': + $$_key = (bool)$_val; + break; + + default: + trigger_error("textformat: unknown attribute '$_key'"); + } + } + + if ($style == 'email') { + $wrap = 72; + } + // split into paragraphs + $_paragraphs = preg_split('![\r\n][\r\n]!', $content); + $_output = ''; + + for($_x = 0, $_y = count($_paragraphs); $_x < $_y; $_x++) { + if ($_paragraphs[$_x] == '') { + continue; + } + // convert mult. spaces & special chars to single space + $_paragraphs[$_x] = preg_replace(array('!\s+!', '!(^\s+)|(\s+$)!'), array(' ', ''), $_paragraphs[$_x]); + // indent first line + if ($indent_first > 0) { + $_paragraphs[$_x] = str_repeat($indent_char, $indent_first) . $_paragraphs[$_x]; + } + // wordwrap sentences + $_paragraphs[$_x] = wordwrap($_paragraphs[$_x], $wrap - $indent, $wrap_char, $wrap_cut); + // indent lines + if ($indent > 0) { + $_paragraphs[$_x] = preg_replace('!^!m', str_repeat($indent_char, $indent), $_paragraphs[$_x]); + } + } + $_output = implode($wrap_char . $wrap_char, $_paragraphs); + + return $assign ? $template->assign($assign, $_output) : $_output; +} + +?> \ No newline at end of file diff --git a/3dparty/Smarty/plugins/function.counter.php b/3dparty/Smarty/plugins/function.counter.php new file mode 100644 index 0000000000..7c50bd44b7 --- /dev/null +++ b/3dparty/Smarty/plugins/function.counter.php @@ -0,0 +1,78 @@ + + * Name: counter
+ * Purpose: print out a counter value + * @author Monte Ohrt + * @link http://smarty.php.net/manual/en/language.function.counter.php {counter} + * (Smarty online manual) + * @param array parameters + * @param Smarty + * @param object $template template object + * @return string|null + */ +function smarty_function_counter($params, $template) +{ + static $counters = array(); + + $name = (isset($params['name'])) ? $params['name'] : 'default'; + if (!isset($counters[$name])) { + $counters[$name] = array( + 'start'=>1, + 'skip'=>1, + 'direction'=>'up', + 'count'=>1 + ); + } + $counter =& $counters[$name]; + + if (isset($params['start'])) { + $counter['start'] = $counter['count'] = (int)$params['start']; + } + + if (!empty($params['assign'])) { + $counter['assign'] = $params['assign']; + } + + if (isset($counter['assign'])) { + $template->assign($counter['assign'], $counter['count']); + } + + if (isset($params['print'])) { + $print = (bool)$params['print']; + } else { + $print = empty($counter['assign']); + } + + if ($print) { + $retval = $counter['count']; + } else { + $retval = null; + } + + if (isset($params['skip'])) { + $counter['skip'] = $params['skip']; + } + + if (isset($params['direction'])) { + $counter['direction'] = $params['direction']; + } + + if ($counter['direction'] == "down") + $counter['count'] -= $counter['skip']; + else + $counter['count'] += $counter['skip']; + + return $retval; + +} + +?> \ No newline at end of file diff --git a/3dparty/Smarty/plugins/function.cycle.php b/3dparty/Smarty/plugins/function.cycle.php new file mode 100644 index 0000000000..98e3e28781 --- /dev/null +++ b/3dparty/Smarty/plugins/function.cycle.php @@ -0,0 +1,106 @@ + + * Name: cycle
+ * Date: May 3, 2002
+ * Purpose: cycle through given values
+ * Input: + * - name = name of cycle (optional) + * - values = comma separated list of values to cycle, + * or an array of values to cycle + * (this can be left out for subsequent calls) + * - reset = boolean - resets given var to true + * - print = boolean - print var or not. default is true + * - advance = boolean - whether or not to advance the cycle + * - delimiter = the value delimiter, default is "," + * - assign = boolean, assigns to template var instead of + * printed. + * + * Examples:
+ *
+ * {cycle values="#eeeeee,#d0d0d0d"}
+ * {cycle name=row values="one,two,three" reset=true}
+ * {cycle name=row}
+ * 
+ * @link http://smarty.php.net/manual/en/language.function.cycle.php {cycle} + * (Smarty online manual) + * @author Monte Ohrt + * @author credit to Mark Priatel + * @author credit to Gerard + * @author credit to Jason Sweat + * @version 1.3 + * @param array + * @param object $template template object + * @return string|null + */ + +function smarty_function_cycle($params, $template) +{ + static $cycle_vars; + + $name = (empty($params['name'])) ? 'default' : $params['name']; + $print = (isset($params['print'])) ? (bool)$params['print'] : true; + $advance = (isset($params['advance'])) ? (bool)$params['advance'] : true; + $reset = (isset($params['reset'])) ? (bool)$params['reset'] : false; + + if (!in_array('values', array_keys($params))) { + if(!isset($cycle_vars[$name]['values'])) { + trigger_error("cycle: missing 'values' parameter"); + return; + } + } else { + if(isset($cycle_vars[$name]['values']) + && $cycle_vars[$name]['values'] != $params['values'] ) { + $cycle_vars[$name]['index'] = 0; + } + $cycle_vars[$name]['values'] = $params['values']; + } + + if (isset($params['delimiter'])) { + $cycle_vars[$name]['delimiter'] = $params['delimiter']; + } elseif (!isset($cycle_vars[$name]['delimiter'])) { + $cycle_vars[$name]['delimiter'] = ','; + } + + if(is_array($cycle_vars[$name]['values'])) { + $cycle_array = $cycle_vars[$name]['values']; + } else { + $cycle_array = explode($cycle_vars[$name]['delimiter'],$cycle_vars[$name]['values']); + } + + if(!isset($cycle_vars[$name]['index']) || $reset ) { + $cycle_vars[$name]['index'] = 0; + } + + if (isset($params['assign'])) { + $print = false; + $template->assign($params['assign'], $cycle_array[$cycle_vars[$name]['index']]); + } + + if($print) { + $retval = $cycle_array[$cycle_vars[$name]['index']]; + } else { + $retval = null; + } + + if($advance) { + if ( $cycle_vars[$name]['index'] >= count($cycle_array) -1 ) { + $cycle_vars[$name]['index'] = 0; + } else { + $cycle_vars[$name]['index']++; + } + } + + return $retval; +} + +?> \ No newline at end of file diff --git a/3dparty/Smarty/plugins/function.fetch.php b/3dparty/Smarty/plugins/function.fetch.php new file mode 100644 index 0000000000..2b09fb9475 --- /dev/null +++ b/3dparty/Smarty/plugins/function.fetch.php @@ -0,0 +1,216 @@ + + * Name: fetch
+ * Purpose: fetch file, web or ftp data and display results + * @link http://smarty.php.net/manual/en/language.function.fetch.php {fetch} + * (Smarty online manual) + * @author Monte Ohrt + * @param array $params parameters + * @param object $template template object + * @return string|null if the assign parameter is passed, Smarty assigns the + * result to a template variable + */ +function smarty_function_fetch($params, $template) +{ + if (empty($params['file'])) { + trigger_error("[plugin] fetch parameter 'file' cannot be empty",E_USER_NOTICE); + return; + } + + $content = ''; + if (isset($template->security_policy) && !preg_match('!^(http|ftp)://!i', $params['file'])) { + if(!$template->security_policy->isTrustedResourceDir($params['file'])) { + return; + } + + // fetch the file + if($fp = @fopen($params['file'],'r')) { + while(!feof($fp)) { + $content .= fgets ($fp,4096); + } + fclose($fp); + } else { + trigger_error('[plugin] fetch cannot read file \'' . $params['file'] . '\'',E_USER_NOTICE); + return; + } + } else { + // not a local file + if(preg_match('!^http://!i',$params['file'])) { + // http fetch + if($uri_parts = parse_url($params['file'])) { + // set defaults + $host = $server_name = $uri_parts['host']; + $timeout = 30; + $accept = "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*"; + $agent = "Smarty Template Engine ".$template->_version; + $referer = ""; + $uri = !empty($uri_parts['path']) ? $uri_parts['path'] : '/'; + $uri .= !empty($uri_parts['query']) ? '?' . $uri_parts['query'] : ''; + $_is_proxy = false; + if(empty($uri_parts['port'])) { + $port = 80; + } else { + $port = $uri_parts['port']; + } + if(!empty($uri_parts['user'])) { + $user = $uri_parts['user']; + } + if(!empty($uri_parts['pass'])) { + $pass = $uri_parts['pass']; + } + // loop through parameters, setup headers + foreach($params as $param_key => $param_value) { + switch($param_key) { + case "file": + case "assign": + case "assign_headers": + break; + case "user": + if(!empty($param_value)) { + $user = $param_value; + } + break; + case "pass": + if(!empty($param_value)) { + $pass = $param_value; + } + break; + case "accept": + if(!empty($param_value)) { + $accept = $param_value; + } + break; + case "header": + if(!empty($param_value)) { + if(!preg_match('![\w\d-]+: .+!',$param_value)) { + trigger_error("[plugin] invalid header format '".$param_value."'",E_USER_NOTICE); + return; + } else { + $extra_headers[] = $param_value; + } + } + break; + case "proxy_host": + if(!empty($param_value)) { + $proxy_host = $param_value; + } + break; + case "proxy_port": + if(!preg_match('!\D!', $param_value)) { + $proxy_port = (int) $param_value; + } else { + trigger_error("[plugin] invalid value for attribute '".$param_key."'",E_USER_NOTICE); + return; + } + break; + case "agent": + if(!empty($param_value)) { + $agent = $param_value; + } + break; + case "referer": + if(!empty($param_value)) { + $referer = $param_value; + } + break; + case "timeout": + if(!preg_match('!\D!', $param_value)) { + $timeout = (int) $param_value; + } else { + trigger_error("[plugin] invalid value for attribute '".$param_key."'",E_USER_NOTICE); + return; + } + break; + default: + trigger_error("[plugin] unrecognized attribute '".$param_key."'",E_USER_NOTICE); + return; + } + } + if(!empty($proxy_host) && !empty($proxy_port)) { + $_is_proxy = true; + $fp = fsockopen($proxy_host,$proxy_port,$errno,$errstr,$timeout); + } else { + $fp = fsockopen($server_name,$port,$errno,$errstr,$timeout); + } + + if(!$fp) { + trigger_error("[plugin] unable to fetch: $errstr ($errno)",E_USER_NOTICE); + return; + } else { + if($_is_proxy) { + fputs($fp, 'GET ' . $params['file'] . " HTTP/1.0\r\n"); + } else { + fputs($fp, "GET $uri HTTP/1.0\r\n"); + } + if(!empty($host)) { + fputs($fp, "Host: $host\r\n"); + } + if(!empty($accept)) { + fputs($fp, "Accept: $accept\r\n"); + } + if(!empty($agent)) { + fputs($fp, "User-Agent: $agent\r\n"); + } + if(!empty($referer)) { + fputs($fp, "Referer: $referer\r\n"); + } + if(isset($extra_headers) && is_array($extra_headers)) { + foreach($extra_headers as $curr_header) { + fputs($fp, $curr_header."\r\n"); + } + } + if(!empty($user) && !empty($pass)) { + fputs($fp, "Authorization: BASIC ".base64_encode("$user:$pass")."\r\n"); + } + + fputs($fp, "\r\n"); + while(!feof($fp)) { + $content .= fgets($fp,4096); + } + fclose($fp); + $csplit = preg_split("!\r\n\r\n!",$content,2); + + $content = $csplit[1]; + + if(!empty($params['assign_headers'])) { + $template->assign($params['assign_headers'],preg_split("!\r\n!",$csplit[0])); + } + } + } else { + trigger_error("[plugin fetch] unable to parse URL, check syntax",E_USER_NOTICE); + return; + } + } else { + // ftp fetch + if($fp = @fopen($params['file'],'r')) { + while(!feof($fp)) { + $content .= fgets ($fp,4096); + } + fclose($fp); + } else { + trigger_error('[plugin] fetch cannot read file \'' . $params['file'] .'\'',E_USER_NOTICE); + return; + } + } + + } + + + if (!empty($params['assign'])) { + $template->assign($params['assign'],$content); + } else { + return $content; + } +} + +?> \ No newline at end of file diff --git a/3dparty/Smarty/plugins/function.html_checkboxes.php b/3dparty/Smarty/plugins/function.html_checkboxes.php new file mode 100644 index 0000000000..6a1a3ffdc7 --- /dev/null +++ b/3dparty/Smarty/plugins/function.html_checkboxes.php @@ -0,0 +1,143 @@ + + * Type: function
+ * Name: html_checkboxes
+ * Date: 24.Feb.2003
+ * Purpose: Prints out a list of checkbox input types
+ * Examples: + *
+ * {html_checkboxes values=$ids output=$names}
+ * {html_checkboxes values=$ids name='box' separator='
' output=$names} + * {html_checkboxes values=$ids checked=$checked separator='
' output=$names} + *
+ * @link http://smarty.php.net/manual/en/language.function.html.checkboxes.php {html_checkboxes} + * (Smarty online manual) + * @author Christopher Kvarme + * @author credits to Monte Ohrt + * @version 1.0 + * @param array $params parameters + * Input:
+ * - name (optional) - string default "checkbox" + * - values (required) - array + * - options (optional) - associative array + * - checked (optional) - array default not set + * - separator (optional) - ie
or   + * - output (optional) - the output next to each checkbox + * - assign (optional) - assign the output as an array to this variable + * @param object $template template object + * @return string + * @uses smarty_function_escape_special_chars() + */ +function smarty_function_html_checkboxes($params, $template) +{ + require_once(SMARTY_PLUGINS_DIR . 'shared.escape_special_chars.php'); + + $name = 'checkbox'; + $values = null; + $options = null; + $selected = null; + $separator = ''; + $labels = true; + $output = null; + + $extra = ''; + + foreach($params as $_key => $_val) { + switch($_key) { + case 'name': + case 'separator': + $$_key = $_val; + break; + + case 'labels': + $$_key = (bool)$_val; + break; + + case 'options': + $$_key = (array)$_val; + break; + + case 'values': + case 'output': + $$_key = array_values((array)$_val); + break; + + case 'checked': + case 'selected': + $selected = array_map('strval', array_values((array)$_val)); + break; + + case 'checkboxes': + trigger_error('html_checkboxes: the use of the "checkboxes" attribute is deprecated, use "options" instead', E_USER_WARNING); + $options = (array)$_val; + break; + + case 'assign': + break; + + default: + if(!is_array($_val)) { + $extra .= ' '.$_key.'="'.smarty_function_escape_special_chars($_val).'"'; + } else { + trigger_error("html_checkboxes: extra attribute '$_key' cannot be an array", E_USER_NOTICE); + } + break; + } + } + + if (!isset($options) && !isset($values)) + return ''; /* raise error here? */ + + settype($selected, 'array'); + $_html_result = array(); + + if (isset($options)) { + + foreach ($options as $_key=>$_val) + $_html_result[] = smarty_function_html_checkboxes_output($name, $_key, $_val, $selected, $extra, $separator, $labels); + + + } else { + foreach ($values as $_i=>$_key) { + $_val = isset($output[$_i]) ? $output[$_i] : ''; + $_html_result[] = smarty_function_html_checkboxes_output($name, $_key, $_val, $selected, $extra, $separator, $labels); + } + + } + + if(!empty($params['assign'])) { + $template->assign($params['assign'], $_html_result); + } else { + return implode("\n",$_html_result); + } + +} + +function smarty_function_html_checkboxes_output($name, $value, $output, $selected, $extra, $separator, $labels) { + $_output = ''; + if ($labels) $_output .= ''; + $_output .= $separator; + + return $_output; +} + +?> \ No newline at end of file diff --git a/3dparty/Smarty/plugins/function.html_image.php b/3dparty/Smarty/plugins/function.html_image.php new file mode 100644 index 0000000000..6ff4f5707c --- /dev/null +++ b/3dparty/Smarty/plugins/function.html_image.php @@ -0,0 +1,137 @@ + + * Name: html_image
+ * Date: Feb 24, 2003
+ * Purpose: format HTML tags for the image
+ * Examples: {html_image file="/images/masthead.gif"} + * Output: + * + * @link http://smarty.php.net/manual/en/language.function.html.image.php {html_image} + * (Smarty online manual) + * @author Monte Ohrt + * @author credits to Duda + * @version 1.0 + * @param array $params parameters + * Input:
+ * - file = file (and path) of image (required) + * - height = image height (optional, default actual height) + * - width = image width (optional, default actual width) + * - basedir = base directory for absolute paths, default + * is environment variable DOCUMENT_ROOT + * - path_prefix = prefix for path output (optional, default empty) + * @param object $template template object + * @return string + * @uses smarty_function_escape_special_chars() + */ +function smarty_function_html_image($params, $template) +{ + require_once(SMARTY_PLUGINS_DIR . 'shared.escape_special_chars.php'); + + $alt = ''; + $file = ''; + $height = ''; + $width = ''; + $extra = ''; + $prefix = ''; + $suffix = ''; + $path_prefix = ''; + $server_vars = $_SERVER; + $basedir = isset($server_vars['DOCUMENT_ROOT']) ? $server_vars['DOCUMENT_ROOT'] : ''; + foreach($params as $_key => $_val) { + switch ($_key) { + case 'file': + case 'height': + case 'width': + case 'dpi': + case 'path_prefix': + case 'basedir': + $$_key = $_val; + break; + + case 'alt': + if (!is_array($_val)) { + $$_key = smarty_function_escape_special_chars($_val); + } else { + throw new SmartyException ("html_image: extra attribute '$_key' cannot be an array", E_USER_NOTICE); + } + break; + + case 'link': + case 'href': + $prefix = ''; + $suffix = ''; + break; + + default: + if (!is_array($_val)) { + $extra .= ' ' . $_key . '="' . smarty_function_escape_special_chars($_val) . '"'; + } else { + throw new SmartyException ("html_image: extra attribute '$_key' cannot be an array", E_USER_NOTICE); + } + break; + } + } + + if (empty($file)) { + trigger_error("html_image: missing 'file' parameter", E_USER_NOTICE); + return; + } + + if (substr($file, 0, 1) == '/') { + $_image_path = $basedir . $file; + } else { + $_image_path = $file; + } + + if (!isset($params['width']) || !isset($params['height'])) { + if (!$_image_data = @getimagesize($_image_path)) { + if (!file_exists($_image_path)) { + trigger_error("html_image: unable to find '$_image_path'", E_USER_NOTICE); + return; + } else if (!is_readable($_image_path)) { + trigger_error("html_image: unable to read '$_image_path'", E_USER_NOTICE); + return; + } else { + trigger_error("html_image: '$_image_path' is not a valid image file", E_USER_NOTICE); + return; + } + } + if (isset($template->security_policy)) { + if (!$template->security_policy->isTrustedResourceDir($_image_path)) { + return; + } + } + + if (!isset($params['width'])) { + $width = $_image_data[0]; + } + if (!isset($params['height'])) { + $height = $_image_data[1]; + } + } + + if (isset($params['dpi'])) { + if (strstr($server_vars['HTTP_USER_AGENT'], 'Mac')) { + $dpi_default = 72; + } else { + $dpi_default = 96; + } + $_resize = $dpi_default / $params['dpi']; + $width = round($width * $_resize); + $height = round($height * $_resize); + } + + return $prefix . '' . $alt . '' . $suffix; +} + +?> \ No newline at end of file diff --git a/3dparty/Smarty/plugins/function.html_options.php b/3dparty/Smarty/plugins/function.html_options.php new file mode 100644 index 0000000000..3570a62064 --- /dev/null +++ b/3dparty/Smarty/plugins/function.html_options.php @@ -0,0 +1,133 @@ + + * Name: html_options
+ * Purpose: Prints the list of