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
|
|
@@ -25,59 +25,59 @@
|
|
|
25
25
|
* @link http://codeigniter.com/user_guide/libraries/file_uploading.html
|
|
26
26
|
*/
|
|
27
27
|
class CI_Upload {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
28
|
+
|
|
29
|
+
public $max_size = 0;
|
|
30
|
+
public $max_width = 0;
|
|
31
|
+
public $max_height = 0;
|
|
32
|
+
public $max_filename = 0;
|
|
33
|
+
public $allowed_types = "";
|
|
34
|
+
public $file_temp = "";
|
|
35
|
+
public $file_name = "";
|
|
36
|
+
public $orig_name = "";
|
|
37
|
+
public $file_type = "";
|
|
38
|
+
public $file_size = "";
|
|
39
|
+
public $file_ext = "";
|
|
40
|
+
public $upload_path = "";
|
|
41
|
+
public $overwrite = FALSE;
|
|
42
|
+
public $encrypt_name = FALSE;
|
|
43
|
+
public $is_image = FALSE;
|
|
44
|
+
public $image_width = '';
|
|
45
|
+
public $image_height = '';
|
|
46
|
+
public $image_type = '';
|
|
47
|
+
public $image_size_str = '';
|
|
48
|
+
public $error_msg = array();
|
|
49
|
+
public $mimes = array();
|
|
50
|
+
public $remove_spaces = TRUE;
|
|
51
|
+
public $xss_clean = FALSE;
|
|
52
|
+
public $temp_prefix = "temp_file_";
|
|
53
|
+
public $client_name = '';
|
|
54
|
+
|
|
55
|
+
protected $_file_name_override = '';
|
|
56
|
+
|
|
56
57
|
/**
|
|
57
58
|
* Constructor
|
|
58
59
|
*
|
|
59
60
|
* @access public
|
|
60
61
|
*/
|
|
61
|
-
function
|
|
62
|
+
public function __construct($props = array())
|
|
62
63
|
{
|
|
63
64
|
if (count($props) > 0)
|
|
64
65
|
{
|
|
65
66
|
$this->initialize($props);
|
|
66
67
|
}
|
|
67
|
-
|
|
68
|
+
|
|
68
69
|
log_message('debug', "Upload Class Initialized");
|
|
69
70
|
}
|
|
70
|
-
|
|
71
|
+
|
|
71
72
|
// --------------------------------------------------------------------
|
|
72
|
-
|
|
73
|
+
|
|
73
74
|
/**
|
|
74
75
|
* Initialize preferences
|
|
75
76
|
*
|
|
76
|
-
* @access public
|
|
77
77
|
* @param array
|
|
78
78
|
* @return void
|
|
79
|
-
*/
|
|
80
|
-
function initialize($config = array())
|
|
79
|
+
*/
|
|
80
|
+
public function initialize($config = array())
|
|
81
81
|
{
|
|
82
82
|
$defaults = array(
|
|
83
83
|
'max_size' => 0,
|
|
@@ -105,9 +105,9 @@ class CI_Upload {
|
|
|
105
105
|
'xss_clean' => FALSE,
|
|
106
106
|
'temp_prefix' => "temp_file_",
|
|
107
107
|
'client_name' => ''
|
|
108
|
-
);
|
|
109
|
-
|
|
110
|
-
|
|
108
|
+
);
|
|
109
|
+
|
|
110
|
+
|
|
111
111
|
foreach ($defaults as $key => $val)
|
|
112
112
|
{
|
|
113
113
|
if (isset($config[$key]))
|
|
@@ -120,28 +120,27 @@ class CI_Upload {
|
|
|
120
120
|
else
|
|
121
121
|
{
|
|
122
122
|
$this->$key = $config[$key];
|
|
123
|
-
}
|
|
123
|
+
}
|
|
124
124
|
}
|
|
125
125
|
else
|
|
126
126
|
{
|
|
127
127
|
$this->$key = $val;
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
|
-
|
|
130
|
+
|
|
131
131
|
// if a file_name was provided in the config, use it instead of the user input
|
|
132
132
|
// supplied file name for all uploads until initialized again
|
|
133
133
|
$this->_file_name_override = $this->file_name;
|
|
134
134
|
}
|
|
135
|
-
|
|
135
|
+
|
|
136
136
|
// --------------------------------------------------------------------
|
|
137
|
-
|
|
137
|
+
|
|
138
138
|
/**
|
|
139
139
|
* Perform the file upload
|
|
140
140
|
*
|
|
141
|
-
* @access public
|
|
142
141
|
* @return bool
|
|
143
|
-
*/
|
|
144
|
-
function do_upload($field = 'userfile')
|
|
142
|
+
*/
|
|
143
|
+
public function do_upload($field = 'userfile')
|
|
145
144
|
{
|
|
146
145
|
// Is $_FILES[$field] set? If not, no reason to continue.
|
|
147
146
|
if ( ! isset($_FILES[$field]))
|
|
@@ -149,7 +148,7 @@ class CI_Upload {
|
|
|
149
148
|
$this->set_error('upload_no_file_selected');
|
|
150
149
|
return FALSE;
|
|
151
150
|
}
|
|
152
|
-
|
|
151
|
+
|
|
153
152
|
// Is the upload path valid?
|
|
154
153
|
if ( ! $this->validate_upload_path())
|
|
155
154
|
{
|
|
@@ -171,10 +170,10 @@ class CI_Upload {
|
|
|
171
170
|
$this->set_error('upload_file_exceeds_form_limit');
|
|
172
171
|
break;
|
|
173
172
|
case 3: // UPLOAD_ERR_PARTIAL
|
|
174
|
-
|
|
173
|
+
$this->set_error('upload_file_partial');
|
|
175
174
|
break;
|
|
176
175
|
case 4: // UPLOAD_ERR_NO_FILE
|
|
177
|
-
|
|
176
|
+
$this->set_error('upload_no_file_selected');
|
|
178
177
|
break;
|
|
179
178
|
case 6: // UPLOAD_ERR_NO_TMP_DIR
|
|
180
179
|
$this->set_error('upload_no_temp_directory');
|
|
@@ -192,9 +191,10 @@ class CI_Upload {
|
|
|
192
191
|
return FALSE;
|
|
193
192
|
}
|
|
194
193
|
|
|
194
|
+
|
|
195
195
|
// Set the uploaded data as class variables
|
|
196
|
-
$this->file_temp = $_FILES[$field]['tmp_name'];
|
|
197
|
-
$this->file_size = $_FILES[$field]['size'];
|
|
196
|
+
$this->file_temp = $_FILES[$field]['tmp_name'];
|
|
197
|
+
$this->file_size = $_FILES[$field]['size'];
|
|
198
198
|
$this->file_type = preg_replace("/^(.+?);.*$/", "\\1", $_FILES[$field]['type']);
|
|
199
199
|
$this->file_type = strtolower(trim(stripslashes($this->file_type), '"'));
|
|
200
200
|
$this->file_name = $this->_prep_filename($_FILES[$field]['name']);
|
|
@@ -207,20 +207,31 @@ class CI_Upload {
|
|
|
207
207
|
$this->set_error('upload_invalid_filetype');
|
|
208
208
|
return FALSE;
|
|
209
209
|
}
|
|
210
|
-
|
|
210
|
+
|
|
211
211
|
// if we're overriding, let's now make sure the new name and type is allowed
|
|
212
212
|
if ($this->_file_name_override != '')
|
|
213
213
|
{
|
|
214
214
|
$this->file_name = $this->_prep_filename($this->_file_name_override);
|
|
215
|
-
|
|
215
|
+
|
|
216
|
+
// If no extension was provided in the file_name config item, use the uploaded one
|
|
217
|
+
if(strpos($this->_file_name_override, '.') === FALSE)
|
|
218
|
+
{
|
|
219
|
+
$this->file_name .= $this->file_ext;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
// An extension was provided, lets have it!
|
|
223
|
+
else
|
|
224
|
+
{
|
|
225
|
+
$this->file_ext = $this->get_extension($this->_file_name_override);
|
|
226
|
+
}
|
|
216
227
|
|
|
217
228
|
if ( ! $this->is_allowed_filetype(TRUE))
|
|
218
229
|
{
|
|
219
230
|
$this->set_error('upload_invalid_filetype');
|
|
220
|
-
return FALSE;
|
|
231
|
+
return FALSE;
|
|
221
232
|
}
|
|
222
233
|
}
|
|
223
|
-
|
|
234
|
+
|
|
224
235
|
// Convert the file size to kilobytes
|
|
225
236
|
if ($this->file_size > 0)
|
|
226
237
|
{
|
|
@@ -244,7 +255,7 @@ class CI_Upload {
|
|
|
244
255
|
|
|
245
256
|
// Sanitize the file name for security
|
|
246
257
|
$this->file_name = $this->clean_file_name($this->file_name);
|
|
247
|
-
|
|
258
|
+
|
|
248
259
|
// Truncate the file name if it's too long
|
|
249
260
|
if ($this->max_filename > 0)
|
|
250
261
|
{
|
|
@@ -268,13 +279,28 @@ class CI_Upload {
|
|
|
268
279
|
if ($this->overwrite == FALSE)
|
|
269
280
|
{
|
|
270
281
|
$this->file_name = $this->set_filename($this->upload_path, $this->file_name);
|
|
271
|
-
|
|
282
|
+
|
|
272
283
|
if ($this->file_name === FALSE)
|
|
273
284
|
{
|
|
274
285
|
return FALSE;
|
|
275
286
|
}
|
|
276
287
|
}
|
|
277
288
|
|
|
289
|
+
/*
|
|
290
|
+
* Run the file through the XSS hacking filter
|
|
291
|
+
* This helps prevent malicious code from being
|
|
292
|
+
* embedded within a file. Scripts can easily
|
|
293
|
+
* be disguised as images or other file types.
|
|
294
|
+
*/
|
|
295
|
+
if ($this->xss_clean)
|
|
296
|
+
{
|
|
297
|
+
if ($this->do_xss_clean() === FALSE)
|
|
298
|
+
{
|
|
299
|
+
$this->set_error('upload_unable_to_write_file');
|
|
300
|
+
return FALSE;
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
|
|
278
304
|
/*
|
|
279
305
|
* Move the file to the final destination
|
|
280
306
|
* To deal with different server configurations
|
|
@@ -286,21 +312,10 @@ class CI_Upload {
|
|
|
286
312
|
{
|
|
287
313
|
if ( ! @move_uploaded_file($this->file_temp, $this->upload_path.$this->file_name))
|
|
288
314
|
{
|
|
289
|
-
|
|
290
|
-
|
|
315
|
+
$this->set_error('upload_destination_error');
|
|
316
|
+
return FALSE;
|
|
291
317
|
}
|
|
292
318
|
}
|
|
293
|
-
|
|
294
|
-
/*
|
|
295
|
-
* Run the file through the XSS hacking filter
|
|
296
|
-
* This helps prevent malicious code from being
|
|
297
|
-
* embedded within a file. Scripts can easily
|
|
298
|
-
* be disguised as images or other file types.
|
|
299
|
-
*/
|
|
300
|
-
if ($this->xss_clean == TRUE)
|
|
301
|
-
{
|
|
302
|
-
$this->do_xss_clean();
|
|
303
|
-
}
|
|
304
319
|
|
|
305
320
|
/*
|
|
306
321
|
* Set the finalized image dimensions
|
|
@@ -312,19 +327,18 @@ class CI_Upload {
|
|
|
312
327
|
|
|
313
328
|
return TRUE;
|
|
314
329
|
}
|
|
315
|
-
|
|
330
|
+
|
|
316
331
|
// --------------------------------------------------------------------
|
|
317
|
-
|
|
332
|
+
|
|
318
333
|
/**
|
|
319
334
|
* Finalized Data Array
|
|
320
|
-
*
|
|
335
|
+
*
|
|
321
336
|
* Returns an associative array containing all of the information
|
|
322
337
|
* related to the upload, allowing the developer easy access in one array.
|
|
323
338
|
*
|
|
324
|
-
* @access public
|
|
325
339
|
* @return array
|
|
326
|
-
*/
|
|
327
|
-
function data()
|
|
340
|
+
*/
|
|
341
|
+
public function data()
|
|
328
342
|
{
|
|
329
343
|
return array (
|
|
330
344
|
'file_name' => $this->file_name,
|
|
@@ -343,24 +357,23 @@ class CI_Upload {
|
|
|
343
357
|
'image_size_str' => $this->image_size_str,
|
|
344
358
|
);
|
|
345
359
|
}
|
|
346
|
-
|
|
360
|
+
|
|
347
361
|
// --------------------------------------------------------------------
|
|
348
|
-
|
|
362
|
+
|
|
349
363
|
/**
|
|
350
364
|
* Set Upload Path
|
|
351
365
|
*
|
|
352
|
-
* @access public
|
|
353
366
|
* @param string
|
|
354
367
|
* @return void
|
|
355
|
-
*/
|
|
356
|
-
function set_upload_path($path)
|
|
368
|
+
*/
|
|
369
|
+
public function set_upload_path($path)
|
|
357
370
|
{
|
|
358
371
|
// Make sure it has a trailing slash
|
|
359
372
|
$this->upload_path = rtrim($path, '/').'/';
|
|
360
373
|
}
|
|
361
|
-
|
|
374
|
+
|
|
362
375
|
// --------------------------------------------------------------------
|
|
363
|
-
|
|
376
|
+
|
|
364
377
|
/**
|
|
365
378
|
* Set the file name
|
|
366
379
|
*
|
|
@@ -368,29 +381,28 @@ class CI_Upload {
|
|
|
368
381
|
* existence of a file with the same name. If found, it will append a
|
|
369
382
|
* number to the end of the filename to avoid overwriting a pre-existing file.
|
|
370
383
|
*
|
|
371
|
-
* @access public
|
|
372
384
|
* @param string
|
|
373
385
|
* @param string
|
|
374
386
|
* @return string
|
|
375
|
-
*/
|
|
376
|
-
function set_filename($path, $filename)
|
|
387
|
+
*/
|
|
388
|
+
public function set_filename($path, $filename)
|
|
377
389
|
{
|
|
378
390
|
if ($this->encrypt_name == TRUE)
|
|
379
|
-
{
|
|
391
|
+
{
|
|
380
392
|
mt_srand();
|
|
381
|
-
$filename = md5(uniqid(mt_rand())).$this->file_ext;
|
|
393
|
+
$filename = md5(uniqid(mt_rand())).$this->file_ext;
|
|
382
394
|
}
|
|
383
|
-
|
|
395
|
+
|
|
384
396
|
if ( ! file_exists($path.$filename))
|
|
385
397
|
{
|
|
386
398
|
return $filename;
|
|
387
399
|
}
|
|
388
|
-
|
|
400
|
+
|
|
389
401
|
$filename = str_replace($this->file_ext, '', $filename);
|
|
390
|
-
|
|
402
|
+
|
|
391
403
|
$new_filename = '';
|
|
392
404
|
for ($i = 1; $i < 100; $i++)
|
|
393
|
-
{
|
|
405
|
+
{
|
|
394
406
|
if ( ! file_exists($path.$filename.$i.$this->file_ext))
|
|
395
407
|
{
|
|
396
408
|
$new_filename = $filename.$i.$this->file_ext;
|
|
@@ -408,89 +420,88 @@ class CI_Upload {
|
|
|
408
420
|
return $new_filename;
|
|
409
421
|
}
|
|
410
422
|
}
|
|
411
|
-
|
|
423
|
+
|
|
412
424
|
// --------------------------------------------------------------------
|
|
413
|
-
|
|
425
|
+
|
|
414
426
|
/**
|
|
415
427
|
* Set Maximum File Size
|
|
416
428
|
*
|
|
417
|
-
* @access public
|
|
418
429
|
* @param integer
|
|
419
430
|
* @return void
|
|
420
|
-
*/
|
|
421
|
-
function set_max_filesize($n)
|
|
431
|
+
*/
|
|
432
|
+
public function set_max_filesize($n)
|
|
422
433
|
{
|
|
423
434
|
$this->max_size = ((int) $n < 0) ? 0: (int) $n;
|
|
424
435
|
}
|
|
425
|
-
|
|
436
|
+
|
|
426
437
|
// --------------------------------------------------------------------
|
|
427
|
-
|
|
438
|
+
|
|
428
439
|
/**
|
|
429
440
|
* Set Maximum File Name Length
|
|
430
441
|
*
|
|
431
|
-
* @access public
|
|
432
442
|
* @param integer
|
|
433
443
|
* @return void
|
|
434
|
-
*/
|
|
435
|
-
function set_max_filename($n)
|
|
444
|
+
*/
|
|
445
|
+
public function set_max_filename($n)
|
|
436
446
|
{
|
|
437
447
|
$this->max_filename = ((int) $n < 0) ? 0: (int) $n;
|
|
438
448
|
}
|
|
439
449
|
|
|
440
450
|
// --------------------------------------------------------------------
|
|
441
|
-
|
|
451
|
+
|
|
442
452
|
/**
|
|
443
453
|
* Set Maximum Image Width
|
|
444
454
|
*
|
|
445
|
-
* @access public
|
|
446
455
|
* @param integer
|
|
447
456
|
* @return void
|
|
448
|
-
*/
|
|
449
|
-
function set_max_width($n)
|
|
457
|
+
*/
|
|
458
|
+
public function set_max_width($n)
|
|
450
459
|
{
|
|
451
460
|
$this->max_width = ((int) $n < 0) ? 0: (int) $n;
|
|
452
461
|
}
|
|
453
|
-
|
|
462
|
+
|
|
454
463
|
// --------------------------------------------------------------------
|
|
455
|
-
|
|
464
|
+
|
|
456
465
|
/**
|
|
457
466
|
* Set Maximum Image Height
|
|
458
467
|
*
|
|
459
|
-
* @access public
|
|
460
468
|
* @param integer
|
|
461
469
|
* @return void
|
|
462
|
-
*/
|
|
463
|
-
function set_max_height($n)
|
|
470
|
+
*/
|
|
471
|
+
public function set_max_height($n)
|
|
464
472
|
{
|
|
465
473
|
$this->max_height = ((int) $n < 0) ? 0: (int) $n;
|
|
466
474
|
}
|
|
467
|
-
|
|
475
|
+
|
|
468
476
|
// --------------------------------------------------------------------
|
|
469
|
-
|
|
477
|
+
|
|
470
478
|
/**
|
|
471
479
|
* Set Allowed File Types
|
|
472
480
|
*
|
|
473
|
-
* @access public
|
|
474
481
|
* @param string
|
|
475
482
|
* @return void
|
|
476
|
-
*/
|
|
477
|
-
function set_allowed_types($types)
|
|
483
|
+
*/
|
|
484
|
+
public function set_allowed_types($types)
|
|
478
485
|
{
|
|
486
|
+
if ( ! is_array($types) && $types == '*')
|
|
487
|
+
{
|
|
488
|
+
$this->allowed_types = '*';
|
|
489
|
+
return;
|
|
490
|
+
}
|
|
479
491
|
$this->allowed_types = explode('|', $types);
|
|
480
492
|
}
|
|
481
|
-
|
|
493
|
+
|
|
482
494
|
// --------------------------------------------------------------------
|
|
483
|
-
|
|
495
|
+
|
|
484
496
|
/**
|
|
485
497
|
* Set Image Properties
|
|
486
498
|
*
|
|
487
499
|
* Uses GD to determine the width/height/type of image
|
|
488
500
|
*
|
|
489
|
-
* @access public
|
|
490
501
|
* @param string
|
|
491
502
|
* @return void
|
|
492
|
-
*/
|
|
493
|
-
function set_image_properties($path = '')
|
|
503
|
+
*/
|
|
504
|
+
public function set_image_properties($path = '')
|
|
494
505
|
{
|
|
495
506
|
if ( ! $this->is_image())
|
|
496
507
|
{
|
|
@@ -500,7 +511,7 @@ class CI_Upload {
|
|
|
500
511
|
if (function_exists('getimagesize'))
|
|
501
512
|
{
|
|
502
513
|
if (FALSE !== ($D = @getimagesize($path)))
|
|
503
|
-
{
|
|
514
|
+
{
|
|
504
515
|
$types = array(1 => 'gif', 2 => 'jpeg', 3 => 'png');
|
|
505
516
|
|
|
506
517
|
$this->image_width = $D['0'];
|
|
@@ -510,45 +521,43 @@ class CI_Upload {
|
|
|
510
521
|
}
|
|
511
522
|
}
|
|
512
523
|
}
|
|
513
|
-
|
|
524
|
+
|
|
514
525
|
// --------------------------------------------------------------------
|
|
515
|
-
|
|
526
|
+
|
|
516
527
|
/**
|
|
517
528
|
* Set XSS Clean
|
|
518
529
|
*
|
|
519
530
|
* Enables the XSS flag so that the file that was uploaded
|
|
520
531
|
* will be run through the XSS filter.
|
|
521
532
|
*
|
|
522
|
-
* @access public
|
|
523
533
|
* @param bool
|
|
524
534
|
* @return void
|
|
525
535
|
*/
|
|
526
|
-
function set_xss_clean($flag = FALSE)
|
|
536
|
+
public function set_xss_clean($flag = FALSE)
|
|
527
537
|
{
|
|
528
538
|
$this->xss_clean = ($flag == TRUE) ? TRUE : FALSE;
|
|
529
539
|
}
|
|
530
|
-
|
|
540
|
+
|
|
531
541
|
// --------------------------------------------------------------------
|
|
532
|
-
|
|
542
|
+
|
|
533
543
|
/**
|
|
534
544
|
* Validate the image
|
|
535
545
|
*
|
|
536
|
-
* @access public
|
|
537
546
|
* @return bool
|
|
538
|
-
*/
|
|
539
|
-
function is_image()
|
|
547
|
+
*/
|
|
548
|
+
public function is_image()
|
|
540
549
|
{
|
|
541
550
|
// IE will sometimes return odd mime-types during upload, so here we just standardize all
|
|
542
551
|
// jpegs or pngs to the same file type.
|
|
543
552
|
|
|
544
553
|
$png_mimes = array('image/x-png');
|
|
545
554
|
$jpeg_mimes = array('image/jpg', 'image/jpe', 'image/jpeg', 'image/pjpeg');
|
|
546
|
-
|
|
555
|
+
|
|
547
556
|
if (in_array($this->file_type, $png_mimes))
|
|
548
557
|
{
|
|
549
558
|
$this->file_type = 'image/png';
|
|
550
559
|
}
|
|
551
|
-
|
|
560
|
+
|
|
552
561
|
if (in_array($this->file_type, $jpeg_mimes))
|
|
553
562
|
{
|
|
554
563
|
$this->file_type = 'image/jpeg';
|
|
@@ -558,29 +567,33 @@ class CI_Upload {
|
|
|
558
567
|
'image/gif',
|
|
559
568
|
'image/jpeg',
|
|
560
569
|
'image/png',
|
|
561
|
-
|
|
570
|
+
);
|
|
562
571
|
|
|
563
572
|
return (in_array($this->file_type, $img_mimes, TRUE)) ? TRUE : FALSE;
|
|
564
573
|
}
|
|
565
|
-
|
|
574
|
+
|
|
566
575
|
// --------------------------------------------------------------------
|
|
567
|
-
|
|
576
|
+
|
|
568
577
|
/**
|
|
569
578
|
* Verify that the filetype is allowed
|
|
570
579
|
*
|
|
571
|
-
* @access public
|
|
572
580
|
* @return bool
|
|
573
|
-
*/
|
|
574
|
-
function is_allowed_filetype($ignore_mime = FALSE)
|
|
581
|
+
*/
|
|
582
|
+
public function is_allowed_filetype($ignore_mime = FALSE)
|
|
575
583
|
{
|
|
584
|
+
if ($this->allowed_types == '*')
|
|
585
|
+
{
|
|
586
|
+
return TRUE;
|
|
587
|
+
}
|
|
588
|
+
|
|
576
589
|
if (count($this->allowed_types) == 0 OR ! is_array($this->allowed_types))
|
|
577
590
|
{
|
|
578
591
|
$this->set_error('upload_no_file_types');
|
|
579
592
|
return FALSE;
|
|
580
593
|
}
|
|
581
|
-
|
|
594
|
+
|
|
582
595
|
$ext = strtolower(ltrim($this->file_ext, '.'));
|
|
583
|
-
|
|
596
|
+
|
|
584
597
|
if ( ! in_array($ext, $this->allowed_types))
|
|
585
598
|
{
|
|
586
599
|
return FALSE;
|
|
@@ -594,40 +607,39 @@ class CI_Upload {
|
|
|
594
607
|
if (getimagesize($this->file_temp) === FALSE)
|
|
595
608
|
{
|
|
596
609
|
return FALSE;
|
|
597
|
-
}
|
|
610
|
+
}
|
|
598
611
|
}
|
|
599
612
|
|
|
600
613
|
if ($ignore_mime === TRUE)
|
|
601
614
|
{
|
|
602
615
|
return TRUE;
|
|
603
616
|
}
|
|
604
|
-
|
|
617
|
+
|
|
605
618
|
$mime = $this->mimes_types($ext);
|
|
606
|
-
|
|
619
|
+
|
|
607
620
|
if (is_array($mime))
|
|
608
621
|
{
|
|
609
622
|
if (in_array($this->file_type, $mime, TRUE))
|
|
610
623
|
{
|
|
611
624
|
return TRUE;
|
|
612
|
-
}
|
|
625
|
+
}
|
|
613
626
|
}
|
|
614
627
|
elseif ($mime == $this->file_type)
|
|
615
628
|
{
|
|
616
629
|
return TRUE;
|
|
617
630
|
}
|
|
618
|
-
|
|
631
|
+
|
|
619
632
|
return FALSE;
|
|
620
633
|
}
|
|
621
|
-
|
|
634
|
+
|
|
622
635
|
// --------------------------------------------------------------------
|
|
623
|
-
|
|
636
|
+
|
|
624
637
|
/**
|
|
625
638
|
* Verify that the file is within the allowed size
|
|
626
639
|
*
|
|
627
|
-
* @access public
|
|
628
640
|
* @return bool
|
|
629
|
-
*/
|
|
630
|
-
function is_allowed_filesize()
|
|
641
|
+
*/
|
|
642
|
+
public function is_allowed_filesize()
|
|
631
643
|
{
|
|
632
644
|
if ($this->max_size != 0 AND $this->file_size > $this->max_size)
|
|
633
645
|
{
|
|
@@ -638,16 +650,15 @@ class CI_Upload {
|
|
|
638
650
|
return TRUE;
|
|
639
651
|
}
|
|
640
652
|
}
|
|
641
|
-
|
|
653
|
+
|
|
642
654
|
// --------------------------------------------------------------------
|
|
643
|
-
|
|
655
|
+
|
|
644
656
|
/**
|
|
645
657
|
* Verify that the image is within the allowed width/height
|
|
646
658
|
*
|
|
647
|
-
* @access public
|
|
648
659
|
* @return bool
|
|
649
|
-
*/
|
|
650
|
-
function is_allowed_dimensions()
|
|
660
|
+
*/
|
|
661
|
+
public function is_allowed_dimensions()
|
|
651
662
|
{
|
|
652
663
|
if ( ! $this->is_image())
|
|
653
664
|
{
|
|
@@ -673,26 +684,25 @@ class CI_Upload {
|
|
|
673
684
|
|
|
674
685
|
return TRUE;
|
|
675
686
|
}
|
|
676
|
-
|
|
687
|
+
|
|
677
688
|
// --------------------------------------------------------------------
|
|
678
|
-
|
|
689
|
+
|
|
679
690
|
/**
|
|
680
691
|
* Validate Upload Path
|
|
681
692
|
*
|
|
682
693
|
* Verifies that it is a valid upload path with proper permissions.
|
|
683
694
|
*
|
|
684
695
|
*
|
|
685
|
-
* @access public
|
|
686
696
|
* @return bool
|
|
687
|
-
*/
|
|
688
|
-
function validate_upload_path()
|
|
697
|
+
*/
|
|
698
|
+
public function validate_upload_path()
|
|
689
699
|
{
|
|
690
700
|
if ($this->upload_path == '')
|
|
691
701
|
{
|
|
692
702
|
$this->set_error('upload_no_filepath');
|
|
693
703
|
return FALSE;
|
|
694
704
|
}
|
|
695
|
-
|
|
705
|
+
|
|
696
706
|
if (function_exists('realpath') AND @realpath($this->upload_path) !== FALSE)
|
|
697
707
|
{
|
|
698
708
|
$this->upload_path = str_replace("\\", "/", realpath($this->upload_path));
|
|
@@ -713,32 +723,30 @@ class CI_Upload {
|
|
|
713
723
|
$this->upload_path = preg_replace("/(.+?)\/*$/", "\\1/", $this->upload_path);
|
|
714
724
|
return TRUE;
|
|
715
725
|
}
|
|
716
|
-
|
|
726
|
+
|
|
717
727
|
// --------------------------------------------------------------------
|
|
718
|
-
|
|
728
|
+
|
|
719
729
|
/**
|
|
720
730
|
* Extract the file extension
|
|
721
731
|
*
|
|
722
|
-
* @access public
|
|
723
732
|
* @param string
|
|
724
733
|
* @return string
|
|
725
|
-
*/
|
|
726
|
-
function get_extension($filename)
|
|
734
|
+
*/
|
|
735
|
+
public function get_extension($filename)
|
|
727
736
|
{
|
|
728
737
|
$x = explode('.', $filename);
|
|
729
738
|
return '.'.end($x);
|
|
730
|
-
}
|
|
731
|
-
|
|
739
|
+
}
|
|
740
|
+
|
|
732
741
|
// --------------------------------------------------------------------
|
|
733
|
-
|
|
742
|
+
|
|
734
743
|
/**
|
|
735
744
|
* Clean the file name for security
|
|
736
745
|
*
|
|
737
|
-
* @access public
|
|
738
746
|
* @param string
|
|
739
747
|
* @return string
|
|
740
|
-
*/
|
|
741
|
-
function clean_file_name($filename)
|
|
748
|
+
*/
|
|
749
|
+
public function clean_file_name($filename)
|
|
742
750
|
{
|
|
743
751
|
$bad = array(
|
|
744
752
|
"<!--",
|
|
@@ -756,40 +764,39 @@ class CI_Upload {
|
|
|
756
764
|
"%20",
|
|
757
765
|
"%22",
|
|
758
766
|
"%3c", // <
|
|
759
|
-
"%253c",
|
|
760
|
-
"%3e",
|
|
761
|
-
"%0e",
|
|
762
|
-
"%28",
|
|
763
|
-
"%29",
|
|
764
|
-
"%2528",
|
|
765
|
-
"%26",
|
|
766
|
-
"%24",
|
|
767
|
-
"%3f",
|
|
768
|
-
"%3b",
|
|
767
|
+
"%253c", // <
|
|
768
|
+
"%3e", // >
|
|
769
|
+
"%0e", // >
|
|
770
|
+
"%28", // (
|
|
771
|
+
"%29", // )
|
|
772
|
+
"%2528", // (
|
|
773
|
+
"%26", // &
|
|
774
|
+
"%24", // $
|
|
775
|
+
"%3f", // ?
|
|
776
|
+
"%3b", // ;
|
|
769
777
|
"%3d" // =
|
|
770
778
|
);
|
|
771
|
-
|
|
779
|
+
|
|
772
780
|
$filename = str_replace($bad, '', $filename);
|
|
773
781
|
|
|
774
782
|
return stripslashes($filename);
|
|
775
783
|
}
|
|
776
784
|
|
|
777
785
|
// --------------------------------------------------------------------
|
|
778
|
-
|
|
786
|
+
|
|
779
787
|
/**
|
|
780
788
|
* Limit the File Name Length
|
|
781
789
|
*
|
|
782
|
-
* @access public
|
|
783
790
|
* @param string
|
|
784
791
|
* @return string
|
|
785
|
-
*/
|
|
786
|
-
function limit_filename_length($filename, $length)
|
|
792
|
+
*/
|
|
793
|
+
public function limit_filename_length($filename, $length)
|
|
787
794
|
{
|
|
788
795
|
if (strlen($filename) < $length)
|
|
789
796
|
{
|
|
790
797
|
return $filename;
|
|
791
798
|
}
|
|
792
|
-
|
|
799
|
+
|
|
793
800
|
$ext = '';
|
|
794
801
|
if (strpos($filename, '.') !== FALSE)
|
|
795
802
|
{
|
|
@@ -797,12 +804,12 @@ class CI_Upload {
|
|
|
797
804
|
$ext = '.'.array_pop($parts);
|
|
798
805
|
$filename = implode('.', $parts);
|
|
799
806
|
}
|
|
800
|
-
|
|
807
|
+
|
|
801
808
|
return substr($filename, 0, ($length - strlen($ext))).$ext;
|
|
802
809
|
}
|
|
803
810
|
|
|
804
811
|
// --------------------------------------------------------------------
|
|
805
|
-
|
|
812
|
+
|
|
806
813
|
/**
|
|
807
814
|
* Runs the file through the XSS clean function
|
|
808
815
|
*
|
|
@@ -810,59 +817,93 @@ class CI_Upload {
|
|
|
810
817
|
* I'm not sure that it won't negatively affect certain files in unexpected ways,
|
|
811
818
|
* but so far I haven't found that it causes trouble.
|
|
812
819
|
*
|
|
813
|
-
* @access public
|
|
814
820
|
* @return void
|
|
815
|
-
*/
|
|
816
|
-
function do_xss_clean()
|
|
817
|
-
{
|
|
818
|
-
$file = $this->
|
|
819
|
-
|
|
821
|
+
*/
|
|
822
|
+
public function do_xss_clean()
|
|
823
|
+
{
|
|
824
|
+
$file = $this->file_temp;
|
|
825
|
+
|
|
820
826
|
if (filesize($file) == 0)
|
|
821
827
|
{
|
|
822
828
|
return FALSE;
|
|
823
829
|
}
|
|
824
830
|
|
|
831
|
+
if (function_exists('memory_get_usage') && memory_get_usage() && ini_get('memory_limit') != '')
|
|
832
|
+
{
|
|
833
|
+
$current = ini_get('memory_limit') * 1024 * 1024;
|
|
834
|
+
|
|
835
|
+
// There was a bug/behavioural change in PHP 5.2, where numbers over one million get output
|
|
836
|
+
// into scientific notation. number_format() ensures this number is an integer
|
|
837
|
+
// http://bugs.php.net/bug.php?id=43053
|
|
838
|
+
|
|
839
|
+
$new_memory = number_format(ceil(filesize($file) + $current), 0, '.', '');
|
|
840
|
+
|
|
841
|
+
ini_set('memory_limit', $new_memory); // When an integer is used, the value is measured in bytes. - PHP.net
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
// If the file being uploaded is an image, then we should have no problem with XSS attacks (in theory), but
|
|
845
|
+
// IE can be fooled into mime-type detecting a malformed image as an html file, thus executing an XSS attack on anyone
|
|
846
|
+
// using IE who looks at the image. It does this by inspecting the first 255 bytes of an image. To get around this
|
|
847
|
+
// CI will itself look at the first 255 bytes of an image to determine its relative safety. This can save a lot of
|
|
848
|
+
// processor power and time if it is actually a clean image, as it will be in nearly all instances _except_ an
|
|
849
|
+
// attempted XSS attack.
|
|
850
|
+
|
|
851
|
+
if (function_exists('getimagesize') && @getimagesize($file) !== FALSE)
|
|
852
|
+
{
|
|
853
|
+
if (($file = @fopen($file, 'rb')) === FALSE) // "b" to force binary
|
|
854
|
+
{
|
|
855
|
+
return FALSE; // Couldn't open the file, return FALSE
|
|
856
|
+
}
|
|
857
|
+
|
|
858
|
+
$opening_bytes = fread($file, 256);
|
|
859
|
+
fclose($file);
|
|
860
|
+
|
|
861
|
+
// These are known to throw IE into mime-type detection chaos
|
|
862
|
+
// <a, <body, <head, <html, <img, <plaintext, <pre, <script, <table, <title
|
|
863
|
+
// title is basically just in SVG, but we filter it anyhow
|
|
864
|
+
|
|
865
|
+
if ( ! preg_match('/<(a|body|head|html|img|plaintext|pre|script|table|title)[\s>]/i', $opening_bytes))
|
|
866
|
+
{
|
|
867
|
+
return TRUE; // its an image, no "triggers" detected in the first 256 bytes, we're good
|
|
868
|
+
}
|
|
869
|
+
}
|
|
870
|
+
|
|
825
871
|
if (($data = @file_get_contents($file)) === FALSE)
|
|
826
872
|
{
|
|
827
873
|
return FALSE;
|
|
828
874
|
}
|
|
829
|
-
|
|
830
|
-
|
|
875
|
+
|
|
876
|
+
$CI =& get_instance();
|
|
877
|
+
|
|
878
|
+
if ( ! isset($CI->security))
|
|
831
879
|
{
|
|
832
|
-
|
|
880
|
+
$CI->load->library('security');
|
|
833
881
|
}
|
|
834
882
|
|
|
835
|
-
$CI
|
|
836
|
-
$data = $CI->input->xss_clean($data);
|
|
837
|
-
|
|
838
|
-
flock($fp, LOCK_EX);
|
|
839
|
-
fwrite($fp, $data);
|
|
840
|
-
flock($fp, LOCK_UN);
|
|
841
|
-
fclose($fp);
|
|
883
|
+
return $CI->security->xss_clean($data, TRUE);
|
|
842
884
|
}
|
|
843
|
-
|
|
885
|
+
|
|
844
886
|
// --------------------------------------------------------------------
|
|
845
|
-
|
|
887
|
+
|
|
846
888
|
/**
|
|
847
889
|
* Set an error message
|
|
848
890
|
*
|
|
849
|
-
* @access public
|
|
850
891
|
* @param string
|
|
851
892
|
* @return void
|
|
852
|
-
*/
|
|
853
|
-
function set_error($msg)
|
|
893
|
+
*/
|
|
894
|
+
public function set_error($msg)
|
|
854
895
|
{
|
|
855
|
-
$CI =& get_instance();
|
|
896
|
+
$CI =& get_instance();
|
|
856
897
|
$CI->lang->load('upload');
|
|
857
|
-
|
|
898
|
+
|
|
858
899
|
if (is_array($msg))
|
|
859
900
|
{
|
|
860
901
|
foreach ($msg as $val)
|
|
861
902
|
{
|
|
862
|
-
$msg = ($CI->lang->line($val) == FALSE) ? $val : $CI->lang->line($val);
|
|
903
|
+
$msg = ($CI->lang->line($val) == FALSE) ? $val : $CI->lang->line($val);
|
|
863
904
|
$this->error_msg[] = $msg;
|
|
864
905
|
log_message('error', $msg);
|
|
865
|
-
}
|
|
906
|
+
}
|
|
866
907
|
}
|
|
867
908
|
else
|
|
868
909
|
{
|
|
@@ -871,44 +912,42 @@ class CI_Upload {
|
|
|
871
912
|
log_message('error', $msg);
|
|
872
913
|
}
|
|
873
914
|
}
|
|
874
|
-
|
|
915
|
+
|
|
875
916
|
// --------------------------------------------------------------------
|
|
876
|
-
|
|
917
|
+
|
|
877
918
|
/**
|
|
878
919
|
* Display the error message
|
|
879
920
|
*
|
|
880
|
-
* @access public
|
|
881
921
|
* @param string
|
|
882
922
|
* @param string
|
|
883
923
|
* @return string
|
|
884
|
-
*/
|
|
885
|
-
function display_errors($open = '<p>', $close = '</p>')
|
|
924
|
+
*/
|
|
925
|
+
public function display_errors($open = '<p>', $close = '</p>')
|
|
886
926
|
{
|
|
887
927
|
$str = '';
|
|
888
928
|
foreach ($this->error_msg as $val)
|
|
889
929
|
{
|
|
890
930
|
$str .= $open.$val.$close;
|
|
891
931
|
}
|
|
892
|
-
|
|
932
|
+
|
|
893
933
|
return $str;
|
|
894
934
|
}
|
|
895
|
-
|
|
935
|
+
|
|
896
936
|
// --------------------------------------------------------------------
|
|
897
|
-
|
|
937
|
+
|
|
898
938
|
/**
|
|
899
939
|
* List of Mime Types
|
|
900
940
|
*
|
|
901
941
|
* This is a list of mime types. We use it to validate
|
|
902
942
|
* the "allowed types" set by the developer
|
|
903
943
|
*
|
|
904
|
-
* @access public
|
|
905
944
|
* @param string
|
|
906
945
|
* @return string
|
|
907
|
-
*/
|
|
908
|
-
function mimes_types($mime)
|
|
946
|
+
*/
|
|
947
|
+
public function mimes_types($mime)
|
|
909
948
|
{
|
|
910
949
|
global $mimes;
|
|
911
|
-
|
|
950
|
+
|
|
912
951
|
if (count($this->mimes) == 0)
|
|
913
952
|
{
|
|
914
953
|
if (@require_once(APPPATH.'config/mimes'.EXT))
|
|
@@ -917,25 +956,24 @@ class CI_Upload {
|
|
|
917
956
|
unset($mimes);
|
|
918
957
|
}
|
|
919
958
|
}
|
|
920
|
-
|
|
959
|
+
|
|
921
960
|
return ( ! isset($this->mimes[$mime])) ? FALSE : $this->mimes[$mime];
|
|
922
961
|
}
|
|
923
962
|
|
|
924
963
|
// --------------------------------------------------------------------
|
|
925
|
-
|
|
964
|
+
|
|
926
965
|
/**
|
|
927
966
|
* Prep Filename
|
|
928
967
|
*
|
|
929
968
|
* Prevents possible script execution from Apache's handling of files multiple extensions
|
|
930
969
|
* http://httpd.apache.org/docs/1.3/mod/mod_mime.html#multipleext
|
|
931
970
|
*
|
|
932
|
-
* @access private
|
|
933
971
|
* @param string
|
|
934
972
|
* @return string
|
|
935
973
|
*/
|
|
936
|
-
function _prep_filename($filename)
|
|
974
|
+
protected function _prep_filename($filename)
|
|
937
975
|
{
|
|
938
|
-
if (strpos($filename, '.') === FALSE)
|
|
976
|
+
if (strpos($filename, '.') === FALSE OR $this->allowed_types == '*')
|
|
939
977
|
{
|
|
940
978
|
return $filename;
|
|
941
979
|
}
|
|
@@ -957,7 +995,7 @@ class CI_Upload {
|
|
|
957
995
|
}
|
|
958
996
|
|
|
959
997
|
$filename .= '.'.$ext;
|
|
960
|
-
|
|
998
|
+
|
|
961
999
|
return $filename;
|
|
962
1000
|
}
|
|
963
1001
|
|