Fix, config master base style/js, fix DB\IO num rows

DB\IO dbReturn also sets internal num_rows, num_fields, field_names so
the normal dbGet* calls can be used after dbReturn call

JAVASCRIPT/STYLESHEET in config.master is now override able from .env
file. Others will follow
This commit is contained in:
Clemens Schwaighofer
2022-03-22 20:11:13 +09:00
parent 023ab6811d
commit b7f594e683
5 changed files with 13 additions and 6 deletions

View File

@@ -1786,9 +1786,12 @@ class IO
// count the rows returned (if select)
$this->cursor_ext[$query_hash]['num_rows'] =
$this->db_functions->__dbNumRows($this->cursor_ext[$query_hash]['cursor']);
// also set last return
$this->num_rows = $this->cursor_ext[$query_hash]['num_rows'];
// count the fields
$this->cursor_ext[$query_hash]['num_fields'] =
$this->db_functions->__dbNumFields($this->cursor_ext[$query_hash]['cursor']);
$this->num_fields = $this->cursor_ext[$query_hash]['num_fields'];
// set field names
$this->cursor_ext[$query_hash]['field_names'] = [];
for ($i = 0; $i < $this->cursor_ext[$query_hash]['num_fields']; $i++) {
@@ -1798,6 +1801,7 @@ class IO
$i
);
}
$this->field_names = $this->cursor_ext[$query_hash]['field_names'];
// reset first call vars
$this->cursor_ext[$query_hash]['firstcall'] = 0;
// reset the internal pos counter