codeigniter_vender 0.0.1 → 0.0.2
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 +1 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +10 -0
- data/README.md +39 -0
- data/Rakefile +4 -2
- data/VERSION +1 -1
- data/bin/ci +5 -0
- data/codeigniter_vender.gemspec +355 -344
- data/lib/codeigniter/commands/app.rb +5 -0
- data/lib/codeigniter/commands/help.rb +7 -0
- data/lib/codeigniter/commands.rb +19 -0
- data/lib/{tasks/app.rake → codeigniter/tasks/ci.rake} +1 -1
- data/lib/codeigniter_vender.rb +26 -1
- data/lib/generators/base.rb +11 -0
- data/{generators → lib/generators/ci}/ci_app/USAGE +0 -0
- data/lib/generators/ci/ci_app/ci_app_generator.rb +10 -0
- data/lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/application/.htaccess +1 -0
- data/lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/application/cache/.htaccess +1 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2/system/application/config → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/application/cache}/index.html +0 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2/system → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/application/config/autoload.php +18 -18
- data/{generators/ci_app/templates/CodeIgniter_1.7.2/system → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/application/config/config.php +62 -31
- data/{generators/ci_app/templates/CodeIgniter_1.7.2/system → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/application/config/constants.php +7 -7
- data/{generators/ci_app/templates/CodeIgniter_1.7.2/system → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/application/config/database.php +20 -13
- data/{generators/ci_app/templates/CodeIgniter_1.7.2/system → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/application/config/doctypes.php +1 -1
- data/lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/application/config/foreign_chars.php +64 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2/system → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/application/config/hooks.php +1 -1
- data/{generators/ci_app/templates/CodeIgniter_1.7.2/system/application/controllers → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/application/config}/index.html +0 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2/system → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/application/config/mimes.php +5 -5
- data/lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/application/config/profiler.php +17 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2/system → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/application/config/routes.php +7 -9
- data/{generators/ci_app/templates/CodeIgniter_1.7.2/system → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/application/config/smileys.php +2 -2
- data/{generators/ci_app/templates/CodeIgniter_1.7.2/system → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/application/config/user_agents.php +7 -4
- data/{generators/ci_app/templates/CodeIgniter_1.7.2/system/application/errors → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/application/controllers}/index.html +0 -0
- data/lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/application/controllers/welcome.php +17 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2/system/application/helpers → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/application/core}/index.html +0 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2/system → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/application/errors/error_404.php +1 -1
- data/{generators/ci_app/templates/CodeIgniter_1.7.2/system → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/application/errors/error_db.php +1 -1
- data/{generators/ci_app/templates/CodeIgniter_1.7.2/system → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/application/errors/error_general.php +1 -1
- data/{generators/ci_app/templates/CodeIgniter_1.7.2/system → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/application/errors/error_php.php +0 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2/system/application/hooks → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/application/errors}/index.html +0 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2/system/application → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/application/helpers}/index.html +0 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2/system/application/language/english → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/application/hooks}/index.html +0 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2/system/application/libraries → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/application}/index.html +0 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2/system/application/models → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/application/language/english}/index.html +0 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2/system/application/views → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/application/libraries}/index.html +0 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2/system/cache → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/application/logs}/index.html +0 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2/system/codeigniter → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/application/models}/index.html +0 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/application/third_party}/index.html +0 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mssql → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/application/views}/index.html +0 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2/system → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/application/views/welcome_message.php +6 -4
- data/lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/index.php +166 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/license.txt +1 -2
- data/lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/system/.htaccess +1 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/system/core}/Benchmark.php +5 -5
- data/lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/system/core/CodeIgniter.php +340 -0
- data/lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/system/core/Common.php +503 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/system/core}/Config.php +126 -57
- data/lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/system/core/Controller.php +67 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/system/core}/Exceptions.php +24 -20
- data/{generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/system/core}/Hooks.php +14 -15
- data/lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/system/core/Input.php +652 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Language.php → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/system/core/Lang.php} +33 -16
- data/{generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/system/core}/Loader.php +374 -364
- data/lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/system/core/Model.php +56 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/system/core}/Output.php +140 -93
- data/{generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/system/core}/Router.php +185 -115
- data/{generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/system/core}/URI.php +78 -58
- data/lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/system/core/Utf8.php +165 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mysql → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/system/core}/index.html +0 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/database/DB.php +32 -27
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/database/DB_active_rec.php +478 -225
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/database/DB_cache.php +30 -30
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/database/DB_driver.php +199 -175
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/database/DB_forge.php +43 -36
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/database/DB_result.php +115 -52
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/database/DB_utility.php +69 -44
- data/{generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/mysqli → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/system/database/drivers}/index.html +0 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/oci8 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/system/database/drivers/mssql}/index.html +0 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/database/drivers/mssql/mssql_driver.php +64 -67
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/database/drivers/mssql/mssql_forge.php +19 -19
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/database/drivers/mssql/mssql_result.php +14 -14
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/database/drivers/mssql/mssql_utility.php +3 -38
- data/{generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/odbc → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/system/database/drivers/mysql}/index.html +0 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/database/drivers/mysql/mysql_driver.php +155 -63
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/database/drivers/mysql/mysql_forge.php +36 -21
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/database/drivers/mysql/mysql_result.php +14 -14
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/database/drivers/mysql/mysql_utility.php +25 -60
- data/{generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/postgre → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/system/database/drivers/mysqli}/index.html +0 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/database/drivers/mysqli/mysqli_driver.php +131 -62
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/database/drivers/mysqli/mysqli_forge.php +17 -17
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/database/drivers/mysqli/mysqli_result.php +14 -14
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/database/drivers/mysqli/mysqli_utility.php +4 -40
- data/{generators/ci_app/templates/CodeIgniter_1.7.2/system/database/drivers/sqlite → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/system/database/drivers/oci8}/index.html +0 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/database/drivers/oci8/oci8_driver.php +55 -58
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/database/drivers/oci8/oci8_forge.php +18 -18
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/database/drivers/oci8/oci8_result.php +17 -17
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/database/drivers/oci8/oci8_utility.php +2 -37
- data/{generators/ci_app/templates/CodeIgniter_1.7.2/system/database → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/system/database/drivers/odbc}/index.html +0 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/database/drivers/odbc/odbc_driver.php +58 -61
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/database/drivers/odbc/odbc_forge.php +21 -21
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/database/drivers/odbc/odbc_result.php +11 -11
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/database/drivers/odbc/odbc_utility.php +5 -50
- data/{generators/ci_app/templates/CodeIgniter_1.7.2/system/fonts → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/system/database/drivers/postgre}/index.html +0 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/database/drivers/postgre/postgre_driver.php +61 -61
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/database/drivers/postgre/postgre_forge.php +84 -33
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/database/drivers/postgre/postgre_result.php +11 -11
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/database/drivers/postgre/postgre_utility.php +2 -38
- data/{generators/ci_app/templates/CodeIgniter_1.7.2/system/helpers → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/system/database/drivers/sqlite}/index.html +0 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/database/drivers/sqlite/sqlite_driver.php +65 -65
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/database/drivers/sqlite/sqlite_forge.php +18 -18
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/database/drivers/sqlite/sqlite_result.php +12 -12
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/database/drivers/sqlite/sqlite_utility.php +3 -48
- data/{generators/ci_app/templates/CodeIgniter_1.7.2/system → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/system/database}/index.html +0 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/system/fonts}/index.html +0 -0
- data/lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/system/fonts/texb.ttf +0 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/helpers/array_helper.php +46 -6
- data/lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/system/helpers/captcha_helper.php +246 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/helpers/cookie_helper.php +7 -48
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/helpers/date_helper.php +90 -90
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/helpers/directory_helper.php +18 -22
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/helpers/download_helper.php +8 -8
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/helpers/email_helper.php +4 -4
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/helpers/file_helper.php +45 -39
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/helpers/form_helper.php +59 -35
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/helpers/html_helper.php +20 -14
- data/{generators/ci_app/templates/CodeIgniter_1.7.2/system/language → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/system/helpers}/index.html +0 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/helpers/inflector_helper.php +27 -16
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/helpers/language_helper.php +3 -3
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/helpers/number_helper.php +15 -14
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/helpers/path_helper.php +7 -7
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/helpers/security_helper.php +49 -15
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/helpers/smiley_helper.php +29 -23
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/helpers/string_helper.php +45 -28
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/helpers/text_helper.php +195 -124
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/helpers/typography_helper.php +32 -9
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/helpers/url_helper.php +17 -15
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/helpers/xml_helper.php +21 -12
- data/{generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/system}/index.html +0 -0
- data/lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/system/language/english/calendar_lang.php +51 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/language/english/date_lang.php +1 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/language/english/db_lang.php +2 -1
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/language/english/email_lang.php +0 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/language/english/form_validation_lang.php +5 -4
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/language/english/ftp_lang.php +1 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/language/english/imglib_lang.php +0 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2/system/logs → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/system/language/english}/index.html +0 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/language/english/number_lang.php +0 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/language/english/profiler_lang.php +4 -1
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/language/english/unit_test_lang.php +1 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/language/english/upload_lang.php +0 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2/system/plugins → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/system/language}/index.html +0 -0
- data/lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/system/libraries/Cache/Cache.php +216 -0
- data/lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/system/libraries/Cache/drivers/Cache_apc.php +151 -0
- data/lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/system/libraries/Cache/drivers/Cache_dummy.php +129 -0
- data/lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/system/libraries/Cache/drivers/Cache_file.php +196 -0
- data/lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/system/libraries/Cache/drivers/Cache_memcached.php +209 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/libraries/Calendar.php +81 -83
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/libraries/Cart.php +73 -73
- data/lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/system/libraries/Driver.php +229 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/libraries/Email.php +209 -188
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/libraries/Encrypt.php +78 -15
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/libraries/Form_validation.php +265 -228
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/libraries/Ftp.php +46 -4
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/libraries/Image_lib.php +36 -43
- data/lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/system/libraries/Javascript.php +871 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/libraries/Log.php +29 -32
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/libraries/Pagination.php +64 -29
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/libraries/Parser.php +63 -24
- data/lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/system/libraries/Profiler.php +502 -0
- data/lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/system/libraries/Security.php +737 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/libraries/Session.php +33 -16
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/libraries/Sha1.php +14 -14
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/libraries/Table.php +172 -84
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/libraries/Trackback.php +129 -128
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/libraries/Typography.php +84 -80
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/libraries/Unit_test.php +105 -69
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/libraries/Upload.php +273 -235
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/libraries/User_agent.php +150 -115
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/libraries/Xmlrpc.php +193 -179
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/libraries/Xmlrpcs.php +91 -83
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/system/libraries/Zip.php +110 -46
- data/{generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/images → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/system/libraries}/index.html +0 -0
- data/lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/system/libraries/javascript/Jquery.php +1071 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/changelog.html +182 -29
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/database/active_record.html +48 -48
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/database/caching.html +2 -2
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/database/call_function.html +3 -3
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/database/configuration.html +14 -5
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/database/connecting.html +5 -3
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/database/examples.html +2 -2
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/database/fields.html +3 -3
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/database/forge.html +3 -3
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/database/helpers.html +2 -2
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/database/index.html +3 -3
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/database/queries.html +4 -4
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/database/results.html +17 -17
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/database/table_data.html +3 -3
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/database/transactions.html +2 -2
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/database/utilities.html +21 -2
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/doc_style/index.html +4 -3
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/doc_style/template.html +2 -2
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/general/alternative_php.html +4 -4
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/general/ancillary_classes.html +2 -2
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/general/autoloader.html +3 -4
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/general/caching.html +2 -2
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/general/common_functions.html +9 -3
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/general/controllers.html +32 -29
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/general/core_classes.html +10 -9
- data/lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/user_guide/general/creating_drivers.html +100 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/general/creating_libraries.html +8 -13
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/general/credits.html +4 -4
- data/{generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/profiling.html → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/user_guide/general/drivers.html} +21 -21
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/general/errors.html +5 -3
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/general/helpers.html +4 -4
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/general/hooks.html +2 -4
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/general/libraries.html +9 -5
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/general/managing_apps.html +24 -24
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/general/models.html +13 -13
- data/lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/user_guide/general/profiling.html +176 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/general/quick_reference.html +2 -2
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/general/requirements.html +3 -3
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/general/reserved_names.html +4 -33
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/general/routing.html +7 -17
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/general/security.html +3 -3
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/general/styleguide.html +71 -79
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/general/urls.html +2 -2
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/general/views.html +13 -13
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/helpers/array_helper.html +53 -2
- data/lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/user_guide/helpers/captcha_helper.html +195 -0
- data/lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/user_guide/helpers/cookie_helper.html +107 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/helpers/date_helper.html +6 -6
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/helpers/directory_helper.html +6 -6
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/helpers/download_helper.html +2 -2
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/helpers/email_helper.html +2 -2
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/helpers/file_helper.html +5 -4
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/helpers/form_helper.html +9 -9
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/helpers/html_helper.html +6 -6
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/helpers/inflector_helper.html +2 -2
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/helpers/language_helper.html +2 -2
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/helpers/number_helper.html +9 -3
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/helpers/path_helper.html +2 -2
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/helpers/security_helper.html +12 -5
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/helpers/smiley_helper.html +12 -12
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/helpers/string_helper.html +11 -9
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/helpers/text_helper.html +21 -2
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/helpers/typography_helper.html +2 -2
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/helpers/url_helper.html +7 -8
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/helpers/xml_helper.html +2 -2
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/images/appflowchart.gif +0 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/images/arrow.gif +0 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/images/ci_logo.jpg +0 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/images/ci_logo_flame.jpg +0 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/images/ci_quick_ref.png +0 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/images/codeigniter_1.7.1_helper_reference.pdf +0 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/images/codeigniter_1.7.1_helper_reference.png +0 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/images/codeigniter_1.7.1_library_reference.pdf +0 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/images/codeigniter_1.7.1_library_reference.png +0 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/images/file.gif +0 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/images/folder.gif +0 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/images/nav_bg_darker.jpg +0 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/images/nav_separator_darker.jpg +0 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/images/nav_toggle_darker.jpg +0 -0
- data/lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/user_guide/images/reactor-bullet.png +0 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/images/smile.gif +0 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/images/transparent.gif +0 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/index.html +2 -2
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/installation/downloads.html +10 -6
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/installation/index.html +10 -5
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/installation/troubleshooting.html +2 -2
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/installation/upgrade_120.html +2 -2
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/installation/upgrade_130.html +2 -2
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/installation/upgrade_131.html +2 -2
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/installation/upgrade_132.html +2 -2
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/installation/upgrade_133.html +2 -2
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/installation/upgrade_140.html +2 -2
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/installation/upgrade_141.html +2 -2
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/installation/upgrade_150.html +2 -2
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/installation/upgrade_152.html +2 -2
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/installation/upgrade_153.html +2 -2
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/installation/upgrade_154.html +5 -5
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/installation/upgrade_160.html +6 -6
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/installation/upgrade_161.html +2 -2
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/installation/upgrade_162.html +5 -5
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/installation/upgrade_163.html +2 -2
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/installation/upgrade_170.html +5 -5
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/installation/upgrade_171.html +2 -2
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/installation/upgrade_172.html +7 -3
- data/lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/user_guide/installation/upgrade_200.html +131 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/installation/upgrade_b11.html +2 -2
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/installation/upgrading.html +3 -2
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/libraries/benchmark.html +4 -4
- data/lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/user_guide/libraries/caching.html +193 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/libraries/calendar.html +3 -3
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/libraries/cart.html +345 -345
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/libraries/config.html +4 -4
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/libraries/email.html +4 -4
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/libraries/encryption.html +49 -7
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/libraries/file_uploading.html +15 -15
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/libraries/form_validation.html +22 -25
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/libraries/ftp.html +21 -8
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/libraries/image_lib.html +4 -3
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/libraries/input.html +69 -31
- data/lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/user_guide/libraries/javascript.html +246 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/libraries/language.html +3 -3
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/libraries/loader.html +56 -15
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/libraries/output.html +19 -2
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/libraries/pagination.html +19 -8
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/libraries/parser.html +6 -2
- data/lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0/user_guide/libraries/security.html +135 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/libraries/sessions.html +18 -7
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/libraries/table.html +33 -10
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/libraries/trackback.html +2 -2
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/libraries/typography.html +5 -5
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/libraries/unit_testing.html +27 -6
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/libraries/uri.html +3 -3
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/libraries/user_agent.html +27 -2
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/libraries/xmlrpc.html +25 -23
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/libraries/zip.html +13 -3
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/license.html +3 -3
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/nav/hacks.txt +2 -1
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/nav/moo.fx.js +1 -37
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/nav/nav.js +27 -24
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/nav/prototype.lite.js +0 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/nav/user_guide_menu.js +0 -0
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/overview/appflow.html +3 -3
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/overview/at_a_glance.html +5 -15
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/overview/cheatsheets.html +2 -2
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/overview/features.html +3 -5
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/overview/getting_started.html +2 -2
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/overview/goals.html +2 -2
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/overview/index.html +3 -3
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/overview/mvc.html +2 -2
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/toc.html +14 -15
- data/{generators/ci_app/templates/CodeIgniter_1.7.2 → lib/generators/ci/ci_app/templates/CodeIgniterLibs/CodeIgniter_2.0.0}/user_guide/userguide.css +9 -0
- data/{generators → lib/generators/ci}/ci_app/templates/README +0 -0
- data/lib/generators/ci/ci_auth/USAGE +8 -0
- data/lib/generators/ci/ci_auth/ci_auth_generator.rb +11 -0
- data/lib/generators/ci/ci_auth/templates/auth.php +133 -0
- data/lib/generators/ci/ci_auth/templates/auth_model.php +52 -0
- data/lib/generators/ci/ci_auth/templates/login_form.php +29 -0
- data/{generators → lib/generators/ci}/ci_controller/USAGE +0 -0
- data/{generators → lib/generators/ci}/ci_controller/ci_controller_generator.rb +0 -0
- data/{generators → lib/generators/ci}/ci_controller/templates/ci_controller.php.erb +0 -0
- data/{generators → lib/generators/ci}/ci_controller/templates/ci_view.php.erb +0 -0
- data/{generators → lib/generators/ci}/ci_layout/USAGE +0 -0
- data/{generators → lib/generators/ci}/ci_layout/ci_layout_generator.rb +0 -0
- data/{generators → lib/generators/ci}/ci_layout/templates/application_layout.php.erb +0 -0
- data/{generators → lib/generators/ci}/ci_model/USAGE +0 -0
- data/{generators → lib/generators/ci}/ci_model/ci_model_generator.rb +0 -0
- data/{generators → lib/generators/ci}/ci_model/templates/ci_model.php.erb +0 -0
- data/{generators → lib/generators/ci}/ci_model/templates/model.rb +0 -0
- data/{generators → lib/generators/ci}/ci_model/templates/model_migration.rb.erb +0 -0
- metadata +358 -347
- data/README +0 -40
- data/generators/ci_app/ci_app_generator.rb +0 -12
- data/generators/ci_app/templates/CodeIgniter_1.7.2/index.php +0 -118
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/application/controllers/welcome.php +0 -17
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/codeigniter/Base4.php +0 -69
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/codeigniter/Base5.php +0 -56
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/codeigniter/CodeIgniter.php +0 -280
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/codeigniter/Common.php +0 -421
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/codeigniter/Compat.php +0 -93
- 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/compatibility_helper.php +0 -498
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/calendar_lang.php +0 -51
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/scaffolding_lang.php +0 -17
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/language/english/validation_lang.php +0 -24
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Controller.php +0 -127
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Input.php +0 -1067
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Model.php +0 -83
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Profiler.php +0 -392
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/libraries/Validation.php +0 -875
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/plugins/captcha_pi.php +0 -356
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/plugins/js_calendar_pi.php +0 -629
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/Scaffolding.php +0 -291
- 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/logo.jpg +0 -0
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/index.html +0 -10
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/views/add.php +0 -32
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/views/delete.php +0 -9
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/views/edit.php +0 -33
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/views/footer.php +0 -10
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/views/header.php +0 -29
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/views/index.html +0 -10
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/views/no_data.php +0 -8
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/views/stylesheet.css +0 -143
- data/generators/ci_app/templates/CodeIgniter_1.7.2/system/scaffolding/views/view.php +0 -27
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/plugins.html +0 -127
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/general/scaffolding.html +0 -147
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/compatibility_helper.html +0 -118
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/helpers/cookie_helper.html +0 -147
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/libraries/validation.html +0 -740
- data/generators/ci_app/templates/CodeIgniter_1.7.2/user_guide/nav/moo.fx.pack.js +0 -241
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* CodeIgniter
|
|
4
4
|
*
|
|
5
|
-
* An open source application development framework for PHP
|
|
5
|
+
* An open source application development framework for PHP 5.1.6 or newer
|
|
6
6
|
*
|
|
7
7
|
* @package CodeIgniter
|
|
8
8
|
* @author ExpressionEngine Dev Team
|
|
9
|
-
* @copyright Copyright (c) 2008 -
|
|
9
|
+
* @copyright Copyright (c) 2008 - 2011, EllisLab, Inc.
|
|
10
10
|
* @license http://codeigniter.com/user_guide/license.html
|
|
11
11
|
* @link http://codeigniter.com
|
|
12
12
|
* @since Version 1.0
|
|
@@ -36,17 +36,18 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
36
36
|
var $ar_like = array();
|
|
37
37
|
var $ar_groupby = array();
|
|
38
38
|
var $ar_having = array();
|
|
39
|
+
var $ar_keys = array();
|
|
39
40
|
var $ar_limit = FALSE;
|
|
40
41
|
var $ar_offset = FALSE;
|
|
41
42
|
var $ar_order = FALSE;
|
|
42
43
|
var $ar_orderby = array();
|
|
43
|
-
var $ar_set = array();
|
|
44
|
+
var $ar_set = array();
|
|
44
45
|
var $ar_wherein = array();
|
|
45
46
|
var $ar_aliased_tables = array();
|
|
46
47
|
var $ar_store_array = array();
|
|
47
|
-
|
|
48
|
+
|
|
48
49
|
// Active Record Caching variables
|
|
49
|
-
var $ar_caching
|
|
50
|
+
var $ar_caching = FALSE;
|
|
50
51
|
var $ar_cache_exists = array();
|
|
51
52
|
var $ar_cache_select = array();
|
|
52
53
|
var $ar_cache_from = array();
|
|
@@ -56,7 +57,7 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
56
57
|
var $ar_cache_groupby = array();
|
|
57
58
|
var $ar_cache_having = array();
|
|
58
59
|
var $ar_cache_orderby = array();
|
|
59
|
-
var $ar_cache_set = array();
|
|
60
|
+
var $ar_cache_set = array();
|
|
60
61
|
|
|
61
62
|
|
|
62
63
|
// --------------------------------------------------------------------
|
|
@@ -72,12 +73,12 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
72
73
|
*/
|
|
73
74
|
function select($select = '*', $escape = NULL)
|
|
74
75
|
{
|
|
75
|
-
// Set the global value if this was sepecified
|
|
76
|
+
// Set the global value if this was sepecified
|
|
76
77
|
if (is_bool($escape))
|
|
77
78
|
{
|
|
78
79
|
$this->_protect_identifiers = $escape;
|
|
79
80
|
}
|
|
80
|
-
|
|
81
|
+
|
|
81
82
|
if (is_string($select))
|
|
82
83
|
{
|
|
83
84
|
$select = explode(',', $select);
|
|
@@ -117,7 +118,7 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
117
118
|
{
|
|
118
119
|
return $this->_max_min_avg_sum($select, $alias, 'MAX');
|
|
119
120
|
}
|
|
120
|
-
|
|
121
|
+
|
|
121
122
|
// --------------------------------------------------------------------
|
|
122
123
|
|
|
123
124
|
/**
|
|
@@ -178,7 +179,7 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
178
179
|
* select_min()
|
|
179
180
|
* select_avg()
|
|
180
181
|
* select_sum()
|
|
181
|
-
*
|
|
182
|
+
*
|
|
182
183
|
* @access public
|
|
183
184
|
* @param string the field
|
|
184
185
|
* @param string an alias
|
|
@@ -190,29 +191,29 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
190
191
|
{
|
|
191
192
|
$this->display_error('db_invalid_query');
|
|
192
193
|
}
|
|
193
|
-
|
|
194
|
+
|
|
194
195
|
$type = strtoupper($type);
|
|
195
|
-
|
|
196
|
+
|
|
196
197
|
if ( ! in_array($type, array('MAX', 'MIN', 'AVG', 'SUM')))
|
|
197
198
|
{
|
|
198
199
|
show_error('Invalid function type: '.$type);
|
|
199
200
|
}
|
|
200
|
-
|
|
201
|
+
|
|
201
202
|
if ($alias == '')
|
|
202
203
|
{
|
|
203
204
|
$alias = $this->_create_alias_from_table(trim($select));
|
|
204
205
|
}
|
|
205
|
-
|
|
206
|
+
|
|
206
207
|
$sql = $type.'('.$this->_protect_identifiers(trim($select)).') AS '.$alias;
|
|
207
208
|
|
|
208
209
|
$this->ar_select[] = $sql;
|
|
209
|
-
|
|
210
|
+
|
|
210
211
|
if ($this->ar_caching === TRUE)
|
|
211
212
|
{
|
|
212
213
|
$this->ar_cache_select[] = $sql;
|
|
213
214
|
$this->ar_cache_exists[] = 'select';
|
|
214
215
|
}
|
|
215
|
-
|
|
216
|
+
|
|
216
217
|
return $this;
|
|
217
218
|
}
|
|
218
219
|
|
|
@@ -231,7 +232,7 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
231
232
|
{
|
|
232
233
|
return end(explode('.', $item));
|
|
233
234
|
}
|
|
234
|
-
|
|
235
|
+
|
|
235
236
|
return $item;
|
|
236
237
|
}
|
|
237
238
|
|
|
@@ -251,7 +252,7 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
251
252
|
$this->ar_distinct = (is_bool($val)) ? $val : TRUE;
|
|
252
253
|
return $this;
|
|
253
254
|
}
|
|
254
|
-
|
|
255
|
+
|
|
255
256
|
// --------------------------------------------------------------------
|
|
256
257
|
|
|
257
258
|
/**
|
|
@@ -275,12 +276,12 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
275
276
|
$this->_track_aliases($v);
|
|
276
277
|
|
|
277
278
|
$this->ar_from[] = $this->_protect_identifiers($v, TRUE, NULL, FALSE);
|
|
278
|
-
|
|
279
|
+
|
|
279
280
|
if ($this->ar_caching === TRUE)
|
|
280
281
|
{
|
|
281
282
|
$this->ar_cache_from[] = $this->_protect_identifiers($v, TRUE, NULL, FALSE);
|
|
282
283
|
$this->ar_cache_exists[] = 'from';
|
|
283
|
-
}
|
|
284
|
+
}
|
|
284
285
|
}
|
|
285
286
|
|
|
286
287
|
}
|
|
@@ -289,11 +290,11 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
289
290
|
$val = trim($val);
|
|
290
291
|
|
|
291
292
|
// Extract any aliases that might exist. We use this information
|
|
292
|
-
// in the _protect_identifiers to know whether to add a table prefix
|
|
293
|
+
// in the _protect_identifiers to know whether to add a table prefix
|
|
293
294
|
$this->_track_aliases($val);
|
|
294
|
-
|
|
295
|
+
|
|
295
296
|
$this->ar_from[] = $this->_protect_identifiers($val, TRUE, NULL, FALSE);
|
|
296
|
-
|
|
297
|
+
|
|
297
298
|
if ($this->ar_caching === TRUE)
|
|
298
299
|
{
|
|
299
300
|
$this->ar_cache_from[] = $this->_protect_identifiers($val, TRUE, NULL, FALSE);
|
|
@@ -319,7 +320,7 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
319
320
|
* @return object
|
|
320
321
|
*/
|
|
321
322
|
function join($table, $cond, $type = '')
|
|
322
|
-
{
|
|
323
|
+
{
|
|
323
324
|
if ($type != '')
|
|
324
325
|
{
|
|
325
326
|
$type = strtoupper(trim($type));
|
|
@@ -335,7 +336,7 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
335
336
|
}
|
|
336
337
|
|
|
337
338
|
// Extract any aliases that might exist. We use this information
|
|
338
|
-
// in the _protect_identifiers to know whether to add a table prefix
|
|
339
|
+
// in the _protect_identifiers to know whether to add a table prefix
|
|
339
340
|
$this->_track_aliases($table);
|
|
340
341
|
|
|
341
342
|
// Strip apart the condition and protect the identifiers
|
|
@@ -343,10 +344,10 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
343
344
|
{
|
|
344
345
|
$match[1] = $this->_protect_identifiers($match[1]);
|
|
345
346
|
$match[3] = $this->_protect_identifiers($match[3]);
|
|
346
|
-
|
|
347
|
-
$cond = $match[1].$match[2].$match[3];
|
|
347
|
+
|
|
348
|
+
$cond = $match[1].$match[2].$match[3];
|
|
348
349
|
}
|
|
349
|
-
|
|
350
|
+
|
|
350
351
|
// Assemble the JOIN statement
|
|
351
352
|
$join = $type.'JOIN '.$this->_protect_identifiers($table, TRUE, NULL, FALSE).' ON '.$cond;
|
|
352
353
|
|
|
@@ -377,7 +378,7 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
377
378
|
{
|
|
378
379
|
return $this->_where($key, $value, 'AND ', $escape);
|
|
379
380
|
}
|
|
380
|
-
|
|
381
|
+
|
|
381
382
|
// --------------------------------------------------------------------
|
|
382
383
|
|
|
383
384
|
/**
|
|
@@ -398,18 +399,6 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
398
399
|
|
|
399
400
|
// --------------------------------------------------------------------
|
|
400
401
|
|
|
401
|
-
/**
|
|
402
|
-
* orwhere() is an alias of or_where()
|
|
403
|
-
* this function is here for backwards compatibility, as
|
|
404
|
-
* orwhere() has been deprecated
|
|
405
|
-
*/
|
|
406
|
-
function orwhere($key, $value = NULL, $escape = TRUE)
|
|
407
|
-
{
|
|
408
|
-
return $this->or_where($key, $value, $escape);
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
// --------------------------------------------------------------------
|
|
412
|
-
|
|
413
402
|
/**
|
|
414
403
|
* Where
|
|
415
404
|
*
|
|
@@ -427,7 +416,7 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
427
416
|
{
|
|
428
417
|
$key = array($key => $value);
|
|
429
418
|
}
|
|
430
|
-
|
|
419
|
+
|
|
431
420
|
// If the escape value was not set will will base it on the global setting
|
|
432
421
|
if ( ! is_bool($escape))
|
|
433
422
|
{
|
|
@@ -443,13 +432,13 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
443
432
|
// value appears not to have been set, assign the test to IS NULL
|
|
444
433
|
$k .= ' IS NULL';
|
|
445
434
|
}
|
|
446
|
-
|
|
435
|
+
|
|
447
436
|
if ( ! is_null($v))
|
|
448
437
|
{
|
|
449
438
|
if ($escape === TRUE)
|
|
450
439
|
{
|
|
451
440
|
$k = $this->_protect_identifiers($k, FALSE, $escape);
|
|
452
|
-
|
|
441
|
+
|
|
453
442
|
$v = ' '.$this->escape($v);
|
|
454
443
|
}
|
|
455
444
|
|
|
@@ -460,19 +449,19 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
460
449
|
}
|
|
461
450
|
else
|
|
462
451
|
{
|
|
463
|
-
$k = $this->_protect_identifiers($k, FALSE, $escape);
|
|
452
|
+
$k = $this->_protect_identifiers($k, FALSE, $escape);
|
|
464
453
|
}
|
|
465
454
|
|
|
466
455
|
$this->ar_where[] = $prefix.$k.$v;
|
|
467
|
-
|
|
456
|
+
|
|
468
457
|
if ($this->ar_caching === TRUE)
|
|
469
458
|
{
|
|
470
459
|
$this->ar_cache_where[] = $prefix.$k.$v;
|
|
471
460
|
$this->ar_cache_exists[] = 'where';
|
|
472
461
|
}
|
|
473
|
-
|
|
462
|
+
|
|
474
463
|
}
|
|
475
|
-
|
|
464
|
+
|
|
476
465
|
return $this;
|
|
477
466
|
}
|
|
478
467
|
|
|
@@ -493,7 +482,7 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
493
482
|
{
|
|
494
483
|
return $this->_where_in($key, $values);
|
|
495
484
|
}
|
|
496
|
-
|
|
485
|
+
|
|
497
486
|
// --------------------------------------------------------------------
|
|
498
487
|
|
|
499
488
|
/**
|
|
@@ -529,7 +518,7 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
529
518
|
{
|
|
530
519
|
return $this->_where_in($key, $values, TRUE);
|
|
531
520
|
}
|
|
532
|
-
|
|
521
|
+
|
|
533
522
|
// --------------------------------------------------------------------
|
|
534
523
|
|
|
535
524
|
/**
|
|
@@ -559,7 +548,7 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
559
548
|
* @param string The field to search
|
|
560
549
|
* @param array The values searched on
|
|
561
550
|
* @param boolean If the statement would be IN or NOT IN
|
|
562
|
-
* @param string
|
|
551
|
+
* @param string
|
|
563
552
|
* @return object
|
|
564
553
|
*/
|
|
565
554
|
function _where_in($key = NULL, $values = NULL, $not = FALSE, $type = 'AND ')
|
|
@@ -568,12 +557,12 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
568
557
|
{
|
|
569
558
|
return;
|
|
570
559
|
}
|
|
571
|
-
|
|
560
|
+
|
|
572
561
|
if ( ! is_array($values))
|
|
573
562
|
{
|
|
574
563
|
$values = array($values);
|
|
575
564
|
}
|
|
576
|
-
|
|
565
|
+
|
|
577
566
|
$not = ($not) ? ' NOT' : '';
|
|
578
567
|
|
|
579
568
|
foreach ($values as $value)
|
|
@@ -582,7 +571,7 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
582
571
|
}
|
|
583
572
|
|
|
584
573
|
$prefix = (count($this->ar_where) == 0) ? '' : $type;
|
|
585
|
-
|
|
574
|
+
|
|
586
575
|
$where_in = $prefix . $this->_protect_identifiers($key) . $not . " IN (" . implode(", ", $this->ar_wherein) . ") ";
|
|
587
576
|
|
|
588
577
|
$this->ar_where[] = $where_in;
|
|
@@ -596,7 +585,7 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
596
585
|
$this->ar_wherein = array();
|
|
597
586
|
return $this;
|
|
598
587
|
}
|
|
599
|
-
|
|
588
|
+
|
|
600
589
|
// --------------------------------------------------------------------
|
|
601
590
|
|
|
602
591
|
/**
|
|
@@ -632,7 +621,7 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
632
621
|
{
|
|
633
622
|
return $this->_like($field, $match, 'AND ', $side, 'NOT');
|
|
634
623
|
}
|
|
635
|
-
|
|
624
|
+
|
|
636
625
|
// --------------------------------------------------------------------
|
|
637
626
|
|
|
638
627
|
/**
|
|
@@ -668,19 +657,7 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
668
657
|
{
|
|
669
658
|
return $this->_like($field, $match, 'OR ', $side, 'NOT');
|
|
670
659
|
}
|
|
671
|
-
|
|
672
|
-
// --------------------------------------------------------------------
|
|
673
660
|
|
|
674
|
-
/**
|
|
675
|
-
* orlike() is an alias of or_like()
|
|
676
|
-
* this function is here for backwards compatibility, as
|
|
677
|
-
* orlike() has been deprecated
|
|
678
|
-
*/
|
|
679
|
-
function orlike($field, $match = '', $side = 'both')
|
|
680
|
-
{
|
|
681
|
-
return $this->or_like($field, $match, $side);
|
|
682
|
-
}
|
|
683
|
-
|
|
684
661
|
// --------------------------------------------------------------------
|
|
685
662
|
|
|
686
663
|
/**
|
|
@@ -700,7 +677,7 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
700
677
|
{
|
|
701
678
|
$field = array($field => $match);
|
|
702
679
|
}
|
|
703
|
-
|
|
680
|
+
|
|
704
681
|
foreach ($field as $k => $v)
|
|
705
682
|
{
|
|
706
683
|
$k = $this->_protect_identifiers($k);
|
|
@@ -721,24 +698,24 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
721
698
|
{
|
|
722
699
|
$like_statement = $prefix." $k $not LIKE '%{$v}%'";
|
|
723
700
|
}
|
|
724
|
-
|
|
701
|
+
|
|
725
702
|
// some platforms require an escape sequence definition for LIKE wildcards
|
|
726
703
|
if ($this->_like_escape_str != '')
|
|
727
704
|
{
|
|
728
|
-
$like_statement = $like_statement.sprintf($this->_like_escape_str, $this->
|
|
705
|
+
$like_statement = $like_statement.sprintf($this->_like_escape_str, $this->_like_escape_chr);
|
|
729
706
|
}
|
|
730
|
-
|
|
707
|
+
|
|
731
708
|
$this->ar_like[] = $like_statement;
|
|
732
709
|
if ($this->ar_caching === TRUE)
|
|
733
710
|
{
|
|
734
711
|
$this->ar_cache_like[] = $like_statement;
|
|
735
712
|
$this->ar_cache_exists[] = 'like';
|
|
736
713
|
}
|
|
737
|
-
|
|
714
|
+
|
|
738
715
|
}
|
|
739
716
|
return $this;
|
|
740
717
|
}
|
|
741
|
-
|
|
718
|
+
|
|
742
719
|
// --------------------------------------------------------------------
|
|
743
720
|
|
|
744
721
|
/**
|
|
@@ -754,15 +731,15 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
754
731
|
{
|
|
755
732
|
$by = explode(',', $by);
|
|
756
733
|
}
|
|
757
|
-
|
|
734
|
+
|
|
758
735
|
foreach ($by as $val)
|
|
759
736
|
{
|
|
760
737
|
$val = trim($val);
|
|
761
|
-
|
|
738
|
+
|
|
762
739
|
if ($val != '')
|
|
763
740
|
{
|
|
764
741
|
$this->ar_groupby[] = $this->_protect_identifiers($val);
|
|
765
|
-
|
|
742
|
+
|
|
766
743
|
if ($this->ar_caching === TRUE)
|
|
767
744
|
{
|
|
768
745
|
$this->ar_cache_groupby[] = $this->_protect_identifiers($val);
|
|
@@ -775,18 +752,6 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
775
752
|
|
|
776
753
|
// --------------------------------------------------------------------
|
|
777
754
|
|
|
778
|
-
/**
|
|
779
|
-
* groupby() is an alias of group_by()
|
|
780
|
-
* this function is here for backwards compatibility, as
|
|
781
|
-
* groupby() has been deprecated
|
|
782
|
-
*/
|
|
783
|
-
function groupby($by)
|
|
784
|
-
{
|
|
785
|
-
return $this->group_by($by);
|
|
786
|
-
}
|
|
787
|
-
|
|
788
|
-
// --------------------------------------------------------------------
|
|
789
|
-
|
|
790
755
|
/**
|
|
791
756
|
* Sets the HAVING value
|
|
792
757
|
*
|
|
@@ -804,18 +769,6 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
804
769
|
|
|
805
770
|
// --------------------------------------------------------------------
|
|
806
771
|
|
|
807
|
-
/**
|
|
808
|
-
* orhaving() is an alias of or_having()
|
|
809
|
-
* this function is here for backwards compatibility, as
|
|
810
|
-
* orhaving() has been deprecated
|
|
811
|
-
*/
|
|
812
|
-
|
|
813
|
-
function orhaving($key, $value = '', $escape = TRUE)
|
|
814
|
-
{
|
|
815
|
-
return $this->or_having($key, $value, $escape);
|
|
816
|
-
}
|
|
817
|
-
// --------------------------------------------------------------------
|
|
818
|
-
|
|
819
772
|
/**
|
|
820
773
|
* Sets the OR HAVING value
|
|
821
774
|
*
|
|
@@ -830,7 +783,7 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
830
783
|
{
|
|
831
784
|
return $this->_having($key, $value, 'OR ', $escape);
|
|
832
785
|
}
|
|
833
|
-
|
|
786
|
+
|
|
834
787
|
// --------------------------------------------------------------------
|
|
835
788
|
|
|
836
789
|
/**
|
|
@@ -849,7 +802,7 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
849
802
|
{
|
|
850
803
|
$key = array($key => $value);
|
|
851
804
|
}
|
|
852
|
-
|
|
805
|
+
|
|
853
806
|
foreach ($key as $k => $v)
|
|
854
807
|
{
|
|
855
808
|
$prefix = (count($this->ar_having) == 0) ? '' : $type;
|
|
@@ -868,7 +821,7 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
868
821
|
{
|
|
869
822
|
$v = ' '.$this->escape_str($v);
|
|
870
823
|
}
|
|
871
|
-
|
|
824
|
+
|
|
872
825
|
$this->ar_having[] = $prefix.$k.$v;
|
|
873
826
|
if ($this->ar_caching === TRUE)
|
|
874
827
|
{
|
|
@@ -876,10 +829,10 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
876
829
|
$this->ar_cache_exists[] = 'having';
|
|
877
830
|
}
|
|
878
831
|
}
|
|
879
|
-
|
|
832
|
+
|
|
880
833
|
return $this;
|
|
881
834
|
}
|
|
882
|
-
|
|
835
|
+
|
|
883
836
|
// --------------------------------------------------------------------
|
|
884
837
|
|
|
885
838
|
/**
|
|
@@ -901,8 +854,8 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
901
854
|
{
|
|
902
855
|
$direction = (in_array(strtoupper(trim($direction)), array('ASC', 'DESC'), TRUE)) ? ' '.$direction : ' ASC';
|
|
903
856
|
}
|
|
904
|
-
|
|
905
|
-
|
|
857
|
+
|
|
858
|
+
|
|
906
859
|
if (strpos($orderby, ',') !== FALSE)
|
|
907
860
|
{
|
|
908
861
|
$temp = array();
|
|
@@ -913,19 +866,19 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
913
866
|
{
|
|
914
867
|
$part = $this->_protect_identifiers(trim($part));
|
|
915
868
|
}
|
|
916
|
-
|
|
869
|
+
|
|
917
870
|
$temp[] = $part;
|
|
918
871
|
}
|
|
919
|
-
|
|
920
|
-
$orderby = implode(', ', $temp);
|
|
872
|
+
|
|
873
|
+
$orderby = implode(', ', $temp);
|
|
921
874
|
}
|
|
922
875
|
else if ($direction != $this->_random_keyword)
|
|
923
876
|
{
|
|
924
877
|
$orderby = $this->_protect_identifiers($orderby);
|
|
925
878
|
}
|
|
926
|
-
|
|
879
|
+
|
|
927
880
|
$orderby_statement = $orderby.$direction;
|
|
928
|
-
|
|
881
|
+
|
|
929
882
|
$this->ar_orderby[] = $orderby_statement;
|
|
930
883
|
if ($this->ar_caching === TRUE)
|
|
931
884
|
{
|
|
@@ -935,19 +888,7 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
935
888
|
|
|
936
889
|
return $this;
|
|
937
890
|
}
|
|
938
|
-
|
|
939
|
-
// --------------------------------------------------------------------
|
|
940
891
|
|
|
941
|
-
/**
|
|
942
|
-
* orderby() is an alias of order_by()
|
|
943
|
-
* this function is here for backwards compatibility, as
|
|
944
|
-
* orderby() has been deprecated
|
|
945
|
-
*/
|
|
946
|
-
function orderby($orderby, $direction = '')
|
|
947
|
-
{
|
|
948
|
-
return $this->order_by($orderby, $direction);
|
|
949
|
-
}
|
|
950
|
-
|
|
951
892
|
// --------------------------------------------------------------------
|
|
952
893
|
|
|
953
894
|
/**
|
|
@@ -966,10 +907,10 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
966
907
|
{
|
|
967
908
|
$this->ar_offset = $offset;
|
|
968
909
|
}
|
|
969
|
-
|
|
910
|
+
|
|
970
911
|
return $this;
|
|
971
912
|
}
|
|
972
|
-
|
|
913
|
+
|
|
973
914
|
// --------------------------------------------------------------------
|
|
974
915
|
|
|
975
916
|
/**
|
|
@@ -984,7 +925,7 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
984
925
|
$this->ar_offset = $offset;
|
|
985
926
|
return $this;
|
|
986
927
|
}
|
|
987
|
-
|
|
928
|
+
|
|
988
929
|
// --------------------------------------------------------------------
|
|
989
930
|
|
|
990
931
|
/**
|
|
@@ -999,11 +940,11 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
999
940
|
function set($key, $value = '', $escape = TRUE)
|
|
1000
941
|
{
|
|
1001
942
|
$key = $this->_object_to_array($key);
|
|
1002
|
-
|
|
943
|
+
|
|
1003
944
|
if ( ! is_array($key))
|
|
1004
945
|
{
|
|
1005
946
|
$key = array($key => $value);
|
|
1006
|
-
}
|
|
947
|
+
}
|
|
1007
948
|
|
|
1008
949
|
foreach ($key as $k => $v)
|
|
1009
950
|
{
|
|
@@ -1016,10 +957,10 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
1016
957
|
$this->ar_set[$this->_protect_identifiers($k)] = $this->escape($v);
|
|
1017
958
|
}
|
|
1018
959
|
}
|
|
1019
|
-
|
|
960
|
+
|
|
1020
961
|
return $this;
|
|
1021
962
|
}
|
|
1022
|
-
|
|
963
|
+
|
|
1023
964
|
// --------------------------------------------------------------------
|
|
1024
965
|
|
|
1025
966
|
/**
|
|
@@ -1041,12 +982,12 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
1041
982
|
$this->_track_aliases($table);
|
|
1042
983
|
$this->from($table);
|
|
1043
984
|
}
|
|
1044
|
-
|
|
985
|
+
|
|
1045
986
|
if ( ! is_null($limit))
|
|
1046
987
|
{
|
|
1047
988
|
$this->limit($limit, $offset);
|
|
1048
989
|
}
|
|
1049
|
-
|
|
990
|
+
|
|
1050
991
|
$sql = $this->_compile_select();
|
|
1051
992
|
|
|
1052
993
|
$result = $this->query($sql);
|
|
@@ -1057,7 +998,7 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
1057
998
|
/**
|
|
1058
999
|
* "Count All Results" query
|
|
1059
1000
|
*
|
|
1060
|
-
* Generates a platform-specific query string that counts all records
|
|
1001
|
+
* Generates a platform-specific query string that counts all records
|
|
1061
1002
|
* returned by an Active Record query.
|
|
1062
1003
|
*
|
|
1063
1004
|
* @access public
|
|
@@ -1071,12 +1012,12 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
1071
1012
|
$this->_track_aliases($table);
|
|
1072
1013
|
$this->from($table);
|
|
1073
1014
|
}
|
|
1074
|
-
|
|
1015
|
+
|
|
1075
1016
|
$sql = $this->_compile_select($this->_count_string . $this->_protect_identifiers('numrows'));
|
|
1076
1017
|
|
|
1077
1018
|
$query = $this->query($sql);
|
|
1078
1019
|
$this->_reset_select();
|
|
1079
|
-
|
|
1020
|
+
|
|
1080
1021
|
if ($query->num_rows() == 0)
|
|
1081
1022
|
{
|
|
1082
1023
|
return '0';
|
|
@@ -1110,12 +1051,12 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
1110
1051
|
{
|
|
1111
1052
|
$this->where($where);
|
|
1112
1053
|
}
|
|
1113
|
-
|
|
1054
|
+
|
|
1114
1055
|
if ( ! is_null($limit))
|
|
1115
1056
|
{
|
|
1116
1057
|
$this->limit($limit, $offset);
|
|
1117
1058
|
}
|
|
1118
|
-
|
|
1059
|
+
|
|
1119
1060
|
$sql = $this->_compile_select();
|
|
1120
1061
|
|
|
1121
1062
|
$result = $this->query($sql);
|
|
@@ -1126,15 +1067,123 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
1126
1067
|
// --------------------------------------------------------------------
|
|
1127
1068
|
|
|
1128
1069
|
/**
|
|
1129
|
-
*
|
|
1130
|
-
*
|
|
1131
|
-
*
|
|
1070
|
+
* Insert_Batch
|
|
1071
|
+
*
|
|
1072
|
+
* Compiles batch insert strings and runs the queries
|
|
1073
|
+
*
|
|
1074
|
+
* @access public
|
|
1075
|
+
* @param string the table to retrieve the results from
|
|
1076
|
+
* @param array an associative array of insert values
|
|
1077
|
+
* @return object
|
|
1132
1078
|
*/
|
|
1133
|
-
function
|
|
1079
|
+
function insert_batch($table = '', $set = NULL)
|
|
1134
1080
|
{
|
|
1135
|
-
|
|
1081
|
+
if ( ! is_null($set))
|
|
1082
|
+
{
|
|
1083
|
+
$this->set_insert_batch($set);
|
|
1084
|
+
}
|
|
1085
|
+
|
|
1086
|
+
if (count($this->ar_set) == 0)
|
|
1087
|
+
{
|
|
1088
|
+
if ($this->db_debug)
|
|
1089
|
+
{
|
|
1090
|
+
//No valid data array. Folds in cases where keys and values did not match up
|
|
1091
|
+
return $this->display_error('db_must_use_set');
|
|
1092
|
+
}
|
|
1093
|
+
return FALSE;
|
|
1094
|
+
}
|
|
1095
|
+
|
|
1096
|
+
if ($table == '')
|
|
1097
|
+
{
|
|
1098
|
+
if ( ! isset($this->ar_from[0]))
|
|
1099
|
+
{
|
|
1100
|
+
if ($this->db_debug)
|
|
1101
|
+
{
|
|
1102
|
+
return $this->display_error('db_must_set_table');
|
|
1103
|
+
}
|
|
1104
|
+
return FALSE;
|
|
1105
|
+
}
|
|
1106
|
+
|
|
1107
|
+
$table = $this->ar_from[0];
|
|
1108
|
+
}
|
|
1109
|
+
|
|
1110
|
+
// Batch this baby
|
|
1111
|
+
for ($i = 0, $total = count($this->ar_set); $i < $total; $i = $i + 100)
|
|
1112
|
+
{
|
|
1113
|
+
|
|
1114
|
+
$sql = $this->_insert_batch($this->_protect_identifiers($table, TRUE, NULL, FALSE), $this->ar_keys, array_slice($this->ar_set, $i, 100));
|
|
1115
|
+
|
|
1116
|
+
//echo $sql;
|
|
1117
|
+
|
|
1118
|
+
$this->query($sql);
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1121
|
+
$this->_reset_write();
|
|
1122
|
+
|
|
1123
|
+
|
|
1124
|
+
return TRUE;
|
|
1136
1125
|
}
|
|
1137
|
-
|
|
1126
|
+
|
|
1127
|
+
// --------------------------------------------------------------------
|
|
1128
|
+
|
|
1129
|
+
/**
|
|
1130
|
+
* The "set_insert_batch" function. Allows key/value pairs to be set for batch inserts
|
|
1131
|
+
*
|
|
1132
|
+
* @access public
|
|
1133
|
+
* @param mixed
|
|
1134
|
+
* @param string
|
|
1135
|
+
* @param boolean
|
|
1136
|
+
* @return object
|
|
1137
|
+
*/
|
|
1138
|
+
|
|
1139
|
+
function set_insert_batch($key, $value = '', $escape = TRUE)
|
|
1140
|
+
{
|
|
1141
|
+
$key = $this->_object_to_array_batch($key);
|
|
1142
|
+
|
|
1143
|
+
if ( ! is_array($key))
|
|
1144
|
+
{
|
|
1145
|
+
$key = array($key => $value);
|
|
1146
|
+
}
|
|
1147
|
+
|
|
1148
|
+
$keys = array_keys(current($key));
|
|
1149
|
+
sort($keys);
|
|
1150
|
+
|
|
1151
|
+
foreach ($key as $row)
|
|
1152
|
+
{
|
|
1153
|
+
if (count(array_diff($keys, array_keys($row))) > 0 OR count(array_diff(array_keys($row), $keys)) > 0)
|
|
1154
|
+
{
|
|
1155
|
+
// batch function above returns an error on an empty array
|
|
1156
|
+
$this->ar_set[] = array();
|
|
1157
|
+
return;
|
|
1158
|
+
}
|
|
1159
|
+
|
|
1160
|
+
ksort($row); // puts $row in the same order as our keys
|
|
1161
|
+
|
|
1162
|
+
if ($escape === FALSE)
|
|
1163
|
+
{
|
|
1164
|
+
$this->ar_set[] = '('.implode(',', $row).')';
|
|
1165
|
+
}
|
|
1166
|
+
else
|
|
1167
|
+
{
|
|
1168
|
+
$clean = array();
|
|
1169
|
+
|
|
1170
|
+
foreach($row as $value)
|
|
1171
|
+
{
|
|
1172
|
+
$clean[] = $this->escape($value);
|
|
1173
|
+
}
|
|
1174
|
+
|
|
1175
|
+
$this->ar_set[] = '('.implode(',', $clean).')';
|
|
1176
|
+
}
|
|
1177
|
+
}
|
|
1178
|
+
|
|
1179
|
+
foreach ($keys as $k)
|
|
1180
|
+
{
|
|
1181
|
+
$this->ar_keys[] = $this->_protect_identifiers($k);
|
|
1182
|
+
}
|
|
1183
|
+
|
|
1184
|
+
return $this;
|
|
1185
|
+
}
|
|
1186
|
+
|
|
1138
1187
|
// --------------------------------------------------------------------
|
|
1139
1188
|
|
|
1140
1189
|
/**
|
|
@@ -1148,12 +1197,12 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
1148
1197
|
* @return object
|
|
1149
1198
|
*/
|
|
1150
1199
|
function insert($table = '', $set = NULL)
|
|
1151
|
-
{
|
|
1200
|
+
{
|
|
1152
1201
|
if ( ! is_null($set))
|
|
1153
1202
|
{
|
|
1154
1203
|
$this->set($set);
|
|
1155
1204
|
}
|
|
1156
|
-
|
|
1205
|
+
|
|
1157
1206
|
if (count($this->ar_set) == 0)
|
|
1158
1207
|
{
|
|
1159
1208
|
if ($this->db_debug)
|
|
@@ -1173,16 +1222,52 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
1173
1222
|
}
|
|
1174
1223
|
return FALSE;
|
|
1175
1224
|
}
|
|
1176
|
-
|
|
1225
|
+
|
|
1177
1226
|
$table = $this->ar_from[0];
|
|
1178
1227
|
}
|
|
1179
1228
|
|
|
1180
1229
|
$sql = $this->_insert($this->_protect_identifiers($table, TRUE, NULL, FALSE), array_keys($this->ar_set), array_values($this->ar_set));
|
|
1181
|
-
|
|
1230
|
+
|
|
1182
1231
|
$this->_reset_write();
|
|
1183
|
-
return $this->query($sql);
|
|
1232
|
+
return $this->query($sql);
|
|
1184
1233
|
}
|
|
1185
|
-
|
|
1234
|
+
|
|
1235
|
+
function replace($table = '', $set = NULL)
|
|
1236
|
+
{
|
|
1237
|
+
if ( ! is_null($set))
|
|
1238
|
+
{
|
|
1239
|
+
$this->set($set);
|
|
1240
|
+
}
|
|
1241
|
+
|
|
1242
|
+
if (count($this->ar_set) == 0)
|
|
1243
|
+
{
|
|
1244
|
+
if ($this->db_debug)
|
|
1245
|
+
{
|
|
1246
|
+
return $this->display_error('db_must_use_set');
|
|
1247
|
+
}
|
|
1248
|
+
return FALSE;
|
|
1249
|
+
}
|
|
1250
|
+
|
|
1251
|
+
if ($table == '')
|
|
1252
|
+
{
|
|
1253
|
+
if ( ! isset($this->ar_from[0]))
|
|
1254
|
+
{
|
|
1255
|
+
if ($this->db_debug)
|
|
1256
|
+
{
|
|
1257
|
+
return $this->display_error('db_must_set_table');
|
|
1258
|
+
}
|
|
1259
|
+
return FALSE;
|
|
1260
|
+
}
|
|
1261
|
+
|
|
1262
|
+
$table = $this->ar_from[0];
|
|
1263
|
+
}
|
|
1264
|
+
|
|
1265
|
+
$sql = $this->_replace($this->_protect_identifiers($table, TRUE, NULL, FALSE), array_keys($this->ar_set), array_values($this->ar_set));
|
|
1266
|
+
|
|
1267
|
+
$this->_reset_write();
|
|
1268
|
+
return $this->query($sql);
|
|
1269
|
+
}
|
|
1270
|
+
|
|
1186
1271
|
// --------------------------------------------------------------------
|
|
1187
1272
|
|
|
1188
1273
|
/**
|
|
@@ -1205,7 +1290,7 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
1205
1290
|
{
|
|
1206
1291
|
$this->set($set);
|
|
1207
1292
|
}
|
|
1208
|
-
|
|
1293
|
+
|
|
1209
1294
|
if (count($this->ar_set) == 0)
|
|
1210
1295
|
{
|
|
1211
1296
|
if ($this->db_debug)
|
|
@@ -1225,10 +1310,10 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
1225
1310
|
}
|
|
1226
1311
|
return FALSE;
|
|
1227
1312
|
}
|
|
1228
|
-
|
|
1313
|
+
|
|
1229
1314
|
$table = $this->ar_from[0];
|
|
1230
1315
|
}
|
|
1231
|
-
|
|
1316
|
+
|
|
1232
1317
|
if ($where != NULL)
|
|
1233
1318
|
{
|
|
1234
1319
|
$this->where($where);
|
|
@@ -1238,13 +1323,140 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
1238
1323
|
{
|
|
1239
1324
|
$this->limit($limit);
|
|
1240
1325
|
}
|
|
1241
|
-
|
|
1326
|
+
|
|
1242
1327
|
$sql = $this->_update($this->_protect_identifiers($table, TRUE, NULL, FALSE), $this->ar_set, $this->ar_where, $this->ar_orderby, $this->ar_limit);
|
|
1243
|
-
|
|
1328
|
+
|
|
1244
1329
|
$this->_reset_write();
|
|
1245
1330
|
return $this->query($sql);
|
|
1246
1331
|
}
|
|
1247
1332
|
|
|
1333
|
+
|
|
1334
|
+
// --------------------------------------------------------------------
|
|
1335
|
+
|
|
1336
|
+
/**
|
|
1337
|
+
* Update_Batch
|
|
1338
|
+
*
|
|
1339
|
+
* Compiles an update string and runs the query
|
|
1340
|
+
*
|
|
1341
|
+
* @access public
|
|
1342
|
+
* @param string the table to retrieve the results from
|
|
1343
|
+
* @param array an associative array of update values
|
|
1344
|
+
* @param string the where key
|
|
1345
|
+
* @return object
|
|
1346
|
+
*/
|
|
1347
|
+
function update_batch($table = '', $set = NULL, $index = NULL)
|
|
1348
|
+
{
|
|
1349
|
+
// Combine any cached components with the current statements
|
|
1350
|
+
$this->_merge_cache();
|
|
1351
|
+
|
|
1352
|
+
if (is_null($index))
|
|
1353
|
+
{
|
|
1354
|
+
if ($this->db_debug)
|
|
1355
|
+
{
|
|
1356
|
+
return $this->display_error('db_myst_use_index');
|
|
1357
|
+
}
|
|
1358
|
+
|
|
1359
|
+
return FALSE;
|
|
1360
|
+
}
|
|
1361
|
+
|
|
1362
|
+
if ( ! is_null($set))
|
|
1363
|
+
{
|
|
1364
|
+
$this->set_update_batch($set, $index);
|
|
1365
|
+
}
|
|
1366
|
+
|
|
1367
|
+
if (count($this->ar_set) == 0)
|
|
1368
|
+
{
|
|
1369
|
+
if ($this->db_debug)
|
|
1370
|
+
{
|
|
1371
|
+
return $this->display_error('db_must_use_set');
|
|
1372
|
+
}
|
|
1373
|
+
|
|
1374
|
+
return FALSE;
|
|
1375
|
+
}
|
|
1376
|
+
|
|
1377
|
+
if ($table == '')
|
|
1378
|
+
{
|
|
1379
|
+
if ( ! isset($this->ar_from[0]))
|
|
1380
|
+
{
|
|
1381
|
+
if ($this->db_debug)
|
|
1382
|
+
{
|
|
1383
|
+
return $this->display_error('db_must_set_table');
|
|
1384
|
+
}
|
|
1385
|
+
return FALSE;
|
|
1386
|
+
}
|
|
1387
|
+
|
|
1388
|
+
$table = $this->ar_from[0];
|
|
1389
|
+
}
|
|
1390
|
+
|
|
1391
|
+
// Batch this baby
|
|
1392
|
+
for ($i = 0, $total = count($this->ar_set); $i < $total; $i = $i + 100)
|
|
1393
|
+
{
|
|
1394
|
+
$sql = $this->_update_batch($this->_protect_identifiers($table, TRUE, NULL, FALSE), array_slice($this->ar_set, $i, 100), $this->_protect_identifiers($index), $this->ar_where);
|
|
1395
|
+
|
|
1396
|
+
$this->query($sql);
|
|
1397
|
+
}
|
|
1398
|
+
|
|
1399
|
+
$this->_reset_write();
|
|
1400
|
+
}
|
|
1401
|
+
|
|
1402
|
+
// --------------------------------------------------------------------
|
|
1403
|
+
|
|
1404
|
+
/**
|
|
1405
|
+
* The "set_update_batch" function. Allows key/value pairs to be set for batch updating
|
|
1406
|
+
*
|
|
1407
|
+
* @access public
|
|
1408
|
+
* @param array
|
|
1409
|
+
* @param string
|
|
1410
|
+
* @param boolean
|
|
1411
|
+
* @return object
|
|
1412
|
+
*/
|
|
1413
|
+
|
|
1414
|
+
function set_update_batch($key, $index = '', $escape = TRUE)
|
|
1415
|
+
{
|
|
1416
|
+
$key = $this->_object_to_array_batch($key);
|
|
1417
|
+
|
|
1418
|
+
if ( ! is_array($key))
|
|
1419
|
+
{
|
|
1420
|
+
// @todo error
|
|
1421
|
+
}
|
|
1422
|
+
|
|
1423
|
+
foreach ($key as $k => $v)
|
|
1424
|
+
{
|
|
1425
|
+
$index_set = FALSE;
|
|
1426
|
+
$clean = array();
|
|
1427
|
+
|
|
1428
|
+
foreach($v as $k2 => $v2)
|
|
1429
|
+
{
|
|
1430
|
+
if ($k2 == $index)
|
|
1431
|
+
{
|
|
1432
|
+
$index_set = TRUE;
|
|
1433
|
+
}
|
|
1434
|
+
else
|
|
1435
|
+
{
|
|
1436
|
+
$not[] = $k.'-'.$v;
|
|
1437
|
+
}
|
|
1438
|
+
|
|
1439
|
+
if ($escape === FALSE)
|
|
1440
|
+
{
|
|
1441
|
+
$clean[$this->_protect_identifiers($k2)] = $v2;
|
|
1442
|
+
}
|
|
1443
|
+
else
|
|
1444
|
+
{
|
|
1445
|
+
$clean[$this->_protect_identifiers($k2)] = $this->escape($v2);
|
|
1446
|
+
}
|
|
1447
|
+
}
|
|
1448
|
+
|
|
1449
|
+
if ($index_set == FALSE)
|
|
1450
|
+
{
|
|
1451
|
+
return $this->display_error('db_batch_missing_index');
|
|
1452
|
+
}
|
|
1453
|
+
|
|
1454
|
+
$this->ar_set[] = $clean;
|
|
1455
|
+
}
|
|
1456
|
+
|
|
1457
|
+
return $this;
|
|
1458
|
+
}
|
|
1459
|
+
|
|
1248
1460
|
// --------------------------------------------------------------------
|
|
1249
1461
|
|
|
1250
1462
|
/**
|
|
@@ -1279,7 +1491,7 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
1279
1491
|
$sql = $this->_delete($table);
|
|
1280
1492
|
|
|
1281
1493
|
$this->_reset_write();
|
|
1282
|
-
|
|
1494
|
+
|
|
1283
1495
|
return $this->query($sql);
|
|
1284
1496
|
}
|
|
1285
1497
|
|
|
@@ -1319,10 +1531,10 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
1319
1531
|
$sql = $this->_truncate($table);
|
|
1320
1532
|
|
|
1321
1533
|
$this->_reset_write();
|
|
1322
|
-
|
|
1534
|
+
|
|
1323
1535
|
return $this->query($sql);
|
|
1324
1536
|
}
|
|
1325
|
-
|
|
1537
|
+
|
|
1326
1538
|
// --------------------------------------------------------------------
|
|
1327
1539
|
|
|
1328
1540
|
/**
|
|
@@ -1388,7 +1600,7 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
1388
1600
|
}
|
|
1389
1601
|
|
|
1390
1602
|
return FALSE;
|
|
1391
|
-
}
|
|
1603
|
+
}
|
|
1392
1604
|
|
|
1393
1605
|
$sql = $this->_delete($table, $this->ar_where, $this->ar_like, $this->ar_limit);
|
|
1394
1606
|
|
|
@@ -1396,7 +1608,7 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
1396
1608
|
{
|
|
1397
1609
|
$this->_reset_write();
|
|
1398
1610
|
}
|
|
1399
|
-
|
|
1611
|
+
|
|
1400
1612
|
return $this->query($sql);
|
|
1401
1613
|
}
|
|
1402
1614
|
|
|
@@ -1431,7 +1643,7 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
1431
1643
|
* @access private
|
|
1432
1644
|
* @param string The table to inspect
|
|
1433
1645
|
* @return string
|
|
1434
|
-
*/
|
|
1646
|
+
*/
|
|
1435
1647
|
function _track_aliases($table)
|
|
1436
1648
|
{
|
|
1437
1649
|
if (is_array($table))
|
|
@@ -1442,23 +1654,23 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
1442
1654
|
}
|
|
1443
1655
|
return;
|
|
1444
1656
|
}
|
|
1445
|
-
|
|
1657
|
+
|
|
1446
1658
|
// Does the string contain a comma? If so, we need to separate
|
|
1447
1659
|
// the string into discreet statements
|
|
1448
1660
|
if (strpos($table, ',') !== FALSE)
|
|
1449
1661
|
{
|
|
1450
1662
|
return $this->_track_aliases(explode(',', $table));
|
|
1451
1663
|
}
|
|
1452
|
-
|
|
1664
|
+
|
|
1453
1665
|
// if a table alias is used we can recognize it by a space
|
|
1454
1666
|
if (strpos($table, " ") !== FALSE)
|
|
1455
1667
|
{
|
|
1456
1668
|
// if the alias is written with the AS keyword, remove it
|
|
1457
1669
|
$table = preg_replace('/ AS /i', ' ', $table);
|
|
1458
|
-
|
|
1670
|
+
|
|
1459
1671
|
// Grab the alias
|
|
1460
1672
|
$table = trim(strrchr($table, " "));
|
|
1461
|
-
|
|
1673
|
+
|
|
1462
1674
|
// Store the alias, if it doesn't already exist
|
|
1463
1675
|
if ( ! in_array($table, $this->ar_aliased_tables))
|
|
1464
1676
|
{
|
|
@@ -1484,7 +1696,7 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
1484
1696
|
$this->_merge_cache();
|
|
1485
1697
|
|
|
1486
1698
|
// ----------------------------------------------------------------
|
|
1487
|
-
|
|
1699
|
+
|
|
1488
1700
|
// Write the "select" portion of the query
|
|
1489
1701
|
|
|
1490
1702
|
if ($select_override !== FALSE)
|
|
@@ -1494,13 +1706,13 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
1494
1706
|
else
|
|
1495
1707
|
{
|
|
1496
1708
|
$sql = ( ! $this->ar_distinct) ? 'SELECT ' : 'SELECT DISTINCT ';
|
|
1497
|
-
|
|
1709
|
+
|
|
1498
1710
|
if (count($this->ar_select) == 0)
|
|
1499
1711
|
{
|
|
1500
|
-
$sql .= '*';
|
|
1712
|
+
$sql .= '*';
|
|
1501
1713
|
}
|
|
1502
1714
|
else
|
|
1503
|
-
{
|
|
1715
|
+
{
|
|
1504
1716
|
// Cycle through the "select" portion of the query and prep each column name.
|
|
1505
1717
|
// The reason we protect identifiers here rather then in the select() function
|
|
1506
1718
|
// is because until the user calls the from() function we don't know if there are aliases
|
|
@@ -1508,13 +1720,13 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
1508
1720
|
{
|
|
1509
1721
|
$this->ar_select[$key] = $this->_protect_identifiers($val);
|
|
1510
1722
|
}
|
|
1511
|
-
|
|
1723
|
+
|
|
1512
1724
|
$sql .= implode(', ', $this->ar_select);
|
|
1513
1725
|
}
|
|
1514
1726
|
}
|
|
1515
1727
|
|
|
1516
1728
|
// ----------------------------------------------------------------
|
|
1517
|
-
|
|
1729
|
+
|
|
1518
1730
|
// Write the "FROM" portion of the query
|
|
1519
1731
|
|
|
1520
1732
|
if (count($this->ar_from) > 0)
|
|
@@ -1525,7 +1737,7 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
1525
1737
|
}
|
|
1526
1738
|
|
|
1527
1739
|
// ----------------------------------------------------------------
|
|
1528
|
-
|
|
1740
|
+
|
|
1529
1741
|
// Write the "JOIN" portion of the query
|
|
1530
1742
|
|
|
1531
1743
|
if (count($this->ar_join) > 0)
|
|
@@ -1536,7 +1748,7 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
1536
1748
|
}
|
|
1537
1749
|
|
|
1538
1750
|
// ----------------------------------------------------------------
|
|
1539
|
-
|
|
1751
|
+
|
|
1540
1752
|
// Write the "WHERE" portion of the query
|
|
1541
1753
|
|
|
1542
1754
|
if (count($this->ar_where) > 0 OR count($this->ar_like) > 0)
|
|
@@ -1549,9 +1761,9 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
1549
1761
|
$sql .= implode("\n", $this->ar_where);
|
|
1550
1762
|
|
|
1551
1763
|
// ----------------------------------------------------------------
|
|
1552
|
-
|
|
1764
|
+
|
|
1553
1765
|
// Write the "LIKE" portion of the query
|
|
1554
|
-
|
|
1766
|
+
|
|
1555
1767
|
if (count($this->ar_like) > 0)
|
|
1556
1768
|
{
|
|
1557
1769
|
if (count($this->ar_where) > 0)
|
|
@@ -1563,20 +1775,20 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
1563
1775
|
}
|
|
1564
1776
|
|
|
1565
1777
|
// ----------------------------------------------------------------
|
|
1566
|
-
|
|
1778
|
+
|
|
1567
1779
|
// Write the "GROUP BY" portion of the query
|
|
1568
|
-
|
|
1780
|
+
|
|
1569
1781
|
if (count($this->ar_groupby) > 0)
|
|
1570
1782
|
{
|
|
1571
1783
|
$sql .= "\nGROUP BY ";
|
|
1572
|
-
|
|
1784
|
+
|
|
1573
1785
|
$sql .= implode(', ', $this->ar_groupby);
|
|
1574
1786
|
}
|
|
1575
1787
|
|
|
1576
1788
|
// ----------------------------------------------------------------
|
|
1577
|
-
|
|
1789
|
+
|
|
1578
1790
|
// Write the "HAVING" portion of the query
|
|
1579
|
-
|
|
1791
|
+
|
|
1580
1792
|
if (count($this->ar_having) > 0)
|
|
1581
1793
|
{
|
|
1582
1794
|
$sql .= "\nHAVING ";
|
|
@@ -1584,24 +1796,24 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
1584
1796
|
}
|
|
1585
1797
|
|
|
1586
1798
|
// ----------------------------------------------------------------
|
|
1587
|
-
|
|
1799
|
+
|
|
1588
1800
|
// Write the "ORDER BY" portion of the query
|
|
1589
1801
|
|
|
1590
1802
|
if (count($this->ar_orderby) > 0)
|
|
1591
1803
|
{
|
|
1592
1804
|
$sql .= "\nORDER BY ";
|
|
1593
1805
|
$sql .= implode(', ', $this->ar_orderby);
|
|
1594
|
-
|
|
1806
|
+
|
|
1595
1807
|
if ($this->ar_order !== FALSE)
|
|
1596
1808
|
{
|
|
1597
1809
|
$sql .= ($this->ar_order == 'desc') ? ' DESC' : ' ASC';
|
|
1598
|
-
}
|
|
1810
|
+
}
|
|
1599
1811
|
}
|
|
1600
1812
|
|
|
1601
1813
|
// ----------------------------------------------------------------
|
|
1602
|
-
|
|
1814
|
+
|
|
1603
1815
|
// Write the "LIMIT" portion of the query
|
|
1604
|
-
|
|
1816
|
+
|
|
1605
1817
|
if (is_numeric($this->ar_limit))
|
|
1606
1818
|
{
|
|
1607
1819
|
$sql .= "\n";
|
|
@@ -1628,20 +1840,60 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
1628
1840
|
{
|
|
1629
1841
|
return $object;
|
|
1630
1842
|
}
|
|
1631
|
-
|
|
1843
|
+
|
|
1632
1844
|
$array = array();
|
|
1633
1845
|
foreach (get_object_vars($object) as $key => $val)
|
|
1634
1846
|
{
|
|
1635
1847
|
// There are some built in keys we need to ignore for this conversion
|
|
1636
|
-
if ( ! is_object($val) && ! is_array($val) && $key != '_parent_name'
|
|
1848
|
+
if ( ! is_object($val) && ! is_array($val) && $key != '_parent_name')
|
|
1637
1849
|
{
|
|
1638
1850
|
$array[$key] = $val;
|
|
1639
1851
|
}
|
|
1640
1852
|
}
|
|
1641
|
-
|
|
1853
|
+
|
|
1854
|
+
return $array;
|
|
1855
|
+
}
|
|
1856
|
+
|
|
1857
|
+
// --------------------------------------------------------------------
|
|
1858
|
+
|
|
1859
|
+
/**
|
|
1860
|
+
* Object to Array
|
|
1861
|
+
*
|
|
1862
|
+
* Takes an object as input and converts the class variables to array key/vals
|
|
1863
|
+
*
|
|
1864
|
+
* @access public
|
|
1865
|
+
* @param object
|
|
1866
|
+
* @return array
|
|
1867
|
+
*/
|
|
1868
|
+
function _object_to_array_batch($object)
|
|
1869
|
+
{
|
|
1870
|
+
if ( ! is_object($object))
|
|
1871
|
+
{
|
|
1872
|
+
return $object;
|
|
1873
|
+
}
|
|
1874
|
+
|
|
1875
|
+
$array = array();
|
|
1876
|
+
$out = get_object_vars($object);
|
|
1877
|
+
$fields = array_keys($out);
|
|
1878
|
+
|
|
1879
|
+
foreach ($fields as $val)
|
|
1880
|
+
{
|
|
1881
|
+
// There are some built in keys we need to ignore for this conversion
|
|
1882
|
+
if ($val != '_parent_name')
|
|
1883
|
+
{
|
|
1884
|
+
|
|
1885
|
+
$i = 0;
|
|
1886
|
+
foreach ($out[$val] as $data)
|
|
1887
|
+
{
|
|
1888
|
+
$array[$i][$val] = $data;
|
|
1889
|
+
$i++;
|
|
1890
|
+
}
|
|
1891
|
+
}
|
|
1892
|
+
}
|
|
1893
|
+
|
|
1642
1894
|
return $array;
|
|
1643
1895
|
}
|
|
1644
|
-
|
|
1896
|
+
|
|
1645
1897
|
// --------------------------------------------------------------------
|
|
1646
1898
|
|
|
1647
1899
|
/**
|
|
@@ -1651,7 +1903,7 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
1651
1903
|
*
|
|
1652
1904
|
* @access public
|
|
1653
1905
|
* @return void
|
|
1654
|
-
*/
|
|
1906
|
+
*/
|
|
1655
1907
|
function start_cache()
|
|
1656
1908
|
{
|
|
1657
1909
|
$this->ar_caching = TRUE;
|
|
@@ -1666,7 +1918,7 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
1666
1918
|
*
|
|
1667
1919
|
* @access public
|
|
1668
1920
|
* @return void
|
|
1669
|
-
*/
|
|
1921
|
+
*/
|
|
1670
1922
|
function stop_cache()
|
|
1671
1923
|
{
|
|
1672
1924
|
$this->ar_caching = FALSE;
|
|
@@ -1681,23 +1933,23 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
1681
1933
|
*
|
|
1682
1934
|
* @access public
|
|
1683
1935
|
* @return void
|
|
1684
|
-
*/
|
|
1936
|
+
*/
|
|
1685
1937
|
function flush_cache()
|
|
1686
|
-
{
|
|
1938
|
+
{
|
|
1687
1939
|
$this->_reset_run(
|
|
1688
1940
|
array(
|
|
1689
|
-
'ar_cache_select' => array(),
|
|
1690
|
-
'ar_cache_from' => array(),
|
|
1941
|
+
'ar_cache_select' => array(),
|
|
1942
|
+
'ar_cache_from' => array(),
|
|
1691
1943
|
'ar_cache_join' => array(),
|
|
1692
|
-
'ar_cache_where' => array(),
|
|
1693
|
-
'ar_cache_like' => array(),
|
|
1694
|
-
'ar_cache_groupby' => array(),
|
|
1695
|
-
'ar_cache_having' => array(),
|
|
1696
|
-
'ar_cache_orderby' => array(),
|
|
1944
|
+
'ar_cache_where' => array(),
|
|
1945
|
+
'ar_cache_like' => array(),
|
|
1946
|
+
'ar_cache_groupby' => array(),
|
|
1947
|
+
'ar_cache_having' => array(),
|
|
1948
|
+
'ar_cache_orderby' => array(),
|
|
1697
1949
|
'ar_cache_set' => array(),
|
|
1698
1950
|
'ar_cache_exists' => array()
|
|
1699
1951
|
)
|
|
1700
|
-
);
|
|
1952
|
+
);
|
|
1701
1953
|
}
|
|
1702
1954
|
|
|
1703
1955
|
// --------------------------------------------------------------------
|
|
@@ -1705,7 +1957,7 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
1705
1957
|
/**
|
|
1706
1958
|
* Merge Cache
|
|
1707
1959
|
*
|
|
1708
|
-
* When called, this function merges any cached AR arrays with
|
|
1960
|
+
* When called, this function merges any cached AR arrays with
|
|
1709
1961
|
* locally called ones.
|
|
1710
1962
|
*
|
|
1711
1963
|
* @access private
|
|
@@ -1770,50 +2022,51 @@ class CI_DB_active_record extends CI_DB_driver {
|
|
|
1770
2022
|
function _reset_select()
|
|
1771
2023
|
{
|
|
1772
2024
|
$ar_reset_items = array(
|
|
1773
|
-
'ar_select' => array(),
|
|
1774
|
-
'ar_from' => array(),
|
|
1775
|
-
'ar_join' => array(),
|
|
1776
|
-
'ar_where' => array(),
|
|
1777
|
-
'ar_like' => array(),
|
|
1778
|
-
'ar_groupby' => array(),
|
|
1779
|
-
'ar_having' => array(),
|
|
1780
|
-
'ar_orderby' => array(),
|
|
1781
|
-
'ar_wherein' => array(),
|
|
2025
|
+
'ar_select' => array(),
|
|
2026
|
+
'ar_from' => array(),
|
|
2027
|
+
'ar_join' => array(),
|
|
2028
|
+
'ar_where' => array(),
|
|
2029
|
+
'ar_like' => array(),
|
|
2030
|
+
'ar_groupby' => array(),
|
|
2031
|
+
'ar_having' => array(),
|
|
2032
|
+
'ar_orderby' => array(),
|
|
2033
|
+
'ar_wherein' => array(),
|
|
1782
2034
|
'ar_aliased_tables' => array(),
|
|
1783
|
-
'ar_distinct' => FALSE,
|
|
1784
|
-
'ar_limit' => FALSE,
|
|
1785
|
-
'ar_offset' => FALSE,
|
|
2035
|
+
'ar_distinct' => FALSE,
|
|
2036
|
+
'ar_limit' => FALSE,
|
|
2037
|
+
'ar_offset' => FALSE,
|
|
1786
2038
|
'ar_order' => FALSE,
|
|
1787
2039
|
);
|
|
1788
|
-
|
|
2040
|
+
|
|
1789
2041
|
$this->_reset_run($ar_reset_items);
|
|
1790
2042
|
}
|
|
1791
|
-
|
|
2043
|
+
|
|
1792
2044
|
// --------------------------------------------------------------------
|
|
1793
2045
|
|
|
1794
2046
|
/**
|
|
1795
2047
|
* Resets the active record "write" values.
|
|
1796
2048
|
*
|
|
1797
|
-
* Called by the insert() update() and delete() functions
|
|
2049
|
+
* Called by the insert() update() insert_batch() update_batch() and delete() functions
|
|
1798
2050
|
*
|
|
1799
2051
|
* @access private
|
|
1800
2052
|
* @return void
|
|
1801
2053
|
*/
|
|
1802
2054
|
function _reset_write()
|
|
1803
|
-
{
|
|
2055
|
+
{
|
|
1804
2056
|
$ar_reset_items = array(
|
|
1805
|
-
'ar_set' => array(),
|
|
1806
|
-
'ar_from' => array(),
|
|
1807
|
-
'ar_where' => array(),
|
|
2057
|
+
'ar_set' => array(),
|
|
2058
|
+
'ar_from' => array(),
|
|
2059
|
+
'ar_where' => array(),
|
|
1808
2060
|
'ar_like' => array(),
|
|
1809
|
-
'ar_orderby' => array(),
|
|
1810
|
-
'
|
|
2061
|
+
'ar_orderby' => array(),
|
|
2062
|
+
'ar_keys' => array(),
|
|
2063
|
+
'ar_limit' => FALSE,
|
|
1811
2064
|
'ar_order' => FALSE
|
|
1812
2065
|
);
|
|
1813
2066
|
|
|
1814
2067
|
$this->_reset_run($ar_reset_items);
|
|
1815
2068
|
}
|
|
1816
|
-
|
|
2069
|
+
|
|
1817
2070
|
}
|
|
1818
2071
|
|
|
1819
2072
|
/* End of file DB_active_rec.php */
|