diff options
-rw-r--r-- | backend.php | 6 | ||||
-rw-r--r-- | config.php-dist | 6 | ||||
-rw-r--r-- | locale/fr_FR/LC_MESSAGES/messages.mo | bin | 34319 -> 34319 bytes | |||
-rw-r--r-- | locale/fr_FR/LC_MESSAGES/messages.po | 6 | ||||
-rw-r--r-- | locale/ru_RU/LC_MESSAGES/messages.mo | bin | 25597 -> 25597 bytes | |||
-rw-r--r-- | locale/ru_RU/LC_MESSAGES/messages.po | 10 | ||||
-rw-r--r-- | locale/zh_CN/LC_MESSAGES/messages.mo | bin | 28248 -> 28248 bytes | |||
-rw-r--r-- | locale/zh_CN/LC_MESSAGES/messages.po | 6 | ||||
-rw-r--r-- | opml.php | 6 | ||||
-rw-r--r-- | sanity_check.php | 2 | ||||
-rw-r--r-- | update.php | 8 | ||||
-rw-r--r-- | update_daemon.php | 6 | ||||
-rw-r--r-- | update_feeds.php | 6 | ||||
-rw-r--r-- | xml-rpc.php | 6 |
14 files changed, 47 insertions, 21 deletions
diff --git a/backend.php b/backend.php index bbfa8ca23..4b749f9a9 100644 --- a/backend.php +++ b/backend.php @@ -50,8 +50,10 @@ pg_query("set client_encoding = 'UTF-8'"); pg_set_client_encoding("UNICODE"); } else { -// db_query($link, "SET NAMES utf8"); -// db_query($link, "SET CHARACTER SET utf8"); + if (defined('MYSQL_CHARSET') && MYSQL_CHARSET) { + db_query($link, "SET NAMES " . MYSQL_CHARSET); + db_query($link, "SET CHARACTER SET " . MYSQL_CHARSET); + } } $op = $_REQUEST["op"]; diff --git a/config.php-dist b/config.php-dist index 5c6d3c1c5..295a30d5b 100644 --- a/config.php-dist +++ b/config.php-dist @@ -146,7 +146,11 @@ // Enable experimental support for interface translations // based on PHP-Gettext. This is of no much use right now. - define('CONFIG_VERSION', 7); + define('MYSQL_CHARSET', ''); + // Connection charset for MySQL. Only enable if having charset-related + // errors with MySQL (mangled characters, errors when updating feeds, etc). + + define('CONFIG_VERSION', 8); // Expected config version. Please update this option in config.php // if necessary (after migrating all new options from this file). diff --git a/locale/fr_FR/LC_MESSAGES/messages.mo b/locale/fr_FR/LC_MESSAGES/messages.mo Binary files differindex 33767129e..4593e9ca7 100644 --- a/locale/fr_FR/LC_MESSAGES/messages.mo +++ b/locale/fr_FR/LC_MESSAGES/messages.mo diff --git a/locale/fr_FR/LC_MESSAGES/messages.po b/locale/fr_FR/LC_MESSAGES/messages.po index 50a23b2fe..0a2b8ebc2 100644 --- a/locale/fr_FR/LC_MESSAGES/messages.po +++ b/locale/fr_FR/LC_MESSAGES/messages.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: messages\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2007-08-21 18:35+0400\n" +"POT-Creation-Date: 2007-08-21 18:36+0400\n" "PO-Revision-Date: 2007-08-21 12:37+0200\n" "Last-Translator: Thibaut Cousin <[email protected]>\n" "Language-Team: Français <[email protected]>\n" @@ -1112,6 +1112,10 @@ msgstr "La base de données de Tiny Tiny RSS est à jour." msgid "Return to Tiny Tiny RSS" msgstr "Revenir à Tiny Tiny RSS" +#: update.php:109 +msgid "Please backup your database before proceeding." +msgstr "" + #: update.php:111 #, php-format msgid "" diff --git a/locale/ru_RU/LC_MESSAGES/messages.mo b/locale/ru_RU/LC_MESSAGES/messages.mo Binary files differindex 34ba903de..ad4d44d23 100644 --- a/locale/ru_RU/LC_MESSAGES/messages.mo +++ b/locale/ru_RU/LC_MESSAGES/messages.mo diff --git a/locale/ru_RU/LC_MESSAGES/messages.po b/locale/ru_RU/LC_MESSAGES/messages.po index c071ac468..037b2086f 100644 --- a/locale/ru_RU/LC_MESSAGES/messages.po +++ b/locale/ru_RU/LC_MESSAGES/messages.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: 1.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2007-08-21 18:35+0400\n" +"POT-Creation-Date: 2007-08-21 18:36+0400\n" "PO-Revision-Date: 2007-08-18 15:14+0400\n" "Last-Translator: Andrew Dolgov <[email protected]>\n" "Language-Team: Русский <[email protected]>\n" @@ -1051,6 +1051,11 @@ msgstr "" msgid "Return to Tiny Tiny RSS" msgstr "Вернуться к Tiny Tiny RSS" +#: update.php:109 +#, fuzzy +msgid "Please backup your database before proceeding." +msgstr "<b>Внимание:</b> Сохраните базу данных перед продолжением." + #: update.php:111 #, php-format msgid "" @@ -1723,9 +1728,6 @@ msgstr "Сбросить пароль" #~ msgid "Label search results" #~ msgstr "Результаты поиска" -#~ msgid "<b>Warning:</b> Please backup your database before proceeding." -#~ msgstr "<b>Внимание:</b> Сохраните базу данных перед продолжением." - #~ msgid "Help" #~ msgstr "Помощь" diff --git a/locale/zh_CN/LC_MESSAGES/messages.mo b/locale/zh_CN/LC_MESSAGES/messages.mo Binary files differindex deb8c8c1b..9eba09f77 100644 --- a/locale/zh_CN/LC_MESSAGES/messages.mo +++ b/locale/zh_CN/LC_MESSAGES/messages.mo diff --git a/locale/zh_CN/LC_MESSAGES/messages.po b/locale/zh_CN/LC_MESSAGES/messages.po index 3da01b695..f2573766d 100644 --- a/locale/zh_CN/LC_MESSAGES/messages.po +++ b/locale/zh_CN/LC_MESSAGES/messages.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: Tiny Tiny RSS1.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2007-08-21 18:35+0400\n" +"POT-Creation-Date: 2007-08-21 18:36+0400\n" "PO-Revision-Date: 2007-08-19 19:03+0800\n" "Last-Translator: sluke <[email protected]>\n" "Language-Team: hicode.org <[email protected]>\n" @@ -1058,6 +1058,10 @@ msgstr "Tiny Tiny RSS 数据库是最新版。" msgid "Return to Tiny Tiny RSS" msgstr "返回Tiny Tiny RSS" +#: update.php:109 +msgid "Please backup your database before proceeding." +msgstr "" + #: update.php:111 #, php-format msgid "" @@ -14,8 +14,10 @@ pg_query($link, "set client_encoding = 'utf-8'"); pg_set_client_encoding("UNICODE"); } else { -// db_query($link, "SET NAMES utf8"); -// db_query($link, "SET CHARACTER SET utf8"); + if (defined('MYSQL_CHARSET') && MYSQL_CHARSET) { + db_query($link, "SET NAMES " . MYSQL_CHARSET); + db_query($link, "SET CHARACTER SET " . MYSQL_CHARSET); + } } login_sequence($link); diff --git a/sanity_check.php b/sanity_check.php index b1c145d2b..7d41ea73a 100644 --- a/sanity_check.php +++ b/sanity_check.php @@ -1,7 +1,7 @@ <?php require_once "functions.php"; - define('EXPECTED_CONFIG_VERSION', 7); + define('EXPECTED_CONFIG_VERSION', 8); define('SCHEMA_VERSION', 20); if (!file_exists("config.php")) { diff --git a/update.php b/update.php index e74e3e8ff..f05fefcce 100644 --- a/update.php +++ b/update.php @@ -14,8 +14,10 @@ pg_query($link, "set client_encoding = 'utf-8'"); pg_set_client_encoding("UNICODE"); } else { -// db_query($link, "SET NAMES utf8"); -// db_query($link, "SET CHARACTER SET utf8"); + if (defined('MYSQL_CHARSET') && MYSQL_CHARSET) { + db_query($link, "SET NAMES " . MYSQL_CHARSET); + db_query($link, "SET CHARACTER SET " . MYSQL_CHARSET); + } } login_sequence($link); @@ -106,7 +108,7 @@ function confirmOP() { } if (!$op) { - print_warning("Please backup your database before proceeding."); + print_warning(__("Please backup your database before proceeding.")); print "<p>" . T_sprintf("Your Tiny Tiny RSS database needs update to the latest version (<b>%d</b> to <b>%d</b>).", $version, $latest_version) . "</p>"; diff --git a/update_daemon.php b/update_daemon.php index c2738e48b..e7f1f4016 100644 --- a/update_daemon.php +++ b/update_daemon.php @@ -66,8 +66,10 @@ pg_query("set client_encoding = 'utf-8'"); pg_set_client_encoding("UNICODE"); } else { -// db_query($link, "SET NAMES utf8"); -// db_query($link, "SET CHARACTER SET utf8"); + if (defined('MYSQL_CHARSET') && MYSQL_CHARSET) { + db_query($link, "SET NAMES " . MYSQL_CHARSET); + db_query($link, "SET CHARACTER SET " . MYSQL_CHARSET); + } } $last_purge = 0; diff --git a/update_feeds.php b/update_feeds.php index 2fd74ef16..9a1b8f43d 100644 --- a/update_feeds.php +++ b/update_feeds.php @@ -27,8 +27,10 @@ pg_query("set client_encoding = 'utf-8'"); pg_set_client_encoding("UNICODE"); } else { -// db_query($link, "SET NAMES utf8"); -// db_query($link, "SET CHARACTER SET utf8"); + if (defined('MYSQL_CHARSET') && MYSQL_CHARSET) { + db_query($link, "SET NAMES " . MYSQL_CHARSET); + db_query($link, "SET CHARACTER SET " . MYSQL_CHARSET); + } } $result = db_query($link, "SELECT id FROM ttrss_users"); diff --git a/xml-rpc.php b/xml-rpc.php index 21237f6c1..affb09d0e 100644 --- a/xml-rpc.php +++ b/xml-rpc.php @@ -23,8 +23,10 @@ pg_query("set client_encoding = 'utf-8'"); pg_set_client_encoding("UNICODE"); } else { -// db_query($link, "SET NAMES utf8"); -// db_query($link, "SET CHARACTER SET utf8"); + if (defined('MYSQL_CHARSET') && MYSQL_CHARSET) { + db_query($link, "SET NAMES " . MYSQL_CHARSET); + db_query($link, "SET CHARACTER SET " . MYSQL_CHARSET); + } } function getVirtualFeeds($msg) { |