diff options
Diffstat (limited to 'net-p2p/verlihub/files/db_charset.patch')
-rw-r--r-- | net-p2p/verlihub/files/db_charset.patch | 83 |
1 files changed, 0 insertions, 83 deletions
diff --git a/net-p2p/verlihub/files/db_charset.patch b/net-p2p/verlihub/files/db_charset.patch deleted file mode 100644 index eb54aec..0000000 --- a/net-p2p/verlihub/files/db_charset.patch +++ /dev/null @@ -1,83 +0,0 @@ -diff -Naur verlihub-orig/src/cdbconf.cpp verlihub/src/cdbconf.cpp ---- verlihub-orig/src/cdbconf.cpp 2008-10-18 18:43:43.000000000 +0400 -+++ verlihub/src/cdbconf.cpp 2008-10-18 18:43:09.000000000 +0400 -@@ -22,6 +22,7 @@ - Add("lang_name",lang_name,string("lang_en")); - Add("allow_exec",allow_exec, false); - Add("allow_exec_mod",allow_exec_mod, true); -+ Add("db_charset",db_charset,string("utf8")); - Load(); - } - -diff -Naur verlihub-orig/src/cdbconf.h verlihub/src/cdbconf.h ---- verlihub-orig/src/cdbconf.h 2008-10-18 18:43:43.000000000 +0400 -+++ verlihub/src/cdbconf.h 2008-10-18 18:43:09.000000000 +0400 -@@ -31,6 +31,7 @@ - string db_user; - string db_pass; - string db_data; -+ string db_charset; - string config_name; - string lang_name; - bool allow_exec; -diff -Naur verlihub-orig/src/cmysql.cpp verlihub/src/cmysql.cpp ---- verlihub-orig/src/cmysql.cpp 2008-10-18 18:43:43.000000000 +0400 -+++ verlihub/src/cmysql.cpp 2008-10-18 18:43:09.000000000 +0400 -@@ -19,10 +19,10 @@ - /*! - \fn nMySQL::cMySQL::cMySQL(string&host,string&user,string&pass,string&data) - */ --cMySQL::cMySQL(string&host,string&user,string&pass,string&data) : cObj("cMySQL") -+cMySQL::cMySQL(string&host,string&user,string&pass,string&data,string&charset) : cObj("cMySQL") - { - Init(); -- if(!Connect(host,user,pass,data)) -+ if(!Connect(host,user,pass,data,charset)) - { - throw "Mysql connection error."; - } -@@ -40,12 +40,13 @@ - if(!mDBHandle) Error(0, string("Can't init mysql structure :(.: ")); - } - --bool cMySQL::Connect(string &host, string &user, string &pass, string &data) -+bool cMySQL::Connect(string &host, string &user, string &pass, string &data, string &charset) - { - if(Log(1)) LogStream() << "Connecting to mysql server: " -- << user << "@" << host << "/" << data << endl; -+ << user << "@" << host << "/" << data << "with charset " << charset << endl; - - mysql_options(mDBHandle,MYSQL_OPT_COMPRESS,0); -+ mysql_options(mDBHandle,MYSQL_SET_CHARSET_NAME,charset.c_str()); - - if(!mysql_real_connect( - mDBHandle, -diff -Naur verlihub-orig/src/cmysql.h verlihub/src/cmysql.h ---- verlihub-orig/src/cmysql.h 2008-10-18 18:43:43.000000000 +0400 -+++ verlihub/src/cmysql.h 2008-10-18 18:43:09.000000000 +0400 -@@ -34,10 +34,10 @@ - friend class cQuery; - public: - cMySQL(); -- cMySQL(string&host,string&user,string&pass,string&data); -+ cMySQL(string&host,string&user,string&pass,string&data,string&charset); - ~cMySQL(); - void Init(); -- bool Connect(string &host, string &user, string &passwd, string &db); -+ bool Connect(string &host, string &user, string &passwd, string &db, string &charset); - public: void Error(int level, string text); - - private: -diff -Naur verlihub-orig/src/cserverdc.cpp verlihub/src/cserverdc.cpp ---- verlihub-orig/src/cserverdc.cpp 2008-10-18 18:43:43.000000000 +0400 -+++ verlihub/src/cserverdc.cpp 2008-10-18 18:43:09.000000000 +0400 -@@ -72,7 +72,8 @@ - mDBConf.db_host, - mDBConf.db_user, - mDBConf.db_pass, -- mDBConf.db_data), // connect to mysql -+ mDBConf.db_data, -+ mDBConf.db_charset), // connect to mysql - mC(*this), // create the config object - mL(*this), - mSetupList(mMySQL), |