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,29 +25,28 @@
|
|
|
25
25
|
* @link http://codeigniter.com/user_guide/libraries/form_validation.html
|
|
26
26
|
*/
|
|
27
27
|
class CI_Form_validation {
|
|
28
|
-
|
|
28
|
+
|
|
29
29
|
var $CI;
|
|
30
|
-
var $_field_data = array();
|
|
30
|
+
var $_field_data = array();
|
|
31
31
|
var $_config_rules = array();
|
|
32
32
|
var $_error_array = array();
|
|
33
|
-
var $_error_messages = array();
|
|
33
|
+
var $_error_messages = array();
|
|
34
34
|
var $_error_prefix = '<p>';
|
|
35
35
|
var $_error_suffix = '</p>';
|
|
36
36
|
var $error_string = '';
|
|
37
|
-
var $_safe_form_data
|
|
37
|
+
var $_safe_form_data = FALSE;
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
/**
|
|
41
41
|
* Constructor
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
{
|
|
42
|
+
*/
|
|
43
|
+
public function __construct($rules = array())
|
|
44
|
+
{
|
|
46
45
|
$this->CI =& get_instance();
|
|
47
|
-
|
|
46
|
+
|
|
48
47
|
// Validation rules can be stored in a config file.
|
|
49
48
|
$this->_config_rules = $rules;
|
|
50
|
-
|
|
49
|
+
|
|
51
50
|
// Automatically load the form helper
|
|
52
51
|
$this->CI->load->helper('form');
|
|
53
52
|
|
|
@@ -56,12 +55,12 @@ class CI_Form_validation {
|
|
|
56
55
|
{
|
|
57
56
|
mb_internal_encoding($this->CI->config->item('charset'));
|
|
58
57
|
}
|
|
59
|
-
|
|
58
|
+
|
|
60
59
|
log_message('debug', "Form Validation Class Initialized");
|
|
61
60
|
}
|
|
62
|
-
|
|
61
|
+
|
|
63
62
|
// --------------------------------------------------------------------
|
|
64
|
-
|
|
63
|
+
|
|
65
64
|
/**
|
|
66
65
|
* Set Rules
|
|
67
66
|
*
|
|
@@ -78,9 +77,9 @@ class CI_Form_validation {
|
|
|
78
77
|
// No reason to set rules if we have no POST data
|
|
79
78
|
if (count($_POST) == 0)
|
|
80
79
|
{
|
|
81
|
-
return;
|
|
80
|
+
return $this;
|
|
82
81
|
}
|
|
83
|
-
|
|
82
|
+
|
|
84
83
|
// If an array was passed via the first parameter instead of indidual string
|
|
85
84
|
// values we cycle through it and recursively call this function.
|
|
86
85
|
if (is_array($field))
|
|
@@ -99,13 +98,13 @@ class CI_Form_validation {
|
|
|
99
98
|
// Here we go!
|
|
100
99
|
$this->set_rules($row['field'], $label, $row['rules']);
|
|
101
100
|
}
|
|
102
|
-
return;
|
|
101
|
+
return $this;
|
|
103
102
|
}
|
|
104
|
-
|
|
103
|
+
|
|
105
104
|
// No fields? Nothing to do...
|
|
106
105
|
if ( ! is_string($field) OR ! is_string($rules) OR $field == '')
|
|
107
106
|
{
|
|
108
|
-
return;
|
|
107
|
+
return $this;
|
|
109
108
|
}
|
|
110
109
|
|
|
111
110
|
// If the field label wasn't passed we use the field name
|
|
@@ -113,9 +112,9 @@ class CI_Form_validation {
|
|
|
113
112
|
|
|
114
113
|
// Is the field name an array? We test for the existence of a bracket "[" in
|
|
115
114
|
// the field name to determine this. If it is an array, we break it apart
|
|
116
|
-
// into its components so that we can fetch the corresponding POST data later
|
|
115
|
+
// into its components so that we can fetch the corresponding POST data later
|
|
117
116
|
if (strpos($field, '[') !== FALSE AND preg_match_all('/\[(.*?)\]/', $field, $matches))
|
|
118
|
-
{
|
|
117
|
+
{
|
|
119
118
|
// Note: Due to a bug in current() that affects some versions
|
|
120
119
|
// of PHP we can not pass function call directly into it
|
|
121
120
|
$x = explode('[', $field);
|
|
@@ -128,29 +127,31 @@ class CI_Form_validation {
|
|
|
128
127
|
$indexes[] = $matches['1'][$i];
|
|
129
128
|
}
|
|
130
129
|
}
|
|
131
|
-
|
|
130
|
+
|
|
132
131
|
$is_array = TRUE;
|
|
133
132
|
}
|
|
134
133
|
else
|
|
135
134
|
{
|
|
136
|
-
$indexes
|
|
137
|
-
$is_array = FALSE;
|
|
135
|
+
$indexes = array();
|
|
136
|
+
$is_array = FALSE;
|
|
138
137
|
}
|
|
139
|
-
|
|
140
|
-
// Build our master array
|
|
138
|
+
|
|
139
|
+
// Build our master array
|
|
141
140
|
$this->_field_data[$field] = array(
|
|
142
|
-
'field' => $field,
|
|
143
|
-
'label' => $label,
|
|
141
|
+
'field' => $field,
|
|
142
|
+
'label' => $label,
|
|
144
143
|
'rules' => $rules,
|
|
145
144
|
'is_array' => $is_array,
|
|
146
145
|
'keys' => $indexes,
|
|
147
146
|
'postdata' => NULL,
|
|
148
147
|
'error' => ''
|
|
149
148
|
);
|
|
149
|
+
|
|
150
|
+
return $this;
|
|
150
151
|
}
|
|
151
152
|
|
|
152
153
|
// --------------------------------------------------------------------
|
|
153
|
-
|
|
154
|
+
|
|
154
155
|
/**
|
|
155
156
|
* Set Error Message
|
|
156
157
|
*
|
|
@@ -168,12 +169,14 @@ class CI_Form_validation {
|
|
|
168
169
|
{
|
|
169
170
|
$lang = array($lang => $val);
|
|
170
171
|
}
|
|
171
|
-
|
|
172
|
+
|
|
172
173
|
$this->_error_messages = array_merge($this->_error_messages, $lang);
|
|
174
|
+
|
|
175
|
+
return $this;
|
|
173
176
|
}
|
|
174
|
-
|
|
177
|
+
|
|
175
178
|
// --------------------------------------------------------------------
|
|
176
|
-
|
|
179
|
+
|
|
177
180
|
/**
|
|
178
181
|
* Set The Error Delimiter
|
|
179
182
|
*
|
|
@@ -183,15 +186,17 @@ class CI_Form_validation {
|
|
|
183
186
|
* @param string
|
|
184
187
|
* @param string
|
|
185
188
|
* @return void
|
|
186
|
-
*/
|
|
189
|
+
*/
|
|
187
190
|
function set_error_delimiters($prefix = '<p>', $suffix = '</p>')
|
|
188
191
|
{
|
|
189
192
|
$this->_error_prefix = $prefix;
|
|
190
193
|
$this->_error_suffix = $suffix;
|
|
194
|
+
|
|
195
|
+
return $this;
|
|
191
196
|
}
|
|
192
197
|
|
|
193
198
|
// --------------------------------------------------------------------
|
|
194
|
-
|
|
199
|
+
|
|
195
200
|
/**
|
|
196
201
|
* Get Error Message
|
|
197
202
|
*
|
|
@@ -200,14 +205,14 @@ class CI_Form_validation {
|
|
|
200
205
|
* @access public
|
|
201
206
|
* @param string the field name
|
|
202
207
|
* @return void
|
|
203
|
-
*/
|
|
208
|
+
*/
|
|
204
209
|
function error($field = '', $prefix = '', $suffix = '')
|
|
205
|
-
{
|
|
210
|
+
{
|
|
206
211
|
if ( ! isset($this->_field_data[$field]['error']) OR $this->_field_data[$field]['error'] == '')
|
|
207
212
|
{
|
|
208
213
|
return '';
|
|
209
214
|
}
|
|
210
|
-
|
|
215
|
+
|
|
211
216
|
if ($prefix == '')
|
|
212
217
|
{
|
|
213
218
|
$prefix = $this->_error_prefix;
|
|
@@ -222,7 +227,7 @@ class CI_Form_validation {
|
|
|
222
227
|
}
|
|
223
228
|
|
|
224
229
|
// --------------------------------------------------------------------
|
|
225
|
-
|
|
230
|
+
|
|
226
231
|
/**
|
|
227
232
|
* Error String
|
|
228
233
|
*
|
|
@@ -232,7 +237,7 @@ class CI_Form_validation {
|
|
|
232
237
|
* @param string
|
|
233
238
|
* @param string
|
|
234
239
|
* @return str
|
|
235
|
-
*/
|
|
240
|
+
*/
|
|
236
241
|
function error_string($prefix = '', $suffix = '')
|
|
237
242
|
{
|
|
238
243
|
// No errrors, validation passes!
|
|
@@ -240,7 +245,7 @@ class CI_Form_validation {
|
|
|
240
245
|
{
|
|
241
246
|
return '';
|
|
242
247
|
}
|
|
243
|
-
|
|
248
|
+
|
|
244
249
|
if ($prefix == '')
|
|
245
250
|
{
|
|
246
251
|
$prefix = $this->_error_prefix;
|
|
@@ -250,7 +255,7 @@ class CI_Form_validation {
|
|
|
250
255
|
{
|
|
251
256
|
$suffix = $this->_error_suffix;
|
|
252
257
|
}
|
|
253
|
-
|
|
258
|
+
|
|
254
259
|
// Generate the error string
|
|
255
260
|
$str = '';
|
|
256
261
|
foreach ($this->_error_array as $val)
|
|
@@ -260,12 +265,12 @@ class CI_Form_validation {
|
|
|
260
265
|
$str .= $prefix.$val.$suffix."\n";
|
|
261
266
|
}
|
|
262
267
|
}
|
|
263
|
-
|
|
268
|
+
|
|
264
269
|
return $str;
|
|
265
270
|
}
|
|
266
271
|
|
|
267
272
|
// --------------------------------------------------------------------
|
|
268
|
-
|
|
273
|
+
|
|
269
274
|
/**
|
|
270
275
|
* Run the Validator
|
|
271
276
|
*
|
|
@@ -273,7 +278,7 @@ class CI_Form_validation {
|
|
|
273
278
|
*
|
|
274
279
|
* @access public
|
|
275
280
|
* @return bool
|
|
276
|
-
*/
|
|
281
|
+
*/
|
|
277
282
|
function run($group = '')
|
|
278
283
|
{
|
|
279
284
|
// Do we even have any data to process? Mm?
|
|
@@ -281,7 +286,7 @@ class CI_Form_validation {
|
|
|
281
286
|
{
|
|
282
287
|
return FALSE;
|
|
283
288
|
}
|
|
284
|
-
|
|
289
|
+
|
|
285
290
|
// Does the _field_data array containing the validation rules exist?
|
|
286
291
|
// If not, we look to see if they were assigned via a config file
|
|
287
292
|
if (count($this->_field_data) == 0)
|
|
@@ -291,10 +296,10 @@ class CI_Form_validation {
|
|
|
291
296
|
{
|
|
292
297
|
return FALSE;
|
|
293
298
|
}
|
|
294
|
-
|
|
299
|
+
|
|
295
300
|
// Is there a validation rule for the particular URI being accessed?
|
|
296
301
|
$uri = ($group == '') ? trim($this->CI->uri->ruri_string(), '/') : $group;
|
|
297
|
-
|
|
302
|
+
|
|
298
303
|
if ($uri != '' AND isset($this->_config_rules[$uri]))
|
|
299
304
|
{
|
|
300
305
|
$this->set_rules($this->_config_rules[$uri]);
|
|
@@ -303,7 +308,7 @@ class CI_Form_validation {
|
|
|
303
308
|
{
|
|
304
309
|
$this->set_rules($this->_config_rules);
|
|
305
310
|
}
|
|
306
|
-
|
|
311
|
+
|
|
307
312
|
// We're we able to set the rules correctly?
|
|
308
313
|
if (count($this->_field_data) == 0)
|
|
309
314
|
{
|
|
@@ -311,17 +316,17 @@ class CI_Form_validation {
|
|
|
311
316
|
return FALSE;
|
|
312
317
|
}
|
|
313
318
|
}
|
|
314
|
-
|
|
319
|
+
|
|
315
320
|
// Load the language file containing error messages
|
|
316
321
|
$this->CI->lang->load('form_validation');
|
|
317
|
-
|
|
318
|
-
// Cycle through the rules for each field, match the
|
|
322
|
+
|
|
323
|
+
// Cycle through the rules for each field, match the
|
|
319
324
|
// corresponding $_POST item and test for errors
|
|
320
325
|
foreach ($this->_field_data as $field => $row)
|
|
321
|
-
{
|
|
326
|
+
{
|
|
322
327
|
// Fetch the data from the corresponding $_POST array and cache it in the _field_data array.
|
|
323
328
|
// Depending on whether the field name is an array or a string will determine where we get it from.
|
|
324
|
-
|
|
329
|
+
|
|
325
330
|
if ($row['is_array'] == TRUE)
|
|
326
331
|
{
|
|
327
332
|
$this->_field_data[$field]['postdata'] = $this->_reduce_array($_POST, $row['keys']);
|
|
@@ -333,8 +338,8 @@ class CI_Form_validation {
|
|
|
333
338
|
$this->_field_data[$field]['postdata'] = $_POST[$field];
|
|
334
339
|
}
|
|
335
340
|
}
|
|
336
|
-
|
|
337
|
-
$this->_execute($row, explode('|', $row['rules']), $this->_field_data[$field]['postdata']);
|
|
341
|
+
|
|
342
|
+
$this->_execute($row, explode('|', $row['rules']), $this->_field_data[$field]['postdata']);
|
|
338
343
|
}
|
|
339
344
|
|
|
340
345
|
// Did we end up with any errors?
|
|
@@ -347,7 +352,7 @@ class CI_Form_validation {
|
|
|
347
352
|
|
|
348
353
|
// Now we need to re-set the POST data with the new, processed data
|
|
349
354
|
$this->_reset_post_array();
|
|
350
|
-
|
|
355
|
+
|
|
351
356
|
// No errors, validation passes!
|
|
352
357
|
if ($total_errors == 0)
|
|
353
358
|
{
|
|
@@ -359,7 +364,7 @@ class CI_Form_validation {
|
|
|
359
364
|
}
|
|
360
365
|
|
|
361
366
|
// --------------------------------------------------------------------
|
|
362
|
-
|
|
367
|
+
|
|
363
368
|
/**
|
|
364
369
|
* Traverse a multidimensional $_POST array index until the data is found
|
|
365
370
|
*
|
|
@@ -368,7 +373,7 @@ class CI_Form_validation {
|
|
|
368
373
|
* @param array
|
|
369
374
|
* @param integer
|
|
370
375
|
* @return mixed
|
|
371
|
-
*/
|
|
376
|
+
*/
|
|
372
377
|
function _reduce_array($array, $keys, $i = 0)
|
|
373
378
|
{
|
|
374
379
|
if (is_array($array))
|
|
@@ -389,18 +394,18 @@ class CI_Form_validation {
|
|
|
389
394
|
return $array;
|
|
390
395
|
}
|
|
391
396
|
}
|
|
392
|
-
|
|
397
|
+
|
|
393
398
|
return $array;
|
|
394
399
|
}
|
|
395
400
|
|
|
396
401
|
// --------------------------------------------------------------------
|
|
397
|
-
|
|
402
|
+
|
|
398
403
|
/**
|
|
399
404
|
* Re-populate the _POST array with our finalized and processed data
|
|
400
405
|
*
|
|
401
406
|
* @access private
|
|
402
407
|
* @return null
|
|
403
|
-
*/
|
|
408
|
+
*/
|
|
404
409
|
function _reset_post_array()
|
|
405
410
|
{
|
|
406
411
|
foreach ($this->_field_data as $field => $row)
|
|
@@ -418,7 +423,7 @@ class CI_Form_validation {
|
|
|
418
423
|
{
|
|
419
424
|
// start with a reference
|
|
420
425
|
$post_ref =& $_POST;
|
|
421
|
-
|
|
426
|
+
|
|
422
427
|
// before we assign values, make a reference to the right POST key
|
|
423
428
|
if (count($row['keys']) == 1)
|
|
424
429
|
{
|
|
@@ -452,7 +457,7 @@ class CI_Form_validation {
|
|
|
452
457
|
}
|
|
453
458
|
|
|
454
459
|
// --------------------------------------------------------------------
|
|
455
|
-
|
|
460
|
+
|
|
456
461
|
/**
|
|
457
462
|
* Executes the Validation routines
|
|
458
463
|
*
|
|
@@ -462,21 +467,21 @@ class CI_Form_validation {
|
|
|
462
467
|
* @param mixed
|
|
463
468
|
* @param integer
|
|
464
469
|
* @return mixed
|
|
465
|
-
*/
|
|
470
|
+
*/
|
|
466
471
|
function _execute($row, $rules, $postdata = NULL, $cycles = 0)
|
|
467
472
|
{
|
|
468
473
|
// If the $_POST data is an array we will run a recursive call
|
|
469
474
|
if (is_array($postdata))
|
|
470
|
-
{
|
|
475
|
+
{
|
|
471
476
|
foreach ($postdata as $key => $val)
|
|
472
477
|
{
|
|
473
478
|
$this->_execute($row, $rules, $val, $cycles);
|
|
474
479
|
$cycles++;
|
|
475
480
|
}
|
|
476
|
-
|
|
481
|
+
|
|
477
482
|
return;
|
|
478
483
|
}
|
|
479
|
-
|
|
484
|
+
|
|
480
485
|
// --------------------------------------------------------------------
|
|
481
486
|
|
|
482
487
|
// If the field is blank, but NOT required, no further tests are necessary
|
|
@@ -496,7 +501,7 @@ class CI_Form_validation {
|
|
|
496
501
|
}
|
|
497
502
|
|
|
498
503
|
// --------------------------------------------------------------------
|
|
499
|
-
|
|
504
|
+
|
|
500
505
|
// Isset Test. Typically this rule will only apply to checkboxes.
|
|
501
506
|
if (is_null($postdata) AND $callback == FALSE)
|
|
502
507
|
{
|
|
@@ -504,31 +509,31 @@ class CI_Form_validation {
|
|
|
504
509
|
{
|
|
505
510
|
// Set the message type
|
|
506
511
|
$type = (in_array('required', $rules)) ? 'required' : 'isset';
|
|
507
|
-
|
|
512
|
+
|
|
508
513
|
if ( ! isset($this->_error_messages[$type]))
|
|
509
514
|
{
|
|
510
515
|
if (FALSE === ($line = $this->CI->lang->line($type)))
|
|
511
516
|
{
|
|
512
517
|
$line = 'The field was not set';
|
|
513
|
-
}
|
|
518
|
+
}
|
|
514
519
|
}
|
|
515
520
|
else
|
|
516
521
|
{
|
|
517
522
|
$line = $this->_error_messages[$type];
|
|
518
523
|
}
|
|
519
|
-
|
|
524
|
+
|
|
520
525
|
// Build the error message
|
|
521
526
|
$message = sprintf($line, $this->_translate_fieldname($row['label']));
|
|
522
527
|
|
|
523
528
|
// Save the error message
|
|
524
529
|
$this->_field_data[$row['field']]['error'] = $message;
|
|
525
|
-
|
|
530
|
+
|
|
526
531
|
if ( ! isset($this->_error_array[$row['field']]))
|
|
527
532
|
{
|
|
528
533
|
$this->_error_array[$row['field']] = $message;
|
|
529
534
|
}
|
|
530
535
|
}
|
|
531
|
-
|
|
536
|
+
|
|
532
537
|
return;
|
|
533
538
|
}
|
|
534
539
|
|
|
@@ -538,7 +543,7 @@ class CI_Form_validation {
|
|
|
538
543
|
foreach ($rules As $rule)
|
|
539
544
|
{
|
|
540
545
|
$_in_array = FALSE;
|
|
541
|
-
|
|
546
|
+
|
|
542
547
|
// We set the $postdata variable with the current data in our master array so that
|
|
543
548
|
// each cycle of the loop is dealing with the processed data from the last cycle
|
|
544
549
|
if ($row['is_array'] == TRUE AND is_array($this->_field_data[$row['field']]['postdata']))
|
|
@@ -549,7 +554,7 @@ class CI_Form_validation {
|
|
|
549
554
|
{
|
|
550
555
|
continue;
|
|
551
556
|
}
|
|
552
|
-
|
|
557
|
+
|
|
553
558
|
$postdata = $this->_field_data[$row['field']]['postdata'][$cycles];
|
|
554
559
|
$_in_array = TRUE;
|
|
555
560
|
}
|
|
@@ -559,32 +564,32 @@ class CI_Form_validation {
|
|
|
559
564
|
}
|
|
560
565
|
|
|
561
566
|
// --------------------------------------------------------------------
|
|
562
|
-
|
|
563
|
-
// Is the rule a callback?
|
|
567
|
+
|
|
568
|
+
// Is the rule a callback?
|
|
564
569
|
$callback = FALSE;
|
|
565
570
|
if (substr($rule, 0, 9) == 'callback_')
|
|
566
571
|
{
|
|
567
572
|
$rule = substr($rule, 9);
|
|
568
573
|
$callback = TRUE;
|
|
569
574
|
}
|
|
570
|
-
|
|
575
|
+
|
|
571
576
|
// Strip the parameter (if exists) from the rule
|
|
572
577
|
// Rules can contain a parameter: max_length[5]
|
|
573
578
|
$param = FALSE;
|
|
574
|
-
if (preg_match("/(.*?)\[(
|
|
579
|
+
if (preg_match("/(.*?)\[(.*)\]/", $rule, $match))
|
|
575
580
|
{
|
|
576
581
|
$rule = $match[1];
|
|
577
582
|
$param = $match[2];
|
|
578
583
|
}
|
|
579
|
-
|
|
584
|
+
|
|
580
585
|
// Call the function that corresponds to the rule
|
|
581
586
|
if ($callback === TRUE)
|
|
582
587
|
{
|
|
583
588
|
if ( ! method_exists($this->CI, $rule))
|
|
584
|
-
{
|
|
589
|
+
{
|
|
585
590
|
continue;
|
|
586
591
|
}
|
|
587
|
-
|
|
592
|
+
|
|
588
593
|
// Run the function and grab the result
|
|
589
594
|
$result = $this->CI->$rule($postdata, $param);
|
|
590
595
|
|
|
@@ -597,7 +602,7 @@ class CI_Form_validation {
|
|
|
597
602
|
{
|
|
598
603
|
$this->_field_data[$row['field']]['postdata'] = (is_bool($result)) ? $postdata : $result;
|
|
599
604
|
}
|
|
600
|
-
|
|
605
|
+
|
|
601
606
|
// If the field isn't required and we just processed a callback we'll move on...
|
|
602
607
|
if ( ! in_array('required', $rules, TRUE) AND $result !== FALSE)
|
|
603
608
|
{
|
|
@@ -605,15 +610,15 @@ class CI_Form_validation {
|
|
|
605
610
|
}
|
|
606
611
|
}
|
|
607
612
|
else
|
|
608
|
-
{
|
|
613
|
+
{
|
|
609
614
|
if ( ! method_exists($this, $rule))
|
|
610
615
|
{
|
|
611
|
-
// If our own wrapper function doesn't exist we see if a native PHP function does.
|
|
616
|
+
// If our own wrapper function doesn't exist we see if a native PHP function does.
|
|
612
617
|
// Users can use any native PHP function call that has one param.
|
|
613
618
|
if (function_exists($rule))
|
|
614
619
|
{
|
|
615
620
|
$result = $rule($postdata);
|
|
616
|
-
|
|
621
|
+
|
|
617
622
|
if ($_in_array == TRUE)
|
|
618
623
|
{
|
|
619
624
|
$this->_field_data[$row['field']]['postdata'][$cycles] = (is_bool($result)) ? $postdata : $result;
|
|
@@ -623,7 +628,7 @@ class CI_Form_validation {
|
|
|
623
628
|
$this->_field_data[$row['field']]['postdata'] = (is_bool($result)) ? $postdata : $result;
|
|
624
629
|
}
|
|
625
630
|
}
|
|
626
|
-
|
|
631
|
+
|
|
627
632
|
continue;
|
|
628
633
|
}
|
|
629
634
|
|
|
@@ -638,54 +643,54 @@ class CI_Form_validation {
|
|
|
638
643
|
$this->_field_data[$row['field']]['postdata'] = (is_bool($result)) ? $postdata : $result;
|
|
639
644
|
}
|
|
640
645
|
}
|
|
641
|
-
|
|
646
|
+
|
|
642
647
|
// Did the rule test negatively? If so, grab the error.
|
|
643
648
|
if ($result === FALSE)
|
|
644
|
-
{
|
|
649
|
+
{
|
|
645
650
|
if ( ! isset($this->_error_messages[$rule]))
|
|
646
651
|
{
|
|
647
652
|
if (FALSE === ($line = $this->CI->lang->line($rule)))
|
|
648
653
|
{
|
|
649
654
|
$line = 'Unable to access an error message corresponding to your field name.';
|
|
650
|
-
}
|
|
655
|
+
}
|
|
651
656
|
}
|
|
652
657
|
else
|
|
653
658
|
{
|
|
654
659
|
$line = $this->_error_messages[$rule];
|
|
655
660
|
}
|
|
656
|
-
|
|
661
|
+
|
|
657
662
|
// Is the parameter we are inserting into the error message the name
|
|
658
663
|
// of another field? If so we need to grab its "field label"
|
|
659
664
|
if (isset($this->_field_data[$param]) AND isset($this->_field_data[$param]['label']))
|
|
660
665
|
{
|
|
661
|
-
$param = $this->_field_data[$param]['label'];
|
|
666
|
+
$param = $this->_translate_fieldname($this->_field_data[$param]['label']);
|
|
662
667
|
}
|
|
663
|
-
|
|
668
|
+
|
|
664
669
|
// Build the error message
|
|
665
670
|
$message = sprintf($line, $this->_translate_fieldname($row['label']), $param);
|
|
666
671
|
|
|
667
672
|
// Save the error message
|
|
668
673
|
$this->_field_data[$row['field']]['error'] = $message;
|
|
669
|
-
|
|
674
|
+
|
|
670
675
|
if ( ! isset($this->_error_array[$row['field']]))
|
|
671
676
|
{
|
|
672
677
|
$this->_error_array[$row['field']] = $message;
|
|
673
678
|
}
|
|
674
|
-
|
|
679
|
+
|
|
675
680
|
return;
|
|
676
681
|
}
|
|
677
682
|
}
|
|
678
683
|
}
|
|
679
684
|
|
|
680
685
|
// --------------------------------------------------------------------
|
|
681
|
-
|
|
686
|
+
|
|
682
687
|
/**
|
|
683
688
|
* Translate a field name
|
|
684
689
|
*
|
|
685
690
|
* @access private
|
|
686
691
|
* @param string the field name
|
|
687
692
|
* @return string
|
|
688
|
-
*/
|
|
693
|
+
*/
|
|
689
694
|
function _translate_fieldname($fieldname)
|
|
690
695
|
{
|
|
691
696
|
// Do we need to translate the field name?
|
|
@@ -693,8 +698,8 @@ class CI_Form_validation {
|
|
|
693
698
|
if (substr($fieldname, 0, 5) == 'lang:')
|
|
694
699
|
{
|
|
695
700
|
// Grab the variable
|
|
696
|
-
$line = substr($fieldname, 5);
|
|
697
|
-
|
|
701
|
+
$line = substr($fieldname, 5);
|
|
702
|
+
|
|
698
703
|
// Were we able to translate the field name? If not we use $line
|
|
699
704
|
if (FALSE === ($fieldname = $this->CI->lang->line($line)))
|
|
700
705
|
{
|
|
@@ -706,7 +711,7 @@ class CI_Form_validation {
|
|
|
706
711
|
}
|
|
707
712
|
|
|
708
713
|
// --------------------------------------------------------------------
|
|
709
|
-
|
|
714
|
+
|
|
710
715
|
/**
|
|
711
716
|
* Get the value from a form
|
|
712
717
|
*
|
|
@@ -717,19 +722,26 @@ class CI_Form_validation {
|
|
|
717
722
|
* @param string the field name
|
|
718
723
|
* @param string
|
|
719
724
|
* @return void
|
|
720
|
-
*/
|
|
725
|
+
*/
|
|
721
726
|
function set_value($field = '', $default = '')
|
|
722
727
|
{
|
|
723
728
|
if ( ! isset($this->_field_data[$field]))
|
|
724
729
|
{
|
|
725
730
|
return $default;
|
|
726
731
|
}
|
|
727
|
-
|
|
732
|
+
|
|
733
|
+
// If the data is an array output them one at a time.
|
|
734
|
+
// E.g: form_input('name[]', set_value('name[]');
|
|
735
|
+
if (is_array($this->_field_data[$field]['postdata']))
|
|
736
|
+
{
|
|
737
|
+
return array_shift($this->_field_data[$field]['postdata']);
|
|
738
|
+
}
|
|
739
|
+
|
|
728
740
|
return $this->_field_data[$field]['postdata'];
|
|
729
741
|
}
|
|
730
|
-
|
|
742
|
+
|
|
731
743
|
// --------------------------------------------------------------------
|
|
732
|
-
|
|
744
|
+
|
|
733
745
|
/**
|
|
734
746
|
* Set Select
|
|
735
747
|
*
|
|
@@ -740,9 +752,9 @@ class CI_Form_validation {
|
|
|
740
752
|
* @param string
|
|
741
753
|
* @param string
|
|
742
754
|
* @return string
|
|
743
|
-
*/
|
|
755
|
+
*/
|
|
744
756
|
function set_select($field = '', $value = '', $default = FALSE)
|
|
745
|
-
{
|
|
757
|
+
{
|
|
746
758
|
if ( ! isset($this->_field_data[$field]) OR ! isset($this->_field_data[$field]['postdata']))
|
|
747
759
|
{
|
|
748
760
|
if ($default === TRUE AND count($this->_field_data) === 0)
|
|
@@ -751,9 +763,9 @@ class CI_Form_validation {
|
|
|
751
763
|
}
|
|
752
764
|
return '';
|
|
753
765
|
}
|
|
754
|
-
|
|
766
|
+
|
|
755
767
|
$field = $this->_field_data[$field]['postdata'];
|
|
756
|
-
|
|
768
|
+
|
|
757
769
|
if (is_array($field))
|
|
758
770
|
{
|
|
759
771
|
if ( ! in_array($value, $field))
|
|
@@ -768,12 +780,12 @@ class CI_Form_validation {
|
|
|
768
780
|
return '';
|
|
769
781
|
}
|
|
770
782
|
}
|
|
771
|
-
|
|
783
|
+
|
|
772
784
|
return ' selected="selected"';
|
|
773
785
|
}
|
|
774
|
-
|
|
786
|
+
|
|
775
787
|
// --------------------------------------------------------------------
|
|
776
|
-
|
|
788
|
+
|
|
777
789
|
/**
|
|
778
790
|
* Set Radio
|
|
779
791
|
*
|
|
@@ -784,7 +796,7 @@ class CI_Form_validation {
|
|
|
784
796
|
* @param string
|
|
785
797
|
* @param string
|
|
786
798
|
* @return string
|
|
787
|
-
*/
|
|
799
|
+
*/
|
|
788
800
|
function set_radio($field = '', $value = '', $default = FALSE)
|
|
789
801
|
{
|
|
790
802
|
if ( ! isset($this->_field_data[$field]) OR ! isset($this->_field_data[$field]['postdata']))
|
|
@@ -795,9 +807,9 @@ class CI_Form_validation {
|
|
|
795
807
|
}
|
|
796
808
|
return '';
|
|
797
809
|
}
|
|
798
|
-
|
|
810
|
+
|
|
799
811
|
$field = $this->_field_data[$field]['postdata'];
|
|
800
|
-
|
|
812
|
+
|
|
801
813
|
if (is_array($field))
|
|
802
814
|
{
|
|
803
815
|
if ( ! in_array($value, $field))
|
|
@@ -812,12 +824,12 @@ class CI_Form_validation {
|
|
|
812
824
|
return '';
|
|
813
825
|
}
|
|
814
826
|
}
|
|
815
|
-
|
|
827
|
+
|
|
816
828
|
return ' checked="checked"';
|
|
817
829
|
}
|
|
818
|
-
|
|
830
|
+
|
|
819
831
|
// --------------------------------------------------------------------
|
|
820
|
-
|
|
832
|
+
|
|
821
833
|
/**
|
|
822
834
|
* Set Checkbox
|
|
823
835
|
*
|
|
@@ -828,7 +840,7 @@ class CI_Form_validation {
|
|
|
828
840
|
* @param string
|
|
829
841
|
* @param string
|
|
830
842
|
* @return string
|
|
831
|
-
*/
|
|
843
|
+
*/
|
|
832
844
|
function set_checkbox($field = '', $value = '', $default = FALSE)
|
|
833
845
|
{
|
|
834
846
|
if ( ! isset($this->_field_data[$field]) OR ! isset($this->_field_data[$field]['postdata']))
|
|
@@ -839,9 +851,9 @@ class CI_Form_validation {
|
|
|
839
851
|
}
|
|
840
852
|
return '';
|
|
841
853
|
}
|
|
842
|
-
|
|
854
|
+
|
|
843
855
|
$field = $this->_field_data[$field]['postdata'];
|
|
844
|
-
|
|
856
|
+
|
|
845
857
|
if (is_array($field))
|
|
846
858
|
{
|
|
847
859
|
if ( ! in_array($value, $field))
|
|
@@ -856,12 +868,12 @@ class CI_Form_validation {
|
|
|
856
868
|
return '';
|
|
857
869
|
}
|
|
858
870
|
}
|
|
859
|
-
|
|
871
|
+
|
|
860
872
|
return ' checked="checked"';
|
|
861
873
|
}
|
|
862
|
-
|
|
874
|
+
|
|
863
875
|
// --------------------------------------------------------------------
|
|
864
|
-
|
|
876
|
+
|
|
865
877
|
/**
|
|
866
878
|
* Required
|
|
867
879
|
*
|
|
@@ -880,9 +892,29 @@ class CI_Form_validation {
|
|
|
880
892
|
return ( ! empty($str));
|
|
881
893
|
}
|
|
882
894
|
}
|
|
883
|
-
|
|
895
|
+
|
|
896
|
+
// --------------------------------------------------------------------
|
|
897
|
+
|
|
898
|
+
/**
|
|
899
|
+
* Performs a Regular Expression match test.
|
|
900
|
+
*
|
|
901
|
+
* @access public
|
|
902
|
+
* @param string
|
|
903
|
+
* @param regex
|
|
904
|
+
* @return bool
|
|
905
|
+
*/
|
|
906
|
+
function regex_match($str, $regex)
|
|
907
|
+
{
|
|
908
|
+
if ( ! preg_match($regex, $str))
|
|
909
|
+
{
|
|
910
|
+
return FALSE;
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
return TRUE;
|
|
914
|
+
}
|
|
915
|
+
|
|
884
916
|
// --------------------------------------------------------------------
|
|
885
|
-
|
|
917
|
+
|
|
886
918
|
/**
|
|
887
919
|
* Match one field to another
|
|
888
920
|
*
|
|
@@ -895,16 +927,16 @@ class CI_Form_validation {
|
|
|
895
927
|
{
|
|
896
928
|
if ( ! isset($_POST[$field]))
|
|
897
929
|
{
|
|
898
|
-
return FALSE;
|
|
930
|
+
return FALSE;
|
|
899
931
|
}
|
|
900
|
-
|
|
932
|
+
|
|
901
933
|
$field = $_POST[$field];
|
|
902
934
|
|
|
903
935
|
return ($str !== $field) ? FALSE : TRUE;
|
|
904
936
|
}
|
|
905
|
-
|
|
937
|
+
|
|
906
938
|
// --------------------------------------------------------------------
|
|
907
|
-
|
|
939
|
+
|
|
908
940
|
/**
|
|
909
941
|
* Minimum Length
|
|
910
942
|
*
|
|
@@ -912,7 +944,7 @@ class CI_Form_validation {
|
|
|
912
944
|
* @param string
|
|
913
945
|
* @param value
|
|
914
946
|
* @return bool
|
|
915
|
-
*/
|
|
947
|
+
*/
|
|
916
948
|
function min_length($str, $val)
|
|
917
949
|
{
|
|
918
950
|
if (preg_match("/[^0-9]/", $val))
|
|
@@ -922,14 +954,14 @@ class CI_Form_validation {
|
|
|
922
954
|
|
|
923
955
|
if (function_exists('mb_strlen'))
|
|
924
956
|
{
|
|
925
|
-
return (mb_strlen($str) < $val) ? FALSE : TRUE;
|
|
957
|
+
return (mb_strlen($str) < $val) ? FALSE : TRUE;
|
|
926
958
|
}
|
|
927
|
-
|
|
959
|
+
|
|
928
960
|
return (strlen($str) < $val) ? FALSE : TRUE;
|
|
929
961
|
}
|
|
930
|
-
|
|
962
|
+
|
|
931
963
|
// --------------------------------------------------------------------
|
|
932
|
-
|
|
964
|
+
|
|
933
965
|
/**
|
|
934
966
|
* Max Length
|
|
935
967
|
*
|
|
@@ -937,7 +969,7 @@ class CI_Form_validation {
|
|
|
937
969
|
* @param string
|
|
938
970
|
* @param value
|
|
939
971
|
* @return bool
|
|
940
|
-
*/
|
|
972
|
+
*/
|
|
941
973
|
function max_length($str, $val)
|
|
942
974
|
{
|
|
943
975
|
if (preg_match("/[^0-9]/", $val))
|
|
@@ -947,14 +979,14 @@ class CI_Form_validation {
|
|
|
947
979
|
|
|
948
980
|
if (function_exists('mb_strlen'))
|
|
949
981
|
{
|
|
950
|
-
return (mb_strlen($str) > $val) ? FALSE : TRUE;
|
|
982
|
+
return (mb_strlen($str) > $val) ? FALSE : TRUE;
|
|
951
983
|
}
|
|
952
|
-
|
|
984
|
+
|
|
953
985
|
return (strlen($str) > $val) ? FALSE : TRUE;
|
|
954
986
|
}
|
|
955
|
-
|
|
987
|
+
|
|
956
988
|
// --------------------------------------------------------------------
|
|
957
|
-
|
|
989
|
+
|
|
958
990
|
/**
|
|
959
991
|
* Exact Length
|
|
960
992
|
*
|
|
@@ -962,7 +994,7 @@ class CI_Form_validation {
|
|
|
962
994
|
* @param string
|
|
963
995
|
* @param value
|
|
964
996
|
* @return bool
|
|
965
|
-
*/
|
|
997
|
+
*/
|
|
966
998
|
function exact_length($str, $val)
|
|
967
999
|
{
|
|
968
1000
|
if (preg_match("/[^0-9]/", $val))
|
|
@@ -972,42 +1004,42 @@ class CI_Form_validation {
|
|
|
972
1004
|
|
|
973
1005
|
if (function_exists('mb_strlen'))
|
|
974
1006
|
{
|
|
975
|
-
return (mb_strlen($str) != $val) ? FALSE : TRUE;
|
|
1007
|
+
return (mb_strlen($str) != $val) ? FALSE : TRUE;
|
|
976
1008
|
}
|
|
977
|
-
|
|
1009
|
+
|
|
978
1010
|
return (strlen($str) != $val) ? FALSE : TRUE;
|
|
979
1011
|
}
|
|
980
|
-
|
|
1012
|
+
|
|
981
1013
|
// --------------------------------------------------------------------
|
|
982
|
-
|
|
1014
|
+
|
|
983
1015
|
/**
|
|
984
1016
|
* Valid Email
|
|
985
1017
|
*
|
|
986
1018
|
* @access public
|
|
987
1019
|
* @param string
|
|
988
1020
|
* @return bool
|
|
989
|
-
*/
|
|
1021
|
+
*/
|
|
990
1022
|
function valid_email($str)
|
|
991
1023
|
{
|
|
992
1024
|
return ( ! preg_match("/^([a-z0-9\+_\-]+)(\.[a-z0-9\+_\-]+)*@([a-z0-9\-]+\.)+[a-z]{2,6}$/ix", $str)) ? FALSE : TRUE;
|
|
993
1025
|
}
|
|
994
1026
|
|
|
995
1027
|
// --------------------------------------------------------------------
|
|
996
|
-
|
|
1028
|
+
|
|
997
1029
|
/**
|
|
998
1030
|
* Valid Emails
|
|
999
1031
|
*
|
|
1000
1032
|
* @access public
|
|
1001
1033
|
* @param string
|
|
1002
1034
|
* @return bool
|
|
1003
|
-
*/
|
|
1035
|
+
*/
|
|
1004
1036
|
function valid_emails($str)
|
|
1005
1037
|
{
|
|
1006
1038
|
if (strpos($str, ',') === FALSE)
|
|
1007
1039
|
{
|
|
1008
1040
|
return $this->valid_email(trim($str));
|
|
1009
1041
|
}
|
|
1010
|
-
|
|
1042
|
+
|
|
1011
1043
|
foreach(explode(',', $str) as $email)
|
|
1012
1044
|
{
|
|
1013
1045
|
if (trim($email) != '' && $this->valid_email(trim($email)) === FALSE)
|
|
@@ -1015,12 +1047,12 @@ class CI_Form_validation {
|
|
|
1015
1047
|
return FALSE;
|
|
1016
1048
|
}
|
|
1017
1049
|
}
|
|
1018
|
-
|
|
1050
|
+
|
|
1019
1051
|
return TRUE;
|
|
1020
1052
|
}
|
|
1021
1053
|
|
|
1022
1054
|
// --------------------------------------------------------------------
|
|
1023
|
-
|
|
1055
|
+
|
|
1024
1056
|
/**
|
|
1025
1057
|
* Validate IP Address
|
|
1026
1058
|
*
|
|
@@ -1034,56 +1066,56 @@ class CI_Form_validation {
|
|
|
1034
1066
|
}
|
|
1035
1067
|
|
|
1036
1068
|
// --------------------------------------------------------------------
|
|
1037
|
-
|
|
1069
|
+
|
|
1038
1070
|
/**
|
|
1039
1071
|
* Alpha
|
|
1040
1072
|
*
|
|
1041
1073
|
* @access public
|
|
1042
1074
|
* @param string
|
|
1043
1075
|
* @return bool
|
|
1044
|
-
*/
|
|
1076
|
+
*/
|
|
1045
1077
|
function alpha($str)
|
|
1046
1078
|
{
|
|
1047
1079
|
return ( ! preg_match("/^([a-z])+$/i", $str)) ? FALSE : TRUE;
|
|
1048
1080
|
}
|
|
1049
|
-
|
|
1081
|
+
|
|
1050
1082
|
// --------------------------------------------------------------------
|
|
1051
|
-
|
|
1083
|
+
|
|
1052
1084
|
/**
|
|
1053
1085
|
* Alpha-numeric
|
|
1054
1086
|
*
|
|
1055
1087
|
* @access public
|
|
1056
1088
|
* @param string
|
|
1057
1089
|
* @return bool
|
|
1058
|
-
*/
|
|
1090
|
+
*/
|
|
1059
1091
|
function alpha_numeric($str)
|
|
1060
1092
|
{
|
|
1061
1093
|
return ( ! preg_match("/^([a-z0-9])+$/i", $str)) ? FALSE : TRUE;
|
|
1062
1094
|
}
|
|
1063
|
-
|
|
1095
|
+
|
|
1064
1096
|
// --------------------------------------------------------------------
|
|
1065
|
-
|
|
1097
|
+
|
|
1066
1098
|
/**
|
|
1067
1099
|
* Alpha-numeric with underscores and dashes
|
|
1068
1100
|
*
|
|
1069
1101
|
* @access public
|
|
1070
1102
|
* @param string
|
|
1071
1103
|
* @return bool
|
|
1072
|
-
*/
|
|
1104
|
+
*/
|
|
1073
1105
|
function alpha_dash($str)
|
|
1074
1106
|
{
|
|
1075
1107
|
return ( ! preg_match("/^([-a-z0-9_-])+$/i", $str)) ? FALSE : TRUE;
|
|
1076
1108
|
}
|
|
1077
|
-
|
|
1109
|
+
|
|
1078
1110
|
// --------------------------------------------------------------------
|
|
1079
|
-
|
|
1111
|
+
|
|
1080
1112
|
/**
|
|
1081
1113
|
* Numeric
|
|
1082
1114
|
*
|
|
1083
1115
|
* @access public
|
|
1084
1116
|
* @param string
|
|
1085
1117
|
* @return bool
|
|
1086
|
-
*/
|
|
1118
|
+
*/
|
|
1087
1119
|
function numeric($str)
|
|
1088
1120
|
{
|
|
1089
1121
|
return (bool)preg_match( '/^[\-+]?[0-9]*\.?[0-9]+$/', $str);
|
|
@@ -1092,72 +1124,72 @@ class CI_Form_validation {
|
|
|
1092
1124
|
|
|
1093
1125
|
// --------------------------------------------------------------------
|
|
1094
1126
|
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1127
|
+
/**
|
|
1128
|
+
* Is Numeric
|
|
1129
|
+
*
|
|
1130
|
+
* @access public
|
|
1131
|
+
* @param string
|
|
1132
|
+
* @return bool
|
|
1133
|
+
*/
|
|
1134
|
+
function is_numeric($str)
|
|
1135
|
+
{
|
|
1136
|
+
return ( ! is_numeric($str)) ? FALSE : TRUE;
|
|
1137
|
+
}
|
|
1106
1138
|
|
|
1107
1139
|
// --------------------------------------------------------------------
|
|
1108
|
-
|
|
1140
|
+
|
|
1109
1141
|
/**
|
|
1110
1142
|
* Integer
|
|
1111
1143
|
*
|
|
1112
1144
|
* @access public
|
|
1113
1145
|
* @param string
|
|
1114
1146
|
* @return bool
|
|
1115
|
-
*/
|
|
1147
|
+
*/
|
|
1116
1148
|
function integer($str)
|
|
1117
1149
|
{
|
|
1118
1150
|
return (bool)preg_match( '/^[\-+]?[0-9]+$/', $str);
|
|
1119
1151
|
}
|
|
1120
|
-
|
|
1152
|
+
|
|
1121
1153
|
// --------------------------------------------------------------------
|
|
1122
1154
|
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1155
|
+
/**
|
|
1156
|
+
* Is a Natural number (0,1,2,3, etc.)
|
|
1157
|
+
*
|
|
1158
|
+
* @access public
|
|
1159
|
+
* @param string
|
|
1160
|
+
* @return bool
|
|
1161
|
+
*/
|
|
1162
|
+
function is_natural($str)
|
|
1163
|
+
{
|
|
1164
|
+
return (bool)preg_match( '/^[0-9]+$/', $str);
|
|
1165
|
+
}
|
|
1134
1166
|
|
|
1135
1167
|
// --------------------------------------------------------------------
|
|
1136
1168
|
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1169
|
+
/**
|
|
1170
|
+
* Is a Natural number, but not a zero (1,2,3, etc.)
|
|
1171
|
+
*
|
|
1172
|
+
* @access public
|
|
1173
|
+
* @param string
|
|
1174
|
+
* @return bool
|
|
1175
|
+
*/
|
|
1144
1176
|
function is_natural_no_zero($str)
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1177
|
+
{
|
|
1178
|
+
if ( ! preg_match( '/^[0-9]+$/', $str))
|
|
1179
|
+
{
|
|
1180
|
+
return FALSE;
|
|
1181
|
+
}
|
|
1182
|
+
|
|
1183
|
+
if ($str == 0)
|
|
1184
|
+
{
|
|
1185
|
+
return FALSE;
|
|
1186
|
+
}
|
|
1187
|
+
|
|
1188
|
+
return TRUE;
|
|
1189
|
+
}
|
|
1190
|
+
|
|
1159
1191
|
// --------------------------------------------------------------------
|
|
1160
|
-
|
|
1192
|
+
|
|
1161
1193
|
/**
|
|
1162
1194
|
* Valid Base64
|
|
1163
1195
|
*
|
|
@@ -1172,9 +1204,9 @@ class CI_Form_validation {
|
|
|
1172
1204
|
{
|
|
1173
1205
|
return (bool) ! preg_match('/[^a-zA-Z0-9\/\+=]/', $str);
|
|
1174
1206
|
}
|
|
1175
|
-
|
|
1207
|
+
|
|
1176
1208
|
// --------------------------------------------------------------------
|
|
1177
|
-
|
|
1209
|
+
|
|
1178
1210
|
/**
|
|
1179
1211
|
* Prep data for form
|
|
1180
1212
|
*
|
|
@@ -1193,10 +1225,10 @@ class CI_Form_validation {
|
|
|
1193
1225
|
{
|
|
1194
1226
|
$data[$key] = $this->prep_for_form($val);
|
|
1195
1227
|
}
|
|
1196
|
-
|
|
1228
|
+
|
|
1197
1229
|
return $data;
|
|
1198
1230
|
}
|
|
1199
|
-
|
|
1231
|
+
|
|
1200
1232
|
if ($this->_safe_form_data == FALSE OR $data === '')
|
|
1201
1233
|
{
|
|
1202
1234
|
return $data;
|
|
@@ -1204,68 +1236,73 @@ class CI_Form_validation {
|
|
|
1204
1236
|
|
|
1205
1237
|
return str_replace(array("'", '"', '<', '>'), array("'", """, '<', '>'), stripslashes($data));
|
|
1206
1238
|
}
|
|
1207
|
-
|
|
1239
|
+
|
|
1208
1240
|
// --------------------------------------------------------------------
|
|
1209
|
-
|
|
1241
|
+
|
|
1210
1242
|
/**
|
|
1211
1243
|
* Prep URL
|
|
1212
1244
|
*
|
|
1213
1245
|
* @access public
|
|
1214
1246
|
* @param string
|
|
1215
1247
|
* @return string
|
|
1216
|
-
*/
|
|
1248
|
+
*/
|
|
1217
1249
|
function prep_url($str = '')
|
|
1218
1250
|
{
|
|
1219
1251
|
if ($str == 'http://' OR $str == '')
|
|
1220
1252
|
{
|
|
1221
1253
|
return '';
|
|
1222
1254
|
}
|
|
1223
|
-
|
|
1255
|
+
|
|
1224
1256
|
if (substr($str, 0, 7) != 'http://' && substr($str, 0, 8) != 'https://')
|
|
1225
1257
|
{
|
|
1226
1258
|
$str = 'http://'.$str;
|
|
1227
1259
|
}
|
|
1228
|
-
|
|
1260
|
+
|
|
1229
1261
|
return $str;
|
|
1230
1262
|
}
|
|
1231
|
-
|
|
1263
|
+
|
|
1232
1264
|
// --------------------------------------------------------------------
|
|
1233
|
-
|
|
1265
|
+
|
|
1234
1266
|
/**
|
|
1235
1267
|
* Strip Image Tags
|
|
1236
1268
|
*
|
|
1237
1269
|
* @access public
|
|
1238
1270
|
* @param string
|
|
1239
1271
|
* @return string
|
|
1240
|
-
*/
|
|
1272
|
+
*/
|
|
1241
1273
|
function strip_image_tags($str)
|
|
1242
1274
|
{
|
|
1243
1275
|
return $this->CI->input->strip_image_tags($str);
|
|
1244
1276
|
}
|
|
1245
|
-
|
|
1277
|
+
|
|
1246
1278
|
// --------------------------------------------------------------------
|
|
1247
|
-
|
|
1279
|
+
|
|
1248
1280
|
/**
|
|
1249
1281
|
* XSS Clean
|
|
1250
1282
|
*
|
|
1251
1283
|
* @access public
|
|
1252
1284
|
* @param string
|
|
1253
1285
|
* @return string
|
|
1254
|
-
*/
|
|
1286
|
+
*/
|
|
1255
1287
|
function xss_clean($str)
|
|
1256
1288
|
{
|
|
1257
|
-
|
|
1289
|
+
if ( ! isset($this->CI->security))
|
|
1290
|
+
{
|
|
1291
|
+
$this->CI->load->library('security');
|
|
1292
|
+
}
|
|
1293
|
+
|
|
1294
|
+
return $this->CI->security->xss_clean($str);
|
|
1258
1295
|
}
|
|
1259
|
-
|
|
1296
|
+
|
|
1260
1297
|
// --------------------------------------------------------------------
|
|
1261
|
-
|
|
1298
|
+
|
|
1262
1299
|
/**
|
|
1263
1300
|
* Convert PHP tags to entities
|
|
1264
1301
|
*
|
|
1265
1302
|
* @access public
|
|
1266
1303
|
* @param string
|
|
1267
1304
|
* @return string
|
|
1268
|
-
*/
|
|
1305
|
+
*/
|
|
1269
1306
|
function encode_php_tags($str)
|
|
1270
1307
|
{
|
|
1271
1308
|
return str_replace(array('<?php', '<?PHP', '<?', '?>'), array('<?php', '<?PHP', '<?', '?>'), $str);
|