| 1 |
report_errors() in retrieve_conf uses a mysql-specific function. |
|---|
| 2 |
Upstream bug: http://freepbx.org/trac/ticket/2772 |
|---|
| 3 |
|
|---|
| 4 |
@DPATCH@ |
|---|
| 5 |
diff -urNad freepbx-2.3.1~dfsg~/amp_conf/bin/retrieve_conf freepbx-2.3.1~dfsg/amp_conf/bin/retrieve_conf |
|---|
| 6 |
--- freepbx-2.3.1~dfsg~/amp_conf/bin/retrieve_conf 2007-10-22 18:56:52.000000000 +0200 |
|---|
| 7 |
+++ freepbx-2.3.1~dfsg/amp_conf/bin/retrieve_conf 2008-04-06 17:38:04.682430057 +0300 |
|---|
| 8 |
@@ -561,7 +561,18 @@ |
|---|
| 9 |
|
|---|
| 10 |
function report_errors($errno, $errstr, $errfile, $errline) { |
|---|
| 11 |
global $cp_errors; |
|---|
| 12 |
- freepbx_log('retrieve-conf', 'error', "php reported: '".mysql_real_escape_string($errstr)."' after copy or unlink attempt!"); |
|---|
| 13 |
+ switch($db_engine) { |
|---|
| 14 |
+ case "sqlite3": |
|---|
| 15 |
+ $escaped_string = sqlite_real_escape($errstr); |
|---|
| 16 |
+ break; |
|---|
| 17 |
+ case "mysql": |
|---|
| 18 |
+ $escaped_string = mysql_real_escape_string($errstr); |
|---|
| 19 |
+ break; |
|---|
| 20 |
+ case "pgsql": |
|---|
| 21 |
+ $escaped_string = pgsql_escape_string($errstr); |
|---|
| 22 |
+ break; |
|---|
| 23 |
+ } |
|---|
| 24 |
+ freepbx_log('retrieve-conf', 'error', "php reported: '$escaped_string' after copy or unlink attempt!"); |
|---|
| 25 |
$cp_errors .= $errstr."\n"; |
|---|
| 26 |
} |
|---|
| 27 |
|
|---|