diff options
author | ale <ale@FreeBSD.org> | 2005-12-23 15:02:12 +0800 |
---|---|---|
committer | ale <ale@FreeBSD.org> | 2005-12-23 15:02:12 +0800 |
commit | a5443bba50cc849d7e50c29b28aa498478049cc1 (patch) | |
tree | 04b4ad9bcc0896d6fb682a7d1305ee14a8d8ec59 /databases/php5-mssql | |
parent | e2fbf4ac3a00f3a8979e099818689d7a9727fe51 (diff) | |
download | freebsd-ports-gnome-a5443bba50cc849d7e50c29b28aa498478049cc1.tar.gz freebsd-ports-gnome-a5443bba50cc849d7e50c29b28aa498478049cc1.tar.zst freebsd-ports-gnome-a5443bba50cc849d7e50c29b28aa498478049cc1.zip |
Do not hardcode charset, honour charset defined in freetds.conf or php.ini.
Diffstat (limited to 'databases/php5-mssql')
-rw-r--r-- | databases/php5-mssql/files/patch-php_mssql.c | 23 | ||||
-rw-r--r-- | databases/php5-mssql/files/patch-php_mssql.h | 12 |
2 files changed, 35 insertions, 0 deletions
diff --git a/databases/php5-mssql/files/patch-php_mssql.c b/databases/php5-mssql/files/patch-php_mssql.c new file mode 100644 index 000000000000..73eaa6a30057 --- /dev/null +++ b/databases/php5-mssql/files/patch-php_mssql.c @@ -0,0 +1,23 @@ +--- php_mssql.c 2005/12/06 18:47:14 1.152.2.10 ++++ php_mssql.c 2005/12/21 22:43:06 1.152.2.11 +@@ -141,6 +141,9 @@ + STD_PHP_INI_BOOLEAN("mssql.datetimeconvert", "1", PHP_INI_ALL, OnUpdateBool, datetimeconvert, zend_mssql_globals, mssql_globals) + STD_PHP_INI_BOOLEAN("mssql.secure_connection", "0", PHP_INI_SYSTEM, OnUpdateBool, secure_connection, zend_mssql_globals, mssql_globals) + STD_PHP_INI_ENTRY_EX("mssql.max_procs", "-1", PHP_INI_ALL, OnUpdateLong, max_procs, zend_mssql_globals, mssql_globals, display_link_numbers) ++#ifdef HAVE_FREETDS ++ STD_PHP_INI_ENTRY("mssql.charset", "", PHP_INI_ALL, OnUpdateString, charset, zend_mssql_globals, mssql_globals) ++#endif + PHP_INI_END() + + /* error handler */ +@@ -495,7 +498,9 @@ + #endif + + #ifdef HAVE_FREETDS +- DBSETLCHARSET(mssql.login, "ISO-8859-1"); ++ if (MS_SQL_G(charset) && strlen(MS_SQL_G(charset))) { ++ DBSETLCHARSET(mssql.login, MS_SQL_G(charset)); ++ } + #endif + + DBSETLAPP(mssql.login,MS_SQL_G(appname)); diff --git a/databases/php5-mssql/files/patch-php_mssql.h b/databases/php5-mssql/files/patch-php_mssql.h new file mode 100644 index 000000000000..d8aefeadb1a0 --- /dev/null +++ b/databases/php5-mssql/files/patch-php_mssql.h @@ -0,0 +1,12 @@ +--- php_mssql.h 2005/12/06 01:25:16 1.42.2.1 ++++ php_mssql.h 2005/12/21 22:43:06 1.42.2.2 +@@ -158,6 +158,9 @@ + zend_bool allow_persistent; + char *appname; + char *server_message; ++#ifdef HAVE_FREETDS ++ char *charset; ++#endif + long min_error_severity, min_message_severity; + long cfg_min_error_severity, cfg_min_message_severity; + long connect_timeout, timeout; |