mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-14 07:43:06 +00:00
Do not hardcode charset, honour charset defined in freetds.conf or php.ini.
This commit is contained in:
parent
9047a727d6
commit
ff61237356
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=151898
23
databases/php5-mssql/files/patch-php_mssql.c
Normal file
23
databases/php5-mssql/files/patch-php_mssql.c
Normal file
@ -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));
|
12
databases/php5-mssql/files/patch-php_mssql.h
Normal file
12
databases/php5-mssql/files/patch-php_mssql.h
Normal file
@ -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;
|
Loading…
Reference in New Issue
Block a user