^Status|Draft| ====== 2.0 to 2.1 Upgrading ====== There are a number of changes to the main '''index.php''' file and the '''config.php''' system file. The quickest way to upgrade is make a backup of your '''index.php''' and your application '''config.php''' file. Call the backups file_name_version.of.Kohana. e.g. index.php_2.0. You could consider naming your system folder with the version number: '''system_2.1.1''' rather than copying the new one over the top. You can then simply revert to a previous version if there are any issues. Install the new '''index.php''' and '''application/config.php''' files, and update any values in them to reflect the changes you made in your original files. The '''$kohana_system''' should point to the new versioned system folder. Then continue with the changes in other files (if needed) stated below. This method is more reliable than making incremental changes to existing files based on a list - and you can simple swap back to the old version if things go wrong. ===== Configuration ===== * Changes to config/config.php: * ''display_errors'' has been added. * ''output_compression'' has been added. * ''include_paths'' has been renamed to ''modules''. * ''autoload'' has been renamed to ''preload''. * Changes to config/session.php: * ''name'' should only contain alphanumeric characters with at least one letter. * ''gc_probability'' has been added. * Changes to config/database.php: * ''show_errors'' has been removed. ===== Helpers ===== * Helpers must be renamed from ''helper_name'' to ''helper_name_Core'' if they need to be extended. * The parameter to add ''index.php'' from the URL in html helpers now defaults to false, it needs to be specified as TRUE if you require it. ===== Validation ===== * trim, md5, sha1 Validation rules must now be preceded by = (e.g. '=trim'). * Validation rule 'regex' must now specify the delimiter. ===== Database ===== * ''join($table, $cond, $type)'' has changed to ''join($table, $key, $value, $type)''. * ''$query->num_rows()'' has been removed. Use ''count(query)'' instead. ===== Deprecated stuff ===== * Use ''http_build_query()'' instead of ''html::query_string()''. * Use ''$this->pagination->sql_offset'' instead of ''$this->pagination->sql_offset()''. * Use ''$this->pagination->sql_limit'' instead of ''$this->pagination->sql_limit()''.