[BUGFIX] MSSQL native driver for ADOdb returns erroneous message
[Packages/TYPO3.CMS.git] / typo3 / sysext / adodb / Documentation / typo3-adodb.diff
1 diff --git a/adodb.inc.php b/adodb.inc.php
2 index e9011e9..51d6313 100644
3 --- a/adodb.inc.php
4 +++ b/adodb.inc.php
5 @@ -2037,7 +2037,8 @@ if (!defined('_ADODB_LAYER')) {
6
7 function SetCharSet($charset)
8 {
9 - return false;
10 + $this->charSet = $charset;
11 + return TRUE;
12 }
13
14 function IfNull( $field, $ifNull )
15 diff --git a/datadict/datadict-access.inc.php b/datadict/datadict-access.inc.php
16 index 6a0a2cd..cabcab8 100644
17 --- a/datadict/datadict-access.inc.php
18 +++ b/datadict/datadict-access.inc.php
19 @@ -77,14 +77,14 @@ class ADODB2_access extends ADODB_DataDict {
20 {
21 }
22
23 - function AlterColumnSQL($tabname, $flds)
24 + function AlterColumnSQL($tabname, $flds, $tableflds='', $tableoptions='')
25 {
26 if ($this->debug) ADOConnection::outp("AlterColumnSQL not supported");
27 return array();
28 }
29
30
31 - function DropColumnSQL($tabname, $flds)
32 + function DropColumnSQL($tabname, $flds, $tableflds='', $tableoptions='')
33 {
34 if ($this->debug) ADOConnection::outp("DropColumnSQL not supported");
35 return array();
36 diff --git a/datadict/datadict-db2.inc.php b/datadict/datadict-db2.inc.php
37 index 5bbca1d..95a693f 100644
38 --- a/datadict/datadict-db2.inc.php
39 +++ b/datadict/datadict-db2.inc.php
40 @@ -58,14 +58,14 @@ class ADODB2_db2 extends ADODB_DataDict {
41 return $suffix;
42 }
43
44 - function AlterColumnSQL($tabname, $flds)
45 + function AlterColumnSQL($tabname, $flds, $tableflds='', $tableoptions='')
46 {
47 if ($this->debug) ADOConnection::outp("AlterColumnSQL not supported");
48 return array();
49 }
50
51
52 - function DropColumnSQL($tabname, $flds)
53 + function DropColumnSQL($tabname, $flds, $tableflds='', $tableoptions='')
54 {
55 if ($this->debug) ADOConnection::outp("DropColumnSQL not supported");
56 return array();
57 diff --git a/datadict/datadict-generic.inc.php b/datadict/datadict-generic.inc.php
58 index b3736f5..e6336da 100644
59 --- a/datadict/datadict-generic.inc.php
60 +++ b/datadict/datadict-generic.inc.php
61 @@ -49,14 +49,14 @@ class ADODB2_generic extends ADODB_DataDict {
62 }
63 }
64
65 - function AlterColumnSQL($tabname, $flds)
66 + function AlterColumnSQL($tabname, $flds, $tableflds='', $tableoptions='')
67 {
68 if ($this->debug) ADOConnection::outp("AlterColumnSQL not supported");
69 return array();
70 }
71
72
73 - function DropColumnSQL($tabname, $flds)
74 + function DropColumnSQL($tabname, $flds, $tableflds='', $tableoptions='')
75 {
76 if ($this->debug) ADOConnection::outp("DropColumnSQL not supported");
77 return array();
78 diff --git a/datadict/datadict-ibase.inc.php b/datadict/datadict-ibase.inc.php
79 index 13f028e..e08ae3c 100644
80 --- a/datadict/datadict-ibase.inc.php
81 +++ b/datadict/datadict-ibase.inc.php
82 @@ -49,14 +49,14 @@ class ADODB2_ibase extends ADODB_DataDict {
83 }
84 }
85
86 - function AlterColumnSQL($tabname, $flds)
87 + function AlterColumnSQL($tabname, $flds, $tableflds='', $tableoptions='')
88 {
89 if ($this->debug) ADOConnection::outp("AlterColumnSQL not supported");
90 return array();
91 }
92
93
94 - function DropColumnSQL($tabname, $flds)
95 + function DropColumnSQL($tabname, $flds, $tableflds='', $tableoptions='')
96 {
97 if ($this->debug) ADOConnection::outp("DropColumnSQL not supported");
98 return array();
99 diff --git a/datadict/datadict-informix.inc.php b/datadict/datadict-informix.inc.php
100 index 1bc6880..76c7585 100644
101 --- a/datadict/datadict-informix.inc.php
102 +++ b/datadict/datadict-informix.inc.php
103 @@ -49,14 +49,14 @@ class ADODB2_informix extends ADODB_DataDict {
104 }
105 }
106
107 - function AlterColumnSQL($tabname, $flds)
108 + function AlterColumnSQL($tabname, $flds, $tableflds='', $tableoptions='')
109 {
110 if ($this->debug) ADOConnection::outp("AlterColumnSQL not supported");
111 return array();
112 }
113
114
115 - function DropColumnSQL($tabname, $flds)
116 + function DropColumnSQL($tabname, $flds, $tableflds='', $tableoptions='')
117 {
118 if ($this->debug) ADOConnection::outp("DropColumnSQL not supported");
119 return array();
120 diff --git a/datadict/datadict-mssql.inc.php b/datadict/datadict-mssql.inc.php
121 index 6610fc4..3374ebd 100644
122 --- a/datadict/datadict-mssql.inc.php
123 +++ b/datadict/datadict-mssql.inc.php
124 @@ -137,7 +137,7 @@ class ADODB2_mssql extends ADODB_DataDict {
125 }
126 */
127
128 - function DropColumnSQL($tabname, $flds)
129 + function DropColumnSQL($tabname, $flds, $tableflds='', $tableoptions='')
130 {
131 $tabname = $this->TableName ($tabname);
132 if (!is_array($flds))
133 diff --git a/datadict/datadict-oci8.inc.php b/datadict/datadict-oci8.inc.php
134 index 0f03389..b8bd4cf 100644
135 --- a/datadict/datadict-oci8.inc.php
136 +++ b/datadict/datadict-oci8.inc.php
137 @@ -116,6 +116,7 @@ class ADODB2_oci8 extends ADODB_DataDict {
138
139 function AddColumnSQL($tabname, $flds)
140 {
141 + $tabname = $this->TableName ($tabname);
142 $f = array();
143 list($lines,$pkey) = $this->_GenFields($flds);
144 $s = "ALTER TABLE $tabname ADD (";
145 @@ -128,8 +129,9 @@ class ADODB2_oci8 extends ADODB_DataDict {
146 return $sql;
147 }
148
149 - function AlterColumnSQL($tabname, $flds)
150 + function AlterColumnSQL($tabname, $flds, $tableflds='', $tableoptions='')
151 {
152 + $tabname = $this->TableName ($tabname);
153 $f = array();
154 list($lines,$pkey) = $this->_GenFields($flds);
155 $s = "ALTER TABLE $tabname MODIFY(";
156 @@ -141,8 +143,9 @@ class ADODB2_oci8 extends ADODB_DataDict {
157 return $sql;
158 }
159
160 - function DropColumnSQL($tabname, $flds)
161 + function DropColumnSQL($tabname, $flds, $tableflds='', $tableoptions='')
162 {
163 + $tabname = $this->TableName ($tabname);
164 if (!is_array($flds)) $flds = explode(',',$flds);
165 foreach ($flds as $k => $v) $flds[$k] = $this->NameQuote($v);
166
167 diff --git a/datadict/datadict-sapdb.inc.php b/datadict/datadict-sapdb.inc.php
168 index aaa4820..8241b20 100644
169 --- a/datadict/datadict-sapdb.inc.php
170 +++ b/datadict/datadict-sapdb.inc.php
171 @@ -100,7 +100,7 @@ class ADODB2_sapdb extends ADODB_DataDict {
172 return array( 'ALTER TABLE ' . $tabname . ' ADD (' . implode(', ',$lines) . ')' );
173 }
174
175 - function AlterColumnSQL($tabname, $flds)
176 + function AlterColumnSQL($tabname, $flds, $tableflds='', $tableoptions='')
177 {
178 $tabname = $this->TableName ($tabname);
179 $sql = array();
180 @@ -108,7 +108,7 @@ class ADODB2_sapdb extends ADODB_DataDict {
181 return array( 'ALTER TABLE ' . $tabname . ' MODIFY (' . implode(', ',$lines) . ')' );
182 }
183
184 - function DropColumnSQL($tabname, $flds)
185 + function DropColumnSQL($tabname, $flds, $tableflds='', $tableoptions='')
186 {
187 $tabname = $this->TableName ($tabname);
188 if (!is_array($flds)) $flds = explode(',',$flds);
189 diff --git a/datadict/datadict-sqlite.inc.php b/datadict/datadict-sqlite.inc.php
190 index 81fb016..5ff76b9 100644
191 --- a/datadict/datadict-sqlite.inc.php
192 +++ b/datadict/datadict-sqlite.inc.php
193 @@ -67,13 +67,13 @@ class ADODB2_sqlite extends ADODB_DataDict {
194 return $suffix;
195 }
196
197 - function AlterColumnSQL($tabname, $flds)
198 + function AlterColumnSQL($tabname, $flds, $tableflds='', $tableoptions='')
199 {
200 if ($this->debug) ADOConnection::outp("AlterColumnSQL not supported natively by SQLite");
201 return array();
202 }
203
204 - function DropColumnSQL($tabname, $flds)
205 + function DropColumnSQL($tabname, $flds, $tableflds='', $tableoptions='')
206 {
207 if ($this->debug) ADOConnection::outp("DropColumnSQL not supported natively by SQLite");
208 return array();
209 diff --git a/drivers/adodb-mssqlnative.inc.php b/drivers/adodb-mssqlnative.inc.php
210 index b10d555..21cfc69 100644
211 --- a/drivers/adodb-mssqlnative.inc.php
212 +++ b/drivers/adodb-mssqlnative.inc.php
213 @@ -459,7 +459,7 @@ class ADODB_mssqlnative extends ADOConnection {
214 $this->_errorMsg .= "Message: ".$arrError[ 'message']."\n";
215 }
216 } else {
217 - $this->_errorMsg = "No errors found";
218 + $this->_errorMsg = '';
219 }
220 return $this->_errorMsg;
221 }