Changeset 1232
- Timestamp:
- 01/05/09 06:03:31 (2 years ago)
- Files:
-
- trunk/CHANGELOG.txt (modified) (1 diff)
- trunk/config/boot.php (modified) (1 diff)
- trunk/lib/AkActiveRecord/AkDbAdapters/AkMysqlDbAdapter.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/CHANGELOG.txt
r1205 r1232 1 [1232] Important: Data integrity issue on MySQL 2 3 Before rev.1232 MySQL on some setups, connections where opened using PHP's default 4 encoding latin1 this caused that UTF8 data written by Akelos could not be edited using other DB tools like phpMyAdmin 5 6 This change solves the issue for new applications, but existing applications can fix this by backing up your database 7 and following the steps at http://codesnippets.joyent.com/posts/show/84 before defining AK_SET_UTF8_ON_MYSQL_CONNECT on your configuration file. 8 1 9 [1205] Adding new configuration script to generate config.php and database.yml 2 10 trunk/config/boot.php
r357 r1232 21 21 defined('AK_LIB_DIR') ? null : define('AK_LIB_DIR',AK_FRAMEWORK_DIR.DS.'lib'); 22 22 23 /** 24 * Before rev.1232 MySQL on some setups, connections where opened using PHP's default 25 * encoding latin1 this caused that UTF8 data written by Akelos could not be edited using other DB tools. 26 * 27 * We can't automatically fix this for older applications as you might need to backup your database and follow the steps at 28 * http://codesnippets.joyent.com/posts/show/84 before defining AK_SET_UTF8_ON_MYSQL_CONNECT on your configuration file 29 * to fix this issue 30 */ 31 defined('AK_SET_UTF8_ON_MYSQL_CONNECT') ? null : define('AK_SET_UTF8_ON_MYSQL_CONNECT', true); 32 23 33 require_once(AK_LIB_DIR.DS.'constants.php'); 24 34 trunk/lib/AkActiveRecord/AkDbAdapters/AkMysqlDbAdapter.php
r647 r1232 81 81 } 82 82 83 function connect($die_on_error=true) 84 { 85 parent::connect($die_on_error); 86 if(defined('AK_SET_UTF8_ON_MYSQL_CONNECT') && AK_SET_UTF8_ON_MYSQL_CONNECT){ 87 isset($this->connection->_connectionID) && mysql_set_charset('utf8', $this->connection->_connectionID); 88 } 89 } 90 83 91 } 84 92 ?>
