From 8df3db566a3a937b45ebf11adb90d265e6f5e2d4 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Sun, 17 Nov 2019 20:45:02 +0100 Subject: initial checking of customized version 1.0rc9 --- vendor/adodb/adodb-php/rsfilter.inc.php | 62 +++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 vendor/adodb/adodb-php/rsfilter.inc.php (limited to 'vendor/adodb/adodb-php/rsfilter.inc.php') diff --git a/vendor/adodb/adodb-php/rsfilter.inc.php b/vendor/adodb/adodb-php/rsfilter.inc.php new file mode 100644 index 0000000..d877c83 --- /dev/null +++ b/vendor/adodb/adodb-php/rsfilter.inc.php @@ -0,0 +1,62 @@ + $v) { + $arr[$k] = ucwords($v); + } + } + $rs = RSFilter($rs,'do_ucwords'); + */ +function RSFilter($rs,$fn) +{ + if ($rs->databaseType != 'array') { + if (!$rs->connection) return false; + + $rs = $rs->connection->_rs2rs($rs); + } + $rows = $rs->RecordCount(); + for ($i=0; $i < $rows; $i++) { + if (is_array ($fn)) { + $obj = $fn[0]; + $method = $fn[1]; + $obj->$method ($rs->_array[$i],$rs); + } else { + $fn($rs->_array[$i],$rs); + } + + } + if (!$rs->EOF) { + $rs->_currentRow = 0; + $rs->fields = $rs->_array[0]; + } + + return $rs; +} -- cgit v1.2.3-54-g00ecf