codeigniter_vender 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +2 -0
- data/MIT-LICENSE +20 -0
- data/README +40 -0
- data/Rakefile +18 -0
- data/VERSION +1 -0
- data/codeigniter_vender.gemspec +389 -0
- data/generators/ci_app/USAGE +8 -0
- data/generators/ci_app/ci_app_generator.rb +12 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/index.php +118 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/license.txt +52 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/config/autoload.php +116 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/config/config.php +329 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/config/constants.php +41 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/config/database.php +55 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/config/doctypes.php +15 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/config/hooks.php +16 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/config/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/config/mimes.php +105 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/config/routes.php +48 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/config/smileys.php +66 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/config/user_agents.php +175 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/controllers/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/controllers/welcome.php +17 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/errors/error_404.php +34 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/errors/error_db.php +34 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/errors/error_general.php +34 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/errors/error_php.php +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/errors/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/helpers/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/hooks/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/language/english/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/libraries/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/models/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/views/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/views/welcome_message.php +62 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/cache/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/codeigniter/Base4.php +69 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/codeigniter/Base5.php +56 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/codeigniter/CodeIgniter.php +280 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/codeigniter/Common.php +421 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/codeigniter/Compat.php +93 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/codeigniter/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/DB.php +146 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/DB_active_rec.php +1820 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/DB_cache.php +195 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/DB_driver.php +1366 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/DB_forge.php +375 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/DB_result.php +342 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/DB_utility.php +389 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mssql/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mssql/mssql_driver.php +667 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mssql/mssql_forge.php +248 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mssql/mssql_result.php +169 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mssql/mssql_utility.php +123 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mysql/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mysql/mysql_driver.php +670 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mysql/mysql_forge.php +254 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mysql/mysql_result.php +169 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mysql/mysql_utility.php +245 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mysqli/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mysqli/mysqli_driver.php +671 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mysqli/mysqli_forge.php +254 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mysqli/mysqli_result.php +169 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mysqli/mysqli_utility.php +123 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/oci8/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/oci8/oci8_driver.php +780 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/oci8/oci8_forge.php +248 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/oci8/oci8_result.php +249 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/oci8/oci8_utility.php +122 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/odbc/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/odbc/odbc_driver.php +639 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/odbc/odbc_forge.php +266 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/odbc/odbc_result.php +228 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/odbc/odbc_utility.php +148 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/postgre/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/postgre/postgre_driver.php +684 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/postgre/postgre_forge.php +248 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/postgre/postgre_result.php +169 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/postgre/postgre_utility.php +124 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/sqlite/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/sqlite/sqlite_driver.php +657 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/sqlite/sqlite_forge.php +265 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/sqlite/sqlite_result.php +179 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/sqlite/sqlite_utility.php +141 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/fonts/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/fonts/texb.ttf +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/array_helper.php +78 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/compatibility_helper.php +498 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/cookie_helper.php +144 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/date_helper.php +611 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/directory_helper.php +84 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/download_helper.php +100 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/email_helper.php +62 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/file_helper.php +464 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/form_helper.php +1025 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/html_helper.php +416 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/inflector_helper.php +171 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/language_helper.php +58 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/number_helper.php +75 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/path_helper.php +72 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/security_helper.php +126 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/smiley_helper.php +273 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/string_helper.php +273 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/text_helper.php +462 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/typography_helper.php +71 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/url_helper.php +593 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers/xml_helper.php +62 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/calendar_lang.php +51 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/date_lang.php +60 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/db_lang.php +28 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/email_lang.php +24 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/form_validation_lang.php +24 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/ftp_lang.php +17 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/imglib_lang.php +24 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/number_lang.php +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/profiler_lang.php +19 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/scaffolding_lang.php +17 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/unit_test_lang.php +24 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/upload_lang.php +22 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/validation_lang.php +24 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Benchmark.php +113 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Calendar.php +477 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Cart.php +550 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Config.php +244 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Controller.php +127 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Email.php +2041 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Encrypt.php +484 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Exceptions.php +174 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Form_validation.php +1278 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Ftp.php +618 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Hooks.php +226 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Image_lib.php +1544 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Input.php +1067 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Language.php +123 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Loader.php +1085 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Log.php +117 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Model.php +83 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Output.php +409 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Pagination.php +244 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Parser.php +173 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Profiler.php +392 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Router.php +389 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Session.php +758 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Sha1.php +251 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Table.php +440 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Trackback.php +547 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Typography.php +406 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/URI.php +586 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Unit_test.php +347 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Upload.php +970 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/User_agent.php +502 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Validation.php +875 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Xmlrpc.php +1421 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Xmlrpcs.php +536 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Zip.php +359 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/logs/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/plugins/captcha_pi.php +356 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/plugins/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/plugins/js_calendar_pi.php +629 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/Scaffolding.php +291 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/images/background.jpg +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/images/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/images/logo.jpg +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/views/add.php +32 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/views/delete.php +9 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/views/edit.php +33 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/views/footer.php +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/views/header.php +29 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/views/index.html +10 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/views/no_data.php +8 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/views/stylesheet.css +143 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/views/view.php +27 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/changelog.html +1080 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/active_record.html +757 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/caching.html +220 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/call_function.html +118 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/configuration.html +157 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/connecting.html +186 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/examples.html +217 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/fields.html +163 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/forge.html +234 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/helpers.html +151 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/index.html +99 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/queries.html +153 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/results.html +238 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/table_data.html +113 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/transactions.html +200 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/database/utilities.html +295 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/doc_style/index.html +86 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/doc_style/template.html +128 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/alternative_php.html +147 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/ancillary_classes.html +117 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/autoloader.html +101 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/caching.html +115 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/common_functions.html +119 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/controllers.html +385 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/core_classes.html +185 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/creating_libraries.html +298 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/credits.html +86 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/errors.html +138 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/helpers.html +185 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/hooks.html +167 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/libraries.html +94 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/managing_apps.html +133 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/models.html +251 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/plugins.html +127 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/profiling.html +104 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/quick_reference.html +77 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/requirements.html +82 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/reserved_names.html +156 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/routing.html +176 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/scaffolding.html +147 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/security.html +153 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/styleguide.html +687 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/urls.html +151 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/views.html +274 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/array_helper.html +119 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/compatibility_helper.html +118 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/cookie_helper.html +147 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/date_helper.html +408 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/directory_helper.html +143 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/download_helper.html +112 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/email_helper.html +102 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/file_helper.html +178 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/form_helper.html +484 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/html_helper.html +385 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/inflector_helper.html +151 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/language_helper.html +98 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/number_helper.html +107 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/path_helper.html +106 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/security_helper.html +125 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/smiley_helper.html +215 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/string_helper.html +176 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/text_helper.html +192 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/typography_helper.html +112 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/url_helper.html +289 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/xml_helper.html +105 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/appflowchart.gif +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/arrow.gif +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/ci_logo.jpg +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/ci_logo_flame.jpg +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/ci_quick_ref.png +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/codeigniter_1.7.1_helper_reference.pdf +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/codeigniter_1.7.1_helper_reference.png +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/codeigniter_1.7.1_library_reference.pdf +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/codeigniter_1.7.1_library_reference.png +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/file.gif +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/folder.gif +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/nav_bg_darker.jpg +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/nav_separator_darker.jpg +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/nav_toggle_darker.jpg +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/smile.gif +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/images/transparent.gif +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/index.html +99 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/downloads.html +105 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/index.html +97 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/troubleshooting.html +90 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_120.html +92 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_130.html +203 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_131.html +102 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_132.html +100 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_133.html +112 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_140.html +145 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_141.html +148 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_150.html +178 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_152.html +111 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_153.html +100 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_154.html +116 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_160.html +125 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_161.html +98 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_162.html +106 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_163.html +99 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_170.html +121 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_171.html +98 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_172.html +105 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrade_b11.html +144 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/installation/upgrading.html +101 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/benchmark.html +198 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/calendar.html +249 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/cart.html +346 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/config.html +181 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/email.html +307 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/encryption.html +182 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/file_uploading.html +451 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/form_validation.html +1221 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/ftp.html +303 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/image_lib.html +666 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/input.html +231 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/language.html +137 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/loader.html +214 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/output.html +145 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/pagination.html +218 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/parser.html +208 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/sessions.html +311 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/table.html +292 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/trackback.html +246 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/typography.html +160 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/unit_testing.html +205 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/uri.html +252 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/user_agent.html +201 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/validation.html +740 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/xmlrpc.html +517 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/zip.html +278 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/license.html +107 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/nav/hacks.txt +9 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/nav/moo.fx.js +119 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/nav/moo.fx.pack.js +241 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/nav/nav.js +139 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/nav/prototype.lite.js +127 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/nav/user_guide_menu.js +4 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/overview/appflow.html +95 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/overview/at_a_glance.html +172 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/overview/cheatsheets.html +83 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/overview/features.html +120 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/overview/getting_started.html +92 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/overview/goals.html +98 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/overview/index.html +84 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/overview/mvc.html +100 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/toc.html +209 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/userguide.css +406 -0
- data/generators/ci_app/templates/README +1 -0
- data/generators/ci_controller/USAGE +2 -0
- data/generators/ci_controller/ci_controller_generator.rb +11 -0
- data/generators/ci_controller/templates/ci_controller.php.erb +15 -0
- data/generators/ci_controller/templates/ci_view.php.erb +8 -0
- data/generators/ci_layout/USAGE +2 -0
- data/generators/ci_layout/ci_layout_generator.rb +24 -0
- data/generators/ci_layout/templates/application_layout.php.erb +19 -0
- data/generators/ci_model/USAGE +2 -0
- data/generators/ci_model/ci_model_generator.rb +42 -0
- data/generators/ci_model/templates/ci_model.php.erb +15 -0
- data/generators/ci_model/templates/model.rb +5 -0
- data/generators/ci_model/templates/model_migration.rb.erb +16 -0
- data/init.rb +1 -0
- data/install.rb +1 -0
- data/lib/codeigniter_vender.rb +1 -0
- data/lib/tasks/app.rake +8 -0
- data/test/codeigniter_vender_test.rb +8 -0
- data/test/test_helper.rb +3 -0
- data/uninstall.rb +1 -0
- metadata +411 -0
data/generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/sqlite/sqlite_driver.php
ADDED
|
@@ -0,0 +1,657 @@
|
|
|
1
|
+
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
|
2
|
+
/**
|
|
3
|
+
* CodeIgniter
|
|
4
|
+
*
|
|
5
|
+
* An open source application development framework for PHP 4.3.2 or newer
|
|
6
|
+
*
|
|
7
|
+
* @package CodeIgniter
|
|
8
|
+
* @author ExpressionEngine Dev Team
|
|
9
|
+
* @copyright Copyright (c) 2008 - 2010, EllisLab, Inc.
|
|
10
|
+
* @license http://codeigniter.com/user_guide/license.html
|
|
11
|
+
* @link http://codeigniter.com
|
|
12
|
+
* @since Version 1.0
|
|
13
|
+
* @filesource
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
// ------------------------------------------------------------------------
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* SQLite Database Adapter Class
|
|
22
|
+
*
|
|
23
|
+
* Note: _DB is an extender class that the app controller
|
|
24
|
+
* creates dynamically based on whether the active record
|
|
25
|
+
* class is being used or not.
|
|
26
|
+
*
|
|
27
|
+
* @package CodeIgniter
|
|
28
|
+
* @subpackage Drivers
|
|
29
|
+
* @category Database
|
|
30
|
+
* @author ExpressionEngine Dev Team
|
|
31
|
+
* @link http://codeigniter.com/user_guide/database/
|
|
32
|
+
*/
|
|
33
|
+
class CI_DB_sqlite_driver extends CI_DB {
|
|
34
|
+
|
|
35
|
+
var $dbdriver = 'sqlite';
|
|
36
|
+
|
|
37
|
+
// The character used to escape with - not needed for SQLite
|
|
38
|
+
var $_escape_char = '';
|
|
39
|
+
|
|
40
|
+
// clause and character used for LIKE escape sequences
|
|
41
|
+
var $_like_escape_str = " ESCAPE '%s' ";
|
|
42
|
+
var $_like_escape_chr = '!';
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* The syntax to count rows is slightly different across different
|
|
46
|
+
* database engines, so this string appears in each driver and is
|
|
47
|
+
* used for the count_all() and count_all_results() functions.
|
|
48
|
+
*/
|
|
49
|
+
var $_count_string = "SELECT COUNT(*) AS ";
|
|
50
|
+
var $_random_keyword = ' Random()'; // database specific random keyword
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Non-persistent database connection
|
|
54
|
+
*
|
|
55
|
+
* @access private called by the base class
|
|
56
|
+
* @return resource
|
|
57
|
+
*/
|
|
58
|
+
function db_connect()
|
|
59
|
+
{
|
|
60
|
+
if ( ! $conn_id = @sqlite_open($this->database, FILE_WRITE_MODE, $error))
|
|
61
|
+
{
|
|
62
|
+
log_message('error', $error);
|
|
63
|
+
|
|
64
|
+
if ($this->db_debug)
|
|
65
|
+
{
|
|
66
|
+
$this->display_error($error, '', TRUE);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return FALSE;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
return $conn_id;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// --------------------------------------------------------------------
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Persistent database connection
|
|
79
|
+
*
|
|
80
|
+
* @access private called by the base class
|
|
81
|
+
* @return resource
|
|
82
|
+
*/
|
|
83
|
+
function db_pconnect()
|
|
84
|
+
{
|
|
85
|
+
if ( ! $conn_id = @sqlite_popen($this->database, FILE_WRITE_MODE, $error))
|
|
86
|
+
{
|
|
87
|
+
log_message('error', $error);
|
|
88
|
+
|
|
89
|
+
if ($this->db_debug)
|
|
90
|
+
{
|
|
91
|
+
$this->display_error($error, '', TRUE);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
return FALSE;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
return $conn_id;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// --------------------------------------------------------------------
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Reconnect
|
|
104
|
+
*
|
|
105
|
+
* Keep / reestablish the db connection if no queries have been
|
|
106
|
+
* sent for a length of time exceeding the server's idle timeout
|
|
107
|
+
*
|
|
108
|
+
* @access public
|
|
109
|
+
* @return void
|
|
110
|
+
*/
|
|
111
|
+
function reconnect()
|
|
112
|
+
{
|
|
113
|
+
// not implemented in SQLite
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// --------------------------------------------------------------------
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Select the database
|
|
120
|
+
*
|
|
121
|
+
* @access private called by the base class
|
|
122
|
+
* @return resource
|
|
123
|
+
*/
|
|
124
|
+
function db_select()
|
|
125
|
+
{
|
|
126
|
+
return TRUE;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// --------------------------------------------------------------------
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Set client character set
|
|
133
|
+
*
|
|
134
|
+
* @access public
|
|
135
|
+
* @param string
|
|
136
|
+
* @param string
|
|
137
|
+
* @return resource
|
|
138
|
+
*/
|
|
139
|
+
function db_set_charset($charset, $collation)
|
|
140
|
+
{
|
|
141
|
+
// @todo - add support if needed
|
|
142
|
+
return TRUE;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
// --------------------------------------------------------------------
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Version number query string
|
|
149
|
+
*
|
|
150
|
+
* @access public
|
|
151
|
+
* @return string
|
|
152
|
+
*/
|
|
153
|
+
function _version()
|
|
154
|
+
{
|
|
155
|
+
return sqlite_libversion();
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
// --------------------------------------------------------------------
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Execute the query
|
|
162
|
+
*
|
|
163
|
+
* @access private called by the base class
|
|
164
|
+
* @param string an SQL query
|
|
165
|
+
* @return resource
|
|
166
|
+
*/
|
|
167
|
+
function _execute($sql)
|
|
168
|
+
{
|
|
169
|
+
$sql = $this->_prep_query($sql);
|
|
170
|
+
return @sqlite_query($this->conn_id, $sql);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
// --------------------------------------------------------------------
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Prep the query
|
|
177
|
+
*
|
|
178
|
+
* If needed, each database adapter can prep the query string
|
|
179
|
+
*
|
|
180
|
+
* @access private called by execute()
|
|
181
|
+
* @param string an SQL query
|
|
182
|
+
* @return string
|
|
183
|
+
*/
|
|
184
|
+
function _prep_query($sql)
|
|
185
|
+
{
|
|
186
|
+
return $sql;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
// --------------------------------------------------------------------
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Begin Transaction
|
|
193
|
+
*
|
|
194
|
+
* @access public
|
|
195
|
+
* @return bool
|
|
196
|
+
*/
|
|
197
|
+
function trans_begin($test_mode = FALSE)
|
|
198
|
+
{
|
|
199
|
+
if ( ! $this->trans_enabled)
|
|
200
|
+
{
|
|
201
|
+
return TRUE;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
// When transactions are nested we only begin/commit/rollback the outermost ones
|
|
205
|
+
if ($this->_trans_depth > 0)
|
|
206
|
+
{
|
|
207
|
+
return TRUE;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
// Reset the transaction failure flag.
|
|
211
|
+
// If the $test_mode flag is set to TRUE transactions will be rolled back
|
|
212
|
+
// even if the queries produce a successful result.
|
|
213
|
+
$this->_trans_failure = ($test_mode === TRUE) ? TRUE : FALSE;
|
|
214
|
+
|
|
215
|
+
$this->simple_query('BEGIN TRANSACTION');
|
|
216
|
+
return TRUE;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
// --------------------------------------------------------------------
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* Commit Transaction
|
|
223
|
+
*
|
|
224
|
+
* @access public
|
|
225
|
+
* @return bool
|
|
226
|
+
*/
|
|
227
|
+
function trans_commit()
|
|
228
|
+
{
|
|
229
|
+
if ( ! $this->trans_enabled)
|
|
230
|
+
{
|
|
231
|
+
return TRUE;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
// When transactions are nested we only begin/commit/rollback the outermost ones
|
|
235
|
+
if ($this->_trans_depth > 0)
|
|
236
|
+
{
|
|
237
|
+
return TRUE;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
$this->simple_query('COMMIT');
|
|
241
|
+
return TRUE;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
// --------------------------------------------------------------------
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* Rollback Transaction
|
|
248
|
+
*
|
|
249
|
+
* @access public
|
|
250
|
+
* @return bool
|
|
251
|
+
*/
|
|
252
|
+
function trans_rollback()
|
|
253
|
+
{
|
|
254
|
+
if ( ! $this->trans_enabled)
|
|
255
|
+
{
|
|
256
|
+
return TRUE;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
// When transactions are nested we only begin/commit/rollback the outermost ones
|
|
260
|
+
if ($this->_trans_depth > 0)
|
|
261
|
+
{
|
|
262
|
+
return TRUE;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
$this->simple_query('ROLLBACK');
|
|
266
|
+
return TRUE;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
// --------------------------------------------------------------------
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* Escape String
|
|
273
|
+
*
|
|
274
|
+
* @access public
|
|
275
|
+
* @param string
|
|
276
|
+
* @param bool whether or not the string will be used in a LIKE condition
|
|
277
|
+
* @return string
|
|
278
|
+
*/
|
|
279
|
+
function escape_str($str, $like = FALSE)
|
|
280
|
+
{
|
|
281
|
+
if (is_array($str))
|
|
282
|
+
{
|
|
283
|
+
foreach($str as $key => $val)
|
|
284
|
+
{
|
|
285
|
+
$str[$key] = $this->escape_str($val, $like);
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
return $str;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
$str = sqlite_escape_string($str);
|
|
292
|
+
|
|
293
|
+
// escape LIKE condition wildcards
|
|
294
|
+
if ($like === TRUE)
|
|
295
|
+
{
|
|
296
|
+
$str = str_replace( array('%', '_', $this->_like_escape_chr),
|
|
297
|
+
array($this->_like_escape_chr.'%', $this->_like_escape_chr.'_', $this->_like_escape_chr.$this->_like_escape_chr),
|
|
298
|
+
$str);
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
return $str;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
// --------------------------------------------------------------------
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* Affected Rows
|
|
308
|
+
*
|
|
309
|
+
* @access public
|
|
310
|
+
* @return integer
|
|
311
|
+
*/
|
|
312
|
+
function affected_rows()
|
|
313
|
+
{
|
|
314
|
+
return sqlite_changes($this->conn_id);
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
// --------------------------------------------------------------------
|
|
318
|
+
|
|
319
|
+
/**
|
|
320
|
+
* Insert ID
|
|
321
|
+
*
|
|
322
|
+
* @access public
|
|
323
|
+
* @return integer
|
|
324
|
+
*/
|
|
325
|
+
function insert_id()
|
|
326
|
+
{
|
|
327
|
+
return @sqlite_last_insert_rowid($this->conn_id);
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
// --------------------------------------------------------------------
|
|
331
|
+
|
|
332
|
+
/**
|
|
333
|
+
* "Count All" query
|
|
334
|
+
*
|
|
335
|
+
* Generates a platform-specific query string that counts all records in
|
|
336
|
+
* the specified database
|
|
337
|
+
*
|
|
338
|
+
* @access public
|
|
339
|
+
* @param string
|
|
340
|
+
* @return string
|
|
341
|
+
*/
|
|
342
|
+
function count_all($table = '')
|
|
343
|
+
{
|
|
344
|
+
if ($table == '')
|
|
345
|
+
{
|
|
346
|
+
return 0;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
$query = $this->query($this->_count_string . $this->_protect_identifiers('numrows') . " FROM " . $this->_protect_identifiers($table, TRUE, NULL, FALSE));
|
|
350
|
+
|
|
351
|
+
if ($query->num_rows() == 0)
|
|
352
|
+
{
|
|
353
|
+
return 0;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
$row = $query->row();
|
|
357
|
+
return (int) $row->numrows;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
// --------------------------------------------------------------------
|
|
361
|
+
|
|
362
|
+
/**
|
|
363
|
+
* List table query
|
|
364
|
+
*
|
|
365
|
+
* Generates a platform-specific query string so that the table names can be fetched
|
|
366
|
+
*
|
|
367
|
+
* @access private
|
|
368
|
+
* @param boolean
|
|
369
|
+
* @return string
|
|
370
|
+
*/
|
|
371
|
+
function _list_tables($prefix_limit = FALSE)
|
|
372
|
+
{
|
|
373
|
+
$sql = "SELECT name from sqlite_master WHERE type='table'";
|
|
374
|
+
|
|
375
|
+
if ($prefix_limit !== FALSE AND $this->dbprefix != '')
|
|
376
|
+
{
|
|
377
|
+
$sql .= " AND 'name' LIKE '".$this->escape_like_str($this->dbprefix)."%' ".sprintf($this->_like_escape_str, $this->_like_escape_char);
|
|
378
|
+
}
|
|
379
|
+
return $sql;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
// --------------------------------------------------------------------
|
|
383
|
+
|
|
384
|
+
/**
|
|
385
|
+
* Show column query
|
|
386
|
+
*
|
|
387
|
+
* Generates a platform-specific query string so that the column names can be fetched
|
|
388
|
+
*
|
|
389
|
+
* @access public
|
|
390
|
+
* @param string the table name
|
|
391
|
+
* @return string
|
|
392
|
+
*/
|
|
393
|
+
function _list_columns($table = '')
|
|
394
|
+
{
|
|
395
|
+
// Not supported
|
|
396
|
+
return FALSE;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
// --------------------------------------------------------------------
|
|
400
|
+
|
|
401
|
+
/**
|
|
402
|
+
* Field data query
|
|
403
|
+
*
|
|
404
|
+
* Generates a platform-specific query so that the column data can be retrieved
|
|
405
|
+
*
|
|
406
|
+
* @access public
|
|
407
|
+
* @param string the table name
|
|
408
|
+
* @return object
|
|
409
|
+
*/
|
|
410
|
+
function _field_data($table)
|
|
411
|
+
{
|
|
412
|
+
return "SELECT * FROM ".$table." LIMIT 1";
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
// --------------------------------------------------------------------
|
|
416
|
+
|
|
417
|
+
/**
|
|
418
|
+
* The error message string
|
|
419
|
+
*
|
|
420
|
+
* @access private
|
|
421
|
+
* @return string
|
|
422
|
+
*/
|
|
423
|
+
function _error_message()
|
|
424
|
+
{
|
|
425
|
+
return sqlite_error_string(sqlite_last_error($this->conn_id));
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
// --------------------------------------------------------------------
|
|
429
|
+
|
|
430
|
+
/**
|
|
431
|
+
* The error message number
|
|
432
|
+
*
|
|
433
|
+
* @access private
|
|
434
|
+
* @return integer
|
|
435
|
+
*/
|
|
436
|
+
function _error_number()
|
|
437
|
+
{
|
|
438
|
+
return sqlite_last_error($this->conn_id);
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
// --------------------------------------------------------------------
|
|
442
|
+
|
|
443
|
+
/**
|
|
444
|
+
* Escape the SQL Identifiers
|
|
445
|
+
*
|
|
446
|
+
* This function escapes column and table names
|
|
447
|
+
*
|
|
448
|
+
* @access private
|
|
449
|
+
* @param string
|
|
450
|
+
* @return string
|
|
451
|
+
*/
|
|
452
|
+
function _escape_identifiers($item)
|
|
453
|
+
{
|
|
454
|
+
if ($this->_escape_char == '')
|
|
455
|
+
{
|
|
456
|
+
return $item;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
foreach ($this->_reserved_identifiers as $id)
|
|
460
|
+
{
|
|
461
|
+
if (strpos($item, '.'.$id) !== FALSE)
|
|
462
|
+
{
|
|
463
|
+
$str = $this->_escape_char. str_replace('.', $this->_escape_char.'.', $item);
|
|
464
|
+
|
|
465
|
+
// remove duplicates if the user already included the escape
|
|
466
|
+
return preg_replace('/['.$this->_escape_char.']+/', $this->_escape_char, $str);
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
if (strpos($item, '.') !== FALSE)
|
|
471
|
+
{
|
|
472
|
+
$str = $this->_escape_char.str_replace('.', $this->_escape_char.'.'.$this->_escape_char, $item).$this->_escape_char;
|
|
473
|
+
}
|
|
474
|
+
else
|
|
475
|
+
{
|
|
476
|
+
$str = $this->_escape_char.$item.$this->_escape_char;
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
// remove duplicates if the user already included the escape
|
|
480
|
+
return preg_replace('/['.$this->_escape_char.']+/', $this->_escape_char, $str);
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
// --------------------------------------------------------------------
|
|
484
|
+
|
|
485
|
+
/**
|
|
486
|
+
* From Tables
|
|
487
|
+
*
|
|
488
|
+
* This function implicitly groups FROM tables so there is no confusion
|
|
489
|
+
* about operator precedence in harmony with SQL standards
|
|
490
|
+
*
|
|
491
|
+
* @access public
|
|
492
|
+
* @param type
|
|
493
|
+
* @return type
|
|
494
|
+
*/
|
|
495
|
+
function _from_tables($tables)
|
|
496
|
+
{
|
|
497
|
+
if ( ! is_array($tables))
|
|
498
|
+
{
|
|
499
|
+
$tables = array($tables);
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
return '('.implode(', ', $tables).')';
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
// --------------------------------------------------------------------
|
|
506
|
+
|
|
507
|
+
/**
|
|
508
|
+
* Insert statement
|
|
509
|
+
*
|
|
510
|
+
* Generates a platform-specific insert string from the supplied data
|
|
511
|
+
*
|
|
512
|
+
* @access public
|
|
513
|
+
* @param string the table name
|
|
514
|
+
* @param array the insert keys
|
|
515
|
+
* @param array the insert values
|
|
516
|
+
* @return string
|
|
517
|
+
*/
|
|
518
|
+
function _insert($table, $keys, $values)
|
|
519
|
+
{
|
|
520
|
+
return "INSERT INTO ".$table." (".implode(', ', $keys).") VALUES (".implode(', ', $values).")";
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
// --------------------------------------------------------------------
|
|
524
|
+
|
|
525
|
+
/**
|
|
526
|
+
* Update statement
|
|
527
|
+
*
|
|
528
|
+
* Generates a platform-specific update string from the supplied data
|
|
529
|
+
*
|
|
530
|
+
* @access public
|
|
531
|
+
* @param string the table name
|
|
532
|
+
* @param array the update data
|
|
533
|
+
* @param array the where clause
|
|
534
|
+
* @param array the orderby clause
|
|
535
|
+
* @param array the limit clause
|
|
536
|
+
* @return string
|
|
537
|
+
*/
|
|
538
|
+
function _update($table, $values, $where, $orderby = array(), $limit = FALSE)
|
|
539
|
+
{
|
|
540
|
+
foreach($values as $key => $val)
|
|
541
|
+
{
|
|
542
|
+
$valstr[] = $key." = ".$val;
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
$limit = ( ! $limit) ? '' : ' LIMIT '.$limit;
|
|
546
|
+
|
|
547
|
+
$orderby = (count($orderby) >= 1)?' ORDER BY '.implode(", ", $orderby):'';
|
|
548
|
+
|
|
549
|
+
$sql = "UPDATE ".$table." SET ".implode(', ', $valstr);
|
|
550
|
+
|
|
551
|
+
$sql .= ($where != '' AND count($where) >=1) ? " WHERE ".implode(" ", $where) : '';
|
|
552
|
+
|
|
553
|
+
$sql .= $orderby.$limit;
|
|
554
|
+
|
|
555
|
+
return $sql;
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
|
|
559
|
+
// --------------------------------------------------------------------
|
|
560
|
+
|
|
561
|
+
/**
|
|
562
|
+
* Truncate statement
|
|
563
|
+
*
|
|
564
|
+
* Generates a platform-specific truncate string from the supplied data
|
|
565
|
+
* If the database does not support the truncate() command
|
|
566
|
+
* This function maps to "DELETE FROM table"
|
|
567
|
+
*
|
|
568
|
+
* @access public
|
|
569
|
+
* @param string the table name
|
|
570
|
+
* @return string
|
|
571
|
+
*/
|
|
572
|
+
function _truncate($table)
|
|
573
|
+
{
|
|
574
|
+
return $this->_delete($table);
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
// --------------------------------------------------------------------
|
|
578
|
+
|
|
579
|
+
/**
|
|
580
|
+
* Delete statement
|
|
581
|
+
*
|
|
582
|
+
* Generates a platform-specific delete string from the supplied data
|
|
583
|
+
*
|
|
584
|
+
* @access public
|
|
585
|
+
* @param string the table name
|
|
586
|
+
* @param array the where clause
|
|
587
|
+
* @param string the limit clause
|
|
588
|
+
* @return string
|
|
589
|
+
*/
|
|
590
|
+
function _delete($table, $where = array(), $like = array(), $limit = FALSE)
|
|
591
|
+
{
|
|
592
|
+
$conditions = '';
|
|
593
|
+
|
|
594
|
+
if (count($where) > 0 OR count($like) > 0)
|
|
595
|
+
{
|
|
596
|
+
$conditions = "\nWHERE ";
|
|
597
|
+
$conditions .= implode("\n", $this->ar_where);
|
|
598
|
+
|
|
599
|
+
if (count($where) > 0 && count($like) > 0)
|
|
600
|
+
{
|
|
601
|
+
$conditions .= " AND ";
|
|
602
|
+
}
|
|
603
|
+
$conditions .= implode("\n", $like);
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
$limit = ( ! $limit) ? '' : ' LIMIT '.$limit;
|
|
607
|
+
|
|
608
|
+
return "DELETE FROM ".$table.$conditions.$limit;
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
// --------------------------------------------------------------------
|
|
612
|
+
|
|
613
|
+
/**
|
|
614
|
+
* Limit string
|
|
615
|
+
*
|
|
616
|
+
* Generates a platform-specific LIMIT clause
|
|
617
|
+
*
|
|
618
|
+
* @access public
|
|
619
|
+
* @param string the sql query string
|
|
620
|
+
* @param integer the number of rows to limit the query to
|
|
621
|
+
* @param integer the offset value
|
|
622
|
+
* @return string
|
|
623
|
+
*/
|
|
624
|
+
function _limit($sql, $limit, $offset)
|
|
625
|
+
{
|
|
626
|
+
if ($offset == 0)
|
|
627
|
+
{
|
|
628
|
+
$offset = '';
|
|
629
|
+
}
|
|
630
|
+
else
|
|
631
|
+
{
|
|
632
|
+
$offset .= ", ";
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
return $sql."LIMIT ".$offset.$limit;
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
// --------------------------------------------------------------------
|
|
639
|
+
|
|
640
|
+
/**
|
|
641
|
+
* Close DB Connection
|
|
642
|
+
*
|
|
643
|
+
* @access public
|
|
644
|
+
* @param resource
|
|
645
|
+
* @return void
|
|
646
|
+
*/
|
|
647
|
+
function _close($conn_id)
|
|
648
|
+
{
|
|
649
|
+
@sqlite_close($conn_id);
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
|
|
656
|
+
/* End of file sqlite_driver.php */
|
|
657
|
+
/* Location: ./system/database/drivers/sqlite/sqlite_driver.php */
|