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/mssql/mssql_driver.php
ADDED
|
@@ -0,0 +1,667 @@
|
|
|
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
|
+
* MS SQL Database Adapter Class
|
|
20
|
+
*
|
|
21
|
+
* Note: _DB is an extender class that the app controller
|
|
22
|
+
* creates dynamically based on whether the active record
|
|
23
|
+
* class is being used or not.
|
|
24
|
+
*
|
|
25
|
+
* @package CodeIgniter
|
|
26
|
+
* @subpackage Drivers
|
|
27
|
+
* @category Database
|
|
28
|
+
* @author ExpressionEngine Dev Team
|
|
29
|
+
* @link http://codeigniter.com/user_guide/database/
|
|
30
|
+
*/
|
|
31
|
+
class CI_DB_mssql_driver extends CI_DB {
|
|
32
|
+
|
|
33
|
+
var $dbdriver = 'mssql';
|
|
34
|
+
|
|
35
|
+
// The character used for escaping
|
|
36
|
+
var $_escape_char = '';
|
|
37
|
+
|
|
38
|
+
// clause and character used for LIKE escape sequences
|
|
39
|
+
var $_like_escape_str = " ESCAPE '%s' ";
|
|
40
|
+
var $_like_escape_chr = '!';
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* The syntax to count rows is slightly different across different
|
|
44
|
+
* database engines, so this string appears in each driver and is
|
|
45
|
+
* used for the count_all() and count_all_results() functions.
|
|
46
|
+
*/
|
|
47
|
+
var $_count_string = "SELECT COUNT(*) AS ";
|
|
48
|
+
var $_random_keyword = ' ASC'; // not currently supported
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Non-persistent database connection
|
|
52
|
+
*
|
|
53
|
+
* @access private called by the base class
|
|
54
|
+
* @return resource
|
|
55
|
+
*/
|
|
56
|
+
function db_connect()
|
|
57
|
+
{
|
|
58
|
+
if ($this->port != '')
|
|
59
|
+
{
|
|
60
|
+
$this->hostname .= ','.$this->port;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
return @mssql_connect($this->hostname, $this->username, $this->password);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// --------------------------------------------------------------------
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Persistent database connection
|
|
70
|
+
*
|
|
71
|
+
* @access private called by the base class
|
|
72
|
+
* @return resource
|
|
73
|
+
*/
|
|
74
|
+
function db_pconnect()
|
|
75
|
+
{
|
|
76
|
+
if ($this->port != '')
|
|
77
|
+
{
|
|
78
|
+
$this->hostname .= ','.$this->port;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
return @mssql_pconnect($this->hostname, $this->username, $this->password);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// --------------------------------------------------------------------
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Reconnect
|
|
88
|
+
*
|
|
89
|
+
* Keep / reestablish the db connection if no queries have been
|
|
90
|
+
* sent for a length of time exceeding the server's idle timeout
|
|
91
|
+
*
|
|
92
|
+
* @access public
|
|
93
|
+
* @return void
|
|
94
|
+
*/
|
|
95
|
+
function reconnect()
|
|
96
|
+
{
|
|
97
|
+
// not implemented in MSSQL
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// --------------------------------------------------------------------
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Select the database
|
|
104
|
+
*
|
|
105
|
+
* @access private called by the base class
|
|
106
|
+
* @return resource
|
|
107
|
+
*/
|
|
108
|
+
function db_select()
|
|
109
|
+
{
|
|
110
|
+
// Note: The brackets are required in the event that the DB name
|
|
111
|
+
// contains reserved characters
|
|
112
|
+
return @mssql_select_db('['.$this->database.']', $this->conn_id);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
// --------------------------------------------------------------------
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Set client character set
|
|
119
|
+
*
|
|
120
|
+
* @access public
|
|
121
|
+
* @param string
|
|
122
|
+
* @param string
|
|
123
|
+
* @return resource
|
|
124
|
+
*/
|
|
125
|
+
function db_set_charset($charset, $collation)
|
|
126
|
+
{
|
|
127
|
+
// @todo - add support if needed
|
|
128
|
+
return TRUE;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
// --------------------------------------------------------------------
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Execute the query
|
|
135
|
+
*
|
|
136
|
+
* @access private called by the base class
|
|
137
|
+
* @param string an SQL query
|
|
138
|
+
* @return resource
|
|
139
|
+
*/
|
|
140
|
+
function _execute($sql)
|
|
141
|
+
{
|
|
142
|
+
$sql = $this->_prep_query($sql);
|
|
143
|
+
return @mssql_query($sql, $this->conn_id);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
// --------------------------------------------------------------------
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Prep the query
|
|
150
|
+
*
|
|
151
|
+
* If needed, each database adapter can prep the query string
|
|
152
|
+
*
|
|
153
|
+
* @access private called by execute()
|
|
154
|
+
* @param string an SQL query
|
|
155
|
+
* @return string
|
|
156
|
+
*/
|
|
157
|
+
function _prep_query($sql)
|
|
158
|
+
{
|
|
159
|
+
return $sql;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
// --------------------------------------------------------------------
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Begin Transaction
|
|
166
|
+
*
|
|
167
|
+
* @access public
|
|
168
|
+
* @return bool
|
|
169
|
+
*/
|
|
170
|
+
function trans_begin($test_mode = FALSE)
|
|
171
|
+
{
|
|
172
|
+
if ( ! $this->trans_enabled)
|
|
173
|
+
{
|
|
174
|
+
return TRUE;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
// When transactions are nested we only begin/commit/rollback the outermost ones
|
|
178
|
+
if ($this->_trans_depth > 0)
|
|
179
|
+
{
|
|
180
|
+
return TRUE;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
// Reset the transaction failure flag.
|
|
184
|
+
// If the $test_mode flag is set to TRUE transactions will be rolled back
|
|
185
|
+
// even if the queries produce a successful result.
|
|
186
|
+
$this->_trans_failure = ($test_mode === TRUE) ? TRUE : FALSE;
|
|
187
|
+
|
|
188
|
+
$this->simple_query('BEGIN TRAN');
|
|
189
|
+
return TRUE;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
// --------------------------------------------------------------------
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* Commit Transaction
|
|
196
|
+
*
|
|
197
|
+
* @access public
|
|
198
|
+
* @return bool
|
|
199
|
+
*/
|
|
200
|
+
function trans_commit()
|
|
201
|
+
{
|
|
202
|
+
if ( ! $this->trans_enabled)
|
|
203
|
+
{
|
|
204
|
+
return TRUE;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
// When transactions are nested we only begin/commit/rollback the outermost ones
|
|
208
|
+
if ($this->_trans_depth > 0)
|
|
209
|
+
{
|
|
210
|
+
return TRUE;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
$this->simple_query('COMMIT TRAN');
|
|
214
|
+
return TRUE;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
// --------------------------------------------------------------------
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* Rollback Transaction
|
|
221
|
+
*
|
|
222
|
+
* @access public
|
|
223
|
+
* @return bool
|
|
224
|
+
*/
|
|
225
|
+
function trans_rollback()
|
|
226
|
+
{
|
|
227
|
+
if ( ! $this->trans_enabled)
|
|
228
|
+
{
|
|
229
|
+
return TRUE;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
// When transactions are nested we only begin/commit/rollback the outermost ones
|
|
233
|
+
if ($this->_trans_depth > 0)
|
|
234
|
+
{
|
|
235
|
+
return TRUE;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
$this->simple_query('ROLLBACK TRAN');
|
|
239
|
+
return TRUE;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
// --------------------------------------------------------------------
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* Escape String
|
|
246
|
+
*
|
|
247
|
+
* @access public
|
|
248
|
+
* @param string
|
|
249
|
+
* @param bool whether or not the string will be used in a LIKE condition
|
|
250
|
+
* @return string
|
|
251
|
+
*/
|
|
252
|
+
function escape_str($str, $like = FALSE)
|
|
253
|
+
{
|
|
254
|
+
if (is_array($str))
|
|
255
|
+
{
|
|
256
|
+
foreach($str as $key => $val)
|
|
257
|
+
{
|
|
258
|
+
$str[$key] = $this->escape_str($val, $like);
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
return $str;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
// Access the CI object
|
|
265
|
+
$CI =& get_instance();
|
|
266
|
+
|
|
267
|
+
// Escape single quotes
|
|
268
|
+
$str = str_replace("'", "''", $CI->input->_remove_invisible_characters($str));
|
|
269
|
+
|
|
270
|
+
// escape LIKE condition wildcards
|
|
271
|
+
if ($like === TRUE)
|
|
272
|
+
{
|
|
273
|
+
$str = str_replace( array('%', '_', $this->_like_escape_chr),
|
|
274
|
+
array($this->_like_escape_chr.'%', $this->_like_escape_chr.'_', $this->_like_escape_chr.$this->_like_escape_chr),
|
|
275
|
+
$str);
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
return $str;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
// --------------------------------------------------------------------
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* Affected Rows
|
|
285
|
+
*
|
|
286
|
+
* @access public
|
|
287
|
+
* @return integer
|
|
288
|
+
*/
|
|
289
|
+
function affected_rows()
|
|
290
|
+
{
|
|
291
|
+
return @mssql_rows_affected($this->conn_id);
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
// --------------------------------------------------------------------
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* Insert ID
|
|
298
|
+
*
|
|
299
|
+
* Returns the last id created in the Identity column.
|
|
300
|
+
*
|
|
301
|
+
* @access public
|
|
302
|
+
* @return integer
|
|
303
|
+
*/
|
|
304
|
+
function insert_id()
|
|
305
|
+
{
|
|
306
|
+
$ver = self::_parse_major_version($this->version());
|
|
307
|
+
$sql = ($ver >= 8 ? "SELECT SCOPE_IDENTITY() AS last_id" : "SELECT @@IDENTITY AS last_id");
|
|
308
|
+
$query = $this->query($sql);
|
|
309
|
+
$row = $query->row();
|
|
310
|
+
return $row->last_id;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
// --------------------------------------------------------------------
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* Parse major version
|
|
317
|
+
*
|
|
318
|
+
* Grabs the major version number from the
|
|
319
|
+
* database server version string passed in.
|
|
320
|
+
*
|
|
321
|
+
* @access private
|
|
322
|
+
* @param string $version
|
|
323
|
+
* @return int16 major version number
|
|
324
|
+
*/
|
|
325
|
+
function _parse_major_version($version)
|
|
326
|
+
{
|
|
327
|
+
preg_match('/([0-9]+)\.([0-9]+)\.([0-9]+)/', $version, $ver_info);
|
|
328
|
+
return $ver_info[1]; // return the major version b/c that's all we're interested in.
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
// --------------------------------------------------------------------
|
|
332
|
+
|
|
333
|
+
/**
|
|
334
|
+
* Version number query string
|
|
335
|
+
*
|
|
336
|
+
* @access public
|
|
337
|
+
* @return string
|
|
338
|
+
*/
|
|
339
|
+
function _version()
|
|
340
|
+
{
|
|
341
|
+
return "SELECT @@VERSION AS ver";
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
// --------------------------------------------------------------------
|
|
345
|
+
|
|
346
|
+
/**
|
|
347
|
+
* "Count All" query
|
|
348
|
+
*
|
|
349
|
+
* Generates a platform-specific query string that counts all records in
|
|
350
|
+
* the specified database
|
|
351
|
+
*
|
|
352
|
+
* @access public
|
|
353
|
+
* @param string
|
|
354
|
+
* @return string
|
|
355
|
+
*/
|
|
356
|
+
function count_all($table = '')
|
|
357
|
+
{
|
|
358
|
+
if ($table == '')
|
|
359
|
+
{
|
|
360
|
+
return 0;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
$query = $this->query($this->_count_string . $this->_protect_identifiers('numrows') . " FROM " . $this->_protect_identifiers($table, TRUE, NULL, FALSE));
|
|
364
|
+
|
|
365
|
+
if ($query->num_rows() == 0)
|
|
366
|
+
{
|
|
367
|
+
return 0;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
$row = $query->row();
|
|
371
|
+
return (int) $row->numrows;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
// --------------------------------------------------------------------
|
|
375
|
+
|
|
376
|
+
/**
|
|
377
|
+
* List table query
|
|
378
|
+
*
|
|
379
|
+
* Generates a platform-specific query string so that the table names can be fetched
|
|
380
|
+
*
|
|
381
|
+
* @access private
|
|
382
|
+
* @param boolean
|
|
383
|
+
* @return string
|
|
384
|
+
*/
|
|
385
|
+
function _list_tables($prefix_limit = FALSE)
|
|
386
|
+
{
|
|
387
|
+
$sql = "SELECT name FROM sysobjects WHERE type = 'U' ORDER BY name";
|
|
388
|
+
|
|
389
|
+
// for future compatibility
|
|
390
|
+
if ($prefix_limit !== FALSE AND $this->dbprefix != '')
|
|
391
|
+
{
|
|
392
|
+
//$sql .= " LIKE '".$this->escape_like_str($this->dbprefix)."%' ".sprintf($this->_like_escape_str, $this->_like_escape_char);
|
|
393
|
+
return FALSE; // not currently supported
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
return $sql;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
// --------------------------------------------------------------------
|
|
400
|
+
|
|
401
|
+
/**
|
|
402
|
+
* List column query
|
|
403
|
+
*
|
|
404
|
+
* Generates a platform-specific query string so that the column names can be fetched
|
|
405
|
+
*
|
|
406
|
+
* @access private
|
|
407
|
+
* @param string the table name
|
|
408
|
+
* @return string
|
|
409
|
+
*/
|
|
410
|
+
function _list_columns($table = '')
|
|
411
|
+
{
|
|
412
|
+
return "SELECT * FROM INFORMATION_SCHEMA.Columns WHERE TABLE_NAME = '".$table."'";
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
// --------------------------------------------------------------------
|
|
416
|
+
|
|
417
|
+
/**
|
|
418
|
+
* Field data query
|
|
419
|
+
*
|
|
420
|
+
* Generates a platform-specific query so that the column data can be retrieved
|
|
421
|
+
*
|
|
422
|
+
* @access public
|
|
423
|
+
* @param string the table name
|
|
424
|
+
* @return object
|
|
425
|
+
*/
|
|
426
|
+
function _field_data($table)
|
|
427
|
+
{
|
|
428
|
+
return "SELECT TOP 1 * FROM ".$table;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
// --------------------------------------------------------------------
|
|
432
|
+
|
|
433
|
+
/**
|
|
434
|
+
* The error message string
|
|
435
|
+
*
|
|
436
|
+
* @access private
|
|
437
|
+
* @return string
|
|
438
|
+
*/
|
|
439
|
+
function _error_message()
|
|
440
|
+
{
|
|
441
|
+
return mssql_get_last_message();
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
// --------------------------------------------------------------------
|
|
445
|
+
|
|
446
|
+
/**
|
|
447
|
+
* The error message number
|
|
448
|
+
*
|
|
449
|
+
* @access private
|
|
450
|
+
* @return integer
|
|
451
|
+
*/
|
|
452
|
+
function _error_number()
|
|
453
|
+
{
|
|
454
|
+
// Are error numbers supported?
|
|
455
|
+
return '';
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
// --------------------------------------------------------------------
|
|
459
|
+
|
|
460
|
+
/**
|
|
461
|
+
* Escape the SQL Identifiers
|
|
462
|
+
*
|
|
463
|
+
* This function escapes column and table names
|
|
464
|
+
*
|
|
465
|
+
* @access private
|
|
466
|
+
* @param string
|
|
467
|
+
* @return string
|
|
468
|
+
*/
|
|
469
|
+
function _escape_identifiers($item)
|
|
470
|
+
{
|
|
471
|
+
if ($this->_escape_char == '')
|
|
472
|
+
{
|
|
473
|
+
return $item;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
foreach ($this->_reserved_identifiers as $id)
|
|
477
|
+
{
|
|
478
|
+
if (strpos($item, '.'.$id) !== FALSE)
|
|
479
|
+
{
|
|
480
|
+
$str = $this->_escape_char. str_replace('.', $this->_escape_char.'.', $item);
|
|
481
|
+
|
|
482
|
+
// remove duplicates if the user already included the escape
|
|
483
|
+
return preg_replace('/['.$this->_escape_char.']+/', $this->_escape_char, $str);
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
if (strpos($item, '.') !== FALSE)
|
|
488
|
+
{
|
|
489
|
+
$str = $this->_escape_char.str_replace('.', $this->_escape_char.'.'.$this->_escape_char, $item).$this->_escape_char;
|
|
490
|
+
}
|
|
491
|
+
else
|
|
492
|
+
{
|
|
493
|
+
$str = $this->_escape_char.$item.$this->_escape_char;
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
// remove duplicates if the user already included the escape
|
|
497
|
+
return preg_replace('/['.$this->_escape_char.']+/', $this->_escape_char, $str);
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
// --------------------------------------------------------------------
|
|
501
|
+
|
|
502
|
+
/**
|
|
503
|
+
* From Tables
|
|
504
|
+
*
|
|
505
|
+
* This function implicitly groups FROM tables so there is no confusion
|
|
506
|
+
* about operator precedence in harmony with SQL standards
|
|
507
|
+
*
|
|
508
|
+
* @access public
|
|
509
|
+
* @param type
|
|
510
|
+
* @return type
|
|
511
|
+
*/
|
|
512
|
+
function _from_tables($tables)
|
|
513
|
+
{
|
|
514
|
+
if ( ! is_array($tables))
|
|
515
|
+
{
|
|
516
|
+
$tables = array($tables);
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
return implode(', ', $tables);
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
// --------------------------------------------------------------------
|
|
523
|
+
|
|
524
|
+
/**
|
|
525
|
+
* Insert statement
|
|
526
|
+
*
|
|
527
|
+
* Generates a platform-specific insert string from the supplied data
|
|
528
|
+
*
|
|
529
|
+
* @access public
|
|
530
|
+
* @param string the table name
|
|
531
|
+
* @param array the insert keys
|
|
532
|
+
* @param array the insert values
|
|
533
|
+
* @return string
|
|
534
|
+
*/
|
|
535
|
+
function _insert($table, $keys, $values)
|
|
536
|
+
{
|
|
537
|
+
return "INSERT INTO ".$table." (".implode(', ', $keys).") VALUES (".implode(', ', $values).")";
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
// --------------------------------------------------------------------
|
|
541
|
+
|
|
542
|
+
/**
|
|
543
|
+
* Update statement
|
|
544
|
+
*
|
|
545
|
+
* Generates a platform-specific update string from the supplied data
|
|
546
|
+
*
|
|
547
|
+
* @access public
|
|
548
|
+
* @param string the table name
|
|
549
|
+
* @param array the update data
|
|
550
|
+
* @param array the where clause
|
|
551
|
+
* @param array the orderby clause
|
|
552
|
+
* @param array the limit clause
|
|
553
|
+
* @return string
|
|
554
|
+
*/
|
|
555
|
+
function _update($table, $values, $where, $orderby = array(), $limit = FALSE)
|
|
556
|
+
{
|
|
557
|
+
foreach($values as $key => $val)
|
|
558
|
+
{
|
|
559
|
+
$valstr[] = $key." = ".$val;
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
$limit = ( ! $limit) ? '' : ' LIMIT '.$limit;
|
|
563
|
+
|
|
564
|
+
$orderby = (count($orderby) >= 1)?' ORDER BY '.implode(", ", $orderby):'';
|
|
565
|
+
|
|
566
|
+
$sql = "UPDATE ".$table." SET ".implode(', ', $valstr);
|
|
567
|
+
|
|
568
|
+
$sql .= ($where != '' AND count($where) >=1) ? " WHERE ".implode(" ", $where) : '';
|
|
569
|
+
|
|
570
|
+
$sql .= $orderby.$limit;
|
|
571
|
+
|
|
572
|
+
return $sql;
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
|
|
576
|
+
// --------------------------------------------------------------------
|
|
577
|
+
|
|
578
|
+
/**
|
|
579
|
+
* Truncate statement
|
|
580
|
+
*
|
|
581
|
+
* Generates a platform-specific truncate string from the supplied data
|
|
582
|
+
* If the database does not support the truncate() command
|
|
583
|
+
* This function maps to "DELETE FROM table"
|
|
584
|
+
*
|
|
585
|
+
* @access public
|
|
586
|
+
* @param string the table name
|
|
587
|
+
* @return string
|
|
588
|
+
*/
|
|
589
|
+
function _truncate($table)
|
|
590
|
+
{
|
|
591
|
+
return "TRUNCATE ".$table;
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
// --------------------------------------------------------------------
|
|
595
|
+
|
|
596
|
+
/**
|
|
597
|
+
* Delete statement
|
|
598
|
+
*
|
|
599
|
+
* Generates a platform-specific delete string from the supplied data
|
|
600
|
+
*
|
|
601
|
+
* @access public
|
|
602
|
+
* @param string the table name
|
|
603
|
+
* @param array the where clause
|
|
604
|
+
* @param string the limit clause
|
|
605
|
+
* @return string
|
|
606
|
+
*/
|
|
607
|
+
function _delete($table, $where = array(), $like = array(), $limit = FALSE)
|
|
608
|
+
{
|
|
609
|
+
$conditions = '';
|
|
610
|
+
|
|
611
|
+
if (count($where) > 0 OR count($like) > 0)
|
|
612
|
+
{
|
|
613
|
+
$conditions = "\nWHERE ";
|
|
614
|
+
$conditions .= implode("\n", $this->ar_where);
|
|
615
|
+
|
|
616
|
+
if (count($where) > 0 && count($like) > 0)
|
|
617
|
+
{
|
|
618
|
+
$conditions .= " AND ";
|
|
619
|
+
}
|
|
620
|
+
$conditions .= implode("\n", $like);
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
$limit = ( ! $limit) ? '' : ' LIMIT '.$limit;
|
|
624
|
+
|
|
625
|
+
return "DELETE FROM ".$table.$conditions.$limit;
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
// --------------------------------------------------------------------
|
|
629
|
+
|
|
630
|
+
/**
|
|
631
|
+
* Limit string
|
|
632
|
+
*
|
|
633
|
+
* Generates a platform-specific LIMIT clause
|
|
634
|
+
*
|
|
635
|
+
* @access public
|
|
636
|
+
* @param string the sql query string
|
|
637
|
+
* @param integer the number of rows to limit the query to
|
|
638
|
+
* @param integer the offset value
|
|
639
|
+
* @return string
|
|
640
|
+
*/
|
|
641
|
+
function _limit($sql, $limit, $offset)
|
|
642
|
+
{
|
|
643
|
+
$i = $limit + $offset;
|
|
644
|
+
|
|
645
|
+
return preg_replace('/(^\SELECT (DISTINCT)?)/i','\\1 TOP '.$i.' ', $sql);
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
// --------------------------------------------------------------------
|
|
649
|
+
|
|
650
|
+
/**
|
|
651
|
+
* Close DB Connection
|
|
652
|
+
*
|
|
653
|
+
* @access public
|
|
654
|
+
* @param resource
|
|
655
|
+
* @return void
|
|
656
|
+
*/
|
|
657
|
+
function _close($conn_id)
|
|
658
|
+
{
|
|
659
|
+
@mssql_close($conn_id);
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
|
|
665
|
+
|
|
666
|
+
/* End of file mssql_driver.php */
|
|
667
|
+
/* Location: ./system/database/drivers/mssql/mssql_driver.php */
|